Hi Guys,
I currently have this Set up on Page
<table width="650" border="0">
<tr>
<td colspan="2"><span class="ptmenu">Info from Database </span></td>
</tr>
<tr>
<tr>
<td width="150">ID</td>
<td><?php echo $row_products['ID']; ?></td>
</tr>
<tr>
<td width="150">SKU</td>
<td><?php echo $row_products['SKU']; ?></td>
</tr>
<tr>
<td width="150">Field3</td>
<td><?php echo $row_products['field3']; ?></td>
</tr>
<tr>
<td width="150">Title</td>
<td><?php echo $row_products['Title']; ?></td>
</tr>
<tr>
<td width="150">Supplier</td>
<td><?php echo $row_products['Supplier']; ?></td>
</tr>
<tr>
<td width="150">Price</td>
<td><?php echo $row_products['Price']; ?></td>
</tr>
<tr>
<td width="150">Field</td>
<td><?php echo $row_products['Field']; ?></td>
</tr>
<tr>
<td colspan="2"><a href="<?php printf("%s?pageNum_products=%d%s", $currentPage, 0, $queryString_products); ?>">First</a> ::: <a href="<?php printf("%s?pageNum_products=%d%s", $currentPage, max(0, $pageNum_products - 1), $queryString_products); ?>">Previous</a>:::<a href="<?php printf("%s?pageNum_products=%d%s", $currentPage, min($totalPages_products, $pageNum_products + 1), $queryString_products); ?>">Next</a>::: <a href="<?php printf("%s?pageNum_products=%d%s", $currentPage, $totalPages_products, $queryString_products); ?>">Last</a></td>
</tr>
</table>
<br /><br />
<?php
$Sale_Price = $row_products['Price'];
?>
<table width="650" border="0"><form action="<?php echo $editFormAction; ?>" name="fulldetails" method="POST">
<tr>
<td colspan="2"><span class="ptmenu">Prices for website </span></td>
</tr>
<tr>
<td width="150"><span class="ptmenu">ID</span></td>
<td><span class="ptmenu"><input type="text" value="<?php echo $row_products['ID']; ?>" name="ID" disabled="disabled" /></span></td>
</tr>
<tr>
<td width="150"><span class="ptmenu">SKU</span></td>
<td><span class="ptmenu"><input type="text" value="<?php echo $row_products['SKU']; ?>" name="SKU" disabled="disabled" /></span></td>
</tr>
<tr>
<td width="150"><span class="ptmenu">Title</span></td>
<td><span class="ptmenu"><input type="text" value="<?php echo $row_products['Title']; ?>" name="Title" disabled="disabled"/></span></td>
</tr>
<tr>
<td width="150"><span class="ptmenu">Genre</span></td>
<td><span class="ptmenu"><input type="text" name="Genre"/></span></td>
</tr>
<tr>
<td width="150"><span class="ptmenu">Platform</span></td>
<td><span class="ptmenu"><input type="text" name="Platform"/></span></td>
</tr>
<tr>
<td width="150"><span class="ptmenu">Description</span></td>
<td><span class="ptmenu"><input type="text" name="Description"/></span></td>
</tr>
<tr>
<td width="150"><span class="ptmenu">Trailer</span></td>
<td><span class="ptmenu"><input type="text" name="Trailer"/></span></td>
</tr>
<tr>
<td width="150"><span class="ptmenu">Website Price</span></td>
<td><span class="ptmenu"><input type="text" value="<?php if ($Sale_Price <= 13) {
$total = $Sale_Price * 1.3;
$total_converted = number_format($total,2);
echo $total_converted;
} else {
if ($Sale_Price <= 20) {
$total = $Sale_Price * 1.28;
$total_converted = number_format($total,2);
echo $total_converted;
} else {
if ($Sale_Price <= 25) {
$total = $Sale_Price * 1.25;
$total_converted = number_format($total,2);
echo $total_converted;
} else {
if ($Sale_Price <= 30) {
$total = $Sale_Price * 1.22;
$total_converted = number_format($total,2);
echo $total_converted;
} else {
if ($Sale_Price <= 35) {
$total = $Sale_Price * 1.19;
$total_converted = number_format($total,2);
echo $total_converted;
} else {
if ($Sale_Price <= 45) {
$total = $Sale_Price * 1.17;
$total_converted = number_format($total,2);
echo $total_converted;
} else {
if ($Sale_Price <= 75) {
$total = $Sale_Price * 1.15;
$total_converted = number_format($total,2);
echo $total_converted;
} else {
if ($Sale_Price <= 150) {
$total = $Sale_Price * 1.12;
$total_converted = number_format($total,2);
echo $total_converted;
} else {
if ($Sale_Price <= 250) {
$total = $Sale_Price * 1.1;
$total_converted = number_format($total,2);
echo $total_converted;
} else {
if ($Sale_Price > 250) {
$total = $Sale_Price * 1.08;
$total_converted = number_format($total,2);
echo $total_converted;
} else {
echo "Invalid Price";}
}
}
}
}
}
}
}
}
}
?>
" name="WebsitePrice"/></span></td>
</tr><tr>
<td width="150"><span class="ptmenu">Weight</span></td>
<td><span class="ptmenu"><input type="text" name="Weight"/></span></td>
</tr>
<tr>
<td width="150"><span class="ptmenu">Stock</span></td>
<td><span class="ptmenu"><input type="text" name="Stock"/></span></td>
</tr>
<tr>
<td width="150"><span class="ptmenu">Shipping Charge</span></td>
<td><span class="ptmenu"><input type="text" name="ShippingCharge"/></span></td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="Submit" id="Submit" value="Submit" /></td>
</tr>
<input type="hidden" name="MM_update" value="fulldetails" />
</form>
</table>
I have one table called products which fields are in the first table above I am then trying to get the second table to link to the first table to locate the data of record, then be able to edit and update the other fields in the game_info table, both tables have ID in them (incremental numbers).
So if I select record ID 4 the first three fields show item details, then I can add extended information for that product line and submit and the information will populate into the game_info table fields for the correct item.
I hope I have explained myself properly, would be glad for the help.
Thanks
Paul