Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Calling values to fill out a form
Old 07-08-2009, 11:40 AM Calling values to fill out a form
Average Talker

Posts: 22
Trades: 0
I have created a request form that has to go to one person. Then additional info needs to be filled out and all the info goes to a second person. So I created the first form and sent it to email.php. In email.php I have added the second form which I would like to be populated with the original info so it does not have to be filled out twice.

here is the link http://beylahrosenbaum.com/equipment/it-request.html


PHP Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>IT Equipment Request</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="styles.css" rel="stylesheet" type="text/css" id="css" />
</head>
<body>
<?php
if ((!$title)||(!$conname)||(!$conext)||(!$date)||(!$location)||(!$start)||(!$end))
{
echo 
"<html><head>
<link href=\"styles.css\" rel=\"stylesheet\" type=\"text/css\">
</head><body>
<blockquote>
<br><br><br><br>
<p class=\"head\" align=\"center\">Error!</p><br><br><p class=\"subhead\" align=\"center\">You have not filled in all of the required fields.<br>
Please go back and fill in the form completely.</p>
</blockquote>"
;
exit;
}
include(
"config.php");
$connection=mysql_connect($hostname,$user,$pass) or die ("Failed to connect.");
mysql_select_db($dbname,$connection) or die ("Cannot connect to DB");
$sql="
insert into equipment
(id, title, name, extension, conname, conext, date, location, start, end, equipment1, equipment2, equipment3, equipment4, equipment5, equipment6, equipment7, equipment8, equipment9, instructions)
values
('','
$title','$name','$extension','$conname','$conext','$date','$location','$start','$end','$equipment1','$equipment2','$equipment3','$equipment4','$equipment5','$equipment6','$equipment7','$equipment8','$equipment9','$instructions')
"
;
$result=mysql_query($sql,$connection) or die ("Could not insert data into the DB.");
if(
$_POST['Submit']){
$id=$_POST['id'];
$title=$_POST['title'];
$name=$_POST['name'];
$extension=$_POST['extension'];
$conname=$_POST['conname'];
$conext=$_POST['conext'];
$date=$_POST['date'];
$location=$_POST['location'];
$start=$_POST['start'];
$end=$_POST['end'];
exit;
}
$id=$_GET['id'];
$resultequipment=mysql_query("select * from equipment where id='$id'");
$row=mysql_fetch_assoc($resultequipment);
?>
 
<img src="images/FM-logo.jpg">
<div class="content">
<p class="head">Your request has been sent</p>
<p class="subhead">If this is a recurring event, please click on the button below and change the date &amp;/or times</p>
<form name="BackForm">
<p id="BackButton">
<input type="button" value=" Recurring " onClick="parent.history.back()" name="ws-back">
</p>
</form>
<p>If you have any further question, please contact the IT Department at x2064.</p>
<br />
<p class="hilite">If you need to order a <strong>Projector Screen or other Misc Equipment</strong> for you meeting please fill out the form below.</p>
<br />
<p class="head">Miscellaneous Equipment Requests</p>
<p class="subhead">Please fill out the remaining part of the form.</p>
<form action="email-misc.php" method="post">
<input type="hidden" name="id" value="<? echo $id?>" /> 
<table cellpadding="10" cellspacing="0" border="1">
<tr><td>Meeting Title</td>
<td colspan="3"><input size="40" type="text" name="title" id="title" value="<?php echo $row['title']; ?>" /></td></tr>
<tr><td>Requestor Name</td><td><input size="40" type="text" name="name" id="name" value="<?php echo $row['name']; ?>" /></td>
<td> Extension</td><td><input size="40" type="text" name="extension" id="extension" value="<?php echo $row['extension']; ?>" /></td></tr>
<tr><td>Contact Name</td><td><input size="40" type="text" name="conname" id="conname" value="<?php echo $row['conname']; ?>" /></td>
<td> Extension</td><td><input size="40" type="text" name="conext" id="conext" value="<?php echo $row['conext']; ?>" /></td></tr>
<tr><td>Date Required</td><td><input size="40" type="text" name="date" id="date" value="<?php echo $row['date']; ?>" /></td>
<td>Location</td><td><input size="40" type="text" name="location" id="location" value="<?php echo $row['location']; ?>" /></td></tr>
<tr><td>Start Time</td><td><input size="40" type="text" name="start" id="start" value="<?php echo $row['start']; ?>" /></td>
<td>End Time</td><td><input size="40" type="text" name="end" id="end" value="<?php echo $row['end']; ?>" /></td></tr>
<tr><td valign="top">Equipment Required</td><td colspan="3">
<p><input name="equipment1" type="checkbox" value="Screen">Projector Screen<br />
<input name="equipment2" type="checkbox" value="Flipchart">Flip Chart<br />
<input name="equipment3" type="checkbox" value="TV">TV<br />
<input name="equipment4" type="checkbox" value="DVD_Player">DVD Player<br />
<input name="equipment5" type="checkbox" value="Podium">Podium<br />
<input name="equipment6" type="checkbox" value="Chairs">Chairs ~ How Many &nbsp; <input type="text" name="Chairs_Number" size=40><br /><br />
<input name="equipment7" type="checkbox" value="Tables">Tables ~ How Many &nbsp; <input type="text" name="Tables_Number" size=40></p>
</td></tr>
<tr><td>Special Instructions<br />
<br />
<em>or</em><br />
<br />
Other Equipment<br />
Request</td><td colspan="3"><textarea cols="80" rows="5" name="instructions"></textarea></td></tr>
<tr><td colspan="4" align="center"><input onClick="return candosubmit(this.form)" type="image" value="submit" src="images/submit.jpg" border="0"></td></tr>
</table>
</form>
<br /><br />
<hr />
<p>Fasken Martineau DuMoulin LLP expects that the equipment will be returned in the same condition as it is received. Other than normal wear and tear, you MAY be assessed all, or part of the cost to replace or repair any damage to the equipment sustained while it is signed out to you, especially if the loss or damage is due to negligence or carelessness of the borrower.</p>
<p>Please read the attached <a href="it-policy.html">Equipment Policy</a></p>
</div>
</body>
</html>
beylah is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to Calling values to fill out a form
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13142 seconds with 12 queries