SA-MP Forums Archive
Problem In Users Control Panel (UCP) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem In Users Control Panel (UCP) (/showthread.php?tid=623512)



Problem In Users Control Panel (UCP) - Speaker - 02.12.2016

When i login in the website with my in game name to see my stats in my localhost it shows me this error
Код:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [1045] Access denied for user 'port_2532'@'localhost' (using password: YES)' in C:\xampp\htdocs\UCP\koneksi.php:2 Stack trace: #0 C:\xampp\htdocs\UCP\koneksi.php(2): PDO->__construct('mysql:host=127....', 'port_2532', 'password') #1 C:\xampp\htdocs\UCP\check.php(3): include('C:\\xampp\\htdocs...') #2 {main} thrown in C:\xampp\htdocs\UCP\koneksi.php on line 2
Here is the koneksi.php file code
Код:
<?php
	$koneksi = new PDO("mysql:host=localhost;dbname=ccnr", "root", "");
	function go($location, $alert)
	{
		echo "<script>window.alert('".$alert."')</script>";
		echo "<meta http-equiv=\"refresh\" content=\"0;URL=".$location."\"><center>";
		return 1;
	}
I Am Putting The Correct Database Info But Not Working.


Re: Problem In Users Control Panel (UCP) - benjenden - 02.12.2016

<?php
$koneksi = new PDO("mysql:host=localhost;dbname=ccnr", "username", "password");
function go($location, $alert)
{
echo "<script>window.alert('".$alert."')</script>";
echo "<meta http-equiv=\"refresh\" content=\"0;URL=".$location."\"><center>";
return 1;
}

You need to change the bold/itil stuff to your database info