with the confirm page, i need a confirm link on the show products page that takes me to another page where that page shows me that one row of information on that other page. then from that page i have the option to delete that one row or go back to the show products page.
does anyone know how to do that or can anyone help me out with this
any help would be much appreciated.
thanks
here is the code that i am using
Code: Select all
<?php
require_once('book_sc_fns.php');
$redo = $_GET[doredo];
session_start();
do_html_header('Administration');
$dbname = "rmgiusa";
$tblname = "items";
$linkid = mysql_connect("localhost", "username", "password") or die("Couldn't connect.");
$db = mysql_select_db($dbname, $linkid) or die("Couldn't select database.");
mysql_query ("SELECT * FROM $tblname");
echo "$select<br>";
$host ="localhost";
$dbuser="username";
$dbpass="password";
$database="rmgiusa";
mysql_connect($host,$dbuser,$dbpass);
mysql_select_db($database) or die ("Unable to select database");
$query="SELECT * FROM $tblname ORDER BY itemId ASC";
$result=mysql_query($query);
$num=mysql_num_rows($result);
$result = mysql_query($query, $linkid);
include("include_code5.php");
$result = mysql_query($query);
echo "<table border='1' bordercolor='#000000' cellpadding='0' cellspacing='0' width='100%'>";
echo "<tr>";
echo "<td width='5%'><strong><center>cat id</center></strong></td>";
echo "<td width='6%'><strong><center>item id</center></strong></td>";
echo "<td width='10%'><strong><center>product item</center></strong></td>";
echo "<td width='10%'><strong><center>item name</center></strong></td>";
echo "<td width='20%'><strong><center>item image</center></strong></td>";
echo "<td width='30%'><strong><center>item desc</center></strong></td>";
echo "<td width='14%'><strong><center>item price</center></strong></td>";
echo "<td width='5%'><strong><center>Delete</td>";
echo "<td width='5%'><strong><center>Update</td>";
echo "</tr>";
while($query_data = mysql_fetch_row($result)) {
echo "<tr>";
echo "<td>$query_data[0]</td>";
echo "<td>$query_data[1]</td>";
echo "<td>$query_data[2]</td>";
echo "<td>$query_data[3]</td>";
echo "<td><img src='../p_imgs/$query_data[4]'></td>";
echo "<td>$query_data[5]</td>";
echo "<td>$query_data[6]</td>";
echo "<td>";
?>
<br>
<a href="showprod4.php?action=delete_proditem_row&id=<?php echo $query_data[1]; ?>">delete</a>
<br>
<a href="prod_confirm2.php">confirm</a>
<?
if(!$redo){
print "<a href='showprod4.php?doredo=true'>confirmdelete</a>";}
else if($redo){
?>
<br><a href='showprod4.php?action=delete_proditem_row&id=<? $query_data[1] ?>'>
<font color='red' size='1'>ARE YOU SURE YOU WANT TO DELETE THIS INFORMTION?</font></a>
<?
}
?>
<?
echo "</td>";
echo "<td>";
?>
<a href="prod_update.php">update</a>
<?
echo "</td>";
echo "</tr>";
}
echo "</table>";
do_html_footer();
?>
?>