Jump to content

Valid Email() Error


JeanieTallis

Recommended Posts

I recieve this error when trying to register an account.

 

Fatal error: Call to undefined function valid_email() in /home/myveeco/public_html/register.php on line 7

 

this is the selection of code with errors.

 

<?php
session_start();
require_once('settings.php');

if ( array_key_exists ( '_submit_check', $_POST ) )
{
	if ( $_POST['full_name'] != '' && $_POST['email'] != '' && $_POST['username'] != '' && $_POST['password'] != '' && $_POST['password'] == $_POST['password_confirmed'] && $_POST['country'] != '' && $_POST['user_code'] != '' && valid_email ( $_POST['email'] ) == TRUE )
	{
		if ( ! checkUnique ( 'Username', $_POST['username'] ) )
		{
			$error = 'Username already taken. Please try again!';
		}
		elseif ( ! checkUnique ( 'Email', $_POST['email'] ) )
		{
			$error = 'The email you used is associated with another user. Please try again or use the "forgot password" feature!';
		}
elseif ( ! checkUnique (md5($_POST['user_code'] ),$_SESSION['ckey'] ) )
{ 
		 die("Invalid code entered. Please enter the correct code as shown in the Image");
  		} 
		else {		
			$query = $db->query ( "INSERT INTO " . DBPREFIX . "users (`full_name` , `Email` , `Username` , `Password` , `Country` , `date_registered` , `Random_key`) VALUES (" . $db->qstr ( $_POST['username'] ) . ", " . $db->qstr ( md5 ( $_POST['password'] ) ).", '" . time () . "', " . $db->qstr ( $_POST['email'] ) . ", '" . random_string ( 'alnum', 32 ) . "')" );

 

 

This is line 7 which causes the error

 

		if ( $_POST['full_name'] != '' && $_POST['email'] != '' && $_POST['username'] != '' && $_POST['password'] != '' && $_POST['password'] == $_POST['password_confirmed'] && $_POST['country'] != '' && $_POST['user_code'] != '' && valid_email ( $_POST['email'] ) == TRUE )

 

Any help?

thanks

Link to comment
https://forums.phpfreaks.com/topic/151735-valid-email-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.