Hi all,
ok i have a webpage with a form on it which contains an image validator
what i want to happen is if the validator is incorrect then a varible value is changed and displayed on the current page underneath the input box telling the user that they entered an incorrect code, and if they entered a correct code i want the page to redirect to the previous page before the rate.php page
i am currently having trouble getting any message to appear when incorrectly entered and when its correctly entered i get
Warning: Cannot modify header information - headers already sent by
here is my rate.php code
<?php
session_start();
ini_set('display_errors',1);
ini_set('display_startup_errors',1);
error_reporting(E_ALL);
require('functions.php');
require('_drawrating.php');
include_once('db101.php');?>
Kernow Connect
$message101="";
if( isset($_POST['submit'])) {
if( $_SESSION['security_code'] == $_POST['security_code'] && !empty($_SESSION['security_code'] ) ) {
// Insert you code for processing the form here, e.g emailing the submission, entering it into a database.
$sql="UPDATE ratings
SET
used_ips = NULL,
total_value = 0,
total_votes = 0
WHERE
id IN ('valuetemp', 'easeofusetemp', 'deliverytemp', 'delchargetemp')";
$query = mysql_query($sql);
header('index.php');
unset($_SESSION['security_code']);
} else {
// Insert your code for showing an error message here
$message101 ="Please enter the above code";
}
} else {
?>
//Database info included in include
Toplinks();
print "
";
?>
Value for moneyEase of useDelivery timeP&P costs Please Enter Security Code:
any help is appreciated
cheers
Luke