Mysql doesn’t save information
eca_ics said 1 year, 1 month ago:
Hi,
I have the following code:
$MySQLDatabaseName=’ecXXXX’;
$MySQLDatabaseLogin=’ecXXXX’;
$MySQLDatabasePassword=’ecxxxxxxxx’;
$HostServerName=’ecxxxxx.db.8221764.hostedresource.com’;
$linkdb=@mysql_connect($HostServerName,$MySQLDatabaseLogin,$MySQLDatabasePassword) or die(“Couldn’t connect to MySQL!”);
@mysql_select_db($MySQLDatabaseName,$linkdb) or die(“Error: “.mysql_error().’
Error No: ‘. mysql_errno());
AND
$query = “INSERT INTO authors (…..)
VALUES ( ……..)”;
if (@mysql_query($query)) {
print “Information saved successfully
“;
}
It’s working fine locally.But online, I get “Information saved successfully” but when I look into the database, it is empty.
What is wrong?
timb said 1 year, 1 month ago:
@eca_ics
You will want to first ensure that your connection string information is correct using the steps in this article:
Locating Your MySQL Database Connection Strings
If your settings are correct, please contact our Support Team to review your database in order to determine the cause.
Tim B
eca_ics said 1 year, 1 month ago:
@timb
I copied the connection string information from “MySQL Database Information” page.
I will contact the Support Team.
Thanks for your prompt reply.
4 min expected wait time