So look at this image :
http://img194.imageshack.us/img194/8272/snapshot5f.png
This table prints the titles of entries from a table in a database.. The code that i use for this table is this :
Code: <!--Table For Deleting and Updating -->
<p align="center"><font color="#1569C7">DeleteOrEdit(</font><font color="red">Security Projects & Thoughts Section</font><font color="#1569C7">);</font></p>
<table align="center" border="2" bordercolor="green" cellspacing="0">
<!--First row with title delete and edit-->
<tr>
<td><font color="#F87217">Title:</td>
<td><font color="#F87217">Delete();</font></td>
<td><font color="#F87217">Edit();</font></td>
</tr>
<?php
$query = 'SELECT title FROM site_entries ORDER BY date_entered DESC';
if ($r = mysql_query($query)){
while ($row = mysql_fetch_array($r)){
print "<tr>
<td><font color="#8BB381">{$row['title']}</td>
<td><form method="post" name="sub_del"><input type="submit" value="Delete();"></form></td>
<td><form method="post" name="sub_edt"><input type="submit" value="Edit();"></form></td>
</tr> ";
}
}else{
die('<p>Could not retrive the data brcause:<b>' . mysql_error .'</b> The query was $query.</p>');
}
mysql_close();
?>
</table>
Its simple...till here...
Now i stack on how to make the script that will delete the registers of the database...I can think something with id column but i can't make it true...:s I want you to help me giving me ideas on how to make this or any other idea on how to create an delete/edit page...If you think that i start it with a wrong way please tell me
The table name is site_entries and its columns are id , title , entry , date_entered
Thanks in advance..!!
PHP Array quick help
I need$_SESSION{'username'} to be like this:if $_SESSION['username'] = "gayner,bob,jesus";echo "ba blah ";but do i use Arrays or what for those 3 nameS? how thanks
delete comma
HI,How to delete "," at the end of the string.Code: $match = 2009/02/03/a2correx03cvbnm,echo preg_replace("/;$/", "HI", "$match");
Credit card verification
I have a client who wants to process credit card transactions from his web site rather than the going through something like paypal. I've never done that before...what is my first step? I really dont
Restricted access to sub-folder in iis6 doesn't work?
Basically I'm trying to add restriction to sub-folder (which contains pdf) in web.config for iis6 as below.It doesn't work at all. <system.web> <authentication
How to use php and sql to check if values match the ones in a table (for logins)
How would I code it that the script takes two variables that are passed to it (UserID and PIN), and checks the table to see if the PIN matches the one in the table. If it does it should assign the
Get to know your fellow coder
I think it's time we got personal around here. There's a lot of code swapping and a few members know a little more about the others, but the vast majority of us are nothing but coders passing in the
Am I setting up my sites oldschool?
Ok,When I create a site I open a basic template that I have created that consists of a css file an index page and a few php inserts for the header, nav and footer.It works fine and I am happy with it
How to restrict the display of report variants
Hello All,
storing video files into mysql in php
hi i have my video files in my folder ,i have to store the path of the videos into db and the play it in the player from the database.thanking in advance
Need help with cin setw
I made a program here is my code:#include <iostream>#include <cstdlib>#include <iomanip>#include <ctime>using namespace std;int main(){ unsigned seed = 0; int randomNum; int