Jump to content

Adding an image to a PHP form submisison confirmation page


stjonesMSI

Recommended Posts

Here is the code at the end of my PHP file I am working on (as a novice user):

$headers = "MIME-Version: 1.0" . "\r\n";

$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";


$headers .= "From: " . $from . "\r\n" ."Reply-To: " . $to . "\r\n" . 'X-Mailer: PHP/' . phpversion();

$retval = mail($to, $subject, $message, $headers);



echo "<br>";

 if( $retval == true )
   {
      
      echo "<h1>Thank you!</h1>\r\n<br>";
      echo "Your application for employment has been successfully transmitted to <strong>Morgan Smith Industries</strong>.<br>";
   }
   else
   {
      echo "Message could not be sent to >".$to."<";
   }

echo "<br<br><br>";

echo date("D M d, Y G:i a");
echo "<br><br>";


?>
</body>
</html>

I want to be able to place an image on the web page that opens after the form is submitted, above the "Thank you" line.  I can't seem to figure out the syntax needed in PHP to put the image "URL" into  the PHP language,  Any pointers?

 

Thanks!

 

Steve

 

 

 

As in something like this:

echo '<img src="yourimage.jpg">';
echo "<h1>Thank you!</h1>\r\n<br>";
 
Note that you could also break out of PHP to do HTML stuff.
if( $retval == true )
   {
      ?>
      <img src="yourimage.jpg">
      <h1>Thank you!</h1><br>
      Your application for employment has been successfully transmitted to <strong>Morgan Smith Industries</strong>.<br>
      <?php
   }

 

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.