0

hi ive changed my system and im attempting to add a date of birth to registration and i have came across the following error
Fatal error: Call to undefined function Age() in /home/jktempla/public_html/signup.php on line 56
if solmeone can please look at the coding for this section and see whats causing this

<div class='tmain'><h3>Please enter your details to sign up</h3>
_END;
$error = $user = $pass = $memtype = $user_birthdate = "";
if (isset($_SESSION['user'])) destroySession();
if (isset($_POST['user']))
{
$user = sanitizeString($_POST['user']);
$pass = sanitizeString($_POST['pass']);
$memtype = sanitizeString($_POST['memtype']);
$day = sanitizeString($_POST['day']);
$month = sanitizeString($_POST['month']);
$year = sanitizeString($_POST['year']);
$confirm = sanitizeString($_POST['confirm']);

$user_birthdate = $_POST['days'].'-'.$_POST['months'].'-'.$_POST['years'];
$age            = Age($user_birthdate);
if ($user == "" || $pass == "" || $memtype == "" || $user_birthdate == "")
$error = "Not all fields were entered<br><br>";
else
{
$result = queryMysql("SELECT * FROM members WHERE user='$user'");
if ($result->num_rows)
$error = "That username already exists<br><br>";
else
{
queryMysql("INSERT INTO members VALUES('$user', '$pass', '$memtype', '$day', '$month', '$year')");
die("<h4>Account created</h4>Please <a href='login.php'>Log in.</a><br><br>");
}
}
}
echo <<<_END

any help would be much appreicated

Edited by janicemurby: typo

2
Contributors
2
Replies
17
Views
1 Year
Discussion Span
Last Post by cereal
0

ive sorted that line out but now im getting on next line down so the error im now getting is
Fatal error: Call to undefined function Age() in /home/jktempla/public_html/signup.php on line 55

how can i sort this :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.