if (@$_GET['action'] == "Save")
if(@$_GET[idnum]==null || @$_GET[fname]==null || @$_GET[lname]==null||@$_GET[midin]==null||@$_GET[gender]==null||@$_GET[bdate]==null||@$_GET[course]==null||@$_GET[year]==null||@$_GET[address]==null||@$_GET[cnum]==null)
{
echo "<font size=5><center>Fill-Up First the Provided Information<br><button type=button onclick=history.back();>Back</button></center></font>";
}
else
{
@$result = mysql_query("insert into students
(idnum,fname,lname,midin,gender,bdate,course,year,address,cnum)
VALUES ('$_GET[idnum]','$_GET[fname]','$_GET[lname]','$_GET[midin]','$_GET[gender]','$_GET[bdate]','$_GET[course]','$_GET[year]','$_GET[address]',
'$_GET[cnum]')");
if(mysql_error())
{
echo "<font size=5><center>ID Number: $_GET[idnum]. Already Exist(it must be unique)<br><button type=button onclick=history.back();>Back</button></center></font>";
}
else
{
echo "<font size=5><center>Record Successfully Added<br><button type=button onclick=history.back();>Back</button></center></font>";
}
}
Dude could someone please make it a whole constraint a unique entry that will added on my sql database? just the fname/firstname and lname/lastname only. thanks in advance guys for someone who help. :D