Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

echo looks tacky

i need to echo within html



10:57 pm on Jan 20, 2008 (gmt 0)

5+ Year Member

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"?

$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 {


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

WebmasterWorld Senior Member eelixduppy is a WebmasterWorld Top Contributor of All Time 10+ Year Member

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?


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

10+ Year Member

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




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

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member

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


Featured Threads

Hot Threads This Week

Hot Threads This Month