Ok folks need desperate help before i throw this laptop out of the window.
Even tho its not the laptop causing the problem.
Heres my story:
i am quite an expierenced user of dreamweaver 8 and of ASP, so i am very new to PHP but can read the scripting "ok"
using the recordset function and the dynamic table function i have created th cript below that when opened in the browser reg2.php?reg_id?3 should show all of the items with reg_id=3 in a table. heres my problem, it is only showing 1 item when there is clearly more in the table for reg_id 3.
i am really stuck and getting quite fed up,
also please note that the number 3 is just an example
here is my script
<?php require_once('../Connections/connMysql.php'); ?>
<?php
$colname_rsnews = "-1";
if (isset($_GET['reg_id'])) {
$colname_rsnews = (get_magic_quotes_gpc()) ? $_GET['reg_id'] : addslashes($_GET['reg_id']);
}
mysql_select_db($database_connMysql, $connMysql);
$query_rsnews = sprintf("SELECT * FROM regionnews WHERE reg_id = %s ORDER BY reg_id ASC", $colname_rsnews);
$rsnews = mysql_query($query_rsnews, $connMysql) or die(mysql_error());
$row_rsnews = mysql_fetch_assoc($rsnews);
$totalRows_rsnews = mysql_num_rows($rsnews);
mysql_free_result($rsnews);
?>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>regnews_id</td>
<td>region_news</td>
<td>reg_id</td>
<td>datetimenewsposted</td>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_rsnews['regnews_id']; ?></td>
<td><?php echo $row_rsnews['region_news']; ?></td>
<td><?php echo $row_rsnews['reg_id']; ?></td>
<td><?php echo $row_rsnews['datetimenewsposted']; ?></td>
</tr>
<?php } while ($row_rsnews = mysql_fetch_assoc($rsnews)); ?>
</table>
Thanks To those who can help