Clifford P
New member
I have a form that collects user data and loads it into a mysql database. what i want to do now is to load a different page (with a success message + other information) after the user info is in the database. the code works up to that point. below is the code that displays a message (on the same page for sql insert success
if($form['register'] == 0) {
$sql = "insert into pen_reg values (NULL,
" ."'".addslashes($form['full_name'])."',
" ."'".addslashes($form['htel'])."',
" ."'".addslashes($form['mobile'])."',
" ."'".addslashes($form['email'])."',
" ."'".addslashes($form['address1'])."',
" ."'".addslashes($form['address2'])."',
" ."'".addslashes($form['city'])."',
" ."'".addslashes($form['post_code'])."',
" ."'".addslashes($form['county'])."',
" ."'".addslashes($form['country'])."',
" ."'".addslashes($form['age60'])."',
" ."'".addslashes($form['age65'])."',
" ."'".addslashes($form['age70'])."',
" ."'".addslashes($form['age75'])."',
" ."'".addslashes($form['yes_check'])."',
" . "'".addslashes($form['data_check'])."',
" ."'".addslashes($form['fee_check'])."' )";
$result = $db->query($sql);
}
$output->msg .= "Thankyou for your interest in ".COMPANY_NAME.". We will be in touch shortly.";
$display_form = 0;
if($form['register'] == 0) {
$sql = "insert into pen_reg values (NULL,
" ."'".addslashes($form['full_name'])."',
" ."'".addslashes($form['htel'])."',
" ."'".addslashes($form['mobile'])."',
" ."'".addslashes($form['email'])."',
" ."'".addslashes($form['address1'])."',
" ."'".addslashes($form['address2'])."',
" ."'".addslashes($form['city'])."',
" ."'".addslashes($form['post_code'])."',
" ."'".addslashes($form['county'])."',
" ."'".addslashes($form['country'])."',
" ."'".addslashes($form['age60'])."',
" ."'".addslashes($form['age65'])."',
" ."'".addslashes($form['age70'])."',
" ."'".addslashes($form['age75'])."',
" ."'".addslashes($form['yes_check'])."',
" . "'".addslashes($form['data_check'])."',
" ."'".addslashes($form['fee_check'])."' )";
$result = $db->query($sql);
}
$output->msg .= "Thankyou for your interest in ".COMPANY_NAME.". We will be in touch shortly.";
$display_form = 0;