Got error without warning

Codes here !

Moderators: macek, egami, gesf

Post Reply
User avatar
sandeep605085
New php-forum User
New php-forum User
Posts: 44
Joined: Tue Feb 26, 2013 6:00 am
Location: Mindfire Solutions
Contact:

Re: Got error without warning

Post by sandeep605085 » Tue May 14, 2013 12:14 pm

Hi,

does your code able to connect to mysql?

try below code to get the error if any but you should not use this die function when you build your live site.

mysql_connect($server, $user, $pass) or die(mysql_error());
mysql_select_db($db) or die(mysql_error());

also try echoing the variable inside your if condition and try to run that echoed query directly from phpmyadmin to check query is correct.

$query = "INSERT INTO user(username, fullname, password, group, number) VALUES('$username', '$fullname', '$password1', '$group', '$number')";
echo $query;

Thanks,
Sandeep Agrawal
Mindfire Solutions.

Post Reply

Who is online

Users browsing this forum: vitelus and 1 guest