Jump to content

[SOLVED] How do you list?


Zepo.

Recommended Posts

I want all of the news articles to be displayed, but it only displays one.

 

<?php
/*Start the sesion*/
session_start(); 

/*Lets pull the data from the database*/
$result = mysql_query("SELECT * FROM news");
$news = mysql_fetch_array($result);

/*Check the sessions permissions*/
if (isset($_SESSION['name'])) {
if ($_SESSION['rights'] == 100){

if ($act == "editnews") {

echo "<div class='pagetitle'>News Manager</div>
<div style='margin:10px'>
<br />
<table cellpadding='4' cellspacing='0' border='0' align='center' width='95%' class='tborder' id='optionsform' >
<colgroup span='2'>
<col style='width:45%'></col>
<col style='width:55%'></col>
</colgroup>
<tr>
<td class='tcat' align='center' colspan='2'>
<b>Edit News</b>
</td>
</tr>";

/*THIS PART NEEDS TO REPEAT*/
echo "
<tr valign='top'>
<td class='optiontitle'  colspan='2'><div>$news[title]</div></td>
</tr>
<tbody id='tbody_keywords'>
<tr valign='top'>
<td class='alt1'><div class='smallfont' ><center>$news[news]
</center></div></td>
</tr>";


echo "
</tbody>
</table>";

if($act == "edit") {
}
if($act == "delete") {
}

  if (isset($_POST['submit'])) {
    editnews();
  }
}
}
}


?>

 

How can i get it to list everything?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.