I have been working on a application form and I have it completed for the most part.
I have two files.
1. index.php - This file contains my application form that guests can view and fill.
2. apply.php - This is a file include for my application form that takes all the form data in a email which will have a confirmation page.
My problem is the confirmation page. It parses the data in a completely blank page instead of the body of my website. When a guest submits and application to our website, I want the guest to be able to view that their application has been sent and recieved within the body of my web sites' theme and not in a completely new page. I have a code that I have to use to display data and info in my body of my website. I am just confused and not sure what to do since im relatively new to PHP. Do I need to do hidden includes and create a whole new php file? I am lost on what to do and I havent seen anything out that will help me.
Here is my apply.php contents
<?php
//Global Parimeters
$firstn= $_POST['firstn'];
$age= $_POST['age'];
$mail= $_POST['mail'];
$life= $_POST['life'];
$cname= $_POST['cname'];
$cclass= $_POST['cclass'];
$cspec= $_POST['cspec'];
$armory= $_POST['armory'];
$wws= $_POST['wws'];
$alts= $_POST['alts'];
$history= $_POST['history'];
$exp= $_POST['exp'];
$role= $_POST['role'];
$joinus= $_POST['joinus'];
// Contact subject
$subject ="$cname, $cspec $cclass";
// Details
$message =" Application from \n
Name: $firstn \n
Age: $age \n
Email: $mail \n
About: $life \n
Character Name: $cname \n
Character Class: $cclass \n
Character Spec: $cspec \n
Armory Link: $armory \n
WWS Log: $wws \n
Alts: $alts \n
Guild History: $history \n
Experience: $exp \n
Class Role & Knowledge: $role \n
Why choose this application: $joinus \n
";
// Mail of sender
$mail_from = $_POST['mail'];
// From
$header = "from: $name <$mail_from>";
// Enter your email address
$to ='recruitment@smraids.com';
$send_contact = mail($to, $subject, $message, $header);
// Check, if message sent to your email
// Confirmation
if($send_contact){
echo "We've recived your contact information";
}
else {
echo "ERROR";
}
?>
This is the code I have to use to display data and information on my website incordination with PHPNuke.
<?php
if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
include("header.php");
$index = 0;
OpenTable();
echo";
CloseTable();
include("footer.php");
?>