4 Replies - 231 Views - Last Post: 11 August 2012 - 05:53 AM Rate Topic: -----

#1 EmiT FliX  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 48
  • Joined: 05-August 12

This is yet another puzzling problem.

Posted 11 August 2012 - 04:56 AM

So I have my registration page all setup using DIC's very own script, and now, after changing some of the registration page I get a continuous "Invalid Email" message for the registration page.

I was reading through the comments on the post and someone said for php 5.3 that you can't use
eregi
but instead have to use
preg_match


Is this being used correctly:
//Check Email
	if(!preg_match eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) { //Make sure email is in the format: me@hi.com
		$errmsg[] = 'Invalid Email'; //Error
		$errflag = true; //Set flag so it says theres an error
	}


I'm really not quite sure

This post has been edited by EmiT FliX: 11 August 2012 - 04:58 AM


Is This A Good Question/Topic? 0
  • +

Replies To: This is yet another puzzling problem.

#2 CTphpnwb  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2484
  • View blog
  • Posts: 8,517
  • Joined: 08-August 08

Re: This is yet another puzzling problem.

Posted 11 August 2012 - 05:17 AM

Is there a reason you're not using filter_var() for email filtering?
Was This Post Helpful? 2
  • +
  • -

#3 EmiT FliX  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 48
  • Joined: 05-August 12

Re: This is yet another puzzling problem.

Posted 11 August 2012 - 05:27 AM

Good reason for it, I am pretty basic with my php at the moment, so I will be getting to all that within the next month :D
Was This Post Helpful? 0
  • +
  • -

#4 JackOfAllTrades  Icon User is online

  • Saucy!
  • member icon

Reputation: 5662
  • View blog
  • Posts: 22,506
  • Joined: 23-August 08

Re: This is yet another puzzling problem.

Posted 11 August 2012 - 05:45 AM

Quote

So I have my registration page all setup using DIC's very own script


Which script is this?
Was This Post Helpful? 0
  • +
  • -

#5 EmiT FliX  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 48
  • Joined: 05-August 12

Re: This is yet another puzzling problem.

Posted 11 August 2012 - 05:53 AM

I'll post it below, also, I managed to get that problem fixed, now it just tells me my error message if the query failed. So I may have it working but I'll post below because I also hve doubts

here's the link
http://www.dreaminco...ber-only-pages/

HUZZAH!!! we have success, it's writing it to the database perfectly now :D thanks for all the help guy (I'm going to learn about that filter suggest right now :D)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1