trouble passing variables through a URL
| From: | James Hallam | Date: | Mon, 04 Feb 2002 19:46:03 +0000 |
| Subject: | trouble passing variables through a URL | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-83437@lists.php.net to get a copy of this message | ||
This is the URL in its <A> tag:
<A
HREF="test_mediacoverage.php?locale=en_na&sec=news&subsec=media&name=infowee
k1">Media Coverage Test Page</A>
Those variables are supposed to be used to populate this SQL statement:
-----Original Message-----
From: mike cullerton [mailto:php-l@bakednotfried.com]
Sent: Monday, February 04, 2002 12:03 PM
To: php@errorcode.com; php-general@lists.php.net
Subject: Re: [PHP] Why does heredoc fail in this instance?
on 2/4/02 11:32 AM, Peter J. Schoenster at php@errorcode.com wrote:
> Hi
>
> If I use $snippet = ""; and escape the quotes in the block then it
> works. But if I use it as is below, it fails with no useful error
> message. Why?
not sure if this is it or not, but from the manual
http://www.php.net/manual/en/language.types.string.php
Variables are expanded, but the same care must be taken when expressing
complex variables inside a here doc as with strings.
i wonder if $this->this_cgi is causing the problem
>
> Thanks,
>
> Peter
>
> function GetAddCommentSnippet($args) {
> $topic_id = $args[id];
> $return_page = $args[return_page];
>
> $snippet = <<<EOS
> <form action="$this->this_cgi" method="post">
> <br>Your First Name: <input type="text" name="FirstName"
> value="">
> <br>Your Last Name: <input type="text" name="LastName"
> value="">
> <br>Your Email Address: <input type="text" name="EmailAddress"
> value="">
> <br>Your Comments:
> <br>
> <textarea cols="40" rows="4"
> name="Comments"></textarea>
> <br>
> <input type="submit" value="submit now">
> <input type="hidden" name="action" value="AddComment">
> <input type="hidden" name="response_to_id"
> value="$topic_id">
> <input type="hidden" name="r" value="$return_page">
> </form>
> EOS;
>
> return $snippet;
>
>
> } // END GetAddCommentSnippet
>
>
> ---------------------------
> "Reality is that which, when you stop believing in it, doesn't go
> away".
> -- Philip K. Dick
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php