I am implementing a search feature using PHP. How would I be able to create a default value for the search textbox which will be the previous search string. Of course this will be blank when first loaded.
After search is passed I would like to display the same page with the previous string in the box and an error message Invalid search expression, or no matching files found. Please try again.
Thanks
Creating a default value for textbox from previous search
Moderator: General Moderators
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
Re: Creating a default value for textbox from previous search
You could use a session variables and just set the form element values equal to the variable.