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

Recommended Answers

All 2 Replies

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 :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.