Activity Stream
48,167 MEMBERS
6728 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 3 of 3
  1.     
    #1
    Member
    Website's:
    goathiphop.com

    Default Contact form in PHP website gives errors

    Hi guys,
    I've recently incorporated a contact form in a PHP website. Everything looks OK but when I click the Submit button I get the following errors:


    fgcontactform.php
    on line
    548
    this is line 548
    Code: 
    {
            return eregi("^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$", $email);
        }
    class.phpmailer.php
    on line
    470
    this is line 470
    Code: 
     $toArr = split(',', $to);
    does anyone have an idea what's causing this?
    f4n3 Reviewed by f4n3 on . Contact form in PHP website gives errors Hi guys, I've recently incorporated a contact form in a PHP website. Everything looks OK but when I click the Submit button I get the following errors: http://i1208.photobucket.com/albums/cc364/f4n3/contact-1.png fgcontactform.php on line 548 this is line 548 { return eregi("^+@(+\.)+{2,6}$", $email); }class.phpmailer.php on line Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Respected Member
    Website's:
    DL4Everything.com Soft2050.in
    They are deprecated functions and they shouldn't be used since they are going to be removed in future versions.

    Instead of eregi, use preg_match, replace code with:
    PHP Code: 
    {
            return 
    preg_match("/^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$/i"$email);
        } 
    Same goes for the split function too, instead of that use explode function, replace with:
    PHP Code: 
     $toArr explode(','$to); 

  4.     
    #3
    Member
    Website's:
    goathiphop.com
    @soft2050,thanks for the reply!

    all errors are gone but now the form is not being forwarded to the email address. f*ck sake...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [PHP] Getting blank message from contact form
    By coolboyz2323 in forum Technical Help Desk Support
    Replies: 6
    Last Post: 30th Sep 2012, 08:03 AM
  2. Where can I found a good contact form?
    By Divvy in forum Webmaster Discussion
    Replies: 9
    Last Post: 31st Mar 2011, 06:00 PM
  3. 23:34 10/11/2010 - Contact form
    By JmZ in forum Web Development Area
    Replies: 4
    Last Post: 12th Nov 2010, 11:53 AM
  4. Free Contact Form Lite
    By Jesse in forum Useful Sites
    Replies: 1
    Last Post: 30th Dec 2009, 08:50 PM
  5. Free Contact Form
    By johnny in forum Webmaster Discussion
    Replies: 1
    Last Post: 2nd Dec 2009, 03:35 PM

Tags for this Thread

BE SOCIAL