Problem in my php code
function connect()
{
$connector = mysql_connect("localhost","root","");
mysql_set_charset('utf8',$connector);
if($connector)
{
if(mysql_select_db("news",$connector))
return true;
return false;
}
return false;
}
if(connect())
{
$query="SELECT * FROM category";
$result=mysql_query($query);
if($result)
{
while($row=mysql_fetch_array($result,MYSQL_ASSOC) )
{
?> <li><a href=""><?php echo $row['catName']; ?></a></li>
<?php
}
}
}
my php version is 5.5.12 & use wamp server 2.5 My code tells me this:
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO & in php
What does that mean and how can I handle it?
"; } it dont worked !! – Hossein Bustanchi Dec 30 '15 at 08:05