I'm trying to figure a way to set a variable with an if statement, however
it's not working.  Here's my code:

if ($_POST['description'] == ""){
    $description='blank';
    } else {
    $description=$_POST['description'];
}

Description isn't a required field, but the stored procedure needs to have
something passed for $description when it runs.  So I'm trying to set it so
that if it's not entered then it will be passed as "blank".  Right now it's
always being assigned as "blank" even if I enter something in the
Description.

What am I doing wrong in my if statement to cause it to always be set as
"blank".

Also, if I set $description=$_POST['description']; then everything passes
correctly, unless it's left blank.

Thanks,
Caleb

_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to