Notice: Undefined index: teamname inc:\apache\cgi-bin\register.php on line 13
here is the code
Code:
#!c:/php/php.exe
<?php
$con = mysql_connect("localhost","student1","student1pw");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("uuj challange", $con);
$sql="INSERT INTO team (teamname, username, password, licencenum, surname, forename, contactnum, email, dateofbirth, housenum, streetname, city, county, postcode)
VALUES ('$_POST[teamname]','$_POST[username]','$_POST[password]','$_POST[licencenum]','$_POST[surname]','$_POST[forename]','$_POST[contactnum]','$_POST[email]','$_POST[dateofbirth]','$_POST[housenum]','$_POST[streetname]','$_POST[city]','$_POST[county]','$_POST[postcode]')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "You Have Successfully registered.";
echo "<p>";
echo "<a href=\"http://localhost/menu.html\"> Click here</a> to return to the main menu.";
mysql_close($con)
?>