Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8958953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:20:07+00:00 2026-06-15T15:20:07+00:00

I’m having a problem that’s probably (hopefully) very easy to solve but I’m just

  • 0

I’m having a problem that’s probably (hopefully) very easy to solve but I’m just about stuck.

When I use the urlencode (or rawurlencode) function it will not find he script I’m sending it too.

So this works fine:

$data["text"] .= "<a href='index.php?load=results&reg=".$row["region"]."'>".$row["region"]."</a><br/>";

And it will take me to the correct page:

index.php?load=results&reg=CRO

But the person I’m doing the job is having her “&” symbol replaced with a (R) registered symbol, and she is getting a page not found. Unfortunately I’m unable to reproduce this on any of the other computers in this office

So when i change the code to read

$data["text"] .= "<a href='".urlencode("index.php?load=results&reg=".$row["region"])."'>".$row["region"]."</a><br/>";

It tries to take me to this page

index.php%3Fload%3Dresults%26reg%3DCRO

But it gives me the following page not found error:

The requested URL index.php?load=results&reg=CRO was not found on this server.

Which is really weird because the requested URL is exactly the same as the URL which resolves no bother up the top. I understand I’ll need to run urldecode (or rawurldecode) at some stage but if it isn’t even finding a script to load I can’t run that function anyway…

EDIT: Further details – I am coding on a Mac using TextWranger. The file is encoded using utf8 with Unix (LF) Line Endings. The local server is using MAMP and the live server is a Windows based machine but I’m not sure of any configuration settings that could help as I’ve just started here. The output HTML is encoded with UTF-8.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T15:20:09+00:00Added an answer on June 15, 2026 at 3:20 pm

    Here is how you use it:

    $data["text"] .= "<a href='index.php?load=results&reg=".urlencode($row["region"])."'>".$row["region"]."</a><br/>";
    

    What you are doing is urlencoding the values of you parameters, not the whole query.

    So basically:

    $data = "index.php?key=".urlencode("hello world value");
    // will result in:
    "index.php?key=hello%20world%20value"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I am reading a book about Javascript and jQuery and using one of the
I am trying to understand how to use SyndicationItem to display feed which is
I've got a string that has curly quotes in it. I'd like to replace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.