this is the php script i'm using, the top section to perform an insert and the bottom section so i know if the data is going in or not. As you can see the $query section returns an array from the database using the select all command, this returns everthing i have inserted but when i open up access there is nothing there. It must be retrieving the data from access though, else where is it being stored.?
<?php
$name=$_POST['name'];
$age=$_POST['age'];
$country=$_POST['country'];
$city=$_POST['city'];
$profession=$_POST['profession'];
$competence=$_POST['competence'];
$website=$_POST['website'];
$emotion=$_POST['emotion'];
$emotion2=$_POST['emotion2'];
$popup=$_POST['popup'];
include 'odbc.php';
echo "$name";
$sql = "Insert Into dissertation (name, age, country, city, profession, competence, website, emotion, emotion2, popup) Values
('$name', $age, '$country', '$city', '$profession', '$competence', '$website', '$emotion', '$emotion2', '$popup')";
$result_set = odbc_exec ($odbc, $sql);
if (!$result_set)
{
echo "<h1>Insert Failed</h1>";
exit;
}
$query = odbc_exec($odbc, "SELECT * FROM dissertation") or die (odbc_errormsg());
while($row = odbc_fetch_array($query)){
echo "Name: ".$row['name']."<br />";
echo "Age: ".$row['age']."<br />";
echo "Country: ".$row['country']."<br />";
echo "Profession: ".$row['profession']."<br />";
echo "Competence: ".$row['competence']."<br />";
echo "Website: ".$row['website']."<br />";
echo "Emotion: ".$row['emotion']."<br />";
echo "Emotion2: ".$row['emotion2']."<br />";
echo "Popup: ".$row['popup']."<br />";
echo "<hr />";
}
odbc_close($odbc);
?>