note 23383 rejected from language.variables.predefined by jmcastagnetto
| From: | jmcastagnetto@php.net | Date: | Thu, 15 Aug 2002 22:18:21 +0000 |
| Subject: | note 23383 rejected from language.variables.predefined by jmcastagnetto | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-35098@lists.php.net to get a copy of this message | ||
Hi, Im learning PHP4 and I'm having a bit of trouble with variables from a form. Im aware of
the register_globals being off.
It gives me the error message: Undefined variable 'submit'. And when I declare it with
$submit=$_POST['submit']; it tells me undefined index submit. I've messed around
around with the php.ini file, I still cant get it to work. The code I've written is:
<?php
//if ($submit) {
if(isset($_POST['submit'])) {
// Connect to the database
$connId = @mysql_connect("localhost", "root", "");
if (!$connId) {
echo( "Unable to connect to the database!");
exit();
}
// Select the database
if (! @mysql_select_db("test") ) {
echo( "Unable to locate the database!");
exit();
}
?>
etc..............
Can anyone help???