I am coding a site for a client and I have never seen this before. My client decided to use Yahoo.com as his host and I have written my scripts on my local system and they worked perfect. The script is a simple login script that takes a username and password form a form and passes it back to itself thru the POST and then checks the 2 variables against the database info to see if they are correct. Here is the script
<?php
session_start();
if (isset($_SESSION['lpage'])){
$lpage = $_SESSION['lpage'].'.php';
}
else{
$lpage = 'cpanel.php';
}
if (isset($_SESSION['login'])){
header ("LOCATION: cpanel.php");
}
if (isset($_POST['user'])){
$user = $_POST['user'];
}
if (isset($_POST['password'])){
$password = md5($_POST['password']);
}
if((!$user == "") && (!$password == "")){
include 'config.inc.php';
include 'mconnect.php';
$sqlselect = mysql_query("SELECT * FROM users WHERE user = '$user' limit 1");
$row = mysql_fetch_array($sqlselect);
mysql_close($mconnect);
if ($row['password'] == $password){
$_SESSION['login'] = "true";
$_SESSION['user'] = $user;
$_SESSION['ip'] = $_SERVER['REMOTE_ADDR'];
$_SESSION['admin'] = $row['admin'];
$_SESSION['rank'] = $row['rank'];
header ("LOCATION: ". $lpage);
}
else{
$password = null;
$user = null;
$sqlselect = null;
$row = null;
echo "Was unable to login. Please check your password and username";
}
}
else{
echo "Please insert an username and a password";
}
?>
<form action="login.php" method="post"><table width="80%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Username:</td>
<td><input name="user" type="text" maxlength="15"></td>
</tr>
<tr>
<td>Password:</td>
<td><input name="password" type="password" maxlength="15"></td>
</tr>
<tr align="center">
<td colspan="2"><input type="submit" name="Submit" value="Login"></td>
</tr>
</table>
</form>
Now after inserting some Echo statemtns to see what is going on, I have noticed that if I use cafrow as the username and password as the password that the POST variables do not hold info, if I use cafrow and then random characters as the password then the POST variables hold a value, its weird, very odd. Basicly I am asking if anyone has used yahoo.com with a script like this. Its very odd, it only transfers certain input.
thanks for any help.