im trying to send Value from one page to another using the method POST, where the name of the database is "firstdb" , and the table named as "TAB1". and here is my code:
the first page named as "addStud.php". the code is :
<html>
<body>
<form action= "addStud_D.php" method="POST">
<center>
<fieldset>
Last Name : <input type = 'text' name ='LName'>
</br> </br>
First Name : <input type = 'text' name = 'FName'>
</br></br>
Date of birth : <input type = 'text' name = 'dat'>
</br></br>
<input type='submit' value='OK'>
</fieldset>
</center>
</form>
</body >
</html>
The second page that receive data named as "addStud_D.php". the code is:
<html>
<body>
<?php
$V1 = $_POST['LName'];
$V2 = $_POST['FName'];
$V3 = $_POST['dat'];
$db=mysql_connect('127.0.0.1','root','','firstdb')
or die('error connecting to MySQL server.');
mysql_select_db('firstdb');
mysql_query("INSERT INTO `firstdb`.`TAB1` (`ID`, `Last_Name`, `First_Name`,`date`)
VALUES (NULL,'$V1','$V2', '$V3')");
?>
</body>
</html>
still. this method is not working and here is the error:
Notice: Undefined index: LName in D:\Computer Scince\Web\EasyPHP-5.3.3.1\www\APP04\addStud_D.php on line 6
Notice: Undefined index: FName in D:\Computer Scince\Web\EasyPHP-5.3.3.1\www\APP04\addStud_D.php on line 7
Notice: Undefined index: dat in D:\Computer Scince\Web\EasyPHP-5.3.3.1\www\APP04\addStud_D.php on line 8