Hi all, im sure this is a small problem so here goes..... I have a form that will insert data into my MySQL database, but the data is added to the end, how can I get the data to be added at the start of the database.... code below from the submit bit of the form
Thanks in advance
Lee
<?php
if ($submit) {
// process form
$db = mysql_connect("XXXXX", "XXXXXX", "XXXXXXX") or die("Could Not Connect To The Database. <br>" . mysql_error());
mysql_select_db("XXXXXXX",$db) or die("Could Not Select The Proper Database. <br>" . mysql_error());
$ident = $POST['ident'];
$town = $POST['town'];
$name = $POST['name'];
$info = $POST['info'];
$url = $POST['url'];
$simg = $POST['simg'];
$sql = "INSERT INTO tablename(ident, town, name, info, url, simg) VALUES ('$ident','$town','$name','$info','$url','$simg')";
$result = mysql_query($sql);
if($result)
{
echo "Data Properly Inserted";
}
else
{
echo "An Error occured while trying to process your information.";
print ("<br>" . mysql_error());
}
echo $sql ;
echo "Thank you! Information entered.\n";
}
else
{
// display form
?>