Re: "update" question

From: Date: Mon, 02 Jun 2003 19:41:51 +0000
Subject: Re: "update" question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-149835@lists.php.net to get a copy of this message
At 21:12 02.06.2003, Matt Hedges said: --------------------[snip]-------------------- >Hello, I am new to PHP and would greatly appreciate any help. > >I am building a webpage for my sister's sorority- >http://olemissddd.com. I >have built a page that allows them to update the officers each year- >http://hedges.org/ddd/olemiss/updateofficers.php and then view >those >officers- http://hedges.org/ddd/olemiss/officers.php . > >However, what I want to be able to do that I can't figure out is for when >they leave one of the fields blank it doesn't change anything. As it is >now, when they change one of the fields and leave the others blank it will >overwrite the names it had for them with blank spaces. I want to be able to >do this so for example if they mistype someone's name, etc. So somehow I >need to be able to tell it that when the user leaves the field blank, not to >change that field in MySQL. --------------------[snip]-------------------- Try something like if (!empty($_REQUEST['fieldname'])) dbupdate('fieldname'); http://www.php.net/manual/en/function.empty.php -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/

« previous php.general (#149835) next »