I have website templates set-up on my website, so when you click a link it leads you to another site in the body of the website itself, the problem with this is that when i feel out information to post to my process, I get an 'notice: undefined index' error, the form works perfectly when I open up the template website separately, but when I try to process the form while it's inside the template I get the 'undefined: index' error.
If anyone could help me out, I would greatly appreciate it, here's the code below, the main areas should be the $page variable usage, and the form area
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
include_once("include/session.php");
$_SESSION['editpage'] = FALSE;
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Fine Literatures Distributors INC: Home</title>
<style type="text/css">
<!--
.style8 {
font-size: 36px;
font-weight: bold;
color: #FFFFFF;
}
.style10 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 24px; color: #FFFFFF; }
.style11 {font-family: Verdana, Arial, Helvetica, sans-serif}
.style13 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 16px;
}
.style14 {
color: #FFFFFF;
font-weight: bold;
font-size: 24px;
}
.style16 {font-size: 24px; color: #FFFFFF;}
.style19 {color: #FFFFFF; font-weight: bold; font-size: 24px; font-family: Geneva, Arial, Helvetica, sans-serif; }
.style20 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
}
-->
</style>
</head>
<body>
<table style="border:1px solid #000000;" cellpadding="0" cellspacing="0">
<tr>
<td width="200" height="85" bordercolor="#993366" bgcolor="#993366"> </td>
<td width="555" align="center" bordercolor="#993366" bgcolor="#993366"><span class="style8">Fine Literature Distributors Inc</span></td>
<td width="174" bordercolor="#993366" bgcolor="#993366"><?php
if($session->logged_in)
{
echo "<p> Welcome, <b>$session->username</b>, you are logged in<br><br></p>"
."[<a href=\"userinfo.php?user=$session->username\">My Account</a>] "
."<br>[<a href=\"useredit.php\">Edit Account</a>] ";
echo "<br>[<a href=\"index.php?page=process\">Logout</a>]<br>";
}
else{
echo "<p> Welcome, Guest, please <a href=\"index.php?page=members\">Sign in</a> or <a href=\"index.php?page=register\">Register</a>";
}
?> </td>
</tr>
<tr>
<td height="739" valign="top" bordercolor="#993366" bgcolor="#993366">
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000" style="border:0px solid #000000;">
<tr>
<td align="center" bordercolor="#993366" class="style10"><a href="index.php?page=main" class="style19">Home</a></td>
</tr>
<tr>
<td align="center"><span class="style19"><a href="index.php?page=register" class="style16">Register</a></span></td>
</tr>
<tr>
<td align="center"><span class="style19"><a href="index.php?page=members" class="style16">Members</a></span></td>
</tr>
<tr>
<td align="center"><span class="style19"><a href="index.php?page=browse" class="style16">Browse</a></span></td>
</tr>
<tr>
<td align="center"><span class="style19"><a href="index.php?page=contactus" class="style16">Contact Us</a></span></td>
</tr>
<tr>
<td align="center" class="style10"><a href="index.php?page=disclaimer" class="style19">Disclaimer</a></td>
</tr>
</table></td>
<td valign="top"><p> </p>
<table width="100%" cellpadding="0" cellspacing="0" style="border:1px solid #000000;">
<tr>
<td bordercolor="#993366" bgcolor="#993366"><span class="style14">WELCOME</span></td>
</tr>
<tr>
<td height="23"><div>
<p class="style20" id="internal-source-marker_0.6462589097209275">Welcome to Fine Literature Distributors inc. Our website is designed to sell books at the lowest price available. In our site you can purchase books in large amounts for schools or libraries such as text books, or popular novels. You can also do smaller purchases for personal use. We have a large inventory with many different types of genre’s. Our goal is to reach and exceed the expectations of our users. For this reason we encourage our users to help us keep Fine Literature Distributors Inc up to par with their expectations by submitting their comments in our user comments section thank you. Hope you enjoy your visit.</p>
</div></td>
</tr>
</table>
<p> </p>
<p>
<?php
$page = $_GET["page"];
if (!isset($page)) { $page = "main"; }
if (file_exists("$page.php")) {
$LoadPage = @include("$page.php");
if (!$LoadPage) { echo "Failed to load page"; }
} else {
echo "Sorry, the requested page does not exists";
}
?>
</p>
<p><img name="" src="" width="553" height="284" alt="" /></p></td>
<td valign="top" bordercolor="#FFFFFF"><p class="style11"> </p>
<p class="style11"> </p>
<p class="style11"> </p>
<?php
if($session->logged_in)
{
}
else {
?>
<p class="style11">Log In:</p>
<form action="index.php?page=process" method="POST" name="form1" id="form1">
<label><span class="style13">User Name
:<br />
<input name="user" type="text" value="<?php echo $form->value("user"); ?>"
</span></label><?php echo $form->value("user"); ?>
<p>
<span class="style13">
<label>Password
:<br />
<input type="password" name="pass" value="<?php echo $form->value("user"); ?>"
</label><?php echo $form->value("user"); ?>
</span> </p>
<p>
<label>
<input type='hidden' name='sublogin' value='1'><input type="submit" name="Login" id="Login" value="Login" />
</label>
</p>
</form>
<?php
}
?>
<p class="style11"> </p>
<p> </p></td>
</tr>
<tr>
<td bordercolor="#993366" bgcolor="#993366"> </td>
<td bordercolor="#FFFFFF"> </td>
<td bordercolor="#FFFFFF"> </td>
</tr>
</table>
</body>
</html>