Hi everyone. Am doin this project of buildin a car hire script and am having difficulties. I have debugged some errors and some won't jus work. please help i have attached an image of how the form is displayed in wamp server Heres the code
<?php
/*********************************************************************************
* Filename: Registration.php
* PHP 4.0 build 11/30/2001
*********************************************************************************/
//-------------------------------
// Registration CustomIncludes begin
include ("./common.php");
include ("./Header.php");
include ("./Footer.php");
// Registration CustomIncludes end
//-------------------------------
session_start();
//===============================
// Save Page and File Name available into variables
//-------------------------------
$sFileName = "Registration.php";
//===============================
//===============================
// Registration PageSecurity begin
// Registration PageSecurity end
//===============================
//===============================
// Registration Open Event begin
// Registration Open Event end
//===============================
//===============================
// Registration OpenAnyPage Event start
// Registration OpenAnyPage Event end
//===============================
//===============================
//Save the name of the form and type of action into the variables
//-------------------------------
$sAction = get_param("FormAction");
$sForm = get_param("FormName");
//===============================
// Registration Show begin
//===============================
// Perform the form's action
//-------------------------------
// Initialize error variables
//-------------------------------
$sRegErr = "";
//-------------------------------
// Select the FormAction
//-------------------------------
switch ($sForm) {
case "Reg":
Reg_action($sAction);
break;
}
//===============================
//===============================
// Display page
//===============================
// HTML Page layout
//-------------------------------
?><html>
<head>
<title>Pablo Online Rent-a-Car</title>
<meta name="GENERATOR" content="Pablo">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"></head>
<body style="background-color: #FFFFFF; color: #000000; font-family: Arial, Tahoma, Verdana, Helveticabackground-color: #FFFFFF; color: #000000; font-family: Arial, Tahoma, Verdana, Helvetica">
<center>
<table>
<tr>
<td valign="top"><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Pablo Online Rent-a-Car</title>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('images/mazda6_1.jpg','images/home_2.jpg','images/aboutus_2.jpg','images/contactus_2.jpg')">
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="images/header1.jpg" width="778" height="110"></td>
</tr>
</table>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="55"><img src="images/header2.jpg" width="55" height="43"></td>
<td width ="17"><a href="default.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('home','','images/home_2.jpg',1)"><img src="images/home_1.jpg" alt="home" name="home" width="63" height="43" border="0"></a></td>
<td width ="114" valign="middle"><a href="about.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('aboutPablo','','images/aboutus_2.jpg',1)"><img src="images/aboutus_1.jpg" alt="aboutPablo" name="aboutPablo" width="114" height="43" border="0"></a></td>
<td width ="111"><a href="contact.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('contactus','','images/contactus_2.jpg',1)"><img src="images/contactus_1.jpg" alt="contactus" name="contactus" width="108" height="43" border="0"></a></td>
<td width ="455"><img src="images/header3.jpg" width="438" height="43"></td>
</tr>
</table>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="55"><img src="images/header4.jpg" width="55" height="48"></td>
<td> </td>
<td width="438"><img src="images/header5.jpg" width="438" height="48"></td>
</tr>
</table>
</body>
</html>
<?php Menu_show() ?>
</td>
</tr>
</table>
</center>
<table width="760" align="center">
<tr>
<td align="center">
<hr color="#800000"><center>
<table>
<tr>
<td valign="top">
<?php Reg_show() ?>
</td>
</tr>
</table>
<hr color="#800000" width="60%">
</td>
</tr>
</table>
<center>
<table>
<tr>
<td valign="top">
<?php Footer_show() ?>
</td>
</tr>
</table>
</center>
</body>
</html>
<?php
// Registration Show end
//===============================
// Registration Close Event begin
// Registration Close Event end
//===============================
//********************************************************************************
//===============================
// Action of the Record Form
//-------------------------------
function Reg_action($sAction)
{
//-------------------------------
// Initialize variables
//-------------------------------
global $db;
global $sForm;
global $sRegErr;
global $styles;
$bExecSQL = true;
$sActionFileName = "";
$sWhere = "";
$bErr = false;
$pPKmember_id = "";
$fldmember_login = "";
$fldmember_password = "";
$fldmember_password2 = "";
$fldfirst_name = "";
$fldlast_name = "";
$fldemail = "";
$fldaddress = "";
$fldphone = "";
$fldcard_type_id = "";
$fldcard_number = "";
//-------------------------------
//-------------------------------
// Reg Action begin
//-------------------------------
$sActionFileName = "Default.php";
//-------------------------------
// CANCEL action
//-------------------------------
if($sAction == "cancel")
{
//-------------------------------
// Reg BeforeCancel Event begin
// Reg BeforeCancel Event end
//-------------------------------
header("Location: " . $sActionFileName);
}
//-------------------------------
//-------------------------------
// Build WHERE statement
//-------------------------------
if($sAction == "update" || $sAction == "delete")
{
$pPKmember_id = get_param("PK_member_id");
if( !strlen($pPKmember_id)) return;
$sWhere = "member_id=" . tosql($pPKmember_id, "Number");
}
//-------------------------------
//-------------------------------
// Load all form fields into variables
//-------------------------------
$fldmember_login = get_param("member_login");
$fldmember_password = get_param("member_password");
$fldmember_password2 = get_param("member_password2");
$fldfirst_name = get_param("first_name");
$fldlast_name = get_param("last_name");
$fldemail = get_param("email");
$fldaddress = get_param("address");
$fldphone = get_param("phone");
$fldcard_type_id = get_param("card_type_id");
$fldcard_number = get_param("card_number");
// ...
Long Piece of Code- For the full codin. Pleasde check the attachment
Am Using Wamp Server.
Thanx in Advance