Alright here's the problem guys;
I did it with mysql_error() function
and guess what? no database selected
it's telling me for some reason.
Here's the tweeked version of my code:
<body>
<?php
if ($submit) {
// process form
$db = mysql_connect("shantadam");
mysql_select_db("quadriscan",$db);
$sql = "INSERT INTO employees (firstname,lastname,id,username,password) VALUES ('$firstname','$lastname','','$username','$password')";
$result = mysql_query($sql,$db)or die("Bad query: ".mysql_error());;
echo "Thank you! Information entered.\n";
} else{
// display form
?>
<form method="post" action="<?php echo $PHP_SELF?>">
First name:<input type="Text" name="firstname"><br>
Last name:<input type="Text" name="lastname"><br>
User Name:<input type="Text" name="username"><br>
Password:<input type="Text" name="password"><br>
<input type="Submit" name="submit" value="Enter information">
</form>
<?php
} // end if
?>
</body>
and here's the error message i get:
"Bad query: No Database Selected"
what about that!