icon Learn how to get the most out of Surmunity - read our forum tips here! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » PHP, MySQL » PHPsuexec » URL query string help

PHPsuexec Information and tips

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread
Old November 1st, 2007, 4:59 PM   #1 (permalink)
Registered User
Fresh Surpasser
 
Joined in Sep 2005
6 posts
Gave thanks: 2
Thanked 0 times
URL query string help

I might not be looking in the right place, but I can't seem to fiind what I need anywhere. I have a php script that looks up user information from a ldap database from information that is taken from a login form. Right now I just have the information to display on the screen and that part works fine ( the display is just for testing) What I am needing to do is to take some of the strings and put them into a url something like http://www.page.html?username=xxxxxx...tion=xxxxxxxxx. I have the data in $username and $location. I have done this before with a A href, but that required clicking on a link. This php script needs to redirect to the next page as soon as the information is located. When I tried to do this with header("location:www.page.html?username=$username& location=$location") the url did not have the data in it. I just got: www.page.html?username=$username&location=$locatio n. What command do I need to use?
I tried to search every way that I could think of and am not making any progress at all. If it can be done I know that one of the good experts here will know how to do it.
Thanks
jonest454 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 2nd, 2007, 9:04 PM   #2 (permalink)
Surpass Developer
On a golden path...
 
Mark's Avatar
 
Joined in Jan 2004
Lives in Florida
Hosted on decc.surpasshosting.com
359 posts
Gave thanks: 7
Thanked 58 times
Blog Entries: 1
Check to make sure the string inside your header function is wrapped in double quotes, not single quotes.

Also, are you sure you are populating $username and $password? Try echoing them first to see if they contain any actual data
__________________
Mark
Surpass Hosting Developer
sɹnoʎ uɐɥʇ ɹǝʇʇǝq sı bıs ʎɯ
Mark is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
This user thanks Mark for this great post!
jonest454 (November 5th, 2007)
Old November 3rd, 2007, 11:16 PM   #3 (permalink)
Registered User
Fresh Surpasser
 
Joined in Sep 2004
8 posts
Gave thanks: 1
Thanked 1 Time in 1 Post
Give the following a try:

<?php
//code to resolve username / and location here

$newUrl = "www.page.html?username=".$username."&location=".$ location;
header("location:".$newUrl);

?>
Zedd is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
This user thanks Zedd for this great post!
jonest454 (November 5th, 2007)
Old November 5th, 2007, 10:08 AM   #4 (permalink)
Registered User
Fresh Surpasser
 
Joined in Sep 2005
6 posts
Gave thanks: 2
Thanked 0 times
Thanks

Thanks a lot for the help. I had tried what Zedd had suggested already, but I had used single quotes and it did not work. It was the double quotes. Again thanks for the help.
jonest454 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

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