It is because the function can't be found and if your server is using a higher version of PHP then that is why:
This function has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0 (
read here).
Therefore you need to change your code to this (I have removed the storage of the password in a session as I can't think of anything less secure - there is just no need to do so and is totally unsafe):
- Code: Select all
<?php
session_start();
include('mysql.php');
.
.
.
.
.
// If result matched $myusername and $mypassword,table is 1 row
if($count==1){
$_SESSION['myusername'] = $myusername;
header("location:imageshow.php");
}
else {
echo "Wrong Username or Password";
}
?>
Make sure you have session_start(): at the very top of every page where you want to use / check your session data.