"; mysql_query("update users set picname = '$name' where id = '$id'"); } else { echo "There was an error uploading the file, please try again!
"; } } //seat picker $numSeats = $_POST['carpicker']; $checkid = mysql_query("SELECT userid FROM car WHERE userid = '$id'"); $checkrows = mysql_fetch_array($checkid); if($checkrows[0] == $id) { $updateseat = mysql_query("UPDATE car SET seats = '$numSeats' WHERE userid = '$id'"); } else { $insertseat = mysql_query("INSERT INTO car (seats, userid) VALUES ('$numSeats','$id')"); } $email= $_POST['email']; $distance = $_POST['distance']; $highway = $_POST['highway']; $zip = $_POST['zip']; $sql = mysql_query("update users set email = '$email', proximity = '$distance', zip = '$zip' , highway = '$highway' where id = '$id'"); } $id = $_SESSION['loggedid']; $date = $_GET['date']; $sql = mysql_query("select name from users where id = '$id'"); $row = mysql_fetch_row($sql); $name = $row[0]; $sql = mysql_query("select picname from users where id = '$id'"); $row = mysql_fetch_array($sql); $pic = $row[0]; if ($pic != "") { $target_path = "userpics/"; echo "Welcome $name

Choose from the links below what you would like to do today
"; } else { echo "Welcome $name
Choose from the links below what you would like to do today
"; } //schedule control //edit profile //car control (seating) //picture control ?> Add/Edit My Schedule
Add/Edit My Profile
Propose a carpool
Send a message to a member
Check current carpools
Remove yourself from carpool availability
Readd yourself from carpool availability
Cancel entire membership
"; $row = mysql_fetch_array($sql); $thecar = $carrows[0]; $email = $row[email]; $proximity = $row[proximity]; $zip = $row[zip]; $highway = $row[highway]; ?>
"; echo ""; echo ""; ?>
Edit Your Profile
Choose how many seats are available in your car
Upload your pic:
Email:
Proximity
Closest Highway
Zip Code:
"; } if ($schedule == 'yes') { if ($date != "") { mysql_query("update schedule set $date = 'no' where userid = '$id'"); } if ($_POST['insertid'] != "") { $day = $_POST['day']; $period = $_POST['period']; $insertid = $_POST['insertid']; $field = "$day$period"; mysql_query("update schedule set $field = 'yes' where userid = '$insertid'"); } $sql = mysql_query("select * from schedule where userid = '$id'"); if (mysql_num_rows($sql) > 0) { $row = mysql_fetch_array($sql); $quarter = $row[1]; echo ""; for ($i=3;$i<19;$i++) { if ($row[$i]== 'yes') { //style current schedule here $class = mysql_field_name($sql,$i); $day = substr($class,0,3); $time = substr($class,3,1); if (ereg(mon,$class)) $word = "Monday"; if (ereg(tue,$class)) $word = "Tuesday"; if (ereg(wed,$class)) $word = "Wednesday"; if (ereg(thu,$class)) $word = "Thursday"; if (ereg(fri,$class)) $word = "Friday"; if (ereg(sat,$class)) $word = "Saturday"; if ($time == 1) $time = "8am - 12pm"; if ($time == 2) $time = "1pm - 5pm"; if ($time == 3) $time = "6pm - 10pm"; echo ""; echo "
"; } } } echo "
"; echo "Here is your schedule for $quarter
$word $timeDelete Class
"; echo ""; ?>
Add a class below