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

  • Home
  • SEARCH
  • 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 6707735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:40:30+00:00 2026-05-26T07:40:30+00:00

I am retrieveing data from $_GET on page linked by: <a class=send href=<?php echo

  • 0

I am retrieveing data from $_GET on page linked by:

<a class="send" href="<?php echo sendData.php?user=somebody&password=any; ?>">Send POST info</a>

locally using XAMPP with

            <?php
                $user = urlencode($_GET['user']);
                $password = urlencode($_GET['password']);
                echo '<strong>user: </strong>'.$user.' <strong>password: </strong>'.$password;                
            ?>

and it works fine, however when encoding

        <?php
            $url=rawurlencode('sendData.php');
            $url .= urlencode('?user=somebody&password=any');
        ?>
        <a class="send" href="<?php echo $url; ?>">

             Send POST info
        </a>

The linked page access is forbidden

Access forbidden!

You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster.

Error 403

localhost
18.10.2011 ã. 23:00:31 ÷.
Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1

Any ideas what is messing up?

  • 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-05-26T07:40:30+00:00Added an answer on May 26, 2026 at 7:40 am

    Don’t encode the entire query-string.
    In your code, you’re converting the “?” and “&” and “=”.

    Encode the values individually, and concatenate the values.

    So

    $query = "?user=" . urlencode($user) . "&password=" . urlencode($password);
    

    Ultimately, that’s also going to allow you to sanitize them, as well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am retrieving data from an Oracle database and binding the same to a
Traditionally when using a DbCommand when retrieving data from a sproc, something like the
I have written this query for retrieving data from mysql as below select FeedbackCode,EMailID,FeedbackDetail,
For some reason I'm having a problem retrieving data from my database. It leaves
I have developed a VB.Net code for retrieving data from excel file .I load
I'd like a generic method for retrieving the data from a vector. I have
I have created an n-tier solution where I am retrieving related data from a
I have an interface in C# that helps retrieving of data from a custom
Are there performance issues when retrieving and filtering data from views than from tables
I have a JSP page retrieving data and when single or double quotes are

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.