gevo12321 Posted June 23, 2007 Share Posted June 23, 2007 hi i made this template that looks into a database and brings all the articles into a page than when u click on the article it opens it but i think there is a syntax error because when i click on the article, nothing on the page changes except the url can someone plz look and make sure that all my code is right i would really appreciate it thx <?php require_once('connect.php'); $articleID=$_GET['newsnumber']; $query=mysql_query("SELECT * FROM news WHERE newsnumber=$articleID") or die(mysql_error()); $row=mysql_fetch_object($query); $date1=$row->date; $title=$row->title; $news=$row->news; $date=date('m-d-Y',strtotime($date1)); echo $title; echo "<br>"; echo $date; echo "<br>"; echo $news; ?> <?php require_once('connect.php'); $query=mysql_query("SELECT newsnumber,date,title FROM news ORDER BY date desc") or die(mysql_error()); while($row=mysql_fetch_object($query)) { $date1=$row->date; $title=$row->title; $newsnumber=$row->newsnumber; $date=date('m-d-Y',strtotime($date1)); echo "<a href=\"?article.php?newsnumber='$newsnumber'\">"; echo $date; echo " "; echo $title; echo "</a>"; echo "<br>"; } ?> thank you Link to comment https://forums.phpfreaks.com/topic/56895-solved-sintax-error/ Share on other sites More sharing options...
gevo12321 Posted June 23, 2007 Author Share Posted June 23, 2007 nvm got it found my errors thank you very much Link to comment https://forums.phpfreaks.com/topic/56895-solved-sintax-error/#findComment-281110 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.