problem with ?id

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
nutstretch
Forum Contributor
Posts: 104
Joined: Sun Jan 11, 2004 11:46 am
Location: Leicester

problem with ?id

Post by nutstretch »

I have a testbed on my machine which i use to test my code first.
on my page i have a link as below
<p><h3><a href="products.php?id=Travel Bag">Handbags</a><img src="gifs/dot.gif" alt="Designer Handbags" width="2" height="2" border="0"></h3></p>

on the php page i use the following to get the id.

$choice=$_GET['id'];

This works well on my machine but falls over when I upload the pages and returns no results. Please can someone shed some light onto this for me.

Do I need to put it in some other way

Thanks in anticipation

Nuts
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

remove spaces in your links or change to underscore as some server settings mess up such data
mysqlautobackup
Forum Newbie
Posts: 3
Joined: Fri Oct 07, 2005 4:47 am

Post by mysqlautobackup »

Please try relpace the space to %20

<p><h3><a href="products.php?id=Travel%20Bag">Handbags</a><img src="gifs/dot.gif" alt="Designer Handbags" width="2" height="2" border="0"></h3></p>

OK?
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

mysqlautobackup wrote:Please try relpace the space to %20

<p><h3><a href="products.php?id=Travel%20Bag">Handbags</a><img src="gifs/dot.gif" alt="Designer Handbags" width="2" height="2" border="0"></h3></p>

OK?
those %20 will still translate to spaces....
Post Reply