Script Assisance

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • jabird60
    Sergeant First Class

    • Feb 2006
    • 57

    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
  • Watdaflip
    Major General

    • Sep 2005
    • 2116

    #2
    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

    Comment

    • VodaHost
      General & Forum Administrator

      • Mar 2005
      • 12356

      #3
      Re: Script Assisance

      Moving to script forum.

      VodaHost

      Your Website People!
      1-302-283-3777 North America / International
      02036089024 / United Kingdom
      291916438 / Australia

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

      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)


      Comment

      Working...
      X