stjonesMSI Posted June 16, 2015 Share Posted June 16, 2015 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 https://forums.phpfreaks.com/topic/296862-adding-an-image-to-a-php-form-submisison-confirmation-page/ Share on other sites More sharing options...
cyberRobot Posted June 16, 2015 Share Posted June 16, 2015 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 https://forums.phpfreaks.com/topic/296862-adding-an-image-to-a-php-form-submisison-confirmation-page/#findComment-1514109 Share on other sites More sharing options...
stjonesMSI Posted June 16, 2015 Author Share Posted June 16, 2015 Thanks! That worked! I was close, I had just screwed up the single quotes! Time to take a break from staring at the screen! Link to comment https://forums.phpfreaks.com/topic/296862-adding-an-image-to-a-php-form-submisison-confirmation-page/#findComment-1514114 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.