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 533615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:31:36+00:00 2026-05-13T09:31:36+00:00

I have a link on a page, and I would like to send a

  • 0

I have a link on a page, and I would like to send a variable to a php file like this:

 href = "php_file.php?qry=$query"

the $query variable contains a query which I would like to make to mysql, inside the php file.

My problem is, I don’t want the users to ‘see’ what I am passing along. I would like to use $_POST but from what I know, that isn’t possible.

Is there any other simple way?

Thanks

  • 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-13T09:31:36+00:00Added an answer on May 13, 2026 at 9:31 am

    That is not possible. Even if you used POST it would be very insecure.

    My suggestion would be to put the query in the $_SESSION variable and reference it back in php_file.php If you have multiple queries you could give them some kind of IDs and store the id=>query pair in session.

    Quick example:

    <?php
    session_start();
    $_SESSION["query1"] = "SOME QUERY";
    $_SESSION["query2"] = "SOME OTHER QUERY";
    
    ?>
    <a href='php_file.php?q=query1'>Execute first query</a>
    <a href='php_file.php?q=query2'>Execute second query</a>
    
    //in php_file.php
    session_start();
    $query = $_SESSION[$_GET["q"]];
    

    Obviously this is very simplistic and you might want to add some more “security” to it (check for empty parameters etc.) but at least your query wouldn’t be visible to the user.

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

Sidebar

Related Questions

I have this mockup page. The accordion works well but I would like to
I am building a Facebook tab page and would like to have a link
I have a page index.php where i have a link called add_users.php. In add_users.php,
I have a simple link in a menu <a id=Home href=Amico-Bio-Home-Page></a> to which i
When a user clicks a link, I would like to send an AJAX request
I would like to link to a new page in the format: /topic/create&qty=4 Right
I have a HTML code like this: <div class=links nopreview><span><a class=csiAction href=/WebAccess/home.html#URL=centric://REFLECTION/INSTANCE/_CS_Data/null>Home</a></span>&nbsp;•&nbsp;<span><span><a class=csiAction href=/WebAccess/home.html#URL=centric://SITEADMIN/_CS_Site>Setup</a></span>&nbsp;•&nbsp;</span><span><a
Right now I have this: echo <a href='misc/removeWallComment.php?id= . $displayWall['id'] . &uID . $displayWall['uID']
This seems like it should be straight-forward, but I'm stumped. I have a link
I have a like/send button that I've set up on a customer's home page.

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.