Re: no worky :|

From: Date: Thu, 03 Apr 2003 23:31:48 +0000
Subject: Re: no worky :|
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-142216@lists.php.net to get a copy of this message
ugh, just when you posted that I got it figured it out! I needed a hidden value like you said! <input type=\"hidden\" name=\"comment\" value=\"$_GET[comment]\"> Thanks! cheers, - Sebastian ----- Original Message ----- From: "Hugh Danaher" <hdanaher@earthlink.net> To: "Sebastian" <sebastian@dslr.net> Sent: Thursday, April 03, 2003 6:24 PM Subject: Re: [PHP] no worky :| | Where is the query getting the id from? | "<input type=hidden name=id value=$_POST[id]>" might be needed in your form. | hugh | ----- Original Message ----- | From: "Sebastian" <sebastian@dslr.net> | To: "php list" <php-general@lists.php.net> | Sent: Thursday, April 03, 2003 2:19 PM | Subject: [PHP] no worky :| | | | > Hello, | > | > This form is really giving me a fight. | > | > I am connected to the database, yet it won't submit, Is the form and | > $_POST's Okay? | > | > echo " | > <form name=\"sendform\" action=\"report.php\" method=\"post\"> | > reason: <br> | > <textarea name=\"reason\" cols=\"50\" rows=\"3\"></textarea> | > <br/><br/> | > <input type=\"submit\" name=\"report\" value=\"mark for moderation\"> | > </form>"; | > | > if($_POST[reason]) { | > $result = $db->sql("INSERT INTO comments (reported, reportedby, reason) | > VALUES ('1', '$username', '$_POST[reason]') WHERE id = '$id'"); | > | > if($result) { | > echo "<center>message sent to moderators.<br/><a | > href=\"$_SERVER[HTTP_REFERER]\">return to your previous | page</a>.</center>"; | > | > } | > } | > | > | > cheers, | > - Sebastian | > | > | > |

« previous php.general (#142216) next »