Re: Looking for some help on web header coding.
| From: | Joshua Patterson | Date: | Fri, 27 Sep 2002 00:01:59 +0000 |
| Subject: | Re: Looking for some help on web header coding. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-117795@lists.php.net to get a copy of this message | ||
I did. That is how I came a crossed the $HTTP_POST_VARS['username']; in my
code. ( The tutorial for Flash MX to php can be found at
http://www.macromedia.com/desdev/mx/flash/articles/flashmx_php02.html
). If
you look at my code and their code sample you will see that I have not made
many changes from their sample and the only one truly is storing the vars to
a internal variable instead of using it directly in the sql script. I have
gotten it working by changing POST to GET as is used in Peter's sample but I
have to wonder if I am still missing something as I am unable to find any
documentation on this at http://php.org I came here.
-----------------------------------------------------------
Women and cats will do as they please and men and dogs should relax and
just get used to the idea.
-----------------------------------------------------------
This Quote has been brought to you in part by the Letter C.
For C is for cookie.
----- Original Message -----
From: "David Buerer" <david@pladesigns.com>
To: <php-general@lists.php.net>
Sent: Thursday, September 26, 2002 10:42 AM
Subject: RE: [PHP] Looking for some help on web header coding.
> go look at the tutorial for using php with flash to retrieve variables
from
> a database. it's pretty self explanatory and clear in how/what to do.
>
> -----Original Message-----
> From: Joshua Patterson [mailto:Bambooza@nvbell.net]
> Sent: Thursday, September 26, 2002 10:35 AM
> To: 'PHP'
> Subject: [PHP] Looking for some help on web header coding.
>
>
> 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.
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>