PHP code that is deprecated
<p>Ok I am not a PHP boffin so I have taken an old website and restoring it slowly but surely. </p>

<pre><code>&lt;?php
$host="localhost"; // Host name 
$username="****"; // Mysql username 
$password="****"; // Mysql password 
$db_name="****"; // Database name 
$tbl_name="****"; // Table name 

// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
mysql_select_db("$db_name")or die("cannot select DB");

$result = mysql_query("SELECT * FROM lbs_ WHERE id&gt;0 ORDER BY date DESC LIMIT 0,15");
?&gt;
</code></pre>

<p>Connect to the server part is what concerns me I understand that it is deprecated and that i should use MySQLi ad or PDO</p>

<p>Question is do I just change the mysql_query to mysqli to alter this or do I need to change a lot of the other coding. I have read the <a href="http://php.net/mysql_query" rel="nofollow">http://php.net/mysql_query</a> but still not sure how to rectify this</p>
