Jump to content

Help!

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Help!'s Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. thank you this should help a lot :)
  2. hi I want to know if it's possible to insert inline php code in an html messege send by a php form e-mail script.  I got the beef of this script online (it's not the final one I'll use I'm just using it to help learn php) but I want to send an html e-mail but I want to be able to echo variables in the html.  this is what i've tried so far.  also am I doing the POST wrong because that doesn't show in the e-mail either. [code]<?php   $to="me@e-mail.com";   $from=$_POST["email"];   $subject="My first HTML E-mail";   $msg=$_POST["message"];   $message=     '<h1>HTML E-mail</h1>   <p>This is an <b>HTML</b> e-mail.</p>   <p>try to put php in the html php page?!?!? <?=$subject?> </p>   ';   $headers = "MIME-Version: 1.0\r\n";   $headers.= "Content-type: text/html; charset=iso-8859-1\r\n";   $headers.= "From: $from\r\n";   if (mail($to, $subject, $message, $headers))       echo "Message Sent!";   else       echo "Failed to send message."; ?>[/code] I got the $subject in the html now becasue the POST won't work (do I need a single quote instead of a double?)  but I eventually want to send what people write in a comment box. the html works but the php in the html doesn't show the main reason for this is formatting so It's pretty and easy to read when I get the results of a form thanks
×
×
  • 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.