Ok here is my code. require ("config.php");
$connection = @mysql_connect($server, $user, $password) or die("Couldn't Connect.");
$db = @mysql_select_db($dbname, $connection) or die("Couldnt select database.");
$sql = 'select * FROM news';
$result = @($sql,$connection) or die("Couldn't ececute query.");
while ($row = mysql_fetch_array($result)) {
echo"<form action='update.php' method='post'>
<table width='100%' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td height='6' valign='top' width='17%' class='text'> Add News Section </td>
<td width='83%'></td>
</tr>
<tr>
<td height='6' valign='top' width='17%' class='text'>Date</td>
<td width='83%'>
<input type='text' name='date' value='$row[date]'>
</td>
</tr>
<tr>
<td valign='top' width='17%' class='text'> Title: </td>
<td width='83%'>
<input type='text' name='title' size='60' value='$row[title]'>
</td>
</tr>
<tr>
<td valign='top' width='17%' class='text'>Teaser: <br>
(This is where you add a small amount of the News) </td>
<td width='83%'>
<input type='text' name='speaker' size='60' value='$row[teaser]'>
</td>
</tr>
<tr>
<td width='17%' class='text'>News</td>
<td rowspan='2' width='83%'><font size='2' face='Verdana'>
<textarea name='date' cols='60' rows='12'>$row[text]</textarea>
</font></td>
</tr>
<tr>
<td width='17%'> </td>
</tr>
<tr>
<td width='17%'></td>
<td width='83%'> </td>
</tr>
</table>
</form>";
}
I have it echoing two articles. When someone changes it i need to be able to update 2 news items at the same time. Would it still jusu be a sql of update?