Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Apr 2006
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Updating Database with empty fields

    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.

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    You'd update it the same way you update the field with a value. Just set it equal to "".

  • #3
    New Coder
    Join Date
    Apr 2006
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #4
    New Coder
    Join Date
    Apr 2006
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ignore
    Last edited by Varient; 10-27-2006 at 06:48 PM.

  • #5
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    Weird... it works fine for me.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •