Jump to content

Eroare UCP Register


SamiHQ

Recommended Posts

Salut, am urcat pe host un User Control Panel, care are si funcția de register, pentru înregistrarea contului In Game la un server de roleplay. Problema este următoarea, trec de intrebări, ajung la completarea datelor caracterului și când dau pe înregistrare îmi dă eroarea ”Your name must contain character _” deși numele avea ”_” .

Aici e site-ul cu înregistrarea: http://st-rp.com/register/part-1/

Vă las și eror_log și register.php, de acolo e problema.

[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[/CODE]


<?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>";
}


?>

 

Edited by SamiHQ
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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. For more details you can also review our Terms of Use and Privacy Policy.