"Dusten" <[EMAIL PROTECTED]> wrote:
>       fwrite($fp, "<?php
>                      $result = mysql_query("SELECT * from winLoss WHERE
> login='$login'    AND pass='$pass'");
>                    ?>
> Ive ommited the redundant things. Basicly it just creates this: SELECT *
> from winLoss WHERE login='' I need that value in there. Any ideas?

When you enclose variables (as represented by $ followed by variable name)
within double quotes the content found within the double quotes are parsed
and translated into their value counterparts.  When you enclose variables
within single quotes the variables remain intact as variables.  So if you
want to pass the SQL statement with the variables intact enclose in single
quotes.  If your problem is simply that the variables are translating to
empty values, you need to do some debugging.  At the same point in the code
put:

echo "login: $login, pass: $pass";

If the values don't appear then they're not available to the code.  It might
be something as simple as you having the code within a function and the
variables being set outside the function in which case you should refer to
them as $GLOBALS[login] or $HTTP_POST_VARS[login] or $HTTP_GET_VARS[login]
or whatever's appropriate for your application.

--
Steve Werby
COO
24-7 Computer Services, LLC
Tel: 804.817.2470
http://www.247computing.com/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to