This function gets the date from the user:
function getCCGraduationDate () {
?>
<form method="post" action="processor.php">
Graduation Date: <input type="text" name="CCgraduationdate"><br>
<input type="submit">
<?php
}
This function sends the value to a DB and is called on the processor.php page:
function sendCCGraduationDate () {
$con = mysql_connect("localhost","root","XXXXXX");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("user", $con);
$grad = mysql_real_escape_string($_POST['CCGraduationDate'], $con);
$sql = "UPDATE profile SET CommunityCollegeGraduationDate='$grad' WHERE userid=$this->user_id";
mysql_query( $sql , $con );
mysql_close($con);
}
For some reason the value isn't populating in the database. I had tested similar functions last night and they worked, not sure what I'm missing here.