Jump to content

linking problema


aznjay

Recommended Posts

[code]
$result6e = mysql_query("SELECT * FROM news ORDER BY id") or die(mysql_error()); 
while($row6e = mysql_fetch_array( $result6e ))
{
echo "<a href=index.php?id=>". $row6e['id'] ."</a>";
}

if($_GET['news'] == '$row6e')
?>
[/code]

Here's what I'm trying to do, I'm getting the info from column 'title' and showing it and I wanted to add "IF" coz' if i added that it'll get the html file from another table "pages".
Link to comment
https://forums.phpfreaks.com/topic/28037-linking-problema/
Share on other sites

[code]
$result6e = mysql_query("SELECT * FROM news ORDER BY id DESC") or die(mysql_error()); 
while($row6e = mysql_fetch_array( $result6e ))
{
$id = $row['id'];
echo "<br><a href=nav1.php?id=". $row6e['id'] .">". $row6e['id'] ."</a>";

if($id)
{
$result89e = mysql_query("SELECT * FROM pages WHERE id='$id'") or die(mysql_error());
$row89e = mysql_fetch_array( $result89e );
echo "<b>". $row69['title'] ."</b>";
}
}

?>
[/code]
Link to comment
https://forums.phpfreaks.com/topic/28037-linking-problema/#findComment-128267
Share on other sites

[code]
$result6e = mysql_query("SELECT * FROM news ORDER BY id DESC") or die(mysql_error()); 
while($row6e = mysql_fetch_array( $result6e ))
{
$id = $row6e['id'];
echo "<br><a href=nav1.php?id=". $row6e['id'] .">". $row6e['id'] ."</a>";

if($_GET['id'] == '$id')
{
$result89e = mysql_query("SELECT * FROM pages WHERE id='$id'") or die(mysql_error());
$row89e = mysql_fetch_array( $result89e );
echo "<b>". $row89e['title'] ."</b>";
}
}

?>
[/code]
It still doesn't work
Link to comment
https://forums.phpfreaks.com/topic/28037-linking-problema/#findComment-128284
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.