Db_connection error

Dear

my code is given below

<?php ob_start(); $connect = mysql_connect("localhost","ycti","*****") or die(mysql_error()); $select = mysql_select_db("id5842809_ycti_dby547") or die(mysql_error()); error_reporting(0); ?>

showing error

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /storage/ssd3/809/5842809/public_html/includes/db_connect.php:3 Stack trace: #0 /storage/ssd3/809/5842809/public_html/index.php(2): include_once() #1 {main} thrown in /storage/ssd3/809/5842809/public_html/includes/db_connect.php on line 3

Downgrade your php version to 5.6
cPanel>Settings>General

1 Like

thank you sir,
last problem is solved but new error is showing

my code is given below

<?php ob_start(); $connect = mysql_connect("localhost","root","") or die(mysql_error()); $select = mysql_select_db("id5842809_ycti_dby547") or die(mysql_error()); error_reporting(0); ?>

error showing

Warning: mysql_connect(): ProxySQL Error: Access denied for user β€˜root’@β€˜2a02:4780:bad:f00d::4’ (using password: NO) in /storage/ssd3/809/5842809/public_html/includes/db_connect.php on line 3
ProxySQL Error: Access denied for user β€˜root’@β€˜2a02:4780:bad:f00d::4’ (using password: NO)

Use the credentials located in cPanel>Manage databases