PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
include("include-mysql.php"); // contains connection details..
$query = "SELECT * from $RegionSelected";
//$RegionSelected contains table name which changes
$result = mysql_query($query);
$i = 0;
while ($row = mysql_fetch_array($result)) {
// For all rows
echo $row[subRegName];
// I simply want to list this field followed by two newlines.
echo '<br/><br/>';
$i++;
}
?>
Thanks very much for that.. Now I know what the problem is..
It is only getting the first word of the table passed to the page using GET e.g. page.php?inst=Channel Islands
It only gets Channel, hence hte table is not found, how can I make sure it gets the lot? If i was to echo the variable out it prints the whole lot, its only when being used for a table is snips it down to one word..