Jump to content

[SOLVED] Super easy question - please help


binarygirl

Recommended Posts

This Should work:

<?php
if (empty($email) ||empty($name)||empty($phone)||!isset($phone)||!isset($name)||!isset($email)||!isset($name)||!isset($phone)||!isset($email))
{
  header( "Location: error.html" );
  exit;
}
else  if(!empty($name)||!empty($email)||!empty($phone)||isset($name)||isset($phone)||isset($email))
{

  //mail ( string $to , string $subject , string $message [, string $additional_headers [, string $additional_parameters ]] )

  $admin = '[email protected]' ; 
  $name = stripslashes($_POST['name']) ;
  $message = stripslashes($_POST['message']) ;
  $email = stripslashes($_POST['email']) ;
  $phone = stripslashes($_POST['phone']) ;

  mail( $admin, "Feedback: $name", "Name: $name\nPhone: $phone\nEmail: $email\n\n$message", "From: $name <$email>" );


  $subject = 'Online Inquiry';
  $replymsg = 'Thank you for your email inquiry. One of our staff will respond shortly.' ; 
  mail( $email, $subject, $replymsg , "From: $admin" );

  header( "Location: thankyou.html" );
  exit;
}
?>

 

ps= mark topic solved ;)

hrm.. another question from the pain in the Arse rookie...

 

how do I make this line work

 

$replymsg = 'Thank you for your email inquiry. One of our staff will respond shortly.\n\nwww.mywebsite.com' ; 

 

so it displays like this

 

Thank you for your email inquiry. One of our staff will respond shortly.

www.mywebsite.com

 

instead of llike this:

$replymsg = 'Thank you for your email inquiry. One of our staff will respond shortly.\nwww.mywebsite.com

aww.. just saw your post.. moon beat ya too it - thanks DFs...

 

$replymsg = 'Thank you for your email inquiry. One of our staff will respond shortly.\nwww.mywebsite.com' ;

 

I thought /n or \n would give me a line break so it would read:

 

Thank you for your email inquiry. One of our staff will respond shortly.

www.mywebsite.com

aww.. but I am still trying to figure out how to print

Thank you for your email inquiry. One of our staff will respond shortly.

www.mywebsite.com

 

$replymsg = 'Thank you for your email inquiry. One of our staff will respond shortly.\nwww.mywebsite.com' ;

 

/n or \n doesn't work.

 

prints it as one string... Thank you for your email inquiry. One of our staff will respond shortly. www.mywebsite.com

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.