Jump to content

[SOLVED] help error


tom232

Recommended Posts

I entered this code into mysql (phpmyadmin) [code]CREATE TABLE users (
userid INT unsigned NOT NULL AUTO_INCREMENT primary key,
username char(16) not null,
password char(10) not null,
email char (20) not null
);

[/code]

but in my php code [code]// if ok, put in db
  $result = mysql_query("insert into user values
                        ('$username', sha1('$password'), '$email')");
  if (!$result)
    throw new Exception(mysql_error);

  return true;
}[/code]

i am getting an error saying "mysql_error". help please ???
Link to comment
https://forums.phpfreaks.com/topic/32718-solved-help-error/
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.