i am having trouble displaying my database table...i am new to php and mysql (just started last week)... this is the code iam using:
<?php
//connect
mysql_connect("","","") or die(mysql_error());
mysql_select_db("") or die(mysql_error());
//query the db
$getnews = mysql_query("SELECT * FROM shows ORDER BY id DESC") or die(mysql_error());
while ($row = mysql_fetch_assoc($getnews))
{
//get data
$id = $row['id'];
$venue = $row['venue'];
$date = date("m/d/Y", strtotime($row[date]));
$city = $row['city'];
$state = $row['state'];
$exceptions = $row['exceptions'];
$countries = $row['countries'];
echo "&theDates=$date|&theStates=$state|&theCities=$city|&theExceptions=$exceptions|&theClubs=$venue|&theIDs=$id|&theCountries=$countries|
<br>";
}
?>
but it is display it like this on the browser:
&theDates=date01|&theStates=state01|&theCities=city01|theExceptions=exceptions01|&theClubs=club01|&theIDs=id01|&theCountries=countries01|
&theDates=date02|&theStates=state02|&theCities=city02|theExceptions=exceptions02|&theClubs=club02|&theIDs=id02|&theCountries=countries02|
I need it to display like this:
&theDates=date01|date02|&theStates=state01|state02|&theCities=city01|city02|theExceptions=exceptions01|exceptions02|&theClubs=club01|club02|&theIDs=id01|id02|&theCountries=countries01|countries02|
so that one the php calls up the information from the database it is displayed in the corresponding area not each row seperatly...can anyone help me with this problem.....?
D