saving . . . saved I am not able to run the code.. has been deleted. I am not able to run the code.. has been hidden .
I am not able to run the code..
Title
Question
Fatal error<span style="color: rgb(0, 0, 0); font-family: &quot;Times New Roman&quot;; font-size: medium;">: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\connect.php:2 Stack trace: #0 C:\xampp\htdocs\mysql.php(2): require() #1 {main} thrown in </span>C:\xampp\htdocs\connect.php<span style="color: rgb(0, 0, 0); font-family: &quot;Times New Roman&quot;; font-size: medium;"> on line </span>2
<font color="#000000" face="Times New Roman" size="3">This keeps showing up..</font>
<font color="#000000" face="Times New Roman" size="3">what to do sir, or mam...</font>

PHP-and-MySQL MySQL-Part-2 04-05 min 0-10 sec 01-12-21, 8:59 a.m. devuttydevu10@gmail.com

Answers:

Dear User,

If you are using a newer version of PHP then it should give an error. Please use mysqli function instead of mysql function.
For example: 
<?php
$connect = mysqli_connect("localhost","root","") or die("Connection Failed!");
mysqli_select_db("$connect","phpacademy") or die(mysqli_error());
echo "Connected!<p>";
?>
05-01-22, 4:20 p.m. hbammkanti


Log-in to answer to this question.