Not Passing Variables

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
stebut05
Forum Commoner
Posts: 35
Joined: Wed Sep 21, 2005 9:29 am
Location: Liverpool, UK

Not Passing Variables

Post by stebut05 »

feyd | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]


Hi all,

Hope someone can please, please help. I have moved a site from test server to live server and site not working On a product page a user clicks on a link that directs them to more details about a product. The link uses a varibale from database query:

Code: Select all

<a href="artificial_christmas_tree_details.php?product_name=<?php echo ['$row_prod['product_name']; ?>

Now this was working but not working now???? I dont know if has anything to do with URL code. As product name has %20 in it. But as i say this was working on first server not now.

URL: artificial_christmas_tree_details.php?product_name=Yardley%20Fir.

I have been told this is not a problem, but i really have no idea what the fault can be. Does something need to be enabled on live server????

Really need some help and really appreciate help. advice, suggestions


Regards

Stevenon live server.


feyd | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
User avatar
jwalsh
Forum Contributor
Posts: 202
Joined: Sat Jan 03, 2004 4:55 pm
Location: Cleveland, OH

Post by jwalsh »

You're URL code looks fine to me. You'll need to post more information to help us narrow down the problem.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

you may want to look into using urldecode() .. maybe converting %20 to a + as well..
stebut05
Forum Commoner
Posts: 35
Joined: Wed Sep 21, 2005 9:29 am
Location: Liverpool, UK

Post by stebut05 »

Thanks for your help.

I dont think it needs decoding as i am using GET and it works fine on test server and NOT live server, any suggestions??

Regards,

Steven
User avatar
chrys
Forum Contributor
Posts: 118
Joined: Tue Oct 04, 2005 9:41 am
Location: West Roxbury, MA (Boston)

Post by chrys »

Does the URL output correctly in both the live and test? Show me the URL for both.
stebut05
Forum Commoner
Posts: 35
Joined: Wed Sep 21, 2005 9:29 am
Location: Liverpool, UK

Post by stebut05 »

Thanks for all your help, problem no resolved.

Kind Regards,

Steven
Post Reply