0

My code is working fine for localhost but when i move it to 000webhost. mysql_connect() doesn't seem to work.

$con = mysql_connect("localhost","id3834617_root","password") or die('database not found');
$db = mysql_select_db('id3834617_db_code',$con);
$query = mysql_query("SELECT * from table_code WHERE Phone='$phone'");
xanadev
  • 713
  • 9
  • 24
  • 1
    Please, don't use the `mysql_*` functions. These functions are deprecated, and are removed in PHP 7. You should use (as soon as possible) [MySQLi](https://php.net/manual/en/book.mysqli.php) or [PDO](https://php.net/manual/en/book.pdo.php). What is the version of the PHP on the web hosting? – Syscall May 14 '18 at 16:56
  • try mysqli_connect OR check the PHPinfo to confirm the availability of module. – Rohit.007 May 14 '18 at 16:57

0 Answers0