it seems as if register_globals option is turned off and therefore $submit
is not set.

hth
ilker


"James Meers" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
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>




-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to