Text area value is not passed to php script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • harikca
    New Member
    • May 2006
    • 1

    Text area value is not passed to php script

    I have the following html code:
    <html>
    <head>
    <title> Node Entry</title>
    </head>

    <body>
    <form action="sqlconn ect.php" method="post">< table border="5">
    <tr> <td><textarea rows=3 cols=70 name="parent_no de"> </textarea></td> </tr>
    <tr> <td> <input type="text" name="Node" maxlength="2070 00" size="20700"> <br> </td> </tr>
    <tr> <td colspan="20"><i nput type="submit" value="Save"</td> </tr>
    </tabe>
    </form>
    </body>
    </html>

    ==The content of sqlconnect.php is as follows:

    <?php
    //phpinfo();

    @ $db = mysql_pconnect( 'localhost', '','');


    if (!$db){echo 'Error Could not connect to database';
    exit;
    }
    else
    echo 'connected to database';
    mysql_select_db ('law');
    //echo 'law';
    $query = 'show databases';
    // echo $query;
    $result = mysql_query($qu ery);
    echo $result;
    // $num_results=my sql_num_rows($r esult);
    // echo $num_result;

    mysql_select_db (‘law’);
    $NODE=$HTTP_POS T_VARS['parent_Node'];
    $NODE=AddSlashe s($NODE);
    $cnode=$HTTP_PO ST_VARS['Node'];
    $cnode=AddSlash es($cnode);
    $query = "insert into nodes values ('".$NODE."','" .$cnode."')";
    echo $query;
    $result = mysql_query($qu ery);
    echo $result;
    //if ($result) echo 'inserted' else echo not inserted;

    ?>

    ===
    After entering some text in to text area, is get nothing echoed from the parent_node. What is the problem??
    Any hellp in this matter is appreciated.
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    Originally posted by harikca
    [html]
    <textarea rows=3 cols=70 name="parent_no de"> </textarea>
    [/html]

    [php]
    $NODE=$HTTP_POS T_VARS['parent_Node'];
    [/php]
    You have a capitalisation mismatch in the identifier parent_node in the two lines above.

    Comment

    Working...