<?php
//duplicate enquiry from reference $ref
include("db.php");
$query=do_query("SELECT * FROM enquiry WHERE ref='".$_GET['ref']."'");
$enq=mssql_fetch_array($query);
foreach ($enq as $key=>$val)
{
echo $key." and ".$val."<br>";
}
?>
Works and it gives me the keys and values....
But it comes out like
0 and 1942
ref and 1942
1 and C15767
clientref and C15767
Is there any way of getting just the keyname (e.g. ref) and the value (e.g. 1942) ?
[note]
The do_query function deals with all database connection and mysql_query included in db.php...
[/note]