Jump to content

kyllingman2

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by kyllingman2

  1. kyllingman2

    PHP echo error

    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!
×
×
  • Create New...