1.

Solve : How to kill perpetual perameters following in URL?

Answer»

I have a page (let's call this, Page 1) that lists all the records of a particular table of a database. From each row, you can select to either edit or delete the record on that line. When I select edit, I go to another page (page 2) with a form that is dynamically filled with the content from the row I selected earlier on page 1 (parameters were PASSED in the URL to the edit page --page 2-- to load the correct record for editing). On Page 2 you make the necessary CHANGES, then press update to save them. The fields of the table are then sent to the database and they update the record. You are also sent back to the initial Page 1 to see the updated record in a new refreshed list. The problem is that the parameters that were passed initially to the edit page (page 2) are still showing and are now appended to the URL of the new page 1 (the page that I return to after the update takes place). Thus, the URL is now littered with more parameters than I need, and they are keeping the records from showing in the list as they did initially. How do I tell the edit page (page 2) to pass the necessary codes on to the database, but don't send the parameters on to the next page...sort of clean things up, so to speak?

Using Dreamweaver 8, PHP, MySQL to create this.

THANKS,The parameters will only display if you send them on to the next page - either using the GET method in a FORM or coding them into a hyperlink.  In your case, if you don't want to see the parameters in the address box, just use POST instead of GET, and ensure you make any necessary consequent amendments to your code.Okay, I just totally removed all the parameter settings from off the URL that tells PHP, after the update page amends the database, to send me on to another page.

When I try it now, it takes me to the right page, but there isn't data on the page as there should be, and the address bar of the browser still has all the parameters lingering that were sent initially to the update page (page 2) calling the record files into a form for edits.

The update page/form I am using submits using Post to send the updated form data on to the database. So, I don't know why these parameters are still coming along for the ride onto the next page.

 Any help appreciated. Thanks.
(Yes, you MUST have guessed by now...I'm a database newby!)Please be a bit more specific.  Please give an excerpt of the code from the form that submits back to page 1.  Please display the url that appears in your address bar.

Alternative, give a link to the pages in question and I'll test them.



Discussion

No Comment Found