Hey,
filename = first.php
$link = mysql_connect("localhost", "root", ""
mysql_select_db("slim"
<form method="POST" action="first.php">
<input type="text" name="name" size="20">
<input type="submit" value="save" name="save">
</form>
After I submitted the form I want to check the data in the form but in the same file (first.php) So I did:
if ($_POST["name"] = "name"
echo "correct";
This works if I submit the form. But the first time (when I load the page) I get the following error:
Notice: Undefined index: name in ...
So I think $_POST can only be used if I submit the page, so is there a way to check the value in a form without the $_POST function? The One And Only KryptoS
filename = first.php
$link = mysql_connect("localhost", "root", ""
mysql_select_db("slim"
<form method="POST" action="first.php">
<input type="text" name="name" size="20">
<input type="submit" value="save" name="save">
</form>
After I submitted the form I want to check the data in the form but in the same file (first.php) So I did:
if ($_POST["name"] = "name"
echo "correct";
This works if I submit the form. But the first time (when I load the page) I get the following error:
Notice: Undefined index: name in ...
So I think $_POST can only be used if I submit the page, so is there a way to check the value in a form without the $_POST function? The One And Only KryptoS