Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.