jeudi 19 mai 2016

connecting wordpress to msyql

Hi I am using wordpress

and I am tring to write to wordpress that I create

however when I preivew the page it show the message: "No database selected"

attaching my code:

$GUID = 30; 
$ID = 40;
$db_host = "localhost";
$db_username = "barak160_04";
$db_password = "rpeddsnm1!";
$db_name = "barak160_ballaganSalsa";
$sql_connection = mysql_connect( $db_host, $db_username, $db_password) or die(mysql_error());
mysql_select_db($db_name);
mysql_query("INSERT INTO `Regestration_by_zcredit` (GUID, ID) VALUES      ('$GUID', '$ID')")
or die(mysql_error());  



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire