cturner Posted November 4, 2006 Share Posted November 4, 2006 My query string is suppose to look like this: http://domain.biz/folder/viewcart.php?username=simplystuck&pd_id=1 but it looks like this: http://domain.biz/folder/viewcart.php?username=simplystuck&pd_id=. Can someone please tell me why and how I can fix it? Thanks in advance.Here is my code that I am working with:[code=php:0]// there is more code here$pd_id = $_GET['pd_id'];// there is more code hereheader ('Location: viewcart.php?username='.$username.'&pd_id='.$pd_id);// there is more code here[/code] Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted November 4, 2006 Share Posted November 4, 2006 it would appear that $_GET['pd_id'] is not being set!!! Quote Link to comment Share on other sites More sharing options...
cturner Posted November 4, 2006 Author Share Posted November 4, 2006 How do I set $_GET['pd_id']? Quote Link to comment Share on other sites More sharing options...
almightyegg Posted November 4, 2006 Share Posted November 4, 2006 well is pd_id defined? can it recognise what it is? Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted November 4, 2006 Share Posted November 4, 2006 I it is passed in the url to the script. The fact that your header is not getting $pd_id suggest that $_GET['pd_id'] is empty - therefore it is not in the url.ARe you POSTING this value to that script? if so use $pd_id = $_POST['pd_id'] Quote Link to comment Share on other sites More sharing options...
cturner Posted November 4, 2006 Author Share Posted November 4, 2006 pd_id is in a url. I now understand that it is empty. Is there a way to keep it from being empty. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.