focus
Member
- Messages
- 128
- Reaction score
- 0
- Points
- 16
I can get my script to send an email but after it sends it the user gets a confirmation "Your mail was sent successfully." on the next page.
THe problem is that the text that the PRINT is displayed in doesn't match the websites CSS its simply in black. How can i fix this?
Webpage:
http://squidg.x10hosting.com/peterstavrou/contact.html
PHP CODE:
<?php
function is_valid_email($from_email)
{
return preg_match('#^[a-z0-9.!\#$%&\'*+-/=?^_`{|}~]+@([0-9.]+|([^\s\'"<>]+\.+[a-z]{2,6}))$#si', $from_email);
}
$to_email = "blabla@hotmail.com";
$subject = "Portfolio Enquiry";
$name.=$_POST['name']."\n" ;
$company.=$_POST['company']."\n" ;
$from_email.=$_POST['email'] ."\n" ;
$msg.=$_POST['msg']."\n" ;
$message = "
Name:
$name
Company:
$company
Email:
$from_email
Message:
$msg
";
$sent = mail($to_email, $subject, $message) ;
if($sent)
{print "Your mail was sent successfully."; }
else
{print "We encountered an error sending your mail"; }
?>
Also... Under the $message = section, how do i get the name for example to be displayed in bold?
For example...
<b> Name: </b>
$name
(but that doesn't work)
THe problem is that the text that the PRINT is displayed in doesn't match the websites CSS its simply in black. How can i fix this?
Webpage:
http://squidg.x10hosting.com/peterstavrou/contact.html
PHP CODE:
<?php
function is_valid_email($from_email)
{
return preg_match('#^[a-z0-9.!\#$%&\'*+-/=?^_`{|}~]+@([0-9.]+|([^\s\'"<>]+\.+[a-z]{2,6}))$#si', $from_email);
}
$to_email = "blabla@hotmail.com";
$subject = "Portfolio Enquiry";
$name.=$_POST['name']."\n" ;
$company.=$_POST['company']."\n" ;
$from_email.=$_POST['email'] ."\n" ;
$msg.=$_POST['msg']."\n" ;
$message = "
Name:
$name
Company:
$company
Email:
$from_email
Message:
$msg
";
$sent = mail($to_email, $subject, $message) ;
if($sent)
{print "Your mail was sent successfully."; }
else
{print "We encountered an error sending your mail"; }
?>
Also... Under the $message = section, how do i get the name for example to be displayed in bold?
For example...
<b> Name: </b>
$name
(but that doesn't work)
Last edited: