Results 1 to 5 of 5
-
17th Oct 2011, 03:17 PM #1OPMember
php urlencode problem
Hi all!
I'm trying to create an a to z listing on my wordpress site. The letters are altering mysql query (with hyperlink and get method) so it would return only posts starting with the letter clicked by user.
The problem is that i have characters that should not be in urls (?,Ő, etc). So, of course, the solution should be urlencode... end here comes the problem: (example)
PHP Code:$letter="?";
$encodeit=urlencode($letter);
echo "<a href='./?letter=".$encodeit."' >Letter is: $letter </a>";
What should i do?
ps.:
So, for example, the created hyperlinks source code (not the above letter)
Code:<a href="./?page_id=157&betu=%C5%90"><span class="azheadletter">So in the source code everything is all right</span></a>
mahjong Reviewed by mahjong on . php urlencode problem Hi all! I'm trying to create an a to z listing on my wordpress site. The letters are altering mysql query (with hyperlink and get method) so it would return only posts starting with the letter clicked by user. The problem is that i have characters that should not be in urls (?,Ő, etc). So, of course, the solution should be urlencode... end here comes the problem: (example) $letter="?"; $encodeit=urlencode($letter); Rating: 5
-
18th Oct 2011, 11:24 PM #2Respected Member
Strange in my chrome it endcodes it: http://localhost/forums/?letter=%C9
same with opera: http://localhost/forums/?letter=%C9
-
19th Oct 2011, 07:56 PM #3OPMember
Well, i do not bother with iit anymore, it has something to do with the browsers. I just urlencoded and then urldecoded the get hoping it will work properly for others too...
-
22nd Oct 2011, 07:37 AM #4Member
I think u need to use html_entity encode too for unique character like that...
-
2nd Nov 2011, 02:41 PM #5MemberWebsite's:
CoursesWeb.net MarPlo.netData in $_GET and $_REQUEST encoded with urlencode() are alutomatically decoded.
I'm not sure if it works, but anyway try the alternative function: rawurlencode() .Free Courses HTML, CSS, Ajax, Flash, ActionScript for Web Masters.
Free PHP - MySQL Course, JavaScript - jQuery Course and tutorials.
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
DNS problem?
By newuploader in forum Server ManagementReplies: 7Last Post: 20th Nov 2011, 03:44 PM -
c# UrlEncode asciiArt
By evlo in forum Web Development AreaReplies: 1Last Post: 10th Aug 2011, 09:47 PM -
I have a problem
By Mister XX in forum Hosting DiscussionReplies: 3Last Post: 15th Apr 2011, 01:34 PM -
Small Footer Problem (<div> problem ??)
By Ashleyuk1984 in forum Technical Help Desk SupportReplies: 2Last Post: 26th Jan 2011, 02:53 PM -
KWWH side problem Or end user side problem?
By bluedevil in forum Feedback and SuggestionsReplies: 3Last Post: 24th Oct 2009, 10:07 AM
themaLeecher - leech and manage...
Version 5.03 released. Open older version (or...