Jump to content

PHP echo error


Recommended Posts

I'm having an error with this echo, I don't really know PHP. The script is going to take the data from a mysql database and show it on my website, but the echo were i'm going to show it just doesn't work. This is the code:

<html>     <?phpmysql_connect("SECRET","SECRET","SECRET") or die(mysql_error());mysql_select_db('SECRET') or die(mysql_error()); $getpage = mysql_query("SELECT * FROM secret") or die(mysql_error()); while ($row = mysql_fetch_assoc($getpage)) {$title = $row['title'];$header = $row['header'];$content = $row['content'];$date = $row['date'];$notes = $row['notes'] echo"<title>($title)</title>" echo nl2br($body);echo"<hr>";}?></html>

So I need to know how I should create the echo so I can display what's in the database like "echo "<title>($title)</title>", that doesn't work, but I need to know what I should do or what I should use. Thanks!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...