How do you delete text in inputboxes

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jaymoore_299
Forum Contributor
Posts: 128
Joined: Wed May 11, 2005 6:40 pm
Contact:

How do you delete text in inputboxes

Post by jaymoore_299 »

After I fill out an inputbox and press submit, when I press back or even reload in firefox, the forms continue to have the same values filled out previously. Is there a setting for inputboxes that clears this?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

that's apart of your browser's caching. The page likely isn't even pulled from the server to render the page.
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post by raghavan20 »

Usually that is what programmers want to do because that avoids users from inputting information again but that does not happen normally.

for clarity, here is an example....
Usually programmers have to code like this to retain the values filled in by an user

Code: Select all

<form method = 'post'>
<input type = 'text' name = 'sometext' value = '<?php echo isset($_POST['sometext'])? "" : $_POST['sometext']; ?> ' />
</form>
Post Reply