note 23383 added to language.variables.predefined
| From: | marcx15 at hotmail dot com | Date: | Wed, 17 Jul 2002 08:40:00 +0000 |
| Subject: | note 23383 added to language.variables.predefined | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-33194@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???
--
http://www.php.net/manual/en/language.variables.predefined.php
http://master.php.net/manage/user-notes.php?action=edit+23383
http://master.php.net/manage/user-notes.php?action=delete+23383
http://master.php.net/manage/user-notes.php?action=reject+23383