hi... im trying to insert a row into the database...
but the query is not run successfully..
$sql = "INSERT INTO temp_db (fname,mname,lname,dob,gender,email,country,phno,mobile,userid,password,mti,rtime)
VALUES ('$fname','$mname','$lname','$dob','$gen','$mail','$country','$phno','$mob','$uid','$pass','$mt','$rtime')";
$res = mysql_query($sql) or die("cud not add record");
echo mysql_error();
this is the code..... im gettin the error from the Die part of the query..
need help....
CREATE TABLE IF NOT EXISTS `temp_db` (
`fname` varchar(30) NOT NULL,
`mname` varchar(30) NOT NULL,
`lname` varchar(30) NOT NULL,
`dob` date NOT NULL,
`gender` varchar(10) NOT NULL,
`email` varchar(40) NOT NULL,
`country` varchar(30) NOT NULL,
`phno` int(20) NOT NULL,
`mobile` int(20) NOT NULL,
`userid` varchar(30) NOT NULL,
`password` varchar(30) NOT NULL,
`mti` varchar(40) NOT NULL,
`rtime` date NOT NULL,
PRIMARY KEY (`userid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
this is the table im using...
help Plz...