SteweGriffin
Technical User
Hello,
I have a webform :-
<form action="job_load.php" method="post"
enctype="multipart/form-data" class="style2" style="width: 958px">
<span class="style34">
<label for="file"><td>Affilate Name:
<img alt="" height="1" src="images/spacer.gif" width="64" class="style35" />
<input type="text" id="affilate" name="affilate" size="15" style="width: 149px" value="Your Trading Name"></td>
<br />
Job Loaders name:
<img alt="" height="1" src="images/spacer.gif" width="25" class="style35" />
<input type="text" id="loadersname" name="loadersname" size="15" style="width: 149px" value="Your Full Name"></td>
<br />
Your e-Mail address:
<img alt="" height="1" src="images/spacer.gif" width="13" class="style35" />
<input type="text" id="eaddress" name="eaddress" size="35" style="width: 263px" value="Your e-Mail address"></td>
<br />
Your
Clients Name:<img alt="" height="1" src="images/spacer.gif" width="38" class="style35" /><img alt="" height="10" src="images/spacer.gif" width="2" class="style35" />
<input type="text" id="cname" name="fullname" size="15" style="width: 229px" value="Your Clients Name / Trading Name"></td>
<font face="verdana" size="2">Company Type:<img alt="" height="1" src="images/spacer.gif" width="6" class="style35" /><select name="cotype" size="1">
<option value="NotSelected">Select from below..</option>
<option value="Limited">Ltd</option>
<option value="Partnership">Partenership</option>
<option value="Sole Trader">Sole Trader</option>
<option value="N/A">Not Applicable</option>
</select></font><div><font face="verdana" size="2"><span class="style34">Type:</span><img alt="" height="1" src="images/spacer.gif" width="113" class="style35" /><select name="type" size="1">
<option value="NotSelected">Select from below..</option>
<option value="option1">1</option>
<option value="option2">3</option>
<option value="option3">3</option>
<option value="option4">4</option>
<option value="option5">5</option>
<option value="option6">6</option>
<option value="option7">7</option>
</select></div>
<div><span class="style34">Output Format requires:</span><img alt="" height="2" src="images/spacer.gif" width="13" class="style35" /><select name="format" size="1">
<option value="NotSelected">Select from below..</option>
<option value="option1">1</option>
<option value="option2">2</option>
<option value="option3">3</option>
<option value="option4">4</option>
<option value="option5">5</option>
<option value="option5">5</option>
<option value="OTHER-See Notes">OTHER - Please detail in the Notes section below.</option>
</select></div>
<span class="style34">Notes:</span><img alt="" height="1" src="images/spacer.gif" width="134" class="style35" />
<textarea cols="40" rows="7" wrap="virtual" name="message"></textarea>
<br/>
<span class="style37"><br />
<span class="style38">I confirm I have read the <a href="TermsAndConditions.html">Terms and
Conditions</a> and am sending all relevant documenting to enable completion
of the requested job. <br />
I acknowledged and any missing items may incure an addtional cost.</span> <input type="checkbox" name="confirm"></span><br />
<!--Filename:<img alt="" height="1" src="images/spacer.gif" width="62" class="style35" /></label></span>
<input type="file" name="file" id="file" size="50" style="width: 406px" /> -->
<br />
<p style="height: 40px"></p>
<div class="style1">
<input type="submit" name="submit" value="Submit Job" style="color: #FFFFFF; background-color: #000000; background-image: url('images/btnbck.gif'); border-color: #000000" />
</div>
</form>
Which parses the information to another PHP file (job_load.php):-
<?php
$affilate = $_POST['affilate'];
$type = $_POST['type'];
$cotype = $_POST['cotype'];
$loader = $_POST['loadersname'];
$client = $_POST['fullname'];
$eaddress = $_POST['eaddress'];
$sendTo = "email@emailaddress.co.uk"; // Set a variable that will be used for emailing
$subject = "A ".$type ." job has been submitted via the webpage by ".$loader ." of ".$affilate ." for their client ".$client ." ".$cotype; // This is the subject that will appear in the email
header('Location: Loadsuccess.php');
session_start();
set($_SESSION['user']);
$body = "------------------------------------------------------------------------------------------------\r\n";
$body .= "----------- The following job has been uploaded via webpage. -----------\r\n";
$body .= "------------------------------------------------------------------------------------------------\r\n";
$body .= "Affilate's name : ". $_POST['affilate'] .".\r\n";
$body .= "".$_POST['loadersname']." quoted their client as : ". $_POST['fullname'] ." (". $_POST['cotype'] .").\r\n";
$body .= "type is : ". $_POST['type'] .".\r\n";
$body .= "using : ". $_POST['program'] .".\r\n";
$body .= "The assocated message is : ". $_POST['message'] .".\r\n";
$body .= "Terms and Conditions etc have been tick (ON = yes) : ". $_POST['confirm'] .".\r\n";
$body .= "------------------------------------------------------------------------------------------------\r\n";
$body .= "---------------------------- Uploader's IP address was : ". $_SERVER['REMOTE_ADDR'] . " ------------------------\r\n";
$body .= "------------------------------------------------------------------------------------------------\r\n";
/* headers used to show from field in email client */
$headers = 'From: '.$eaddress."\r\n" .
'Reply-To: '.$eaddress;
/* this actually sends the mail */
mail($sendTo, $subject, $body, $headers);
?>
This, in turn ,opens loadsuccess.php, which is just a thank you page. This page opens up another on load :-
<script>
var theURL = 'coversheet.php';
var width = 400;
var height = 600;
function popWindow() {
newWindow = window.open(theURL,'newWindow','toolbar=no,menubar=no,resizable=no,scrollbars=no,status=no,location=no,width='+width+',height='+height);
}
</script>
<body onload="popWindow()">
Now, this is the code/page i'm having the trouble with
(coversheet.php) :-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<title>Accounts To You - CoverSheet</title>
<Script language="JavaScript" src="js/security.js"></script>
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
var newwindow;
function poptastic(url)
{
newwindow=window.open(url,'name','height=370,width=600,scrollbars=yes,resizable=yes,status=no');
}
</script>
<style type="text/css">
.style1 {
font-family: Arial, Helvetica, sans-serif;
}
.style2 {
font-family: Arial, Helvetica, sans-serif;
font-size: large;
}
.style3 {
font-family: Arial, Helvetica, sans-serif;
font-size: medium;
}
.style4 {
color: #5F860B;
}
.style5 {
font-family: Arial, Helvetica, sans-serif;
font-size: small;
}
</style>
</head>
<body>
<p> </p>
<p class="style2"><strong><span class="style4">Your</span> Coversheet</strong></p>
<p class="style5">(Insert this cover sheet to the front of each set of documents file you wish
to have scanned)</p>
<p class="style1"> </p>
<p class="style1"> </p>
<p class="style2"><?php $_POST['affilate']?></p>
<p class="style2"><?php $_POST['fullname']?><?php $_POST['cotype']?></p>
<p class="style2">Job type: <script language="javascript"> writeDateLong(6);</script></p>
<p class="style1"> </p>
<p class="style3">Contact at <?php $_POST['affilate']?> : <?php $_POST['loadersname']?></p>
</body>
<script language="JavaScript">
<!--
window.print();
//-->
</script>
</html>
The "coversheet" page loads, but but the $_POST variable and the "DateLong" do you get outputted ( or they do, but thay have a null value ).
I assuming this is a "school boy" error as I am fairly new to PHP, so any help correctly this would be great.
Thank in advance
I have a webform :-
<form action="job_load.php" method="post"
enctype="multipart/form-data" class="style2" style="width: 958px">
<span class="style34">
<label for="file"><td>Affilate Name:
<img alt="" height="1" src="images/spacer.gif" width="64" class="style35" />
<input type="text" id="affilate" name="affilate" size="15" style="width: 149px" value="Your Trading Name"></td>
<br />
Job Loaders name:
<img alt="" height="1" src="images/spacer.gif" width="25" class="style35" />
<input type="text" id="loadersname" name="loadersname" size="15" style="width: 149px" value="Your Full Name"></td>
<br />
Your e-Mail address:
<img alt="" height="1" src="images/spacer.gif" width="13" class="style35" />
<input type="text" id="eaddress" name="eaddress" size="35" style="width: 263px" value="Your e-Mail address"></td>
<br />
Your
Clients Name:<img alt="" height="1" src="images/spacer.gif" width="38" class="style35" /><img alt="" height="10" src="images/spacer.gif" width="2" class="style35" />
<input type="text" id="cname" name="fullname" size="15" style="width: 229px" value="Your Clients Name / Trading Name"></td>
<font face="verdana" size="2">Company Type:<img alt="" height="1" src="images/spacer.gif" width="6" class="style35" /><select name="cotype" size="1">
<option value="NotSelected">Select from below..</option>
<option value="Limited">Ltd</option>
<option value="Partnership">Partenership</option>
<option value="Sole Trader">Sole Trader</option>
<option value="N/A">Not Applicable</option>
</select></font><div><font face="verdana" size="2"><span class="style34">Type:</span><img alt="" height="1" src="images/spacer.gif" width="113" class="style35" /><select name="type" size="1">
<option value="NotSelected">Select from below..</option>
<option value="option1">1</option>
<option value="option2">3</option>
<option value="option3">3</option>
<option value="option4">4</option>
<option value="option5">5</option>
<option value="option6">6</option>
<option value="option7">7</option>
</select></div>
<div><span class="style34">Output Format requires:</span><img alt="" height="2" src="images/spacer.gif" width="13" class="style35" /><select name="format" size="1">
<option value="NotSelected">Select from below..</option>
<option value="option1">1</option>
<option value="option2">2</option>
<option value="option3">3</option>
<option value="option4">4</option>
<option value="option5">5</option>
<option value="option5">5</option>
<option value="OTHER-See Notes">OTHER - Please detail in the Notes section below.</option>
</select></div>
<span class="style34">Notes:</span><img alt="" height="1" src="images/spacer.gif" width="134" class="style35" />
<textarea cols="40" rows="7" wrap="virtual" name="message"></textarea>
<br/>
<span class="style37"><br />
<span class="style38">I confirm I have read the <a href="TermsAndConditions.html">Terms and
Conditions</a> and am sending all relevant documenting to enable completion
of the requested job. <br />
I acknowledged and any missing items may incure an addtional cost.</span> <input type="checkbox" name="confirm"></span><br />
<!--Filename:<img alt="" height="1" src="images/spacer.gif" width="62" class="style35" /></label></span>
<input type="file" name="file" id="file" size="50" style="width: 406px" /> -->
<br />
<p style="height: 40px"></p>
<div class="style1">
<input type="submit" name="submit" value="Submit Job" style="color: #FFFFFF; background-color: #000000; background-image: url('images/btnbck.gif'); border-color: #000000" />
</div>
</form>
Which parses the information to another PHP file (job_load.php):-
<?php
$affilate = $_POST['affilate'];
$type = $_POST['type'];
$cotype = $_POST['cotype'];
$loader = $_POST['loadersname'];
$client = $_POST['fullname'];
$eaddress = $_POST['eaddress'];
$sendTo = "email@emailaddress.co.uk"; // Set a variable that will be used for emailing
$subject = "A ".$type ." job has been submitted via the webpage by ".$loader ." of ".$affilate ." for their client ".$client ." ".$cotype; // This is the subject that will appear in the email
header('Location: Loadsuccess.php');
session_start();
set($_SESSION['user']);
$body = "------------------------------------------------------------------------------------------------\r\n";
$body .= "----------- The following job has been uploaded via webpage. -----------\r\n";
$body .= "------------------------------------------------------------------------------------------------\r\n";
$body .= "Affilate's name : ". $_POST['affilate'] .".\r\n";
$body .= "".$_POST['loadersname']." quoted their client as : ". $_POST['fullname'] ." (". $_POST['cotype'] .").\r\n";
$body .= "type is : ". $_POST['type'] .".\r\n";
$body .= "using : ". $_POST['program'] .".\r\n";
$body .= "The assocated message is : ". $_POST['message'] .".\r\n";
$body .= "Terms and Conditions etc have been tick (ON = yes) : ". $_POST['confirm'] .".\r\n";
$body .= "------------------------------------------------------------------------------------------------\r\n";
$body .= "---------------------------- Uploader's IP address was : ". $_SERVER['REMOTE_ADDR'] . " ------------------------\r\n";
$body .= "------------------------------------------------------------------------------------------------\r\n";
/* headers used to show from field in email client */
$headers = 'From: '.$eaddress."\r\n" .
'Reply-To: '.$eaddress;
/* this actually sends the mail */
mail($sendTo, $subject, $body, $headers);
?>
This, in turn ,opens loadsuccess.php, which is just a thank you page. This page opens up another on load :-
<script>
var theURL = 'coversheet.php';
var width = 400;
var height = 600;
function popWindow() {
newWindow = window.open(theURL,'newWindow','toolbar=no,menubar=no,resizable=no,scrollbars=no,status=no,location=no,width='+width+',height='+height);
}
</script>
<body onload="popWindow()">
Now, this is the code/page i'm having the trouble with
(coversheet.php) :-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<title>Accounts To You - CoverSheet</title>
<Script language="JavaScript" src="js/security.js"></script>
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
var newwindow;
function poptastic(url)
{
newwindow=window.open(url,'name','height=370,width=600,scrollbars=yes,resizable=yes,status=no');
}
</script>
<style type="text/css">
.style1 {
font-family: Arial, Helvetica, sans-serif;
}
.style2 {
font-family: Arial, Helvetica, sans-serif;
font-size: large;
}
.style3 {
font-family: Arial, Helvetica, sans-serif;
font-size: medium;
}
.style4 {
color: #5F860B;
}
.style5 {
font-family: Arial, Helvetica, sans-serif;
font-size: small;
}
</style>
</head>
<body>
<p> </p>
<p class="style2"><strong><span class="style4">Your</span> Coversheet</strong></p>
<p class="style5">(Insert this cover sheet to the front of each set of documents file you wish
to have scanned)</p>
<p class="style1"> </p>
<p class="style1"> </p>
<p class="style2"><?php $_POST['affilate']?></p>
<p class="style2"><?php $_POST['fullname']?><?php $_POST['cotype']?></p>
<p class="style2">Job type: <script language="javascript"> writeDateLong(6);</script></p>
<p class="style1"> </p>
<p class="style3">Contact at <?php $_POST['affilate']?> : <?php $_POST['loadersname']?></p>
</body>
<script language="JavaScript">
<!--
window.print();
//-->
</script>
</html>
The "coversheet" page loads, but but the $_POST variable and the "DateLong" do you get outputted ( or they do, but thay have a null value ).
I assuming this is a "school boy" error as I am fairly new to PHP, so any help correctly this would be great.
Thank in advance