and i'm very short on time.. please help.
an external web based software posts variables to a page called build.php
one of the variables is
$client_state
it displays the information in a text field in "build.php".. when you hit submit it posts to
client_add_script.php ....(which writes all of the information posted to "build.php" to the database after doing a little bit of calculation and such)
now here's what i want to do...
If the state that shows up there is one in list "A" then it is an "attorney state"
if it shows up in list "B" then it is a "standard" state
if it isn't in EITHER of those then say "BAD"
whatever info it produces
"Attorney" , "Standard", "Bad" gets written to the database in a field called "client_model" as the script is working....
at the end of that script, it takes you to a different page which calls all of that information to be viewed... (not important for this question, but useful to know)
i've tried about 10 variations of this and get every result except for the one i want...
This is what i have most currently.........
if ($client_state = "AL" or "AK" or "AZ" or "CA" or "CT" or "DC" or "FL" or "IA" or "IN" or "MD" or "MI" or "MN" or "MI" or "MT" or "NE" or "NM" or "OK" or "OR" or "TX")
{
$state_model = "Standard";
}
if ($client_state = "AR" or "CO" or "GA" or "IL" or "KS" or "KY" or "LA" or "MN" or "MA" or "MS" or "NV" or "NJ" or "NY" or "NC" or "OH" or "TN" or "UT" or "VA" or "SD" or "ND" or "WA")
{
$state_model = "Attorney";
}
else
{
$state_model = "BAD";
}
------------
basically, it allows the correct state to be written to the database, but it shows that ALL of them are attorney.. i've tried putting == instead of = but it gives me other errors at that point.
i've also tried || instead of "or" but it doesn't work either
PLEASE HELP!!! 10 points + unlimited gratitude
--
--
Actually, i take that back... it shows ALL states as "AR" whether they are or not. which of course makes it display as attorney no matter what
an external web based software posts variables to a page called build.php
one of the variables is
$client_state
it displays the information in a text field in "build.php".. when you hit submit it posts to
client_add_script.php ....(which writes all of the information posted to "build.php" to the database after doing a little bit of calculation and such)
now here's what i want to do...
If the state that shows up there is one in list "A" then it is an "attorney state"
if it shows up in list "B" then it is a "standard" state
if it isn't in EITHER of those then say "BAD"
whatever info it produces
"Attorney" , "Standard", "Bad" gets written to the database in a field called "client_model" as the script is working....
at the end of that script, it takes you to a different page which calls all of that information to be viewed... (not important for this question, but useful to know)
i've tried about 10 variations of this and get every result except for the one i want...
This is what i have most currently.........
if ($client_state = "AL" or "AK" or "AZ" or "CA" or "CT" or "DC" or "FL" or "IA" or "IN" or "MD" or "MI" or "MN" or "MI" or "MT" or "NE" or "NM" or "OK" or "OR" or "TX")
{
$state_model = "Standard";
}
if ($client_state = "AR" or "CO" or "GA" or "IL" or "KS" or "KY" or "LA" or "MN" or "MA" or "MS" or "NV" or "NJ" or "NY" or "NC" or "OH" or "TN" or "UT" or "VA" or "SD" or "ND" or "WA")
{
$state_model = "Attorney";
}
else
{
$state_model = "BAD";
}
------------
basically, it allows the correct state to be written to the database, but it shows that ALL of them are attorney.. i've tried putting == instead of = but it gives me other errors at that point.
i've also tried || instead of "or" but it doesn't work either
PLEASE HELP!!! 10 points + unlimited gratitude
--
--
Actually, i take that back... it shows ALL states as "AR" whether they are or not. which of course makes it display as attorney no matter what