<?php
$con=mysql_connect( "localhost", "username", "password" );
mysql_select_db( "databasename",$con);
$sql = "SELECT * from tablename";
 
$result = mysql_query($sql,$con);
 
while ($property = mysql_fetch_field($result))
{
echo  $property->name ."=$"."_REQUEST[".$property->name ."],";
}
?>