UPGRADE FROM PHP 5 TO 7 WITH MySQL commands

Codes here !

Moderators: egami, macek, gesf

Post Reply
0157
New php-forum User
New php-forum User
Posts: 1
Joined: Mon Aug 10, 2020 2:44 am

Mon Aug 10, 2020 2:49 am

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());
User avatar
hyper
php-forum GURU
php-forum GURU
Posts: 1222
Joined: Mon Feb 22, 2016 5:52 pm

Mon Aug 10, 2020 9:38 am

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