Fatal error: Call to undefined function mysql_connect() in C:\wamp\www\www\student_login.php on line 48
this is the error message i got when i try to run the created files on wamp local server page under project where is my root directory files. the error message showing below when i try run student login and i get same error message for al the files in root directory.
is it to do with my database or php code
please check the php code and let me know if there anything wrong or help me to solve this problem
thank you
Fatal error: Call to undefined function mysql_connect() in C:\wamp\www\www\student_login.php on line 48
<
?php
session_start();
?>
<html>
<head>
<title> Student login page </title>
<script language="JavaScript"><!--
function changeFrames(url1,url2) {
parent.options.location.href = url1;
parent.banner.location.href = url2;
}
//--></script>
</head>
<body>
<?php
$s_id = trim($_POST['s_id']);
$s_pwd = trim($_POST['s_pwd']);
$_SESSION[s_id] = $s_id;
// set up error list array
$errors = array();
// validate text input fields
if (empty($s_id) || empty($s_pwd))
{
$errors[] = "Enter the username and passwoed";
}
else
{
// select database and table
$db_name = "industrial_placement";
$table_name = "student";
$Link = mysql_connect("localhost","root","www"

;
$result = mysql_select_db($db_name,$Link);
$query = "select s_forename from $table_name where s_id = '$_POST[s_id]' AND s_pwd = '$_POST[s_pwd]'";
$result = mysql_query($query,$Link);
$row = mysql_fetch_array($result);
if(mysql_num_rows($result)==1){
echo "<script language=javascript> changeFrames('student_menu.htm', 'banner1.htm') </script>";
echo "<center><h3><font face=Geneva, Arial, Helvetica, sans-serif> $row[s_forename] </font></h3></center>";
echo "<hr><br>";
}else{
$errors[] ="Invalid Username or Password";
}
mysql_close($Link);
}
?>
<?php
if (count($errors) > 0) {
$num_errors = count($errors);
for ($i = 0; $i < $num_errors; $i++)
$login_errors=$errors[$i];
require("student_login.htm"

;
}
?>
</body>
</html>
kaan