Im doing a project based on students information. Im looking for the code to add the student details to alumini form when their period of course is completed(based on their date of completion). The below code is registeration of student information.
<?php
$link = mysql_connect('localhost','root','');
if(!$link) {
die('Failed to connect to server: ' . mysql_error());
}
$db = mysql_select_db(priya);
if(!$db) {
die("Unable to select database");
}
$sql = "INSERT INTO trade(id,name,tokenno,trade,dateofjoin,dateofcompletion,duration)VALUES('$_POST[id]','$_POST[name]','$_POST[token]','$_POST[trade]','$_POST[doj]','$_POST[doc]','$_POST[duration]')";
if (!mysql_query($sql,$link))
{
die('Error: ' . mysql_error());
}
echo "1 record added";
mysql_close($link)
?>