Page 1 of 1

echo not cooperating

Posted: Wed Nov 04, 2009 4:06 pm
by dreeves
When my form is submitted and entered into the database, I use 'echo' to display information to the user. When the form is submitted successfully the user should see:
I use this code:

echo "No errors occurred";
echo "$row record was added successfully";
echo "Thank you";

I am hoping to see:

No errors occurred
1 record was added successfully
Thank you

but instead I get:
No errors occurred1 record was added successfullyThank you

What's the problem? Why won't it enter it on multiple lines?

Re: echo not cooperating

Posted: Wed Nov 04, 2009 4:50 pm
by Reviresco
You need to add breaks, paragraphs, etc.

Code: Select all

echo "No errors occurred<br />";
echo "<p>No errors occurred</p>";

Re: echo not cooperating

Posted: Wed Nov 04, 2009 4:57 pm
by dreeves
Got it. Thanks.
I used
echo "text <br>\n";