Re: Odd question regarding creating a php file
| From: | Chris Lee | Date: | Wed, 07 Feb 2001 00:21:07 +0000 |
| Subject: | Re: Odd question regarding creating a php file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-38460@lists.php.net to get a copy of this message | ||
there are a few errors in here. number one being this.
echo "... mysql_query("SELECT ...";
do you see it? youve got the " in the middle there, that is ending your " "
section, not what you wanted right. second too is the fact anything in " "
will be evaluated, anything in ' ' will not.
fwrite($fp, '<?php $result = mysql_query("SELECT * ... "); ?> <html> ...
</html>');
In the future I find if your having a problem with a string, echo it to the
screen, see what happens.
Got a question for you, what is this next page for? im curious why you are
opting todo this this way. are you trying to get around sending variables
through POST/GET/COOKIES ? I would highly recommed sessions if this is your
idea. Speed and Easy of use will be greatly increased. Please respond back
with your answer, Im curious.
--
Chris Lee
Mediawaveonline.com
lee@mediawaveonline.com
""Dusten"" <dusten@gofrontline.com> wrote in message
news:95q1bv$ekv$1@toye.p.sourceforge.net...
> I'm having trouble creating a php file. I've tried to explain it to the
> peeps in IRC but am having trouble. It'll be easier to paste my code:
> ...
> $result2 = mysql_query("INSERT INTO winLoss(login, pass)
> VALUES('$login', '$pass')");
>
> if($result2)
> {
> $fp = fopen
("/home2/colorado/public_html/profiles/$screen_name$ext",
> "w");
> fwrite($fp, "<?php
> $result = mysql_query("SELECT * from winLoss WHERE
> login='$login' AND pass='$pass'");
> ?>
>
> <html>
> <head>
> <title>$screen_name</title>
> </head>").........
>
> Ive ommited the redundant things. Basicly it just creates this: SELECT *
> from winLoss WHERE login='' I need that value in there. Any ideas?
>
> Thank you (sorry about the repost)
> Dusten
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>