Jump to content

Recommended Posts

Hey again,

 

I got a 2 step process

 

1st order.html

<html>
<head>
<title>Alliance Couriers, Your personal delivery system.</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- Fireworks MX Dreamweaver MX target.  Created Sun Feb 25 03:27:17 GMT-0500 (Eastern Standard Time) 2007-->

<script type="text/JavaScript">
<!--
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_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_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 bgcolor="#ffffff" link="#990000" vlink="#990000" alink="#990000" onLoad="MM_preloadImages('../images/buttons/home_down.gif')">
<table width="200" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><!-- #BeginLibraryItem "/Library/top.lbi" --><table width="750" align="center">
      <td><img name="new_logo_2_r1_c1" src="../SLICES/new_logo_2_r1_c1.jpg" width="750" height="93" border="0" alt="Alliance Couriers"><br>
        <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td width="86%"><a href="order.html"><img src="../images/arrows.gif" border="0"><img src="../images/request.gif" alt="Place a pickup/delivery request" border="0" longdesc="order.php"></a></td>
            <td width="5%"><a href="../index.html"><img src="../images/home.gif" alt="Home" width="35" height="16" border="0"></a></td>
            <td width="2%"><div align="center"><img src="../images/spacer.gif"  height="21"></div></td>
            <td width="7%"><div align="left"><a href="../careers.html"><img src="../images/careers.gif" alt="Careers at Alliance Couriers" width="46" height="16" border="0"></a></div></td>
          </tr>
        </table></td>
       
      </table><!-- #EndLibraryItem --><table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td width="87" background="../images/TOP.gif"><div align="left"><a href="../index.html" onMouseOut="MM_swapImgRestore()" onMouseClick="MM_swapImage('999','','../images/buttons/home_down.gif',1)"><img src="../images/buttons/services_up.gif" alt="Home" name="home"  border="0"></a></div>            <div align="left"><a href="../about.html" onMouseOut="MM_swapImgRestore()" onmouseclick="MM_swapImage('home','','../images/buttons/home_down.gif',1)"></a></div></td>
            <td width="111" background="../images/TOP.gif"><div align="left"><a href="../rates.html" onMouseOut="MM_swapImgRestore()" onmouseclick="MM_swapImage('home','','../images/buttons/home_down.gif',1)"></a><a href="https://www.alliancecouriers.com/new.php" onMouseOut="MM_swapImgRestore()" onmouseclick="MM_swapImage('home','','../images/buttons/home_down.gif',1)"><img src="../images/buttons/newacc_up.gif"  border="0" longdesc="https://alliancecouriers.com/new.php"></a></div></td>
            <td width="88" background="../images/TOP.gif"><div align="left"><a href="../contact.html"><img src="../images/buttons/contact_down.gif" alt="Contact Us"  border="0"></a></div></td>
            <td width="107" background="../images/TOP.gif"><div align="left"><a href="../logon.php"><img src="../images/buttons/logon_up.gif" alt="Log on to your account" width="106" height="20" border="0"></a></div></td>
            <td width="357" background="../images/TOP.gif"><div align="right"></div></td>
        </tr>
        <tr>
          <td colspan="5"><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td width="75%"><p align="left"><font size="-1">There areseveral simple ways to place a pickup/delivery order.<br>
                <img src="../images/icon_configured.gif" width="14" height="16"></font><font size="-1"> C</font><font size="-1">all 540-288-1555 <br>
                    <img src="../images/icon_configured.gif" width="14" height="16"> Fax us at 540-301-1557 <br>
                    <img src="../images/icon_configured.gif" width="14" height="16"> Send us an email at <a href="mailto:sales@alliancecouriers.com">sales@alliancecouriers.com</a> (Standard 5 hours delivery only)<br>
                      <img src="../images/icon_configured.gif" width="14" height="16"> Use the web order form below. (Standard 5 hours delivery only)<br>
                      Please include your name, your phone number, company name or account number and pickup location with your Fax and email orders. <br>
                </font></p>                </td>
              <td width="25%"><center><script type="text/javascript" src="http://alliancecouriers.com/live/livehelp_js.php?department=1&pingtimes=15"></script></center> </td>
            </tr>
            <tr>
              <td height="35" colspan="2"><form enctype='multipart/form-data' action='process.php' method='post'>
                <tr><tr>
<table width='100%' border=0>
<tr>
  <td colspan="5" bgcolor='ffffff'><div align="center"><font size="-1"><font color="#FF0000"><strong>Important:</strong></font> <strong>The fax , email & web orders are for standard 5 hours delivery only.</strong></font></div></td>
</tr>
<tr>
  <td colspan="5" background="../images/tableh1_bg.gif" bgcolor='ffffff'><strong><font color="#660000">Billing info </font></strong></td>
  </tr>
<tr><td width="15%" bgcolor='ffffff'><font size="-1"> Customer Name<font color='#ff0000'>*</font></font></td>
<td colspan="4" bgcolor='ffffff'>
  <font size="-1">
  <input name='CustomerName' type=text size="15">
  </font></td></tr>
<tr><td bgcolor='ffffff'><font size="-1"> Company Name</font></td>
<td width="15%" bgcolor='ffffff'>
  <font size="-1">
  <input name='CompanyName' type=text size="15">
  </font></td>
<td width="18%" bgcolor='ffffff'> <div align="center"><font size="-1">or, </font></div></td>
<td width="14%" bgcolor='ffffff'><font size="-1">Account # </font></td>
<td width="38%" bgcolor='ffffff'><font size="-1">
  <input type=text name='Account'>
</font></td>
</tr>
<tr><td colspan="5" bgcolor='ffffff'> </td>
</tr>
<tr>
  <td colspan="5" background="../images/tableh1_bg.gif" bgcolor='ffffff'><strong><font color="#660000">Shipping info</font></strong> </td>
</tr>
<tr>
  <td colspan="2" bgcolor='ffffff'><strong><font size="-1"> Number of Package(s)<font color='#ff0000'>*</font>
        <input type=text name='NumberofPackage' size=6>
  </font></strong></td>
  <td colspan="2" bgcolor='ffffff'><strong><font size="-1">Total package weight<font color='#ff0000'>*</font>
        <input type=text name='Totalpackageweight' size=6>
    * </font></strong></td>
  <td bgcolor='ffffff'><font size="-1">* estimated weight of all your packages </font></td>
</tr>
<tr>
  <td colspan="3" bgcolor='ffffff'><table width="95%" border="0" align="center" cellpadding="2" cellspacing="2" background="../images/maintable_bg.gif" bgcolor="#CCCCCC">
    </table>
    <table width="95%" border="0" align="center" cellpadding="2" cellspacing="2" background="../images/maintable_bg.gif" bgcolor="#CCCCCC">
      <caption>
      <strong>Pickup From        </strong>
      </caption>
      <tr>
        <th scope="row"> </th>
          <th scope="row"><div align="right"><font size="-1"><font size="-1">
            <font size="-1">Pickup Time<font color='#ff0000'> *</font></font>
            <input type=text name='PickupTime' size=10>
            </font></font></div></th>
      </tr>
      <tr>
        <th scope="row"><div align="left"><font size="-1"> Name<font color='#ff0000'>*</font></font></div></th>
          <td><font size="-1">
            <input name='FromName' type=text size="15">
              <input name='sameasbilling2' type=hidden value='No' checked>
              <input type=hidden name='sameasbilling' value='Yes'>
          </font></td>
      </tr>
      <tr>
        <th scope="row"><div align="left"><font size="-1">Street</font><font size="-1"><font color='#ff0000'>*</font></font></div></th>
          <td><font size="-1">
            <input name='FromStreet' type=text size="20">
            suite
            <input type=text name='Fromsuite' size=5>
            </font></td>
      </tr>
      <tr>
        <th scope="row"><div align="left"><font size="-1"> City<font color='#ff0000'>*</font></font></div></th>
          <td><font size="-1">
            <input name='Fromcity' type=text size="15">
            <strong>Zip</strong><font color='#ff0000'>*</font><font size="-1">
              <input name='Fromzip' type=text size="10">
              </font></font></td>
      </tr>
      <tr>
        <th scope="row"><div align="left"><font size="-1">Phone<font color='#ff0000'>*</font></font></div></th>
          <td><font size="-1">
            <input name='Fromphone' type=text size="12">
            </font></td>
      </tr>
      <tr>
        <th scope="row"><div align="left"></div></th>
          <td> </td>
      </tr>
      </table>    </td>
  <td colspan="2" bgcolor='ffffff'><table width="95%" border="0" align="center" cellpadding="2" cellspacing="2" background="../images/maintable_bg.gif" bgcolor="#CCCCCC">
    <caption>
    <strong>Deliver to</strong><font size="-1">
    <input name='Deliverby' type='hidden' value="Web order. Standard 5 hours" size=10>

    </font>
    </caption>
    
    <tr>
      <th colspan="2" scope="row"> </th>
      </tr>
    <tr>
      <th width="28%" scope="row"><div align="left"><font size="-1">Name<font color='#ff0000'>*</font></font></div></th>
      <td width="72%"><font size="-1">
        <input name='Toname' type=text size="15">
      </font></td>
    </tr>
    <tr>
      <th scope="row"><div align="left"><font size="-1">Street</font><font size="-1"><font color='#ff0000'>*</font></font></div></th>
      <td><font size="-1">
        <input name='Tostreet' type=text size="20">
      suite 
      <input name='Tosuite' type=text size="5">
      </font></td>
    </tr>
    <tr>
      <th scope="row"><div align="left"><font size="-1">City<font color='#ff0000'>*</font></font></div></th>
      <td><font size="-1">
        <input name='Tocity' type=text size="15">
        <strong>Zip</strong><font color='#ff0000'>*</font><font size="-1">
        <input name='Tozip' type=text size="10">
        </font></font></td>
    </tr>
    <tr>
      <th scope="row"><div align="left"><font size="-1">Phone<font color='#ff0000'>*</font></font></div></th>
      <td background="../images/maintable_bg.gif"><font size="-1">
        <input name='Tophone' type=text size="12">
      </font></td>
    </tr>
    <tr>
      <th scope="row"><div align="left"></div></th>
      <td> </td>
    </tr>
  </table></td>
  </tr>
<tr><td bgcolor='ffffff'><div align="center"><font size="-1"> Special instructions</font></div></td>
<td colspan="4" bgcolor='ffffff'>
  <div align="center"><font size="-1">
    <textarea name='Specialinstructions' rows=5 cols=60></textarea>
  </font></div></td></tr>
</table>

<div align="center">By clicking "Submit Order" ,I agree to all <a href="../terms.html">terms and conditions</a> 
  <input type='submit' value='Submit Order'> 
  <input type=reset value='Clear Form'>
</div>
                </form>
		  
		   </p>                </td>
              </tr>
            </table></td>
        </tr>
      </table>
    </td></tr>
</table>
</body>
</html>

 

2nd process.php


<?php
include("global.inc.php");


$time = time();



$errors=0;
$error="The following errors occured while processing your form input.<ul>";
pt_register('POST','CustomerName');
pt_register('POST','CompanyName');
pt_register('POST','Account');
pt_register('POST','NumberofPackage');
pt_register('POST','Totalpackageweight');
pt_register('POST','PickupTime');
pt_register('POST','Deliverby');
pt_register('POST','FromName');
pt_register('POST','FromStreet');
pt_register('POST','Fromsuite');
pt_register('POST','Fromcity');
pt_register('POST','Fromzip');
pt_register('POST','Fromphone');
pt_register('POST','Toname');
pt_register('POST','Tophone');
pt_register('POST','Tostreet');
pt_register('POST','Tosuite');
pt_register('POST','Tocity');
pt_register('POST','Tozip');
pt_register('POST','Specialinstructions');
$Specialinstructions=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $Specialinstructions);pt_register('POST','sameasbilling');

if($CustomerName=="" || $NumberofPackage=="" || $Totalpackageweight=="" || $PickupTime=="" || $Deliverby=="" || $FromName=="" || $Fromphone=="" || $Toname=="" || $Tophone=="" || $Tostreet=="" || $Tocity=="" || $Tozip=="" ){
$errors=1;
$error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
}
if($errors==1) echo $error;
else{
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="
Order Number: ".$time."
Company Name: ".$CompanyName."
Customer Name: ".$CustomerName."
Company Name: ".$CompanyName."
Account: ".$Account."
::::::::::::::::::::::::::::::::::::::::::::::::::
Number of Package: ".$NumberofPackage."
Total package weight: ".$Totalpackageweight."
::::::::::::::::::::::::::::::::::::::::::::::::::
Pickup Time: ".$PickupTime."
::::::::::::::::::::::::::::::::::::::::::::::::::
Deliver by: ".$Deliverby."
::::::::::::::::::::::::::::::::::::::::::::::::::
From Name: ".$FromName."
From Street: ".$FromStreet."
From suite: ".$Fromsuite."
From city: ".$Fromcity."
From zip: ".$Fromzip."
From phone: ".$Fromphone."
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
To name: ".$Toname."
To phone: ".$Tophone."
To street: ".$Tostreet."
To suite: ".$Tosuite."
To city: ".$Tocity."
To zip: ".$Tozip."
Special instructions: ".$Specialinstructions."
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
same as billing: ".$sameasbilling."
confirmation email: ".$confirmationemail."
";
$message = stripslashes($message);
mail("email@gmail.com","Form Submitted at your website",$message,"From: ACS_Web_order");
mail("email@gmail.com","Form Submitted at your website",$message,"From: ACS_Web_order");
?>



<!-- This is the content of the Thank you page, be careful while changing it -->
<style type="text/css">
<!--
.style2 {font-size: small}
.style4 {
font-size: x-small;
font-weight: bold;
}
.style6 {
font-size: x-small;
color: #990000;
font-weight: bold;
}
.style7 {
font-size: large;
font-weight: bold;
}
-->
</style>
<div align="center" class="style4"><strong>Please do not refresh this page to avoid duplicate orders.</strong></div>
<table width="75%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="44%" height="95" background="Drag to a file to choose it."> </td>
    <td width="56%" background="Drag to a file to choose it."><div align="right"><img src="../images/printable logo.jpg" width="217" height="49" /></div></td>
  </tr>
</table>
<SCRIPT Language="Javascript">
function printit(){
if (window.print) {
    window.print() ;
} else {
    var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
    WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box WebBrowser1.outerHTML = "";
}
}
</script>
<table width="70%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#666666">
      <tr>
        <td bordercolor="#FFFFFF"><div align="center"><strong>Order # <?php echo $time; ?></strong></div></td>
        <td bordercolor="#FFFFFF"><div align="right"><span class="style2"><span class="style7"><u><?php echo $Deliverby; ?></u></span></span></div></td>
      </tr>
      <tr>
        <td width="50%" bordercolor="#FFFFFF"><span class="style2"><strong>From<br />
                <?php echo $FromName; ?><br />
                <?php echo $FromStreet; ?>, Suite <?php echo $Fromsuite; ?><br />
                <?php echo $Fromcity; ?>, <?php echo $Fromzip; ?><br />
          Phone: <?php echo $Fromphone; ?><br />
          Pick up time : <?php echo $PickupTime; ?></strong><br />
        </span></td>
        <td width="50%" bordercolor="#FFFFFF"><span class="style2"><strong>To:<br />
              <?php echo $Toname; ?><br />
              <?php echo $Tostreet; ?>, Suite <?php echo $Tosuite; ?><br />
              <?php echo $Tocity; ?>, <?php echo $Tozip; ?><br />
Phone: <?php echo $Tophone; ?></strong></span></td>
      </tr>
      
      <tr>
        <td bordercolor="#FFFFFF"><div align="left"><span class="style2"><img src="../images/barcode.jpg" width="102" height="17" /></span></div></td>
        <td bordercolor="#FFFFFF"><p class="style2"> </p></td>
      </tr>
      <tr>
        <td height="47" bordercolor="#FFFFFF"> </td>
        <td bordercolor="#FFFFFF"><table width="100%" border="1" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td bordercolor="#FFFFFF"><span class="style2"><strong>Special Instructions :</strong></span></td>
            </tr>
            <tr>
              <td bordercolor="#FFFFFF"><span class="style2"><strong><?php echo $Specialinstructions; ?></strong></span></td>
            </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
<br />
<table width="50%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="30%"><span class="style2"><strong>Bill to: </strong></span></td>
    <td width="70%"><span class="style2"><strong><?php echo $CustomerName; ?></strong></span></td>
  </tr>
  <tr>
    <td><span class="style2"><strong>Company:</strong></span></td>
    <td><span class="style2"><strong><?php echo $CompanyName; ?></strong></span></td>
  </tr>
  <tr>
    <td><span class="style2"><strong>Account # : </strong></span></td>
    <td><span class="style2"><strong><?php echo $Account; ?></strong></span></td>
  </tr>
</table>
<br />
<br />
<br />
<div align="center">
  <!-- Do not change anything below this line -->
  <?php 
}
?>
  <SCRIPT Language="Javascript">
var NS = (navigator.appName == "Netscape");
var VERSION = parseInt(navigator.appVersion);
if (VERSION > 3) {
    document.write('<form><input type=button value="Print this Page" name="Print" onClick="printit()"></form>');
}
</script> 
  <span class="style6">Please print 2 copies of this page, attach one to your package and keep one for your records</span><span class="style4">.</span></div>

 

check it out here

 

After submission, the 1st page automatically submits the form.

 

I need a confermation page between the 1st and the second page. Basically they will have a chance to review the info & make corrections before submiting.

 

Thanks guys

Link to comment
https://forums.phpfreaks.com/topic/41556-solved-confirmation/
Share on other sites

What exactly are you stuck with? Simply post the first page to a confirmation page, place the infomation either back into a a form for the user to view / edit then submit to the third page.

 

Otherwise, display the data however you like and send the data via a hidden form.

 

PS: Its a good idea to post relevent code only, I didn't even look at all that code.

Link to comment
https://forums.phpfreaks.com/topic/41556-solved-confirmation/#findComment-201398
Share on other sites

What exactly are you stuck with? Simply post the first page to a confirmation page, place the infomation either back into a a form for the user to view / edit then submit to the third page.

 

Otherwise, display the data however you like and send the data via a hidden form.

 

PS: Its a good idea to post relevent code only, I didn't even look at all that code.

 

Hehe I feel like an idiot...

 

Thanks man

Link to comment
https://forums.phpfreaks.com/topic/41556-solved-confirmation/#findComment-201400
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.