1){ if(!is_numeric($v01)){ $error1 = "
Please enter a number.
"; } if(is_numeric($v01)){ if($v01 > 110 OR $v01 < 1){ $error1= "
Get real.
"; } } $error2 = " "; if(empty($v02) OR $v02 < 1 OR $v02 > 4){ $error2= "
Please answer this question. The experiment must go on.
"; } if (!filter_var($v03, FILTER_VALIDATE_EMAIL)) { $error3 = "
Please enter a valid email address.
"; } } // end if pass > 1 /* Let's create a silly interface to collect a data point to plot. In a "real" application the point we would want to plot would be computed based on the user's responses. We'll use this interface simply as a way of plugging in values and exploring ways to plot them. */ print "
"; print "Please enter your age.
"; print " $error1
"; print "

"; print "I think graduate students should have access to more classes on internet research. $error2
"; $selected1 = ""; $selected2 = ""; $selected3 = ""; $selected4 = ""; if($v02 == 1){$selected1 = "checked";} if($v02 == 2){$selected2 = "checked";} if($v02 == 3){$selected3 = "checked";} if($v02 == 4){$selected4 = "checked";} print " Strongly Disagree
"; print " Disagree
"; print " Agree
"; print " Strongly Agree
"; print "

"; print "Please enter your e-mail address.
"; print " $error3
"; print "

"; $nextpass = $pass + 1; print ""; print ""; print "
"; print "




"; ?>