UPGRADE FROM PHP 5 TO 7 WITH MySQL commands

Codes here !

Moderators: gesf, Michalio

Post Reply
0157

I had this php code on my webpage and the server do not support anymore PHP 5 and updated it to 7.
Can you help me to update these code.
Thanks

mysql_connect("external-db.xxxxxx.gridserver.com", "dbxxxxx”, “pw#”) or die(mysql_error());
mysql_select_db("dbxxxxx”) or die(mysql_error());
mysql_query(“insert into xxxxxx (FnameID, LnameID, '$CBnameID')") or die(mysql_error());
hyper

You need to learn PDO so that you can translate all of the database activities.

Do you really only open the database and insert into it?
Post Reply