If anyone is still reading, this is the current version of the code. With, ahem, the pass word removed. Seems to run the HTML okay, then stops at the loop.
Can anyone help? I'm really struggling with something that ought to be fairly straightforward...
<?php
/*
session_start();
if((!session_is_registered(mobile))||(!session_is_registered(email))){
header("location:index.php");
}
*/
// Make an MySQL Connection
$conn = mysql_connect ("localhost", "xxxxx", "xxxxx");
mysql_select_db ("TTX", $conn);
echo $test;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Create new session</title>
<link href="boxes_lg.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="container">
<div id="positioned-element44">this is the positioned element originally called "positioned-element3"</div>
<div id="HEADLINEBOX">this is the positioned element originally called "positioned-element2"</div>
<div id="positioned-element39">this is the positioned element originally called "positioned-element"</div>
<div id="positioned-element17">this is the positioned element originally called "positioned-element17"</div>
<div id="positioned-element15"></div>
<div id="positioned-element41">Rborder</div>
<div id="positioned-element18">this is the positioned element originally called "positioned-element18"</div>
<div id="positioned-element22">This is <strong>your</strong> page!<br />
Here you can: <br />
update your details<br />register for sessions<br />see how THT is doing
</div>
<div id="positioned-element25">
<h1>The admin area</h1></div>
<div id="positioned-element26"></div>
<div id="positioned-element27"><a href="index.php"><strong>HOME</strong></a></div>
<div id="positioned-element29"><a href="messaging.php">Messaging</a></div>
<div id="positioned-element30">Session Tracker</div>
<div id="positioned-element24">
<?php
//admin name
//data sent from form
$location=$_POST['location'];
$PCT=$_POST['PCT'];
$date=$_POST['date'];
$time_select=$_POST['time_select'];
$screeners=$_POST['screeners'];
$setupby="1";
$session_comments=$_POST['session_comments'];
$sql = "INSERT INTO `wkho_TTX`.`sessions` (`id`,`venue`, `PCT`,`date`,`time`,`staff`,`setupby`,`comments`) VALUES (NULL,'$location','$PCT','$date','$time_select','$screeners','$setupby','$session_comments')";
//execute SQL statement
if (mysql_query($sql, $conn)){
echo "Record added";
} else {
echo "Record NOT added";
}
echo '<h3>Thank-you.</h3> The session in '.$PCT.' on '.$session_date.' has been set up.';
?>
</div>
<div id="positioned-element19"><strong>Target</strong></div>
<div id="positioned-element31">Reports
</div>
<div id="positioned-element33">Update details</div>
<div id="positioned-element20">this is the positioned element originally called "positioned-element19"</div>
<div id="positioned-element21">this is the positioned element originally called "positioned-element20"</div>
<div id="positioned-element28">this is the positioned element originally called "positioned-element21"</div>
<div id="positioned-element34"></div>
<div id="positioned-element35">this is the positioned element originally called "positioned-element23"</div>
<div id="positioned-element32">this is the positioned element originally called "positioned-element23"</div>
</div>
</body>
</html>