Thanks for that, the only thing is that sql is part of a larger piece of code and i'm not sure it will work in there.
This is the code.
<?php
session_start();
include "includes\connect.php";
//Information
$spot_name = $_POST['spot_name'];
$address = $_POST['address'];
$suburb = $_POST['suburb'];
$town = $_POST['town'];
$county = $_POST['county'];
$country = $_POST['country'];
$username = $_SESSION['user_logged'];
$comments = $_POST['comments'];
//Obstacles
$rails = $_POST['rails'];
$steps = $_POST['steps'];
$ledges = $_POST['ledges'];
$gaps = $_POST['gap'];
$drops = $_POST['drop'];
$manuals = $_POST['manual'];
//Images
//$image1 = $_POST[''];
$information_insert = "INSERT INTO `spot_information` ( `name` , `address` , `suburb` , `town` , `county` , `country` , `username` , `comments`)
VALUES (
'$spot_name', '$address', '$suburb', '$town', '$county', '$country', '$username', '$comments'
)";
$information_result = mysql_query($information_insert) or die (mysql_error());
$spot_id = mysql_insert_id();
$obstacle_insert = "INSERT INTO `obstacles` (`spot_id` , `rails` , `steps` , `ledges`, `gaps` , `drops`, `manuals`) VALUES ($spot_id, '$rails', '$steps', '$ledges', '$gaps', '$drops', '$manuals')";
$obstacle_result = mysql_query($obstacle_insert) or die (mysql_error());
?>
<html>
<head>
<title>Thanks for adding <?php echo $spot_name; ?> to the list.</title>
<link REL=stylesheet HREF="stylesheet.css" TYPE="text/css">
</head>
<body>
<div id="pagewidth" > <!--begin pagewidth div -->
<div id="header" > <!-- begin header div -->
<?php include "includes\header.php"; ?>
</div> <!-- end header width -->
<div id="wrapper" class="clearfix" > <!-- begin wrapper div-->
<div id="maincol" > <!-- begin maincol div -->
Thanks for adding <?php echo $spot_name; ?> to the list.
<br>
<a href='index.php'>Click here to go back to the home page</a>
</div> <!-- end maincol div -->
<div id="leftcol" > <!-- begin leftcol div -->
<?php include "menu.php"; ?>
</div> <!-- end leftcol div -->
</div> <!-- end wrapper div -->
<div id="footer" > <!-- begin footer div -->
<?php include "includes\footer.php"; ?>
</div> <!-- end footer div -->
</div> <!-- end pagewidth div -->
</body>
</html>
The $_POST array contains all the input from the form, but i need to insert the information part to get the id for the spot. Then do the obstacles. Hope that makes sense.