Link to home
Start Free TrialLog in
Avatar of Pete Long
Pete LongFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Error : Deprecated: Function eregi() is deprecated

Putting an email form on my site as per instructions at  http://www.ibdhost.com/contact/

It works - But it throws that error at me..

Deprecated: Function eregi() is deprecated in /home/petenetl/public_html/KB/Article/sendeail.php on line 24

the line in the page it don't like is below. Some googling tells me that my host is probably using a newer verion of .php

So what can I change that bit of code to that will work?

Be aware I know nothing about code other than how to copy and paste it :(

Thanks




if (eregi('http:', $notes)) {  <<<<This one
die ("Do NOT try that! ! ");
}

Open in new window

Avatar of Om Prakash
Om Prakash
Flag of India image

This function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged.
Use preg_match instead of eregi
ASKER CERTIFIED SOLUTION
Avatar of pareshprajapati
pareshprajapati
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Pete Long

ASKER

Thanks I got that much from google :)

a. it it that line that need to change or loads of lines?
b. As earlier stated I couldn't write code to save my life.
thanks pareshprajapati testing now.................
..........awesome pareshprajapati that's exactly what I needed thanQ
Perfect!!