Bluehost.com Web Hosting $6.95

adding EDIT link to modify row in a table

This is a discussion on adding EDIT link to modify row in a table within the PHP General forums, part of the PHP Programming Forums category; Hi ! hopefully someone can help me as I'm new to php and don't really have much programming background. ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-02-2008
Rilly
 
Posts: n/a
Default adding EDIT link to modify row in a table

Hi ! hopefully someone can help me as I'm new to php and don't really have much programming background.

I have an html table that displays records based on search query.. but I want to add a link 'edit' link at the beginning or end of the rows so that i
can change the values in that.. This is how the table itself is created

Code:
$query = "SELECT `dvdid` , `audience` , `category` , `format` , `title` , `season` , `volume` , `disc` , `year` , `link` FROM `dvds` WHERE 1 AND
`audience`  = '$audience' AND category = '$category' ";

$result = mysql_query($query);
$num_results = mysql_num_rows($result);
echo '<p>Number of Hits: '.$num_results.'</p>';
print("<table border=1 cellspacing=0 bordercolor=#0000CD bgcolor=#D4AAF cellpadding=5>\n");
print("<tr><td class=colhead>DVD #</td><td class=colhead align=left>Audience</td><td class=colhead align=left>Category</td>".
"<td class=colhead align=left>Format</td><td class=colhead align=left>Title</td><td class=colhead>Season #</td>".
"<td class=colhead align=left>Volume #</td><td class=colhead align=left>Disc #</td>".
"<td class=colhead align=left>Year</td><td class=colhead align=center>Comments</td></tr>\n");
for ($i=0; $i <$num_results; $i++)
{
$row = mysql_fetch_array($result);
print("<tr><td>$row[dvdid]</td><td align=center>$row[audience]</td><td align=center>$row[category]</td>".
"<td align=center>$row[format]</td><td align=center>$row[title]</td><td align=center>&nbsp$row[season]</td>".
"<td align=center>&nbsp$row[volume]</td><td align=center>&nbsp$row[disc]</td>".
"<td align=center>&nbsp$row[year]</td><td align=center>$row[link]</td></td></td></tr>\n");

}
print("</table>\n");
I don't even know where to begin.. any pointers, or direction? The edit can open a new page or whatever is easy.. I just can't seem to wrap my head
around this.

Rilly


--
--------------------------------- --- -- -
Posted with NewsLeecher v3.9 Final
Web @ http://www.newsleecher.com/?usenet
------------------- ----- ---- -- -

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 12:10 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0