Code: Select all
<?php if ($noEntry == "No"){ ?>
<INPUT type="hidden" NAME="id" VALUE="<?php echo "$myID" ?>">
<INPUT type="hidden" NAME="myTest" VALUE="<?php echo "$myID" ?>">
<?php } ?>Code: Select all
// set up insert variables
$sectionid=mysql_real_escape_string( $_POST['sectionid'] ) ;
$subsectionid=mysql_real_escape_string( $_POST['subsectionid'] ) ;
$headline=mysql_real_escape_string( $_POST['headline'] ) ;
$subheadline=mysql_real_escape_string( $_POST['subheadline'] ) ;
$bodycontent=mysql_real_escape_string( $_POST['bodycopy'] ) ;
$myTestVar=mysql_real_escape_string( $_POST['myTest'] ) ;
// Perform MySQL query to insert data
// IF UPDATING A RECORD
if (isset($_POST['myTest'])){
$recordid = $_POST['myTest'];
// set up the query
$dataUpdate = "UPDATE generalinfo SET headline='$headline',subheadline='$subheadline',bodycontent='$bodycontent' WHERE id ='$recordid'";
// run the query
mysql_query($dataUpdate) or die(mysql_error());
}Any ideas? Is there some reason why repeating the echo of the "myID" variable allows the processing page to recognize it? Very strange.