homepage Welcome to WebmasterWorld Guest from 54.205.144.54
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
echo looks tacky
i need to echo within html
robert3406




msg:3553146
 10:57 pm on Jan 20, 2008 (gmt 0)
This is my problem.......and probably due to the fact that i am new to php. this php file returns results that look tacky at best. It is just a blank screen that says "message sent". how do I get a "message sent" message within my html doc? do i need to use something other than "echo"?

<?php
$status = $_GET['status'];
if($status=="1") {
echo '<div class="successAlert"
style="width:560px; margin:auto">
Message successfully sent!</div>';
} elseif ($status=="0") {
echo '<div class="warningAlert"
style="width:560px; margin:auto">
Your message was not sent. Please check your input!</div>';
} else {
echo"";
}
?>

 

eelixduppy




msg:3553153
 11:10 pm on Jan 20, 2008 (gmt 0)

Do you mean how do you add php to a HTML file with a .html extension? Or just how do you embed php within HTML in an .php file?

maccas




msg:3553170
 11:25 pm on Jan 20, 2008 (gmt 0)

What about SSI if you must have it in a html file. You dont need to use print or echo in a *.php file i.e

<html>
<head>
.....
<?php

?>
.....
</html>

jatar_k




msg:3553721
 5:45 pm on Jan 21, 2008 (gmt 0)

it's not echo that's tacky, it's what it echos ;)

you can add html to the echo

if you have a template you may be able to use that

if you use a header and footer site wide you could use include to put them around your text

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved