paulman888888 Posted April 8, 2009 Share Posted April 8, 2009 Hi people, Heres the code $query="INSERT INTO `list_members` (`username`, `password`, `email`, `dob`, `userlevel`, `userable`) VALUES ('$username', '$password', '$email', '$dob', 1, 1)"; ///// end add user $rtytr=mysql_query($query); It should work but it doesn't. When i test it with if($sql=false){ die('Error Putting data in.');} It doesn't die or put the data in. Please Help Paul Link to comment https://forums.phpfreaks.com/topic/153133-solved-should-be-easy-but-not-php-mysql/ Share on other sites More sharing options...
sasa Posted April 8, 2009 Share Posted April 8, 2009 change line $rtytr=mysql_query($query); to $rtytr=mysql_query($query) or die(mysql_error()); part if($sql=false){ die('Error Putting data in.');} mean if(false){ die('Error Putting data in.');} never execute Link to comment https://forums.phpfreaks.com/topic/153133-solved-should-be-easy-but-not-php-mysql/#findComment-804358 Share on other sites More sharing options...
Yesideez Posted April 8, 2009 Share Posted April 8, 2009 Just for information. You have used this: ($sql=false You are assigning $sql the value of false which will always equate to false and it'll never die. Link to comment https://forums.phpfreaks.com/topic/153133-solved-should-be-easy-but-not-php-mysql/#findComment-804360 Share on other sites More sharing options...
paulman888888 Posted April 8, 2009 Author Share Posted April 8, 2009 thankyou I found out was wrong and now i fixed. Thanks again Paul Link to comment https://forums.phpfreaks.com/topic/153133-solved-should-be-easy-but-not-php-mysql/#findComment-804371 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.