Re: Odd question regarding creating a php file
| From: | Dusten | Date: | Wed, 07 Feb 2001 14:16:36 +0000 |
| Subject: | Re: Odd question regarding creating a php file | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-38548@lists.php.net to get a copy of this message | ||
In reply to Chris. The reason I'm having this page created is because people
will need to be able to see this person's "win/loss" record. I have a script
that displays all of the ppl registered and when you view their page, you
can get a real time report on their ratings. As another alternative: I could
pass the variables into a 'template' page and create it from there, but I
didn't want all my links to be buttons with hidden variables in them. I hope
I cleared that up.
Thanks for your help
Dusten
"Chris Lee" <lee@mediawaveonline.com> wrote in message
news:95q4hi$b9u$1@toye.p.sourceforge.net...
> 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
> >
>
>
>
> --
> 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
>