can not receive data from the page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • SeeMe
    New Member
    • Mar 2008
    • 18

    can not receive data from the page

    [php]<form name="form1" action="<? $_SERVER['PHP_SELF'];?>" method="post">
    <input type="submit" value="add" name="ram" onClick='window .open("data_add ed.php", "", "width=350, height=100, scrollbars=1"); cal("ram")'>
    <input type="hidden" name="popup" value="popup_" />
    function cal(i)
    {
    document.form1. popup.value = i;
    }
    </form>
    /*************** ******data_adde d.php********** *************** ***/
    <?
    $popup = trim($_REQUEST['popup']);
    //echo "popup = ".$popup;
    switch($popup)
    {
    case "ram": $tbl = "tbl_ram"; break;
    default: break;
    }
    if ($popup == "ram")
    {$title = "Ram";}

    if (trim($_REQUEST['btnEnter']) == "Add")
    {
    if (trim($_REQUEST['txtadd']) <> "")
    {
    $txtadd = trim($_REQUEST['txtadd']);
    $result = "SELECT * FROM ".$tbl;
    $query = "INSERT INTO ".$tbl." VALUES ('0','$txtadd') ";
    if (!$query)
    {echo die(mysql_error ());}
    }
    }
    ?>[/php]
    my coding can't show out in "data_added.php ". may i know what happened?
    thank you.
    Last edited by ronverdonk; May 7 '08, 12:44 PM. Reason: code within code tags!!
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    You don't give nearly enough information on the problem, nor do you follow forum rules.

    Please revise your post and i'll try and help.

    Comment

    • ronverdonk
      Recognized Expert Specialist
      • Jul 2006
      • 4259

      #3
      User keeps ignoring guidelines on using code tags. Has been warned 3 times. Banned for limited period.

      moderator

      Comment

      Working...