Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    mgo
    mgo is offline
    New Coder
    Join Date
    Apr 2004
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Confirmation order

    Hi I have a problem to get the information from the the confirmation page what I have don IS
    1- creat a page (formular) with all the productes
    2- action="comfrim.php"
    3- and when the client confirm his order I schould have the odrer by mail or registred in . txt file and sand him mail to confirme his order.

    my question is in the 3 - point I don't know how can I do this I know that my method is not the best because I have to creat a conforme page for avery formular and it is a lot of work If you can tell me how can I do it better with DB or other method I willbe very thankfull.

    here my pages :fomular.html
    Code:
    <html>
    <head>
    
    
    <body>
    <table width="1012" border="0" align="left" cellpadding="0" cellspacing="0">
    <form method="post" action="phpconfirm.php">
          <p>
      <input type="submit" name="Submit" value="commander">
      <input type="hidden" name="acheter" value="oui" />
      <input type=hidden name="name" value=" ">
      <input type=hidden name="firma" value=" ">  
      <input type=hidden name="langue" value=" "> 
       <input type=hidden name="produits" value=" ">     
      <input type=hidden name="woche" value=" "> 
      <img src="../../../../images/banner.gif" width="468" height="60" vspace="12" border="0">      </p>
          <table border="1" cellspacing="0" cellpadding="0">
            <tr> </tr><tr><td>&nbsp;</td>
      <td><font size="2" face="Arial, Helvetica, sans-serif">Blühende Topfpflanzen</font>
    </td>  <td><font size="2" face="Arial, Helvetica, sans-serif">&nbsp;</font></td>  <td><font size="2" face="Arial, Helvetica, sans-serif">&nbsp;
    </font></td>  
    <td><font size="2" face="Arial, Helvetica, sans-serif">&nbsp;</font></td>  <td><font size="2" face="Arial, Helvetica, sans-serif">&nbsp;</font></td> 
     <td><font size="2" face="Arial, Helvetica, sans-serif">&nbsp;</font></td>  
    <td><font size="2" face="Arial, Helvetica, sans-serif">&nbsp;</font></td>  
    <td><font size="2" face="Arial, Helvetica, sans-serif">bei min. 1 cc</font></td>  
    <td><font size="2" face="Arial, Helvetica, sans-serif">&nbsp;</font></td> </tr><tr><td>Bestellung</td>
      <td><font size="2" face="Arial, Helvetica, sans-serif">A r t i k e l</font></td>  
    <td><font size="2" face="Arial, Helvetica, sans-serif">Topf</font></td> 
     <td><font size="2" face="Arial, Helvetica, sans-serif">&nbsp;       </font></td>  
     </tr>
    <tr>
    <td>    Anz Platten</td>
      <td><font size="2" face="Arial, Helvetica, sans-serif">ANGEBOT   Wo. 8  2004</font></td>  <td><font size="2" face="Arial, Helvetica, sans-serif">cm</font></td>  <td><font size="2" face="Arial, Helvetica, sans-serif">Beschreibung</font></td>  <td><font size="2" face="Arial, Helvetica, sans-serif">Bestel</font></td>  <td><font size="2" face="Arial, Helvetica, sans-serif">CC</font></td>
      <td><font size="2" face="Arial, Helvetica, sans-serif">Kolli</font></td>  
    <td><font size="2" face="Arial, Helvetica, sans-serif">Stck</font></td>
      <td><font size="2" face="Arial, Helvetica, sans-serif">CC</font></td>  
    <td><font size="2" face="Arial, Helvetica, sans-serif">Anzahl CC</font>
    </td> </tr><tr><td><font size="2" face="Arial, Helvetica, sans-serif">
    <input type=checkbox name="produits[]" value="4"> <input name="qtes[4]" type="text" value=""size="3">  </font></td>
      <td><font size="2" face="Arial, Helvetica, sans-serif">Aeschynanthus Mona Lisa</font></td>  <td><font size="2" face="Arial, Helvetica, sans-serif">11</font></td>  <td><font size="2" face="Arial, Helvetica, sans-serif">&nbsp;</font></td>  
    <td><font size="2" face="Arial, Helvetica, sans-serif">&nbsp;</font></td> 
     <td><font size="2" face="Arial, Helvetica, sans-serif">24</font></td> 
     <td><font size="2" face="Arial, Helvetica, sans-serif">12</font></td>
      <td><font size="2" face="Arial, Helvetica, sans-serif">3.99</font></td>  
    <td><font size="2" face="Arial, Helvetica, sans-serif">3.99</font></td> 
     <td><font size="2" face="Arial, Helvetica, sans-serif">0</font></td> 
    </tr><tr><td><font size="2" face="Arial, Helvetica, sans-serif">
    <input type=checkbox name="produits[]" value="5"> <input name="qtes[5]" type="text" value=""size="3">  </font></td>
      <td><font size="2" face="Arial, Helvetica, sans-serif">Aeschynanthus Mona Lisa</font></td>  <td><font size="2" face="Arial, Helvetica, sans-serif">11</font></td>  <td><font size="2" face="Arial, Helvetica, sans-serif">&nbsp;</font></td> 
     <td><font size="2" face="Arial, Helvetica, sans-serif">&nbsp;</font></td>
      <td><font size="2" face="Arial, Helvetica, sans-serif">28</font></td>  
    <td><font size="2" face="Arial, Helvetica, sans-serif">12</font></td> 
     <td><font size="2" face="Arial, Helvetica, sans-serif">3.17</font></td> 
     <td><font size="2" face="Arial, Helvetica, sans-serif">3.17</font></td> 
     <td><font size="2" face="Arial, Helvetica, sans-serif">0</font></td>
     </tr>
    
      
            </tr>
          </table>
          <p>
            <input type="submit" name="Submit2" value="commander">
          </p> <tr><td><p>&nbsp;
          </p>
    </form>
    
    </table>
    </body>
    </html>

    the confirm.php

    Code:
    <form method="POST" name="formu" action="merci.php">
    
    <?php
    
    function keskegeachte($id_produit, $qtes)
    {
    	switch ($id_produit)
    	{
    case 1: echo '<li> ' . $qtes[1] . 'AeschynMona Liba/11//24/12/3.99125416666667/</li>';break;
    case 2: echo '<li> ' . $qtes[2] . 'AeschynaMona Lila/11//24/12/3.991254166666</li>';break;
    case 3: echo '<li> ' . $qtes[3] . 'Aeschyn Mona Lisa/11//24/12/3. </li>';break;
    case 4: echo '<li> ' . $qtes[4] . schynLisa/11//24/12/3.99125416666667/3.99125416666667</li>';break;
    case 5: echo '<li> ' . $qtes[5] . 'Aeschynanthus Mona Lisa/11//28/12/3.166975/3.166975</li>';break;
    case 6: echo '<li> ' . $qtes[6] . 'Anigoz/12/ 24/11/4.28479545454545/4.15774545454545</li>'; break;
    
    
    		default: echo '<li>un produit qui n\'existe pas</li>';
    	}
    }
    
    if (isset($_POST["acheter"]))
    {
    	
    	if (isset($_POST["produits"]))
    	{
    		$produits = $_POST["produits"];
    		$qtes     = $_POST["qtes"];
    		echo "<ul>";
    		foreach ($produits as $produit)
    		{
    			keskegeachte($produit, $qtes);	
    		}	
    		echo "</ul>";
    	}
    	else 
    	{
    		echo "pas d'achats.";	
    	}
    }
    
    ?>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    </head>
    <body name="form">
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <input type="submit" name="formu" value="confirmation">
    <p>&nbsp;  </p>
    <p>
     <br>  
    </FONT>
    </p>
    </form>

  • #2
    mgo
    mgo is offline
    New Coder
    Join Date
    Apr 2004
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Any help please?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •