Jump to content

[SOLVED] Minor PHP Form Help


$kevan

Recommended Posts

Quick help needed, I get this message, whats wrong? - Parse error: parse error, unexpected '@' in /home/www/calrealtyexperts.100webspace.net/output.php on line 73

 

Here's the PHP:

 

<?php

// Receiving variables

@$Agent_Name = addslashes($_POST['Agent_Name']);

@$email = addslashes($_POST['email']);

@$Cities_Served = addslashes($_POST['Cities_Served']);

@$Website = addslashes($_POST['Website']);

@$About_Yourself = addslashes($_POST['About_Yourself']);

@$upload_Name = $_FILES['upload']['name'];

@$upload_Size = $_FILES['upload']['size'];

@$upload_Temp = $_FILES['upload']['tmp_name'];

@$upload_Mime_Type = $_FILES['upload']['type'];

 

function RecursiveMkdir($path)

{

  if (!file_exists($path))

  {

      RecursiveMkdir(dirname($path));

      mkdir($path, 0777);

    }

  }

// Validation

if (! ereg('[A-Za-z0-9_-]+\@[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+', $email))

{

header("Location: error.html");

exit;

}

if( $upload_Size == 0)

{

header("Location: error.html");

exit;

}

if( $upload_Size >1900000)

{

//delete file

unlink($upload_Temp);

header("Location: error.html");

exit;

}

if( $upload_Mime_Type != "image/cgm" AND $upload_Mime_Type != "image/g3fax" AND $upload_Mime_Type != "image/gif" AND $upload_Mime_Type != "image/ief" AND $upload_Mime_Type != "image/pjpeg" AND $upload_Mime_Type != "image/jpeg" AND $upload_Mime_Type != "image/naplps" AND $upload_Mime_Type != "image/png" AND $upload_Mime_Type != "image/prs.btif" AND $upload_Mime_Type != "image/prs.pti" AND $upload_Mime_Type != "image/tiff" AND $upload_Mime_Type != "image/vnd.cns.inf2" AND $upload_Mime_Type != "image/vnd.dwg" AND $upload_Mime_Type != "image/vnd.dxf" AND $upload_Mime_Type != "image/vnd.fastbidsheet" AND $upload_Mime_Type != "image/vnd.fpx" AND $upload_Mime_Type != "image/vnd.fst" AND $upload_Mime_Type != "image/vnd.fujixerox.edmics-mmr" AND $upload_Mime_Type != "image/vnd.fujixerox.edmics-rlc" AND $upload_Mime_Type != "image/vnd.mix" AND $upload_Mime_Type != "image/vnd.net-fpx" AND $upload_Mime_Type != "image/vnd.svf" AND $upload_Mime_Type != "image/vnd.wap.wbmp" AND $upload_Mime_Type != "image/vnd.xiff" )

{

unlink($upload_Temp);

header("Location: error.html");

exit;

}

$uploadFile = "uploads/".$upload_Name ;

if (!is_dir(dirname($uploadFile)))

  {

    RecursiveMkdir(dirname($uploadFile));

  }

else

  {

  @chmod(dirname($uploadFile), 0777);

  }

@move_uploaded_file( $upload_Temp , $uploadFile);

chmod($uploadFile, 0644);

// Changes This to Your URL

$upload_URL = "http://your-url.com/uploads/".$upload_Name ;

//........................................................................

//Sending Email to form owner

# Email to Owner

$pfw_header = "From: $email";

$pfw_subject = "CaliforniaRealtyExperts.com - Someone wants a profile";

// Change this to your email address

$pfw_email_to = "[email protected]";

//........................................................................

$pfw_message = "Agent_Name: $Agent_Name\n"

. "email: $email\n"

. "Cities_Served: $Cities_Served\n"

. "About_Yourself: $About_Yourself\n"

. "Website: $Website\n"

. "upload: $upload_URL\n"

. "\n"

@mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;

//Sending auto respond Email to user

# Email to Owner

// Change this to your email address

$pfw_header = "From: californiarealtyexperts.com";

//........................................................................

$pfw_subject = "Thanks For Applying For A Profile!";

$pfw_email_to = "$email";

$pfw_message = "Agent_Name: $Agent_Name\n"

. "email: $email\n"

. "Cities_Served: $Cities_Served\n"

. "Site_Title: $Site_Title\n"

. "About_Yourself: $About_Yourself\n"

. "Website: $Website\n"

. "upload: $upload_URL\n"

. "\n"

@mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;

 

header("Location: thank_you.html");

 

?>

Link to comment
https://forums.phpfreaks.com/topic/56444-solved-minor-php-form-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.