Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

php forms generated from mysql and submit

$
0
0

How would I submit the below info?

 

<?php
include "common/db_connect.php";
            $date = date("Y-m-d");
if($_POST['button']){ 
 
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Funky Chalk</title>
<link rel="stylesheet" href="css/960.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="css/template.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="css/colour.css" type="text/css" media="screen" charset="utf-8" />
</head>
<body>
    <div id="container">
<?php include("nav-bar.php"); ?>
 
 <div id="content" class="container_16 clearfix">
        <table width="90%" border="1">
                <tr>
                  <td width="71%"><strong>Order</strong></td>
                  <td width="22%"><strong>Service</strong></td>
                  <td width="7%"><strong>Weight</strong></td>
                </tr>
          <?php 
$query=mysql_query("SELECT * FROM `delivery_information` WHERE `date`='$date'");
while($fetch_DI=mysql_fetch_object($query)){
$fetchDPD=mysql_fetch_object(mysql_query("SELECT * FROM `DPD` WHERE `ref`='$fetch_DI->customer_ref'"));
echo"
<tr>
<td>
";
$string=mysql_query("SELECT * FROM `delivery_items` WHERE `customer_ref`='$fetch_DI->customer_ref'");
while($fetch_items=mysql_fetch_object($string)){
echo"<span class='paraProducts'>".$fetch_items->item."</span><br>";
}
echo"<span class='paraDetails'><font color='#0099CC'>".$fetch_DI->contact_name."</font> Order ID: <font color='#0099CC'>".$fetch_DI->customer_ref."</font></span>";
echo"</td>";
 
echo"<td valign='top'><select name='service_".$fetchDPD->ref."' id='select'>";
echo"<option value='12'"; if($fetchDPD->service=="12"){echo'selected="selected"';} echo">Next Day</option>";
echo"<option value='11'"; if($fetchDPD->service=="11"){echo'selected="selected"';} echo">Two Day</option>";
echo"<option value='59'"; if($fetchDPD->service=="59"){echo'selected="selected"';} echo">Hermes</option>";
echo"<option value='19'"; if($fetchDPD->service=="19"){echo'selected="selected"';} echo">Classic</option>";
echo"<option value='10'"; if($fetchDPD->service=="10"){echo'selected="selected"';} echo">Express Air</option>";
echo"</select> to ".$fetch_DI->country_code." (".$fetch_DI->post_code.")</td>";
 
echo'<td><input name="weight_'.$fetchDPD->ref.'" type="text" id="textfield" size="2" /> 
KG</td>
</tr>';
 
 
}
?>
 
                <tr>
                  <td colspan="3"><div align="right">
                    <input type="button" name="button" id="button" value="Submit" style="margin:3px;" />
                  </div></td>
                </tr>
              </table>
              <p> </p>
              <p> </p>
        </div>
    </div>
</body>
</html>

Viewing all articles
Browse latest Browse all 13200

Trending Articles