php help please

Hello there

i have two que as i am really new to php.

We got a database which was written by someone else before me in php using mysql.

It shows full code in url as example below but i wud like it to only show so its as (http://db/alterdiary.php) rather then how it is below.

http://db/alterdiary.php?id=6350&variable=space&date=2010-11-02

Second thing is i have managed build a search function in this same database so logged in user can search all records and amend them but what i want to do is when used done their search and amended a record and when they submit change i want them to get redirected back to their search result rather then them doing full search again and find their results.

Help will be much appreciated as i am new to this php stuff.

R

For second question - you can save search parameters in the $_SESSION or $_COOKIE when user hit submit on search form. And when user returns back, you would check if search criteria is saved in $_SESSION or in cookies, and generate search results again.

As for the first question, if this is result of form submission, you need to change method to POST. But if this is in link url, this is the way how parameters passed to script.

Sponsor our Newsletter | Privacy Policy | Terms of Service