Re: Form Problem
| From: | Ilker Cetinkaya | Date: | Thu, 06 Jun 2002 16:17:21 +0000 |
| Subject: | Re: Form Problem | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-14106@lists.php.net to get a copy of this message | ||
it seems as if register_globals option is turned off and therefore $submit
is not set.
hth
ilker
"James Meers" <jambo@venda.com> wrote in message
news:2BA3903C0E9C284F9AA18B2E123CF5ED1D1FEF@VENDAC01.uk.venda...
Hello,
I have this form and its just not picking up the submit
variable however it is posting them!!!
Can someone double check this, what have i done?
James
<html>
<body>
<?php
include("newsconf.php3");
while (list($name, $value) = each($HTTP_POST_VARS)) {
echo "$name = $value<br>\n";
}
if (isset($submit)) {
mysql_query("INSERT INTO $ntable VALUES
('','$title','$posted_by','$entry',NULL)");
print("$title<br>\n");
print("Posted by $posted_by<br>\n");
print("$entry\n");
}
else {
print("<form action=\"addnews.php3\" method=post>\n");
$result = mysql_query("select name from $ptable")
or die("Query broke!<br>\n");
print("Posted By : <SELECT name=\"posted_by\">\n");
while ($row = mysql_fetch_array($result)) {
$name=$row["name"];
print("<OPTION value=\"$name\">$name\n");
}
print("</SELECT><br>\n");
?>
Title : <input type="Text" name="title" size=50><br>
News :<br>
<textarea rows=20 cols=80 name="entry"></textarea>
<p>
<input type="Submit" value="submit" name="submit">
</form>
<?php
exit;
}
?>
</body>
</html>