Sorry guys still does not work.. i must be putting it in the wrong place or something.. here are all my files if it helps.
Index.php
<form method="post" action="form2.php">
Name
<input type="text" name="name">
Email
<input type="text" name="email_address">
<input type="submit" value="Go To Step 2">
</form>
form2.php
<?php
//let's start the session
session_start();
//now, let's register our session variables
session_register('name');
session_register('email_address');
//finally, let's store our posted values in the session variables
$_SESSION['name'] = $_POST['name'];
$_SESSION['email_address'] = $_POST['email_address'];
?>
<form method="post" action="form3.php">
membership_type
<input type="radio" group="membership_type" value="Free">
<input type="radio" group="membership_type" value="Normal">
<input type="radio" group="membership_type" value="Deluxe">
terms_and_conditions
<input type="checkbox" name="terms_and_conditions">
<input type="submit" value="Go To Step 3">
</form>
form3.php
<?php
//let's start the session
session_start();
//now, let's register our session variables
session_register('membership_type');
session_register('terms_and_conditions');
//finally, let's store our posted values in the session variables
$_SESSION['membership_type'] = $_POST['membership_type'];
$_SESSION['terms_and_conditions'] = $_POST['terms_and_conditions'];
?>
<form action="form_process.php" method="post">
name_on_card
<input type="text" name="name_on_card">
credit_card_number
<input type="text" name="credit_card_number">
credit_card_expiration_date
<input type="text" name="credit_card_expiration_date">
<input type="submit" value="Submit">
</form>
form_process.php
<?php
//let's start our session, so we have access to stored data
session_start();
$receiver = 'PUT IN YOUR EMAIL ADDRESS';
$subject = 'Website - Feedback';
$headers = 'FROM EMAIL ADDRESS';
$err_msg = '';
if((!$name)){
$err_msg = '<br />The following fields are missing, please insure you have filled out each field <br /><br />';
if(!$name){
$err_msg .= "* Your First Name<br />";
}
include 'index.php';
exit();
}
$arr= array();
$arr[0] = "\n\n Name: ";
$arr[1] = $_SESSION['name'];
$arr[2] = "\n\n email_address: ";
$arr[3] = $_SESSION['email_address'];
$arr[4] = "\n\n membership_type: ";
$arr[5] = $_SESSION['membership_type'];
$arr[6] = "\n\n terms_and_conditions: ";
$arr[7] = $_SESSION['terms_and_conditions'];
$arr[8] = "\n\n name_on_card: ";
$arr[9] = $_POST['name_on_card'];
$arr[10] = "\n\n credit_card_number: ";
$arr[11] = $_POST['credit_card_number'];
$arr[12] = "\n\n credit_card_expiration: ";
$arr[13] = $_POST['credit_card_expiration_date'];
$content = ($arr[0] . $arr[1] . $arr[2] . $arr[3] . $arr[4] . $arr[5] . $arr[6] . $arr[7] . $arr[8] . $arr[9] . $arr[10] . $arr[11] . $arr[12] . $arr[13]);
mail("$receiver", "$subject!", "$content", "From: $headers");
header("Location: thankyou.html");
?>