Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem on link

Status
Not open for further replies.

fsqueeen

Programmer
Jul 8, 2002
43
MY
hello,

I have some problem on linking to another page with 2 values.

I want to link to a page as below:


I wrote the code like this:

echo&quot;<a href=\&quot;index.php?
type_id=$type_id&&brand_id=$brand_id\&quot;>HOME</a>&quot;;

where the value for $type_id and $brand_id is 1.

The code is not working, I think it has something to do with the &quot;&&&quot;, but I still can't find any solution.

My project is written in WML + PHP, will it bring any effect on the code above?
 
You should not use && but &

echo&quot;<a href=\&quot;index.php?
type_id=$type_id&brand_id=$brand_id\&quot;>HOME</a>&quot;;

should work if you do the handling at the end correctly (you could still have problems with receiving your variables which could be caused by Register Globals being turned off for security reasons)

After clicking on the link your variables should be in

$_GET['type_id'] and $_GET['brand_id']
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top