Jump to content

[SOLVED] returning mysql error msgs


M.O.S. Studios

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.