Hi there,
Trying to make an order form for web design package.
When i click on button order, nothing happens.
Can any1 help me please.
Thank you,
here is my code:
<!-- "packages" -->
<?php
// get the category
if (isset($_GET['des']) && isset($_GET['des'])) {
echo '<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="0"><img name="box_upleft" src="prazan/box_upleft.gif" width="10" height="30" border="0" alt="my firm"></td>
<td width="94%" align="center" valign="middle" background="prazan/box_r1_c2.gif"><div align="left"></div></td>
<td width="0"><img name="box_upright" src="prazan/box_upright.gif" width="6" height="30" border="0" alt="my firm"></td>
</tr>
<tr>
<td background="prazan/box_left.gif"> </td>
<td width="100%" bgcolor="#6A5B5B"> <p>';
// select the data to be displayed
$queryp=mysql_query("Select * from webportofolio where category='$_GET[des]'");
echo "<table width=100% border=0>\n";
echo "<tr><td >Package thumb</td><td ><div>Package Name</div></td><td ><div>Programming language used</div></td><td ><div>Amount of pages</div></td></tr>";
// if user types non existing category
if (mysql_num_rows($queryp) == 0)
echo "This category has no data in it, either empty or deleted by admin";
elseif (mysql_num_rows($queryp) == 1){
}
// we got the right category, display data
while ($rowp=mysql_fetch_array($queryp)){
echo "<tr><td align='center'> <a href='index.php?more=$rowp[id]'><img src='webpackages/images/$rowp[photo]' border=0 align=\"left\"></a></td>";
echo "<td>$rowp[name]</td><td>$rowp[pl]</td><td><a href='index.php?more=$rowp[id]' target=\"_self\">$rowp[pages]</a></td></tr>\n";
}
echo "</table><br>\n";
echo '
</p> </td>
<td background="prazan/box_right.gif"><img name="box_right" src="prazan/box_right.gif" width="6" height="48" border="0" alt="my firm"></td>
</tr>
<tr>
<td><img name="box_downleft" src="prazan/box_downleft.gif" width="10" height="5" border="0" alt="my firm"></td>
<td background="prazan/box_down.gif"><img name="box_down" src="prazan/box_down.gif" width="79" height="5" border="0" alt="my firm"></td>
<td><img name="box_downright" src="prazan/box_downright.gif" width="6" height="5" border="0" alt="my firm"></td>
</tr>
</table>';
}
// if user click for more information on package
if (isset($_GET["more"]) && $_GET["more"] > 0) {
echo '<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="0"><img name="box_upleft" src="prazan/box_upleft.gif" width="10" height="30" border="0" alt="my firm"></td>
<td width="94%" align="center" valign="middle" background="prazan/box_r1_c2.gif"><div align="left"></div></td>
<td width="0"><img name="box_upright" src="prazan/box_upright.gif" width="6" height="30" border="0" alt="my firm"></td>
</tr>
<tr>
<td background="prazan/box_left.gif"> </td>
<td width="100%" bgcolor="#6A5B5B"> <p>';
$queryp=mysql_query("Select * from webportofolio where id='$_GET[more]'");
while ($rowp=mysql_fetch_array($queryp)){
echo "<table width=\"100%\" >\n";
echo "<tr ><td width=70%><div>$rowp[name]</div></td><td><div>$$rowp[price]</div></td></tr>";
echo "<tr><td rowspan=2 valign='top'>$rowp[description]</td><td><a href='/$rowp[photobig]' target='_blank'><img src='shop/images/$rowp[photo]' border=0><br>Click to Enlarge</a></td></tr>";
echo "<tr><td><form method='POST' action='index.php?order=$rowp[id]' method='post'><input type='submit' class='dno' value='Order'></form></td></tr>\n";
echo "</table><br>\n";
// show the form is order is clicked
if(isset($_POST['order'])){
echo "<form action='index.php' method='post' enctype='multipart/form-data'> ";
echo "<table>";
echo "<tr><td>Order form</td>";
echo "<td><input name='pname' type='text' size='25' value='$row[name]' /></td></tr>";
echo "<tr><td colspan=2>Description project</td></tr>";
echo "<tr><td colspan=2><textarea name='description' cols='30' rows='5'> $row[description]</textarea></td></tr>";
echo "<tr><td>Thumb</td>";
echo "<td><input type='text' name='photo' value='$row[photo]'></td></tr>";
echo "<tr><td>Category</td>";
echo "<td><select name='category'>";
$query2 = "SELECT * from webkategorija ";
$mysqlresult2 = mysql_query($query2);
while($row2 = mysql_fetch_array($mysqlresult2)){
echo "<option value='$row2[id]' ";
if ($row2['id']==$row['category']){echo "selected";}
echo ">$row2[name]</option>";
}
echo "<select></td></tr>";
echo "<tr><td>Quantity</td>";
echo "<td><input type='hidden' name='id' value='$row[id]'></td></tr>";
echo "<tr><td colspan=2><input type='submit' name='submit' value='Submit'></td></tr>";
echo "</table>";
}
if(isset($_POST['submit'])){
//would like to add mail function, and mail all data submitted by user
echo "Product order emailed";
}
echo '
</p> </td>
<td background="prazan/box_right.gif"><img name="box_right" src="prazan/box_right.gif" width="6" height="48" border="0" alt="my firm"></td>
</tr>
<tr>
<td><img name="box_downleft" src="prazan/box_downleft.gif" width="10" height="5" border="0" alt="my firm"></td>
<td background="prazan/box_down.gif"><img name="box_down" src="prazan/box_down.gif" width="79" height="5" border="0" alt="my firm"></td>
<td><img name="box_downright" src="prazan/box_downright.gif" width="6" height="5" border="0" alt="my firm"></td>
</tr>
</table>';
}
}
?>
<!-- "packages end" -->