PHP Help

S

Sheetrum

I'm having trouble with one section of code. All I want to do is jump to
another page upon correctly inserting the secuirty code. Does this mean I
need to remove the echo for "Thank you. Your message said...". The code in
question is:

<?php
session_start();

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.
echo 'Thank you. Your message said "'.$_POST['message'].'"';
unset($_SESSION['security_code']);
} else {
// Insert your code for showing an error message here
echo 'Please enter the Security Code correctly!';
}
} else {
?>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top