|
-
Ex-***
passing by url (get method)
How would I go about it if I wanted to pass a variable (artist) that contained a value with & in it, along the url?
I think that's what giving me a problem here, that the value is not read any further than to the & symbol in the middle of it.
In this case the value is Billy Bragg & Wilco, and I dont think it reads the Wilco bit, hence I'm not getting the right results.
One option is of course to use partial matching with sql (like), but I was wondering if there's something else I could do. I can't change the name of the artist because its stored in the database.
I also cant use post method because I'm not atually submitting a form..
Here's what the URL looks like:
PHP Code:
/data.php?kat=1&artist=Billy%20Bragg%20&%20Wilco&aid=287
Last edited by kid A; 08-28-2003 at 06:02 PM.
Now listening to various rock and metal
143rd member to join Sharkyforums.
-
You cant use the & in the name. The & tells it to look for the next variable.
-
Ex-***
I figured as much.
Thats why I came here for help...
You merely confirmed my suspicion, but gave no solution, which is what I'm looking for.
Last edited by kid A; 08-28-2003 at 10:38 PM.
Now listening to various rock and metal
143rd member to join Sharkyforums.
-
Ex-***
Is the urlencode function something I should look at?
Did I mention we are speaking about PHP here...
Now listening to various rock and metal
143rd member to join Sharkyforums.
-
Ursus Arctos Moderatis
Yep yep, urlencode() and urldecode() should do you just fine.
-
Ex-***
Indeedy
Now listening to various rock and metal
143rd member to join Sharkyforums.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|