Connecting Tech Pros Worldwide Help | Site Map

How can I get the value from another page??

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 17th, 2005, 04:18 AM
Tim
Guest
 
Posts: n/a
Default How can I get the value from another page??

In my case, I type <a href = 'decode.php?song=$choice'>Decode</a> in
one of the php file. But after I click the link, the decode.php page
can't get the value $choice, I would like to know the problem is and
how to solve it??

  #2  
Old July 17th, 2005, 04:18 AM
kingofkolt
Guest
 
Posts: n/a
Default Re: How can I get the value from another page??

is the link that you gave in HTML mode or printed by a PHP print command? if
its in HTML mode (outside the <?php and ?> tags) then change that link to:

<a href='decode.php?song=<?php print $choice; ?>'>Decode</a>

otherwise the php parser doesnt know to interpolate the $choice variable
into the link. (you cant put php code directly in the HTML source. it has to
be seperated from HTML by <?php and ?> tags)

- JP

"Tim" <tim_li1008@sinaman.com> wrote in message
news:e5ae706f.0403191429.789e01e2@posting.google.c om...[color=blue]
> In my case, I type <a href = 'decode.php?song=$choice'>Decode</a> in
> one of the php file. But after I click the link, the decode.php page
> can't get the value $choice, I would like to know the problem is and
> how to solve it??[/color]


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.