Jump to content

Mafia Game Registration Code


MDizzleFresh

Recommended Posts

Hello everyone. I am in need of help. Below are parts of my script for my registration code. All I am getting is a mysql_error, and nothing is showing up after that. The URL to the site is www.mafiasyndicate.co.cc if you would like to register, and see what I am talking about.

 

Below are parts of the code, that I think may have cause the error:

 

Date, to show the start date of the users account

$today = date("F j, Y, g:i a");

 

Part where I changed the ereg to preg

if (preg_match('[^A-Za-z]', $reg_username)) {

$message="Your username can only contain letters.";

}elseif (!preg_match('[^A-Za-z]', $reg_username)) {

 

MySQL Stuff

mysql_query("INSERT INTO `users` ( `id` , `username` , `password` , `money` , `regged` ,`startdate` ,`email` , `location` , `homecity` ,`ip` , `r_ip`, `referal`)

VALUES ('', '$reg_username', '$reg_password', '500', '$time', '$today', '$email', '$location', '$location', '$ip', '$ip', '$referal2')") or die(mysql_error);

 

Those are the different parts, that I think may have caused the error. Please help me anyone, if you can.

 

Link to comment
https://forums.phpfreaks.com/topic/194453-mafia-game-registration-code/
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.