Current location: Hot Scripts Forums » Programming Languages » PHP » need help creating an update & confirm page


need help creating an update & confirm page

Reply
  #1 (permalink)  
Old 11-08-04, 02:45 PM
mikewooten mikewooten is offline
Newbie Coder
 
Join Date: Feb 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
need help creating an update & confirm page

i am working on an administration section. i need help creating an edit/update page where i click

the update link on a showproducts page, and that link goes to another page where i can fill out a

form from the showproducts page that i can update the info. from the information that is in the

show products page.
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




PHP Code:



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();
?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 11-08-04, 05:28 PM
FiRe FiRe is offline
Code Guru
 
Join Date: Oct 2004
Location: UK
Posts: 801
Thanks: 0
Thanked 0 Times in 0 Posts
__________________
Alexa Share <-- Trade virtual shares in websites with this online game.

codR.us <-- Submit and vote for your favorite code snippets with codR.us.

XEWeb.net <-- The ultimate PHP resource network.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Classified Ads skipper23 Perl 3 11-22-05 03:22 AM
need help creating an update page within admin mikewooten PHP 2 11-01-04 11:39 PM
creating static page with php ivan PHP 1 06-26-04 10:08 AM
Classified Ads skipper23 Perl 2 12-30-03 04:43 AM
creating a php registration page codeguru21 Script Requests 3 11-07-03 02:02 PM


All times are GMT -5. The time now is 12:32 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.