View Single Post
Old 09-20-2005, 05:28 PM   #1 (permalink)
ez2c
Member
 
Join Date: Aug 2005
Location: Texas
Posts: 40
Default Test the value of a database field using conditional statement for empty

hi,
I am trying to test if a user enters nothing in a field in my db form the php script will enter something like ' not entered ' in this field in the db.
I tried something like below but get an error message. I know I need some type of conditional statement but don't know how to put it together.

if (some_array[some_field] != "")
{
do something
}

check to see if the field is empty or not. if it is empty, it'll put something there.

any help would be appreciated! thanks in advance!
ez2c is offline   Reply With Quote
Sponsored Links