Jump to content


Photo

troubles keeping the url paramter alive


  • Please log in to reply
3 replies to this topic

#1 leeroy1

leeroy1
  • Members
  • PipPip
  • Member
  • 20 posts

Posted 18 September 2004 - 12:05 PM

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

#2 morpheus.100

morpheus.100
  • Members
  • PipPipPip
  • Advanced Member
  • 145 posts

Posted 20 September 2004 - 12:25 PM

Click the add existing parameters on the dialogue.

#3 leeroy1

leeroy1
  • Members
  • PipPip
  • Member
  • 20 posts

Posted 20 September 2004 - 06:12 PM

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.

#4 morpheus.100

morpheus.100
  • Members
  • PipPipPip
  • Advanced Member
  • 145 posts

Posted 20 September 2004 - 10:11 PM

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'];




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users