UCP Register problem
#1

Hello, I climbed to host a User Control Panel, which has the function register for Game account registration In a roleplay server . The problem is , pass questions , get to filling out the registration character and when I gives me the error " Your name must contain character _ " although the name have "_".


I leave and error_log and register.php , there 's the problem.

Код:
[19-Sep-2016 01:01:47 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 12
[19-Sep-2016 01:01:47 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 13
[19-Sep-2016 01:01:47 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 13
[19-Sep-2016 01:01:47 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 14
[19-Sep-2016 01:01:47 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 14
[19-Sep-2016 01:01:47 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 15
[19-Sep-2016 01:01:47 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 15
[19-Sep-2016 01:01:47 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 16
[19-Sep-2016 01:01:47 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 16
[19-Sep-2016 01:01:47 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 17
[19-Sep-2016 01:01:47 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 17
[19-Sep-2016 01:29:30 Europe/Bucharest] PHP Warning:  mysql_connect(): Host 'ns1.btstelecom.ro' is not allowed to connect to this MySQL server in /home/strpcom/public_html/register/part-4/register.php on line 3
[19-Sep-2016 01:29:30 Europe/Bucharest] PHP Warning:  mysql_select_db() expects parameter 2 to be resource, boolean given in /home/strpcom/public_html/register/part-4/register.php on line 4
[19-Sep-2016 01:29:30 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 6
[19-Sep-2016 01:29:30 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 6
[19-Sep-2016 01:29:30 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 7
[19-Sep-2016 01:29:30 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 7
[19-Sep-2016 01:29:30 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 8
[19-Sep-2016 01:29:30 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 8
[19-Sep-2016 01:29:30 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 9
[19-Sep-2016 01:29:30 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 9
[19-Sep-2016 01:29:30 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 10
[19-Sep-2016 01:29:30 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 10
[19-Sep-2016 01:29:30 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 11
[19-Sep-2016 01:29:30 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 11
[19-Sep-2016 01:29:30 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 12
[19-Sep-2016 01:29:30 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 12
[19-Sep-2016 01:29:30 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 13
[19-Sep-2016 01:29:30 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 13
[19-Sep-2016 01:29:30 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 14
[19-Sep-2016 01:29:30 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 14
[19-Sep-2016 01:29:30 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 15
[19-Sep-2016 01:29:30 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 15
[19-Sep-2016 01:29:30 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 16
[19-Sep-2016 01:29:30 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 16
[19-Sep-2016 01:29:30 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 17
[19-Sep-2016 01:29:30 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 17
[19-Sep-2016 08:57:31 Europe/Bucharest] PHP Warning:  mysql_connect(): Host 'ns1.btstelecom.ro' is not allowed to connect to this MySQL server in /home/strpcom/public_html/register/part-4/register.php on line 3
[19-Sep-2016 08:57:31 Europe/Bucharest] PHP Warning:  mysql_select_db() expects parameter 2 to be resource, boolean given in /home/strpcom/public_html/register/part-4/register.php on line 4
[19-Sep-2016 08:57:31 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 6
[19-Sep-2016 08:57:31 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 6
[19-Sep-2016 08:57:31 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 7
[19-Sep-2016 08:57:31 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 7
[19-Sep-2016 08:57:31 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 8
[19-Sep-2016 08:57:31 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 8
[19-Sep-2016 08:57:31 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 9
[19-Sep-2016 08:57:31 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 9
[19-Sep-2016 08:57:31 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 10
[19-Sep-2016 08:57:31 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 10
[19-Sep-2016 08:57:31 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 11
[19-Sep-2016 08:57:31 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 11
[19-Sep-2016 08:57:31 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 12
[19-Sep-2016 08:57:31 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 12
[19-Sep-2016 08:57:31 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 13
[19-Sep-2016 08:57:31 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 13
[19-Sep-2016 08:57:31 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 14
[19-Sep-2016 08:57:31 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 14
[19-Sep-2016 08:57:31 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 15
[19-Sep-2016 08:57:31 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 15
[19-Sep-2016 08:57:31 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 16
[19-Sep-2016 08:57:31 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 16
[19-Sep-2016 08:57:31 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /home/strpcom/public_html/register/part-4/register.php on line 17
[19-Sep-2016 08:57:31 Europe/Bucharest] PHP Warning:  mysql_real_escape_string(): A link to the server could not be established in /home/strpcom/public_html/register/part-4/register.php on line 17
register.php

Код:
<?php
    include("variables.php"); //Our handy dandy includes page! 
    $connection = mysql_connect($dbservername, $dbusername, $dbpassword);  //Connects to the server 
    mysql_select_db($zhoryx20000, $connection);  //Connects to the database 
	
	$username = mysql_real_escape_string($_POST['Username']);
	$password = mysql_real_escape_string($_POST['Password']);
	$sex1 = mysql_real_escape_string($_POST['Sex']);
	$age = mysql_real_escape_string($_POST['Age']);
	$origin1 = mysql_real_escape_string($_POST['Origin']);
	$email = mysql_real_escape_string($_POST['Email']);
	$Bio = mysql_real_escape_string($_POST['Bio']);
	$Rp = mysql_real_escape_string($_POST['Rp']);
	$Pg = mysql_real_escape_string($_POST['Pg']);
	$Mg = mysql_real_escape_string($_POST['Mg']);
	$Rk = mysql_real_escape_string($_POST['Rk']);
	$Rules = mysql_real_escape_string($_POST['Rules']);	
	
if(!isset($_POST['formVenire'])) 
{
  echo "Forgot to select something !";
}
	
if (preg_match('/[_]/', $username))
{
	
	if ($sex1 == "Male"){
	$sex = "1";   
   }
   else if ($sex1 == "male"){
	$sex = "1";   
   }
   else if ($sex1 == "man"){
	$sex = "1";   
   }
   else if ($sex1 == "Man"){
	$sex = "1";   
   }
   else if ($sex1 == "1"){
	$sex = "1";   
   }
   else if ($sex1 == "man"){
	$sex = "1";   
   }
   else if ($sex1 == "Man"){
	$sex = "1";   
   }
   else if ($sex1 == "Female"){
	$sex = "0";   
   }
   else if ($sex1 == "male"){
	$sex = "0";   
   }
   else if ($sex1 == "man"){
	$sex = "0";   
   }
   else if ($sex1 == "Man"){
	$sex = "0";   
   }
   else if ($sex1 == "0"){
	$sex = "0";   
   }
   else if ($sex1 == "female"){
	$sex = "0";   
   }
   else if ($sex1 == "female"){
	$sex = "0";   
   }
   if ($origin1 == "Negru"){
	$origin = "0";   
   }
   else if ($origin1 == "negru"){
	$origin = "0";   
   }
   else if ($origin1 == "Asiatica"){
	$origin = "1";   
   }
   else if ($origin1 == "asiatica"){
	$origin = "1";   
   }
	
		$nameexist = mysql_query("SELECT `Username`, `Level`, `Money`, `Email`, `Admin`, `Tester`, `Developer`, `Skin`, `V1`, `V2`, `V3`, `V4`, `V5`, `Banned` FROM `Accounts` WHERE `Username` = '$username'"); //Selects the users score and money from the database. 
    if(!mysql_num_rows($nameexist)) //If we could find the users data 
    { 
	mysql_query("INSERT INTO `Accounts` (`Username`, `Password`, `Level`, `Admin`, `Banned`, `Sex`, `Tutorial`, `Bank`, `Experience`, `Money`, `Skin`, `SpawnPoint`, `HouseKey`, `BizKey`, `LoadPosX`, `LoadPosY`, `LoadPosZ`, `LoadPosInt`, `LoadPosW`, `Crashed`, `V1`, `V2`, `V3`, `V4`, `V5`, `CarKey`, `Savings`, `Wanted`, `Cell`, `Gun0`, `Gun1`, `Gun2`, `Gun3`, `Gun4`, `Gun5`, `Gun6`, `Gun7`, `Gun8`, `Gun9`, `Gun10`, `Gun11`, `Gun12`, `GunAmmo0`, `GunAmmo1`, `GunAmmo2`, `GunAmmo3`, `GunAmmo4`, `GunAmmo5`, `GunAmmo6`, `GunAmmo7`, `GunAmmo8`, `GunAmmo9`, `GunAmmo10`, `GunAmmo11`, `GunAmmo12`, `Tester`, `Demerits`, `CarDupe`, `Fight`, `Walk`, `Talk`, `Crimes`, `Deaths`, `Arrested`, `Frequence`, `Radio`, `MaskID`, `Race`, `Job`, `JobAllow`, `Mask`, `Faction`, `Rank`, `Credit`, `PayCheck`, `PlayingHours`, `Jailed`, `JailTime`, `Garage`, `Cigarettes`, `BadgeNumber`, `Lighter`, `CarLic`, `FlyLic`, `WepLic`, `LifeLic`, `PhoneNumber`, `ListNumber`, `Materials`, `Products`, `ContractTime`, `WorkOn`, `HeadValue`, `WeedX`, `WeedY`, `WeedZ`, `WeedTimer`, `WeedPlant`, `Armour`, `Seeds`, `Weed`, `Ecstasy`, `Amphetamine`, `Cocaine`, `Heroin`, `note1`, `note1s`, `note2`, `note2s`, `note3`, `note3s`, `note4`, `note4s`, `note5`, `note5s`, `Social`, `Age`, `BMX`, `ConName1`, `ConNum1`, `ApartKey`, `Location`, `Donator`, `ConName2`, `ConNum2`, `MoneyConvert`, `PaydayTime`, `CarBill`, `HouseBill`, `BusinessBill`, `NormalMail`, `Developer`, `DieTwentyTimes`, `DieOneTime`, `DriveFast`, `FirstSmoke`, `FirstCar`, `FirstHouse`, `GreetJohn`, `Namelocked`, `Inv1`, `Inv1a`, `Inv2`, `Inv2a`, `Inv3`, `Inv3a`, `Inv4`, `Inv4a`, `Inv5`, `Inv5a`, `Inv6`, `Inv6a`, `Inv7`, `Inv7a`, `Inv8`, `Inv8a`, `Inv9`, `Inv9a`, `Inv10`, `Inv10a`, `Inv11`, `Inv11a`, `Online`, `LoadPos`, `Email`, `Accepted`) VALUES ('$username', '$password', '1', '0', '0', '$sex', '1', '0', '0', '1000', '299', '1', '0', '255', '1715.1136', '-1871.3253', '13.5665', '0', '0', '0', 'NONE', 'NONE', 'NONE', 'NONE', 'NONE', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '$origin', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '$age', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '$email', '1')");
	
	mysql_query("INSERT INTO `Register` (`Bio`, `Rp`, `Pg`, `Mg`, `Rk`, `Rules`) VALUES ('$Bio', '$Rp', '$Pg', '$Mg', '$Rk', '$Rules')");
	
	mysql_query("INSERT INTO `Activation` (`Username`, `Password`, `Bio`, `Rp`, `Pg`, `Mg`, `Rk`, `Rules`, `Email`, `Accepted`) VALUES ('$username', '$password','$Bio', '$Rp', '$Pg', '$Mg', '$Rk', '$Rules', '$email', '0')");
	
	echo "<p>The account was successfully registered , you can login now on the server and UCP .</p>"; 
    } 
    else 
    { 
	
       $array = mysql_fetch_array($nameexist, MYSQL_ASSOC); //Fetches our variables for us. 
       $name1 = $array['Username']; //Sets $score to the result in our database for the players score. 
	   
	   	echo "<p>Already there is an account named $name1.</p>";
	   
	}
}

else {
	echo "<p>Your name must contain character _</p>";
}


?>
Reply
#2

Wrong board, it's only for pawno scripting help i guess.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)