Re: Trasfering a variable between two scripts
| From: | Joseph H Blythe | Date: | Thu, 17 Aug 2000 06:22:45 +0000 |
| Subject: | Re: Trasfering a variable between two scripts | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-12159@lists.php.net to get a copy of this message | ||
"J.R. Lillard" wrote:
> this may be nothing, but i usually put the value following the href in
> double quotes ("). to test to make sure that your detail script is running
> correctly, though, you might look up what should be a valid id and go
> directly to the url manually. so you'd have something along the lines of:
>
> http://whatever.com/document_detail.php?id=234
>
> hmm...i don't remember if php variables are case-sensative or not. i'm a
> little rusty. so your id variable might be getting passed as $ID and you
> might be looking for $id.
>
> >
> > I have a script written which generates a table from a Postrgre
> > database(it
> > lists two fields like "SELECT product_name, price FROM my database;"). I
> > have an <A HREF=document_detail.php?ID='$id'>(where ID is the
> > record number
> > in the database) on each record With this links I want to call a
> > new script
> > which makes a "SELECT * FROM my database;", and generates the full product
> > information. The links work fine but the output of the document_detail.php
> > script is empty. I tried to echo
> > the $id in this script and it showed me nothing.
> >
> > Can anybody Help me??????
also make sure that the link is actually being parsed by php for example:
only url part as php:
<A HREF="<?php echo "document_detail.php?ID=$id"; ?>">Link</a>
or as all php:
<?php echo "<a href=\"document_detail.php?ID=$id\">Link</a>";
?>
otherwise $ID on the referring page wont contain anything I think this is right
anyways, as I have made this mistake myself
Hope this helps
Joseph Blythe