cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I cant insert into nor update Mysl database

hi everyone,  I bought a hosting (Economic) plan from GoDaddy about a week ago but for some reasons I cant access my Mysql database to do the typical insert and update.

 

for example, my site www.yiuflix.com is a typical forum that means users will post topics and all but ever since i moved to goDaddy that is not just working again.

 

It works on my localhost...

 

I have granted priviledges to the user and i am using PDO

 

I am using  Cpanel hosting type.

 

What is wrong?

 

1 REPLY 1

Re: I cant insert into nor update Mysl database

Here is my Config.php setup

 

<?php
//MySQL user account.
define('MYSQL_USER', 'xxx');
 
//Our MySQL password.
define('MYSQL_PASSWORD', 'xxx');
 
//The server that MySQL is located on.
define('MYSQL_HOST', 'localhost');
 
//The name of our database.
define('MYSQL_DATABASE', 'ixxx');
 
/**
* PDO options / configuration details.
* I'm going to set the error mode to "Exceptions".
* I'm also going to turn off emulated prepared statements.
*/
$pdoOptions = array(
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_EMULATE_PREPARES => false
);
 
/**
* Connect to MySQL and instantiate the PDO object.
*/
$conn = new PDO(
"mysql:host=" . MYSQL_HOST . ";dbname=" . MYSQL_DATABASE, //DSN
MYSQL_USER, //Username
MYSQL_PASSWORD, //Password
$pdoOptions);
 
//The PDO object can now be used to query MySQL.
?>