Empty fields on page load

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
chrismid259
Forum Newbie
Posts: 1
Joined: Fri Sep 30, 2011 5:58 am

Empty fields on page load

Post by chrismid259 »

Hi all,
This will probably be much simplier than I'm making it out to be. I've created a form with fields that are populated by SQL querys to get rows from a database. The problem is, when the page is refreshed all the fields are sent to the database before the submit button is clicked.

I'd imagine that the problem is that when the page is loaded, the values that show as default (ie. those at the top of the combo boxes) are automatically being sent. What I need to do is find a way that allows the page to load with the fields being empty or the default value being blank. I've searched through Google but had no luck.

Hopefully someone will be able to help.

Thanks all!
Chris.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Empty fields on page load

Post by Celauran »

Can you post the code for this page?
Post Reply