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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:26:17+00:00 2026-06-03T03:26:17+00:00

I have an html page with a form. In the form I have a

  • 0

I have an html page with a form. In the form I have a search function and a delete function that will be available in each results’ row, in this way:

..<td><img src="delete.gif" style="cursor: pointer" onClick="javascript:delete();"></td>..

    <input type="submit"   value="search" onClick="javascript:search();">

In a . js file I have both functions passing the parameters to a php file via jquery’s ajax function.

Let’s go to the php file:

There are no problems with the search function: I get the parameters by $_REQUEST and I do a select query.

By clicking delete.gif in the form, I get to the delete function. The query deletes the selected row and right after I need to call the search function so I can show the results without the deleted row.

And here comes the trouble: both functions use $_REQUEST to build the queries so when calling search function after deleting I have the delete parameters stored in $_REQUEST.

How can I recover the search parameters I had in $_REQUEST in the first search so I can do that search again after deleting??

Here’s a glimpse of the delete function in the php file:

function deleteResult($_REQUEST['param1'],$_REQUEST['param2'], $_REQUEST['param3'])
{  
    $strSqlDelete = "DELETE FROM …"; // query working in database
    //here the connecting to the database code
        $result = search($_REQUEST['param1'],$_REQUEST['param2'], $_REQUEST['param3']);
        echo utf8_encode($result);
        exit();
}

Thanks a lot!!

  • 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-03T03:26:18+00:00Added an answer on June 3, 2026 at 3:26 am

    It’s not too safe to use $_REQUEST superglobal. Use $_POST or $_GET depending on your method. To store something for later use use $_SESSION suberglobal array.

        session_start(); // In the beginning of your script
    
    ...
    
        $_SESSION['param1'] = $_REQUEST['param1'];
    

    Then you can use $_SESSION['param1'] anywhere else within your site even after page reloading.

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

Sidebar

Related Questions

I have a form on an HTML page with multiple submit buttons that perform
I have a form that I don't render as part of HTML page but
I have a html form that posts to a new page on submit. If
I have created my application that has search form and below contains results for
I have an ASP.NET page that is basically a search form. My code for
On my main page I have a search form that is submitting to the
I have this view function: def search(request): if request.method == 'GET': form = SearchForm(request.GET)
I have a search form and am displaying the results on the same page
I have this page which loads quotes. It has a search form wherein if
I have a html page with a form. The form has Div which gets

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.