M.O.S. Studios Posted December 25, 2008 Share Posted December 25, 2008 hey guys, here is the code i have programed require("../common/link.php"); $query="INSERT INTO `montrea1_howard`.`admin_users` (`name` ,`user` ,`pass` ,`email` ,`phone` ,`journalist` ,`level` ,`activated`) VALUES ('".stripslashes($name)."','".stripslashes($login)."','".stripslashes($pass)."','".stripslashes($email)."','".stripslashes($phone)."','".stripslashes($journalist)."','".stripslashes($level)."','".stripslashes($activated)."')"; if(!mysql_query($query)) { $message ="<br/><i>Error</i> User Not added, Please Contact webmaster"; } bassicly i would like to change the line: $message ="<br/><i>Error</i> User Not added, Please Contact webmaster"; so that $message is = to the error returned by the mysql database.. any one know that commande for that? thanks in advace!! Link to comment https://forums.phpfreaks.com/topic/138360-solved-returning-mysql-error-msgs/ Share on other sites More sharing options...
rhodesa Posted December 25, 2008 Share Posted December 25, 2008 $message = 'MySQL Error: '.mysql_error(); Link to comment https://forums.phpfreaks.com/topic/138360-solved-returning-mysql-error-msgs/#findComment-723454 Share on other sites More sharing options...
M.O.S. Studios Posted December 25, 2008 Author Share Posted December 25, 2008 works like a charm, thanks guys Link to comment https://forums.phpfreaks.com/topic/138360-solved-returning-mysql-error-msgs/#findComment-723455 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.