Results 1 to 3 of 3

Thread: Script Assisance
      
   

  1. #1
    jabird60's Avatar
    jabird60 is offline Sergeant First Class
    Join Date
    Feb 2006
    Posts
    57

    Default Script Assisance

    <?php
    // Receiving variables
    @$Name = addslashes($_POST['Name']);
    @$Email = addslashes($_POST['Email']);
    @$username = addslashes($_POST['usernamel']);
    @$password = addslashes($_POST['password']);
    // Validation
    if (strlen($Name) == 0 )
    {
    header("Location: name_error.html");
    exit;
    }
    if (! ereg('[A-Za-z0-9_-]+\@[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+', $Email))
    {
    header("Location: email_error.html");
    exit;
    if (strlen($password) == 0 )
    }
    header("Location: error_password.html");
    exit;
    if (strlen($username) == 0 )
    {
    header("Location: error_username.html");
    exit;
    }
    //Sending Email to form owner
    $pfw_header = "From: $Email\n"
    . "Reply-To: $Email\n";
    $pfw_subject = "Order";
    $pfw_email_to = "jabird60********.com";
    $pfw_message = "Name: $Name\n"
    . "Email: $Email\n"
    . "Descrption: $Descrption\n";
    . "password: $password\n";
    . "username: $username\n";
    *****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
    header("Location: orderconf.html");


    can anybody see if there is something wong with that script,it says that there is a error on line 18 but i cant figer it out

  2. #2
    Watdaflip's Avatar
    Watdaflip is offline Major General
    Join Date
    Sep 2005
    Location
    Cincinnati, Ohio
    Posts
    2,119

    Default Re: Scrip prob

    These lines

    if (! ereg('[A-Za-z0-9_-]+\@[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+', $Email))
    {
    header("Location: email_error.html");
    exit;
    if (strlen($password) == 0 )
    }
    header("Location: error_password.html");
    exit;

    should be

    if (! ereg('[A-Za-z0-9_-]+\@[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+', $Email))
    {
    header("Location: email_error.html");
    exit;
    }
    if (strlen($password) == 0 )
    {
    header("Location: error_password.html");
    exit;
    }

    Register/Login Script
    Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

  3. #3
    VodaHost's Avatar
    VodaHost is offline General & Forum Administrator
    Join Date
    Mar 2005
    Location
    Wilmington, Delaware USA
    Posts
    11,428

    Default Re: Script Assisance

    Moving to script forum.

    VodaHost

    Your Website People!
    1-302-283-3777 North America / International
    07031847328 / United Kingdom

    ------------------------

    Top 3 Best Sellers

    Web Hosting - Unlimited disk space & bandwidth.

    Reseller Hosting - Start your own web hosting business.

    Search Engine & Directory Submission - 300 directories + (Google,Yahoo,Bing)



Thread Information

Users Browsing this Thread

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

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49