Jump to content

Adding an image to a PHP form submisison confirmation page


stjonesMSI
Go to solution Solved by cyberRobot,

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

 

 

 

Link to comment
Share on other sites

  • Solution

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
   }

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.