I believe that my code is wrong as the selected fields aren't inserting into table/fields at all.
how do i get the following to work with the following refernces from the URL.
$sql="INSERT INTO Instruction (PhysioReference, Physio, PhysiosAddress, postcode, Physiomobile, Number, Physiofax, PhysiosEmail WHERE Reference='$Reference')
SELECT PhysioReference, Name, Line1, Postcode, Mobile, Tel, Fax, Email from `Physio` WHERE PhysioReference='$PhysioReference'";
example URL: http://test.com/Physiotoinstruction.php?PhysioReference=100099&Reference=456789
Page.php
<?php
require_once('auth.php');
$host=""; // Host name
$username=""; // Mysql username
$password=""; // Mysql password
$db_name=""; // Database name
$tbl_name="Instruction"; // Table name
// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$Reference=mysql_real_escape_string($_GET['Reference']);
$PhysioReference=mysql_real_escape_string($_GET['PhysioReference']);
$sql="INSERT INTO Instruction (PhysioReference, Physio, PhysiosAddress, postcode, Physiomobile, Number, Physiofax, PhysiosEmail WHERE Reference='$Reference')
SELECT PhysioReference, Name, Line1, Postcode, Mobile, Tel, Fax, Email from `Physio` WHERE PhysioReference='$PhysioReference'";
$result=mysql_query($sql);
//$sql="INSERT INTO Triage (Reference, Forename)
//SELECT Reference, Forename FROM `Instruction`
//WHERE Reference='$Reference' LIMIT 1";
echo "Successful";
echo "<BR>";
echo "<a href='insert.php'>View result</a>";
// mysql_error()
?>