As far as I can read everithin' I think it's ok, but why don't U try another approach??
$conection= @mysql_connect($server,$user,$pass) or die("Error [0.0]: ". mysql_error()." <br>");
@mysql_select_db($database,$conection) or die("Error [0.1]: ". mysql_error());
$sql_ins = "INSERT INTO student4 VALUES ('', "zubair", "second", 500)";
mysql_query ($sql_ins) or die ("Error [1]: ".mysql_error ());
or
$sql_ins = "INSERT INTO student4 VALUES (, "zubair", "second", 500)";
mysql_query ($sql_ins) or die ("Error [1]: ".mysql_error ());
If the id field is auto_incremet & also PK you shouldn't force it to NULL it'll create inconsistent data, hope this could help
READ YA
|