Hi all, I have noticed that a few, not all, scripts seem to choke on Safari. Specifically PHP, when trying some loging in. I don't know why. I am a web designer and would like to make sure that all my scripts work with safari, however, I'm not even sure what is causing this.
I know that some versions of phpadmin choke. I also have a login for below that chokes.. what is the culprit?
I know that some versions of phpadmin choke. I also have a login for below that chokes.. what is the culprit?
PHP:
<?php
include("config.php");
if(isset($submit)) {
if($username == "") {
header("Location: login.php?error=1");
} elseif(empty($password)) {
header("Location: login.php?error=2");
} elseif ($language == "") {
header("Location: login.php?error=3");
} else {
$cnx = mysql_connect($mysqlhost, $mysqluser, $mysqlpass) or die("Cannot connect to database");
if(! mysql_select_db($mysqldbname)) {
print "<blockquote><font size=\"2\" face=\"Verdana\">Cannot Select Database<br>";
print mysql_error();
print "</font></blockquote>";
exit();
}
include("languages/" . $language . ".inc.php");
$cquery = mysql_query("SELECT * FROM " . $pre . "users " .
"WHERE Username='$username' AND Password='$password'");
if(!$cquery) {
print $l_query;
print mysql_error();
exit();
}
if(mysql_numrows($cquery) != 1) {
header("Location: login.php?error=" . urlencode($l_loginerror));
}
if(!setcookie("cusername", $username, time()+604800)) header("Location: login.php?error=" . urlencode($l_cookie_exist));
if(!setcookie("cpassword", $password, time()+604800)) header("Location: login.php?error=" . urlencode($l_cookie_exist));
if(!setcookie("clanguage", $language, time()+604800)) header("Location: login.php?error=" . urlencode($l_cookie_exist));
header("Location: index.php");
} #End if empty
} else {
include("files/g_header.php");
if($error == 1) {
echo "Empty Username!";
} elseif($error == 2) {
echo "Empty Password!";
} elseif($error == 3) {
echo "Empty Language";
} else {
echo $error;
}
?><br>
<br><CENTER>
<form action="<?php echo $PHP_SELF; ?>" name="login" method="get">
<table width="200" border="1" cellspacing="0" cellpadding="2" bordercolor="FF6633">
<TR><TD ALIGN="CENTER" BGCOLOR="FF6633"><CENTER><font face="Verdana"><B>LOG IN</B></font></CENTER></TD></TR>
<TR><TD>
<table width="200" border="0" cellspacing="2" cellpadding="2">
<tr>
<td><font face="Verdana" size="2">Username: </font></td>
<td>
<input type="text" name="username">
</td>
</tr>
<tr>
<td><font face="Verdana" size="2">Password: </font></td>
<td>
<input type="password" name="password">
</td>
</tr>
<tr>
<td><font face="Verdana" size="2">Language: </font></td>
<td>
<select name="language">
<option value="English">English</option>
<option value="French">French</option>
<option value="German">German</option>
<option value="Spanish">Spanish</option>
</select>
</td>
</tr>
<tr>
<td> </td>
<td>
<input type="submit" name="submit" value="Submit">
</td>
</tr>
</table>
</TD></TR></TABLE>
<br><br><br>
</form></CENTER>
<?php
include("files/g_footer.php");
} #End If Submitted
?>