INSER INTO reg ( fname, lname, email, pwd, pv, ev, dob) VALUES ('hi','hello','hi@hello.com',md5(google),'0','1','19471010'); pv and ev are int rest are varchar
INSERT not INSER for starters or was that just a typo here? and quotes around the statemnet: "INSERT INTO reg ( fname, lname, email, pwd, pv, ev, dob) VALUES ('hi','hello','hi@hello.com',md5(google),'0','1','19471010')" ;
1. Remove space before fname 2. Check if there is enough place for data to come in ( for example, 5 char varchar field will not be able to handle 10 chars ). 3. Add md5(google) as a variable ( $md = md5(google) ) $md = md5(google); $query = "INSER INTO reg (fname, lname, email, pwd, pv, ev, dob) VALUES ('hi','hello','hi@hello.com','$md','0','1','19471010')"; mysql_query($query); PHP:
Try this. $query = "INSERT INTO reg ( fname, lname, email, pwd, pv, ev, dob) VALUES ('hi','hello','hi@hello.com',md5('google'),'0','1','19471010')"; // run it $runquery = mysql_query($query); PHP: I changed : - INSER INTO to INSERT INTO - md5(google) to md5('google') - Assigned the query into $query
thanks opps insert is typo error so is the space before fname and this is not a mistake in the original script i will surely take 'google' into account and reply