Jump to content

Archived

This topic is now archived and is closed to further replies.

leeroy1

troubles keeping the url paramter alive

Recommended Posts

I have a search form on a page(page2.php) that lists the results of the search on the same page after the form is submitted.. When you first visit this page it includes a url parameter (recordid41),that it received from the previous page. Whenever I then do a search, it loses the url parameter. How can I fix this? On the "form" properties I've included page2.php?recordid41=<?php echo $_GET['recordid41']; ?> for the page that it's suppose to go to after submitted but this doesn't work. It errors with:

Notice: Undefined index: recordid41 in c:\test\page2.php on line 340

Share this post


Link to post
Share on other sites

Yes, this has been done already. This is the page number with the parameter added:

 

page2.php?recordid41=<?php echo $_GET['recordid41']; ?>

 

The problem is, is that the url parameter is not submitted, it's lost.

 

When the page reloads with the search I get this url:

 

page2.php?a99b=t&Submit=Search

 

The a99b was a paramter of a query, but the 'recordid41' is nowhere.

Share this post


Link to post
Share on other sites

Whilst I fail to see why you would want a parameter named recordid41 wouldnt just page2.php?recordid be better. The parameter looks fine and will pass in any browser. Please post the query script so we can see whats going on and how the query is handled.. To test if the parameter passes ok just echo it in the below the querry to see if the true value shows.

 

echo $_GET['recordid41'];

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.