Re: Re: Automating POST/GET
| From: | Marek Kilimajer | Date: | Mon, 26 Apr 2004 09:51:44 +0000 |
| Subject: | Re: Re: Automating POST/GET | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-184612@lists.php.net to get a copy of this message | ||
Saulius wrote:
and use urlencode(): 'http://www.google.com/addurl?q='.urlencode($siteurl).'&dq='.urlencode($description);I've tried ... <?php $siteurl = "www.whatever.com"; $description = "Description with spaces and commas, in it.";frominclude 'http://www.google.com/addurl?q=$siteurl&dq=$description'; //Works - but passes the variable name instead of its value.Any variationthis format doesn't work - such as double-quotes, periods, etc.when you are forming quoted string expression with variables in it, you should use double quotes (http://www.google.com/addurl?q=$siteurl&dq=$description;) or single quotes, but insert variables in other way: 'http://www.google.com/addurl?q='.$siteurl.'&dq='.$description;