I find I keep having to do things like this:
$sql = "select * from $tablename WHERE id = $id";
$result = mysql_query($sql)or die);
while ($myrow = mysql_fetch_array($result))
{
$id = $myrow["id"];
$name =$myrow["name"];
$region =$myrow["region"];
$phone =$myrow["phone"];
$email =$myrow["email"];
$web =$myrow["web"];
}
is there a way to automate the process? after all I'm using the same variable name as the field name.
What I want it to do is:
$fieldname = $myrow["fieldname"];
It looks like it should be simple, but I can't see the answer
Julia