RE: [PHP] Send variable in include()
| From: | Zareef Ahmed | Date: | Thu, 21 Oct 2004 06:11:16 +0000 |
| Subject: | RE: [PHP] Send variable in include() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-199959@lists.php.net to get a copy of this message | ||
-----Original Message-----
From: Pete [mailto:pk@ludd.ltu.se]
Sent: Wednesday, October 20, 2004 10:36 PM
To: php-general@lists.php.net
Subject: [PHP] Send variable in include()
I'm trying to send a variable an include that is recieve from another
page:
- navi.php-
<a href =\"'http://www.example.com/view.php?offset=0\">Test</a>
- view.php -
I recieve $offset with avalue of "0" nicely, "echo ("$offset");" will
show a
value.
Now a do this:
include
'http://www.example.com/guestbook.php?option=view&offset=$offset';
>>> change your single quotes to double quotes.
- guestbook.php -
$offset gets value "$offset" instead of "0"
$option has correct value, "view"
How do I write my include so it works?
Would appriciate som help.
Regards,
Pete
---------------------------------------------
Zareef Ahmed :: A PHP Developer in Delhi (India)
Homepage :: http://www.zasaifi.com
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.778 / Virus Database: 525 - Release Date: 10/15/2004