Hello good ITz
This is my last resort,I've checked threads but saw no answer to my question,I blieve you good people will help me out
This are my existing forms, i want to add a multiple file upload system to it for each user that signs up as shown below
Begining of form
(Toggle Plain Text)
<?php session_start();
//include('vdaemon/vdaemon.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>testing</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<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];}}
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF">
<style TYPE="text/css">
<!-- A:link {text-decoration: none; color:#000055} A:visited {text-decoration: none; color:#000055} A:active {text-decoration: none; color:#000022} A:hover {text-decoration: ; color:#00CC00 }-->
</style>
<div align="center">
<?
//register session
if (!$PHPSESSIONID){
session_register('stitle');
session_register('sfirstname');
session_register('smiddlename');
session_register('ssurname');
}
?>
<table width="780" border="0" cellpadding="0" cellspacing="2">
<tr>
<td height="27"> <div align="center">
<table width="100%" border="1" cellpadding="2" cellspacing="0" bordercolor="#CCCCCC" bgcolor="#FFFFFF">
<tr>
<td height="25"> <div align="center">
<table width="100%" border="0" cellpadding="2" cellspacing="2">
<tr>
<td width="1%" height="26" bgcolor="#CCCCCC">
</td>
<td width="97%" height="26" bgcolor="#CCCCCC"> <div align="right">
<table border=0 cellspacing=0 cellpadding=0>
<tr>
<td width=170 bgcolor="#006699"> <script language=JavaScript
src="../../scripts/vnu_datestamp.js"></script></td>
<td width="100" align="center" bgcolor="#FF0000"><font color="#FFFFFF" size="2" face="arial">Step
1</font></td>
<td width="20" bgcolor="#006699"> </td>
<td width="100" align="center" bgcolor="#FFFFFF"><font color="#000066" size="2" face="arial">Step
2</font></td>
</tr>
<tr>
<td height="1" colspan="4" bgcolor="#CCCCCC"><table height="1" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table></td>
</tr>
</table>
</div></td>
<td width="19%" rowspan="2" bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td height="121" bgcolor="#999999" valign="top" colspan="2"> <blockquote>
<div align="left">
<form name="form1" id="form1" method="POST" action="p2.php?<?=SID?>" runat="vdaemon">
<div align="left">
<table width="1024" border="0" cellspacing="3" cellpadding="3" id="table2">
<tr>
<td colspan="6" bgcolor="#000066"> <font size="2" face="arial" color="#FFFFFF"><b>Step
1: Personal Data, Education & Training</b></font></td>
</tr>
<tr bgcolor="#66CC00">
<td colspan="6" bgcolor="#006699"> <font size="2" face="arial" color="#000066"><b>Personal
Data</b> (All fields are required)</font></td>
</tr>
<tr>
<td width="221">
<font face="Times New Roman" color="#000066">
Title: Mr/Mrs/Miss</font></td>
<td width="279">
<input name="title" type="text" maxlength="50" size="20" tabindex="100" /></td>
<td width="79"> </td>
<td width="138"> </td>
<td width="72"> </td>
<td width="178">
<vlvalidator name="FirstnameReq" type="required" control="firstname" errmsg="First Name is required">
<vllabel class="default" errclass="defaultErr" validators="FirstnameReq"></vllabel></font></td>
</tr>
<tr>
<td>
<font face="Times New Roman" color="#000066">First
name:</font></td>
<td> <input name="firstname" type="text" maxlength="50" /></td>
<td>
<font size="2" face="arial" color="#000066">
Middle Name:</font></td>
<td>
<input name="middlename" type="text" maxlength="50" size="20" tabindex="100" /></td>
<td>
<font face="arial" size="2" color="#000066">
Surname:</font></td>
<td>
<input name="surname" type="text" maxlength="50" size="20" tabindex="100" /></td>
</tr>
<tr>
<td>Documents</td>
<td colspan="5">This is where i want to
include the upload file component(multiplefile upload)</td>
</tr>
</table>
</div>
<table width="750" border="0" cellspacing="3" cellpadding="3">
<tr>
<td><div align="center">
<input type="reset" name="Submit2" value="Clear" />
<input type="submit" name="Submit" value="Next >>">
</div></td>
</tr>
<tr>
<td> <font color="#FF0000" size="2" face="Arial, Helvetica, sans-serif"><vlsummary class="defaultErr" headertext="The following error(s) will prevent your applicaion from being submitted" displaymode="bulletlist"></font></td>
</tr>
</table>
</form>
</div>
</blockquote></td>
</tr>
<br />
</div>
</body>
</html><?php session_start();
//include('vdaemon/vdaemon.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>testing</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<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];}}
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF">
<style TYPE="text/css">
<!-- A:link {text-decoration: none; color:#000055} A:visited {text-decoration: none; color:#000055} A:active {text-decoration: none; color:#000022} A:hover {text-decoration: ; color:#00CC00 }-->
</style>
<div align="center">
<?
//register session
if (!$PHPSESSIONID){
session_register('stitle');
session_register('sfirstname');
session_register('smiddlename');
session_register('ssurname');
}
?>
<table width="780" border="0" cellpadding="0" cellspacing="2">
<tr>
<td height="27"> <div align="center">
<table width="100%" border="1" cellpadding="2" cellspacing="0" bordercolor="#CCCCCC" bgcolor="#FFFFFF">
<tr>
<td height="25"> <div align="center">
<table width="100%" border="0" cellpadding="2" cellspacing="2">
<tr>
<td width="1%" height="26" bgcolor="#CCCCCC">
</td>
<td width="97%" height="26" bgcolor="#CCCCCC"> <div align="right">
<table border=0 cellspacing=0 cellpadding=0>
<tr>
<td width=170 bgcolor="#006699"> <script language=JavaScript
src="../../scripts/vnu_datestamp.js"></script></td>
<td width="100" align="center" bgcolor="#FF0000"><font color="#FFFFFF" size="2" face="arial">Step
1</font></td>
<td width="20" bgcolor="#006699"> </td>
<td width="100" align="center" bgcolor="#FFFFFF"><font color="#000066" size="2" face="arial">Step
2</font></td>
</tr>
<tr>
<td height="1" colspan="4" bgcolor="#CCCCCC"><table height="1" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table></td>
</tr>
</table>
</div></td>
<td width="19%" rowspan="2" bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td height="121" bgcolor="#999999" valign="top" colspan="2"> <blockquote>
<div align="left">
<form name="form1" id="form1" method="POST" action="p2.php?<?=SID?>" runat="vdaemon">
<div align="left">
<table width="1024" border="0" cellspacing="3" cellpadding="3" id="table2">
<tr>
<td colspan="6" bgcolor="#000066"> <font size="2" face="arial" color="#FFFFFF"><b>Step
1: Personal Data, Education & Training</b></font></td>
</tr>
<tr bgcolor="#66CC00">
<td colspan="6" bgcolor="#006699"> <font size="2" face="arial" color="#000066"><b>Personal
Data</b> (All fields are required)</font></td>
</tr>
<tr>
<td width="221">
<font face="Times New Roman" color="#000066">
Title: Mr/Mrs/Miss</font></td>
<td width="279">
<input name="title" type="text" maxlength="50" size="20" tabindex="100" /></td>
<td width="79"> </td>
<td width="138"> </td>
<td width="72"> </td>
<td width="178">
<vlvalidator name="FirstnameReq" type="required" control="firstname" errmsg="First Name is required">
<vllabel class="default" errclass="defaultErr" validators="FirstnameReq"></vllabel></font></td>
</tr>
<tr>
<td>
<font face="Times New Roman" color="#000066">First
name:</font></td>
<td> <input name="firstname" type="text" maxlength="50" /></td>
<td>
<font size="2" face="arial" color="#000066">
Middle Name:</font></td>
<td>
<input name="middlename" type="text" maxlength="50" size="20" tabindex="100" /></td>
<td>
<font face="arial" size="2" color="#000066">
Surname:</font></td>
<td>
<input name="surname" type="text" maxlength="50" size="20" tabindex="100" /></td>
</tr>
<tr>
<td>Documents</td>
<td colspan="5">This is where i want to
include the upload file component(multiplefile upload)</td>
</tr>
</table>
</div>
<table width="750" border="0" cellspacing="3" cellpadding="3">
<tr>
<td><div align="center">
<input type="reset" name="Submit2" value="Clear" />
<input type="submit" name="Submit" value="Next >>">
</div></td>
</tr>
<tr>
<td> <font color="#FF0000" size="2" face="Arial, Helvetica, sans-serif"><vlsummary class="defaultErr" headertext="The following error(s) will prevent your applicaion from being submitted" displaymode="bulletlist"></font></td>
</tr>
</table>
</form>
</div>
</blockquote></td>
</tr>
<br />
</div>
</body>
</html>
The second form shows the user what he/she has filled to confirm details of what was filled...(Here i included a field for the new component(the uploaded file) to show..this should show the icon or filename uploaded as shown below
(Toggle Plain Text)
<?php session_start();
//include('vdaemon/vdaemon.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>testing</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<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];}}
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF">
<style TYPE="text/css">
<!-- A:link {text-decoration: none; color:#000055} A:visited {text-decoration: none; color:#000055} A:active {text-decoration: none; color:#000022} A:hover {text-decoration: ; color:#00CC00 }-->
</style>
<div align="center">
<?
//start session
session_start();
//pass post data into session variables
$HTTP_SESSION_VARS['stitle'] = addslashes($HTTP_POST_VARS['title']);
$HTTP_SESSION_VARS['sfirstname'] = addslashes($HTTP_POST_VARS['firstname']);
$HTTP_SESSION_VARS['smiddlename'] = addslashes($HTTP_POST_VARS['middlename']);
$HTTP_SESSION_VARS['ssurname'] = addslashes($HTTP_POST_VARS['surname']);
?>
<table width="780" border="0" cellpadding="0" cellspacing="2">
<tr>
<td height="27"> <div align="center">
<table width="96%" border="1" cellpadding="2" cellspacing="0" bordercolor="#CCCCCC">
<tr>
<td height="25"> <div align="center">
<table width="1021" border="0" cellpadding="2" cellspacing="2" bgcolor="#FFFFFF">
<tr>
<td width="11%" height="26" bgcolor="#CCCCCC">
</td>
<td width="88%" height="26" bgcolor="#CCCCCC"> <div align="left">
<table border=0 cellspacing=0 cellpadding=0 width="860">
<tr>
<td width=217 bgcolor="#CCCCCC"> </td>
<td width=170 bgcolor="#006699"> <script language=JavaScript
src="../../scripts/vnu_datestamp.js"></script></td>
<td width="69" align="center" bgcolor="#FFFFFF"><font color="#000066" size="2" face="arial">
Step 1</font></td>
<td width="18" bgcolor="#006699"> </td>
<td width="86" align="center" bgcolor="#800000">
<font color="#FFFFFF" size="2" face="arial">
Step 2</font></td>
<td width="16" bgcolor="#006699"> </td>
</tr>
<tr>
<td height="1" colspan="6" bgcolor="#CCCCCC"><table height="1" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table></td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td height="121" bgcolor="#999999" valign="top" colspan="2">
<blockquote>
<div align="left">
<form name="form1" id="form1" method="POST" action="app.php?<?=SID?>" runat="vdaemon">
<table width="571" border="0" cellspacing="3" cellpadding="3">
<tr>
<td colspan="2" bgcolor="#000066"> <font size="2" face="arial" color="#FFFFFF"><b>Step
2: Review & Certification</b></font></td>
</tr>
<tr bgcolor="#66CC00">
<td colspan="2" bgcolor="#006699"> <font size="2" face="arial" color="#000066"><b>Review: </b>
(Please review the information you supplied
below)</font></td>
</tr>
<tr bgcolor="#666666">
<td colspan="2"><font color="#FFFFFF"> <font size="2" face="arial"><b>Personal
Data</b></font></font></td>
</tr>
<tr>
<td width="140">
<font face="Arial" color="#000066" size="2">
Title: Mr/Mrs/Miss</font></td>
<td width="410"> <font size="2" face="arial" color="#000066"> <? echo $HTTP_SESSION_VARS['stitle']; ?> </font></td>
</tr>
<tr>
<td width="140">
<font size="2" face="arial" color="#000066">First
name: </font></td>
<td width="410"> <font size="2" face="arial" color="#000066"> <? echo $HTTP_SESSION_VARS['sfirstname']; ?> </font> </td>
</tr>
<tr>
<td>
<font face="Arial" size="2" color="#000066">Middle Name:</font></td>
<td> <font size="2" face="arial" color="#000066"> <? echo $HTTP_SESSION_VARS['smiddlename']; ?> </font></td>
</tr>
<tr>
<td>
<font size="2" face="arial" color="#000066">Surname: </font></td>
<td> <font size="2" face="arial" color="#000066"> <? echo $HTTP_SESSION_VARS['ssurname']; ?> </font></td>
</tr>
</table>
<table width="959" border="0" cellspacing="3" cellpadding="3">
<tr>
<td bgcolor="#666666">
<font color="#FFFFFF"><b>Legal Documents:</b></font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF">This
is where I want the icons/name for the file
they uploaded to show</td>
</tr>
</table>
<table width="680" border="0" cellspacing="3" cellpadding="3">
<tr>
<td><div align="center"></div></td>
</tr>
</table>
<table width="500" border="0" cellspacing="3" cellpadding="3">
<tr>
<td bgcolor="#006699"><font color="#000066" size="2" face="arial"><b>
Certification:</b> This is required for your
application to be sent. Check accordingly)</font></td>
</tr>
<tr>
<td><font color="#000066" size="2" face="arial">
I have correctly filled the form<br>
<br>
<label>
<input type="radio" name="certification" value="accept" />
accept</label> <br /> <label>
<input type="radio" name="certification" value="decline" />
decline</label>
<vlvalidator name="CertReq" type="required" control="certification" errmsg="You must certify your entry to complete submission!">
<vllabel class="default" errclass="defaultErr" validators="CertReq"></vllabel>
</font>
</td>
</tr>
<tr>
<td> <input type="reset" name="Submit2" value="Clear" />
<input type="submit" name="Submit" value="Submit"></td>
</tr>
<tr>
<td><font color="#FF0000" size="2" face="Arial, Helvetica, sans-serif"><vlsummary class="defaultErr" headertext="The following error(s) will prevent your applicaion from being submitted" displaymode="bulletlist"></font></td>
</tr>
</table>
<p> </p>
<p> </p>
</form>
</div>
</blockquote></td>
</tr>
<tr>
<td height="23" background="../images/cogbg.gif" bgcolor="#FFFFFF"> </td>
<td height="23" background="../images/cogbg.gif" bgcolor="#FFFFFF">
</td>
</tr>
</table>
</div></td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td height="27"> <br />
</div>
</body>
</html><?php session_start();
//include('vdaemon/vdaemon.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>testing</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<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];}}
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF">
<style TYPE="text/css">
<!-- A:link {text-decoration: none; color:#000055} A:visited {text-decoration: none; color:#000055} A:active {text-decoration: none; color:#000022} A:hover {text-decoration: ; color:#00CC00 }-->
</style>
<div align="center">
<?
//start session
session_start();
//pass post data into session variables
$HTTP_SESSION_VARS['stitle'] = addslashes($HTTP_POST_VARS['title']);
$HTTP_SESSION_VARS['sfirstname'] = addslashes($HTTP_POST_VARS['firstname']);
$HTTP_SESSION_VARS['smiddlename'] = addslashes($HTTP_POST_VARS['middlename']);
$HTTP_SESSION_VARS['ssurname'] = addslashes($HTTP_POST_VARS['surname']);
?>
<table width="780" border="0" cellpadding="0" cellspacing="2">
<tr>
<td height="27"> <div align="center">
<table width="96%" border="1" cellpadding="2" cellspacing="0" bordercolor="#CCCCCC">
<tr>
<td height="25"> <div align="center">
<table width="1021" border="0" cellpadding="2" cellspacing="2" bgcolor="#FFFFFF">
<tr>
<td width="11%" height="26" bgcolor="#CCCCCC">
</td>
<td width="88%" height="26" bgcolor="#CCCCCC"> <div align="left">
<table border=0 cellspacing=0 cellpadding=0 width="860">
<tr>
<td width=217 bgcolor="#CCCCCC"> </td>
<td width=170 bgcolor="#006699"> <script language=JavaScript
src="../../scripts/vnu_datestamp.js"></script></td>
<td width="69" align="center" bgcolor="#FFFFFF"><font color="#000066" size="2" face="arial">
Step 1</font></td>
<td width="18" bgcolor="#006699"> </td>
<td width="86" align="center" bgcolor="#800000">
<font color="#FFFFFF" size="2" face="arial">
Step 2</font></td>
<td width="16" bgcolor="#006699"> </td>
</tr>
<tr>
<td height="1" colspan="6" bgcolor="#CCCCCC"><table height="1" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table></td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td height="121" bgcolor="#999999" valign="top" colspan="2">
<blockquote>
<div align="left">
<form name="form1" id="form1" method="POST" action="app.php?<?=SID?>" runat="vdaemon">
<table width="571" border="0" cellspacing="3" cellpadding="3">
<tr>
<td colspan="2" bgcolor="#000066"> <font size="2" face="arial" color="#FFFFFF"><b>Step
2: Review & Certification</b></font></td>
</tr>
<tr bgcolor="#66CC00">
<td colspan="2" bgcolor="#006699"> <font size="2" face="arial" color="#000066"><b>Review: </b>
(Please review the information you supplied
below)</font></td>
</tr>
<tr bgcolor="#666666">
<td colspan="2"><font color="#FFFFFF"> <font size="2" face="arial"><b>Personal
Data</b></font></font></td>
</tr>
<tr>
<td width="140">
<font face="Arial" color="#000066" size="2">
Title: Mr/Mrs/Miss</font></td>
<td width="410"> <font size="2" face="arial" color="#000066"> <? echo $HTTP_SESSION_VARS['stitle']; ?> </font></td>
</tr>
<tr>
<td width="140">
<font size="2" face="arial" color="#000066">First
name: </font></td>
<td width="410"> <font size="2" face="arial" color="#000066"> <? echo $HTTP_SESSION_VARS['sfirstname']; ?> </font> </td>
</tr>
<tr>
<td>
<font face="Arial" size="2" color="#000066">Middle Name:</font></td>
<td> <font size="2" face="arial" color="#000066"> <? echo $HTTP_SESSION_VARS['smiddlename']; ?> </font></td>
</tr>
<tr>
<td>
<font size="2" face="arial" color="#000066">Surname: </font></td>
<td> <font size="2" face="arial" color="#000066"> <? echo $HTTP_SESSION_VARS['ssurname']; ?> </font></td>
</tr>
</table>
<table width="959" border="0" cellspacing="3" cellpadding="3">
<tr>
<td bgcolor="#666666">
<font color="#FFFFFF"><b>Legal Documents:</b></font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF">This
is where I want the icons/name for the file
they uploaded to show</td>
</tr>
</table>
<table width="680" border="0" cellspacing="3" cellpadding="3">
<tr>
<td><div align="center"></div></td>
</tr>
</table>
<table width="500" border="0" cellspacing="3" cellpadding="3">
<tr>
<td bgcolor="#006699"><font color="#000066" size="2" face="arial"><b>
Certification:</b> This is required for your
application to be sent. Check accordingly)</font></td>
</tr>
<tr>
<td><font color="#000066" size="2" face="arial">
I have correctly filled the form<br>
<br>
<label>
<input type="radio" name="certification" value="accept" />
accept</label> <br /> <label>
<input type="radio" name="certification" value="decline" />
decline</label>
<vlvalidator name="CertReq" type="required" control="certification" errmsg="You must certify your entry to complete submission!">
<vllabel class="default" errclass="defaultErr" validators="CertReq"></vllabel>
</font>
</td>
</tr>
<tr>
<td> <input type="reset" name="Submit2" value="Clear" />
<input type="submit" name="Submit" value="Submit"></td>
</tr>
<tr>
<td><font color="#FF0000" size="2" face="Arial, Helvetica, sans-serif"><vlsummary class="defaultErr" headertext="The following error(s) will prevent your applicaion from being submitted" displaymode="bulletlist"></font></td>
</tr>
</table>
<p> </p>
<p> </p>
</form>
</div>
</blockquote></td>
</tr>
<tr>
<td height="23" background="../images/cogbg.gif" bgcolor="#FFFFFF"> </td>
<td height="23" background="../images/cogbg.gif" bgcolor="#FFFFFF">
</td>
</tr>
</table>
</div></td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td height="27"> <br />
</div>
</body>
</html>
thirdly this is the mail application that sends filled info into the datatbase, the question is what are the values to use in the tables?
MySQL Syntax (Toggle Plain Text)
<?php session_start();include("../Connections/recruit.php"); echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">"; //CHECK certification $certification = $HTTP_POST_VARS['certification']; if($certification != "accept") { echo(" Your application has been terminated as a result of uncertified information!");?> </font></div> <? END; } ELSE{ //post TIME $date_posted = DATE ("l, jS of , Y h:i:s A"); // pass session vars INTO simple vars //personal data $title = $HTTP_SESSION_VARS['stitle']; $firstname = $HTTP_SESSION_VARS['sfirstname']; $middlename = $HTTP_SESSION_VARS['smiddlename']; $surname = $HTTP_SESSION_VARS['ssurname']; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title> :: Recruitment (Status)</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><style TYPE="text/css <? /* recipients */ $to = "example@yahoo.com"; /* subject */ $subject = "Application form submission FROM"." ".$firstname." ".$surname." (".$email.")"; /* message */ $message = "Your application form has been completed with the following details"."\n\n"."Remote form submission TIME: "."$posttime"."\n". "[Personal Data]"."\n". "Title : $title"."\n"."First Name : $firstname"."\n". "Middle Name : $middlename"."\n"."Surname : $surname"."\n". //print_r($_SESSION); // SELECT DATABASEmysql_select_db($database_recruit, $recruit) or die(mysql_error());$result = mysql_query("INSERT INTO users_cv (title, firstname, middlename, surname) VALUES ('$title', '$firstname', '$middlename', '$surname')") or die(mysql_error());// if(mail($to, $subject, $message, $headers)) { echo "Your application has been submitted!"; } } ?> </font></p> </div></td> </tr> </table> </div></td> </tr> </table> </td> </tr> <tr> <td height="27"><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#999999"> <tr> <td> </td> </tr> </table></td> </tr> </table> </div></body></html><?php session_start();
include("../Connections/recruit.php");
echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">";
//check certification
$certification = $HTTP_POST_VARS['certification'];
if($certification != "accept")
{ echo(" Your application has been terminated as a result of uncertified information!");?> </font></div>
<? end;
}
else{
//post time
$date_posted = date ("l, jS of , Y h:i:s A");
// pass session vars into simple vars
//personal data
$title = $HTTP_SESSION_VARS['stitle'];
$firstname = $HTTP_SESSION_VARS['sfirstname'];
$middlename = $HTTP_SESSION_VARS['smiddlename'];
$surname = $HTTP_SESSION_VARS['ssurname'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>
:: Recruitment (Status)</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><style TYPE="text/css
<?
/* recipients */
$to = "example@yahoo.com";
/* subject */
$subject = "Application form submission from"." ".$firstname." ".$surname." (".$email.")";
/* message */
$message = "Your application form has been completed with the following details"."\n\n".
"Remote form submission time: "."$posttime"."\n".
"[Personal Data]"."\n".
"Title : $title"."\n".
"First Name : $firstname"."\n".
"Middle Name : $middlename"."\n".
"Surname : $surname"."\n".
//print_r($_SESSION);
// SELECT DATABASE
mysql_select_db($database_recruit, $recruit) or die(mysql_error());
$result = mysql_query("INSERT INTO users_cv (title, firstname, middlename, surname) VALUES ('$title', '$firstname', '$middlename', '$surname')") or die(mysql_error());//
if(mail($to, $subject, $message, $headers))
{
echo "Your application has been submitted!";
}
} ?> </font></p> </div></td> </tr> </table> </div></td> </tr> </table> </td> </tr> <tr> <td height="27"><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#999999"> <tr> <td>
</td> </tr> </table></td> </tr> </table> </div></body></html>
Fourth question, in my tables below..what is the line to be included for the user's input as shown below
(Toggle Plain Text)
-- phpMyAdmin SQL Dump
-- version 2.11.0
-- [url]http://www.phpmyadmin.net[/url]
--
-- Host: localhost
-- Generation Time: Jan 14, 2008 at 12:54 AM
-- Server version: 4.1.22
-- PHP Version: 5.2.3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `mavlinpr_recruit`
--
-- --------------------------------------------------------
--
-- Table structure for table `admin`
--
CREATE TABLE `admin` (
`id` int(11) NOT NULL auto_increment,
`firstname` varchar(20) collate latin1_general_ci default NULL,
`lastname` varchar(20) collate latin1_general_ci default NULL,
`username` varchar(20) collate latin1_general_ci default NULL,
`password` varchar(20) collate latin1_general_ci default NULL,
`date` date default '0000-00-00',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=3 ;
--
-- Dumping data for table `admin`
--
INSERT INTO `admin` VALUES(1, 'shee', 'sheep', 'sheesheep', '123456', '0000-00-00');
INSERT INTO `admin` VALUES(2, NULL, NULL, 'admin', 'admin', '1899-12-29');
-- --------------------------------------------------------
--
-- Table structure for table `users_cv`
--
CREATE TABLE `users_cv` (
`id` int(11) NOT NULL auto_increment,
`date_posted` varchar(30) collate latin1_general_ci default NULL,
`title` varchar(50) collate latin1_general_ci default NULL,
`firstname` varchar(50) collate latin1_general_ci default NULL,
`middlename` varchar(50) collate latin1_general_ci default NULL,
`surname` varchar(50) collate latin1_general_ci default NULL,
What do i put here?
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=1 ;
--
-- Dumping data for table `users_cv`
---- phpMyAdmin SQL Dump
-- version 2.11.0
-- [url]http://www.phpmyadmin.net[/url]
--
-- Host: localhost
-- Generation Time: Jan 14, 2008 at 12:54 AM
-- Server version: 4.1.22
-- PHP Version: 5.2.3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `mavlinpr_recruit`
--
-- --------------------------------------------------------
--
-- Table structure for table `admin`
--
CREATE TABLE `admin` (
`id` int(11) NOT NULL auto_increment,
`firstname` varchar(20) collate latin1_general_ci default NULL,
`lastname` varchar(20) collate latin1_general_ci default NULL,
`username` varchar(20) collate latin1_general_ci default NULL,
`password` varchar(20) collate latin1_general_ci default NULL,
`date` date default '0000-00-00',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=3 ;
--
-- Dumping data for table `admin`
--
INSERT INTO `admin` VALUES(1, 'shee', 'sheep', 'sheesheep', '123456', '0000-00-00');
INSERT INTO `admin` VALUES(2, NULL, NULL, 'admin', 'admin', '1899-12-29');
-- --------------------------------------------------------
--
-- Table structure for table `users_cv`
--
CREATE TABLE `users_cv` (
`id` int(11) NOT NULL auto_increment,
`date_posted` varchar(30) collate latin1_general_ci default NULL,
`title` varchar(50) collate latin1_general_ci default NULL,
`firstname` varchar(50) collate latin1_general_ci default NULL,
`middlename` varchar(50) collate latin1_general_ci default NULL,
`surname` varchar(50) collate latin1_general_ci default NULL,
What do i put here?
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=1 ;
--
-- Dumping data for table `users_cv`
--
lastly this is the page for each user's profile,now what do i put here to be able to view the link of the uploaded files by the user?
(Toggle Plain Text)
<?php session_start();
require_once('../Connections/recruit.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>testing</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<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];}}
}
//-->
</script>
<style type="text/css">
<!--
.style1 {color: #000066}
.profileheader {font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 24px;
font-weight: bold;
color: #000000;}
.shade {background-color: #666666;
color: #FFFFFF;
display: block;
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
font-size: 12px;
padding-left: 15px;}
.subheading {
border-right-width: thin;
border-bottom-width: medium;
border-left-width: thin;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-right-color: #CCCCCC;
border-bottom-color: #666666;
border-left-color: #CCCCCC;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
color: #000000;
border-top-width: thin;
border-top-color: #CCCCCC;
}
h1 {
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
color: #FFFFFF;
background-color: #666666;
border-bottom-width: medium;
border-bottom-style: solid;
border-bottom-color: #333333;
text-indent: 20px;
}
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #003366;
}
-->
</style>
</head>
<body bgcolor="#FFFFFF">
<style TYPE="text/css">
<!-- A:link {text-decoration: none; color:#000055} A:visited {text-decoration: none; color:#000055} A:active {text-decoration: none; color:#000022} A:hover {text-decoration: ; color:#00CC00 }-->
</style>
<?php
$username = $_SESSION['username'];
$id = $_GET['id'];
mysql_select_db($database_recruit, $recruit);
$query_users = "SELECT * FROM users_cv WHERE id='$id'";
$users = mysql_query($query_users, $recruit) or die(mysql_error());
$row_users = mysql_fetch_assoc($users);
$totalRows_users = mysql_num_rows($users);
?>
<table width="786" border="0" align="left" cellpadding="0" cellspacing="2">
<tr>
<td align="left"><h2>
<font color="#FF0000">
Recruitment Database Administration </font> </h2></td>
</tr>
<tr>
<td bgcolor="#006699"><h1>Profile of <?php echo $row_users['firstname']; ?> <?php echo $row_users['surname']; ?></h1></td>
</tr>
<tr>
<td height="27"><div align="center">
<table width="108%" border="1" cellpadding="2" cellspacing="0" bordercolor="#CCCCCC" bgcolor="#FFFFFF">
<tr>
<td height="25">
<table width="805" border="0" align="left" cellpadding="2" cellspacing="2" bgcolor="#FFFFFF">
<tr>
<td width="81%" height="121" valign="top" bgcolor="#FFFFFF">
<div align="left">
<table width="100%" border="0" cellspacing="3" cellpadding="3">
<tr >
<td class="subheading">Personal
Data</td>
<td align="right" class="subheading" bgcolor="#CCCCCC"><a href= "javascript: history.back(-1)">
<font color="#FF0000"><< Go back </font> </a></td>
</tr>
<tr>
<td width="146">Title</td>
<td width="630"><?php echo $row_users['title']; ?></td>
</tr>
<tr>
<td width="146">First Name</td>
<td width="630"><span class="style1"><?php echo $row_users['firstname']; ?></span></td>
</tr>
<tr>
<td>Middle Name</td>
<td><span class="style1"><?php echo $row_users['middlename']; ?></span></td>
</tr>
<tr>
<td>Surname</td>
<td><span class="style1"><?php echo $row_users['surname']; ?></span></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="3" cellpadding="3">
<tr>
<td bgcolor="#CCCCCC"><b>
<font face="Arial" size="2" color="#000000">Documents:</font></b></td>
</tr>
<tr>
<td> this is
to show the link to the file for this user's profile</td>
</tr>
</table>
</div>
</blockquote></td>
</tr>
<tr>
<td height="23" align="right" background="../../db_recruit/images/cogbg.gif" bgcolor="#FFFFFF"><a href= "javascript: history.back(-1)"><< Go back </a></td>
</tr>
</table>
<?php
?>
</td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td height="27"><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#999999">
<tr>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="12"><div align="center"><font color="#006699" size="1" face="Verdana"> </div></td>
</tr>
</table>
<br />
</body>
</html>
<?php
mysql_free_result($users);
?>