Connecting to MySQL

in what situation can use the following code

[php]<?php
$link = mysql_connect(‘localhost’, ‘user’, ‘pass’);
mysql_select_db(‘testdb’, $link);
mysql_set_charset(‘UTF-8’, $link);[/php]

NEVER. It is obsolete, insecure and has been completely removed from PHP.

but what is new, and where I can watch them update

https://phpdelusions.net/pdo

Great link, I even found it informative…

10x all, I guess the codes are recorded .php ?

Sponsor our Newsletter | Privacy Policy | Terms of Service