View Full Version : Updating Database with empty fields
10-27-2006, 06:46 AM
Let's say I have a user form that allows them to insert their city and they go ahead and do that but later decide they want to erase the info so they delete the city name and click update profile. How can I make it so that the city name in the database goes blank again.
10-27-2006, 07:34 AM
You'd update it the same way you update the field with a value. Just set it equal to "".
10-27-2006, 06:23 PM
Doesn't work. I even deliberately set the $city var to equal "" and it just stays the current city name. I know the update is working cause if I change the city name to any name with at least 1 character it updates fine. It just won't update when the field is blank.
10-27-2006, 06:46 PM
10-28-2006, 02:22 AM
Weird... it works fine for me.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.