Forum Moderators: coopster
Array ( ) Array ( ) Array ( [SESS_USER_ID] => 3 [SESS_USERNAME] => fred.moore [SESS_ACCESS_LEVEL] => 1 ) ID:3
<form name="weighbridge" method="post" action="<?php echo $PHP_SELF; ?>" autocomplete="off">
<input type="hidden" id="user_id" name="user_id" value="<?php echo $_SESSION['SESS_USER_ID']; ?>" />
<input type="hidden" id="reference" name="reference" value="Start Balance" />
<table cellpadding="0" cellspacing="0" id="models">
<tr>
<td>Start Balance</td>
<td><input type="text" class="w80" id="in" name="in" value="" tabindex="1" /></td>
<td><input type="submit" name="start_submit" class="button" value="Insert" tabindex="2" /></td>
</tr>
</table>
</form>
if(isset($_POST['start_submit'])){
$date=date("Y-m-d H:i:s");
$sql="INSERT INTO weighbridge (weighbridge_date, weighbridge_ref, weighbridge_in, weighbridge_entered_by) VALUES ('$date', '$_POST[reference]', '$_POST[in]', '$_POST[user_id]')";
$checkresult = mysql_query($sql) or die(mysql_error());
if ($checkresult) {
header("location:index.php");
exit();
}
}
error_reporting(E_ALL | E_STRICT); // Include E_STRICT as well!
ini_set('display_errors','On');
$sql="INSERT INTO weighbridge (weighbridge_date, weighbridge_ref, weighbridge_in, weighbridge_entered_by)
VALUES ('$date', '$_POST[reference]', '$_POST[in]', '$_POST[user_id]')";
From using php_info() it tells me register_globals is off. I have always used $PHP_SELF for the forms action.
One thing I've just remembered is just before implementing the ntlm code all of this was working under the root directory. I then got the ntlm working which is currently disabled due to issues. Also, I created folders and moved the files into their respective folders to tidy things up a little. Would this have anything to do with it?