Looking for some help on web header coding.
| From: | Joshua Patterson | Date: | Thu, 26 Sep 2002 17:35:16 +0000 |
| Subject: | Looking for some help on web header coding. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-117752@lists.php.net to get a copy of this message | ||
I have been working to try and have flash MX use PHP to access a database
but have been having issues with retrieving the post values in php.
http://127.43.1.1/learning/checkpassword.php?password=somepassword&username=
MyUserName
<html>
<body>
<?php
//store header values to internal defined values.
$username = $HTTP_POST_VARS['username'];
$password = $HTTP_POST_VARS['password'];
//db_connect has been removed for security purposes.
mysql_select_db("test",$db);
$result = mysql_query("SELECT * FROM users WHERE username =
$username",$db);
$myrow = mysql_fetch_array($result);
if( md5($password) == $myrow['user_password'] )
echo "1";
else
echo "0";
//Trying to get some visibility on what is actually retrieved.
echo $password;
echo "\n\n\n";
echo $username;
echo "\n\n\n";
echo "end of the line";
?>
</body>
</html>
-----------------------------------------------------------
Initiative is what separates a genius from the rest of the pack...
-----------------------------------------------------------
This Quote has been brought to you in part by the Letter C.
For C is for cookie.