😃
New Ideas, getting closer please help.
<select name="at_residence_since_years">
<option selected="selected" value="">Select One</option>
<option value="2002">2002</option>
<option value="2001">2001</option>
<option value="2000">2000</option>
<option value="1999">1999</option>
</select>
<select name="at_previous_residence_since_years">
<option selected="selected" value="">Select One</option>
<option value="2000">2000</option>
<option value="1999">1999</option>
<option value="1998">1998</option>
<option value="1997">1997</option>
</select>
~I don't want the form to submit if they select year 2001 or 2002 on the
"at_residence_since_years" pull down menu unless they have selected a
value
for the "at_previous_residence_since_years" pull down menu.
do you know how I can make this happen using php ?
<?
if (value of first dropdown is different from "Select one") first=1;
else first=0;
if (value of second dropdown is different from "Select one") second=1;
else second=0;
if (both first=1 AND second=1) allow post;
else do not allow post;
?>
~I want to use PHP not javascript, I would like it if the user posts the form to my
server, he/she will get an error page. can you help me with this >>??? The scripts below are other
Ideas. The script above how do I modify it to bring the user to a error page that says "hit the
back button and full out the a date for prevoius_address_lived_since?
<?php
if ($at_residence_since_years == 2001 or 2002 and
$at_previous_residence_since_years == ""){
print "Please tell us about your previous residence";
}
else{
whatever you want it to do
}
?>
<?
if(empty($at_previous_residence_since_years)) {
// do something u want if $at_previous_residence_since_years is empty
} elseif(!empty($at_previous_residence_since_years)) {
if(!empty($at_residence_since_years)) {
//do something
}else{
// continue on the form
}
}
?>
<?php
if ($at_residence_since_years == 2000 or 2001) {
if ($at_previous_residence_since_years == "Select One") {
#Do not submit... put what you need in here...
} else {
#Submit to DB
};
} else {
#Submit to DB
};
?>