Rather than using forms to pass information to a script you should consider using sessions instead.
In any case if you are going to use forms instead of appending the information to the form action use the input type=hidden field. <input type="hidden" name="action" value="change"> This keeps your form action clean and it also allows you to cleanly use POST instead of GET. Jason On Sun, 2002-12-15 at 12:23, Lightfirst wrote: > I am using PHP and MySql and wanted to know if it possible to pass the value > inserted in a text box back to the page using PHP_SELF. Bellow is the > snipped of code. The part that is not working is &q=input. Any ideas? > > Thanks. > > > > while($query_data = mysql_fetch_array($result)) { > > $id = $query_data ["q_id"]; > > $q = $query_data ["question"]; > > $a = $query_data ["answer"]; > > echo "<TR>\n"; > > echo "<TD WIDTH=\"5%\" ALIGN=\"CENTER\">$id</TD>\n"; > > echo "<TD WIDTH=\"70%\" ALIGN=\"CENTER\">$q</TD>\n"; > > echo "<TD WIDTH=\"15%\" ALIGN=\"CENTER\"><input type=\"text\" > name=\"textfield\" value=$a></TD>\n"; > > echo "<TD WIDTH=\"10%\" ALIGN=\"CENTER\"> > > <form name=\"update\" method=\"post\" > action=\"$PHP_SELF?action=change&id=$id&q=input\"> > > <input type=\"submit\" name=\"input\" value=\"Update\"> > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php