Two questions here, the first is whether the following error refers to the command exceeding 60 seconds or the whole page taking over 60 seconds to execute.
"Fatal error: Maximum execution time of 60 seconds exceeded in /***/panel.php on line 35"
The code is as follows.
<html>
<head>Text</head>
<body>
<?
$loggedin=0;
$dbusername="*****";
$dbpassword="*****";
$database="*****";
if (isset($_COOKIE['sINFO'])) {
$contents=$_COOKIE['sINFO'];
mysql_connect(localhost,$dbusername,$dbpassword);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT name, password FROM users";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
$i=0;
$cancelwhile=0;
while ($i<$num && $cancelwhile==0) {
$check=mysql_result($result,$i,"name");
$check.=mysql_result($result,$i,"password");
$check=md5($check);
if ($contents==$check) {
echo ("Welcome back ".mysql_result($result,$i,"name"));
$cancelwhile=1;
$loggedin=1;
}
$i++;
if ($i=$num && $cancelwhile==1) {echo ("You are not logged in.");}
}
}else{
echo ("You are not logged in.");
}
if (loggedin==1) {
echo ("<br>Select an option.");
}
?>
</body>
</html>
Line 35 is:
if ($contents==$check) {
Am I executing a command incorrectly, is my connection too slow, or is my code just taking too long to execute?