Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Delete Option From My View Records Page


I have a list of things I need to do with my database - but this is my next hurdle - the delete query within my view records page. I want to be able to click on a button or link to delete a record in a table. I was envisaging that each record would have a delete button or link next to it and clicking that would remove it. Here is the script I have created to view "Devices": PHP Code:




View Complete Forum Thread with Replies

Related Forum Messages:
How Do You Tell If A Page View Is A Direct Hit, Iframe View, Or Other
How can one tell if a hit on a PHP page was generated from an iframe, object/img tag, or a direct hit?

View Replies !
DELETE RECORDS - Database Adding New Records
iv got the database adding new records, and now I want it to display all of the records that are there buy name and id number, then i want u to be able to type in the id number of the customer u wish to delete and it shoudl delete it, sounds good buts its not actually deleting the record. it says it does, but its not doing it. Code:

View Replies !
Adding Delete Option
Have a look at this code found at Zend:

http://www.zend.com/php/beginners/php101-8.php#Heading5

I've been trying to figure out how I can add a "delete" option next to every row result that comes from the quiery. There's a mini tutorial a little further down on that page but I would specifically like it for this structure of code. Also the mini tutorial is in mysqli instead of mysql.

View Replies !
Edit Records From View Script
When I click submit next to a record it does not work. I want to be able to click edit and then be taken to a form with the initial values which I can edit and submit. Code:

View Replies !
Define Files For View/edit/delete
I am working on this little file manager project, I know, there's lots out there. However, I couldn't find one that paged the results that didn't use a DB. Now that I have it set up (works great),

I'm not sure how to define the files and not mess up the paging - so that if it's a folder you can open it and work with the files, a photo you can view or delete it and if it's a .txt, .php. etc. you can edit it. Code:

View Replies !
Listing Table Data With An Option To Delete Each Individual Item.
Was wondering if anyone could help me with a PHP, MySQL problem. I am
completely new to PHP and MySQL. I have been trying to find a way to
list data from a table on a web page and after each individual item
have a hyperlink to allow users to delete the information listed. Can
anyone help?

i.e.
Name Age Sex
------------------------------------------
Adam 21 M delete
Betty 22 F delete
Chris 23 M delete
Daisy 24 F delete

------------------------------------------------------------------------------------------------------------------------------
(delete after 'Sex' would be the hyperlink to delete that entire line
(row) from the table).

View Replies !
View The Query Results One Record At A Time And Cycle (step) Through The Records
I need to know how to use PHP to step (one by one) through the records of MySQL database query result. I am able to connect to the DB and perform a query. I am able to print the results of the query for the ENTIRE query result.

What I need now is to be able to view the query results one record at a time and cycle (step) through the records by using a control (button or link) on the page itself. (The first record of the query result displayed on page entry, a "next" link/button to see the next row of information).

View Replies !
Delete Record - When The Delete Link Is Clicked The Next Page Is Blank And Nothing Is Deleted.
This is my "delete.php" and this "todo/delete.php?id=64" an example of a link to it generated from the index.php page. When the delete link is clicked the next page is blank and nothing is deleted. What have I done wrong?

<?
include("dbinfo.inc.php");

mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");

$id="delete from todo where id='$id'";
mysql_query($id);

mysql_close();
?>

View Replies !
Records Won't Delete
mysql_query("DELETE FROM guestbook WHERE id = '$recnum'"); It works fine on my local server but it doesn't delete records on the remote server. any ideas?

View Replies !
DELETE Records
I am going to write a php script to delete some records based on values supplies by the user. I was just wondering if the query is correct but there are no records to delete for example if this query was executed but there was no testId 7, would an error occur or would the query be performed but just not delete any records? PHP Code:

$testId = 7;
$q="$q="DELETE  FROM test WHERE testId = $testId";
mysql_query($q, $link_id)or die(mysql_error());

View Replies !
Wants To Delete Old Records
I want to delete records that are more than 7 days old($keeptime). I am new to this and can't figure out the correct code. The table is called 'x4tables' and the field 'tdate' is a timestamp. I have used: Code:

View Replies !
Delete Records Since A Week
I've been trying to delete records since a week and i'm not able to do it. Before with this script, i was doing so many things at a time and i was confused.But, now, i just displaying the records from a table N trying to delete them.Would somebody pls guide me.

I just wanna set the delete flag(i.e, i want to set the RBS_DELETE column to Y or something) when i check a check box to delete it. I've some 5 records displaying on my form and i want to check 3 of them and when i check them and hit submit, i want the RBS_DELETE column to have some value. PHP Code:

View Replies !
How Do You Delete Records From Mysql
Could someone please show me how to delete records from mysql. Maybe even an example in a loop that deletes records based on a criteria.

View Replies !
Delete Records From A Table
I have a table its called queue. It has a field called id. I want to delete all records in the table apart from the ones with id equals to 74 or 75 or 87. How do i do that?

View Replies !
Forms To Delete Records
I am trying to make a PHP script that displays all of the records from a database, then allows a user to edit or delete the records via a form. I need a checkbox beside the names and a text field with a number beside each name. Is there a way to make it delete all names with a check beside them and update all number that have been changed when the user clicks submit?

View Replies !
Delete Records From Table 1
I have a script that doesn't delete records from one database when it should, and now I have to do this myself because database is big and causes problems on the server. What I have is:

TABLE 1, field auction
TABLE 2, field id

so I would like to delete all records from TABLE 1 where the value of the field auction doesn't match the value of the field id in TABLE 2. Can someone help me on this, please? I need to get this database cleaned.

View Replies !
Delete Specific Records
On clients machine, currently to delete on trainee record it runs 10 queries to delete records from 10 tables. At the time of running all queries, server shows (104) Connection reset by peer. An error condition occurred while reading data from the network. I think it because of running 10 queries at a same time. Is there any possibility that through one line of query we can delete record from 10 tables. I've tried following query

DELETE FROM table1, table2, table3, table4, table5, table6, table7, table8, table9, table10 WHERE empID = 11;

But it gives ' error in query.

View Replies !
Delete All Records Starting In R
PHP Code:

$result2 = mysql_query ("DELETE FROM r_CompTables WHERE CompID = R??") or die("DELETE error: ".mysql_error());

I have this code but I want it to delete anything start in R. R will be followed with a number so it could be R5 or R91.

View Replies !
Delete Records Older Than 14 Days
Does anybody know how to make a script that automatically removes mySQL records older than 14 days?

View Replies !
Want To Delete The First Letter In A Column With 275 Records
table : product
column : code

in this column i have 279 records with bv. S1092734 i want to delete the first letter in all those records.

View Replies !
Delete Fixed Number Of Records
i have a table with one field. this field saves times as records. i want to there are 40 recoreds always. in other mean when inserts 41'st record then 1'st record be delete
how to delete fixed number of records at a time of first of my records asc (like select).
in other mean i want to like: delete from table order by time asc limit 0,1

View Replies !
Delete Selected Records From Table.
Can anyone see why this connection doesn't work? It's suppose to delete selected records from my table.

<?php

if (isset($_POST['delete'])) // && isset($_POST['delcus']))
{

foreach ($_POST['delcus'] as $val)
{
echo "$val";
$conn= mysql_connect( "localhost", "user", "password" );
$sql = mysql_select_db( "snow" );
$del = mysql_query("DELETE * FROM request WHERE qid =" .$val);
//$rows = mysql_num_rows($del);
$rs = mysql_query($conn, $sql, $del);
if($rs)
.........................

View Replies !
Multiple Delete From A List Of Records
If I have a list of records from a database on the screen, each with a check box beside them, how would I delete all the records that have been ticked? I assume I would use a variable similar to checked[], but not sure what syntax I would use to remove them from the database? Would I loop round each record comparing the checked[] value and it it's set, delete the record?

View Replies !
Do A DELETE Statement To Remove Any Records That Don`t Match.
I`m just trying to figure out the best method to delete my records and wondered if it was possible to do a DELETE statement to remove any records that don`t match. Here is my code so far:

$Query="select blah its huge:-)";
$RESULT=mysql_query($Query);
$my_rows=mysql_num_rows($RESULT);

for ($a=0; $a<$my_rows; $a++){
mysql_data_seek($RESULT, $a);
$Array = mysql_fetch_array($RESULT);
printf("%s<BR>", $Array['Email']);}

My Query returns Matched Records, what I would like to achieve is deletion of the records that didn`t match, would it be possible to do that under the printf statement. So delete all the records in the table that don`t match up to $Array['Email']??

View Replies !
Delete Records And Files In 1 Statement At Same Time?
How can i delete records and files in 1 statement at same time?

View Replies !
Delete Multiple Records In The Same Database Querie?
I have some code that deletes records from the database, in a loop. However its prety inificient as it makes a seperate database call in every loop whcih is slow. PHP Code:

for ($i=0; $i<count($idarray); $i++)
          db_query("delete from clicks where id='$idarray[$i]'");

Is their a more efficient way of doing that? It is posible to delete multiple records in the same database querie?

View Replies !
Database Delete Repeat Records And Add Up Totals
I have a database full of order records for our website. My goal is to delete people from the same 'address' field and add up the 'total' into one record. Can i get some example code on how this would be done?

View Replies !
Automatic Delete From MySQL Database Table Expired Records?
I have a question . . .

how can i delete from MySQL database table automatic expired records ?
?

One think is to make a service that deleting the expired records . . .

Any other method ?



View Replies !
Auto Delete The Old Records But What If Server Clock Was Set Up Wrong In Maintenance?
I want auto delete any events that the event date is at least 1 day older than current date. No problem for the php programming. get the current data (server clock), check the events date and delete the old records. My problem is that for some very rare cases.

Say if for extrem cases I have 1000 new events saved in database. But somehow, I or the the hosting company do the server maintenance, and reset the time clock of the server, in case in the maintenace, the server time clock was set up wrong say 2005, was set up as 2006. Code:

View Replies !
View The Source Of Another Page
From www.whatever.com/index.php how can I get the source for www.anothersite.com/page.php ?

View Replies !
Mac IE- Customer Can Not View Page
I have an irate customer who is running IE 5.2 on Mac. She can not view the webpage:

She just gets a blank screen.

I set up many CSS styles in beginning of code, I think the issue is located there. Can someone take a look at code and give me their thoughts? I have no problem viewing page in IE 6.0, Netscape, or Firefox.

View Replies !
Put A Search Site Option On Every Page
I would like to put a search this site option on every page, my pages are completely database driven written in PHP as you can imagine so there is barely any content that a regular indexer could index on my site. I have an event section on my website and a forum and so forth, if a user types in a term like: "Saturday Night" I would want it to search the whole database (all tables) and come up with a result. I'm not sure how it would even search every table other then writing multiple queries and that method seems like it would take a lot of bandwidth.

View Replies !
Cant View Data On My PHP Page From MySql DB.
Im working on a character generator for a PHP game Im trying to get going but Im having trouble getting data from my mySql database. I created the table and added all the columns using this file:

View Replies !
View The Source Of A Web Page Using A Script?
This is probably some really basic operation, but how do I view the source
of a web page using a php script.

For example I want to have a variable, say

$url = "www.google.com";

Then I want to echo its source code, so that I have a page showing:

<html>
<head><title>Whatever</title></head>
<body>
..
..
</body>
</html>

View Replies !
To Install A New Font While View Page!!!!
I am working with chinese fonts and experienced the difficulty as a user to view that page in chinese... How can i add (or install )chinese fonts to the user's system while the user try to view that page!!!!

View Replies !
Simple Page View Counter
I have been working on a page view counter. Now I haver researched google five times already and can't find a script that calculates a specific page's hits (not the whole site's page htis). So I made my own. Here is the code. I have tried it and it doesn't seem to work. Code:

View Replies !
View The Source Code From A Php Page
Is there a way to view the source code from a php page and see the php? If there is, isn't that really bad? Aren't there a lot of websites out there that could be really messed up if someone could see the php part of the page?

View Replies !
View Only The Main Page Script
How can I prevent users from browsing to any page they want to on my website by typing in the URL to it in the address bar? I only want them to be able to access the main page (index.php) .

View Replies !
Sessions :: You Are Not Authorized To View This Page
PHP Code:

session_start();
$_SESSION['user']=$username;

then on the next page, i tried to check the existence of the content of the said session variable with the following code: PHP Code:

if(empty($_SESSION['user'])) {
      echo "you are not authorized to view this page";
}.

View Replies !
Drag And Drop File To Page View
I want to coding drag and drop but it has more problem. I wanna drag file from desktop and drop into page view then page view show description and file size, can I? Instead of browse from file by use button. How should I do about this?

View Replies !
Redirects The User Back To The View Page
i am facing a strange problem of redirection. After the user fills up the form, i submit the data to save.php file and at the end i have a header which redirects the user back to the view page.Below is the code of save.php: Code:

View Replies !
Insert A Page Break For Printing Purposes After X Records On Page.
I need to insert a page break for printing purposes after X records on page. I'm querying five diffrent records with 5 different results and displaying them like:

$record1
$record2
$record3 and so on

So I want to get total number of records which is pretty easy I just add all the totals let's call it $subtotal. Then I want a page break after every 20 records of the $subtotal. Is this possible?

View Replies !
How Can I View Full Table (like In PhpMyAdmin) From My Database On My Php Page?
how can i view full table (like in phpMyAdmin) from my database on my php page? Lets imagine i have a table called models and it has columns called model_id, model_name. What script should i use to print all table on the page?

View Replies !
Delete An Image From Web Page
i have a script (below) which lists all the images in my images folder on my website - I was wondering if somebody could give me some idea of how to add a delete link to the following script so that i can easily delete each image. Code:

View Replies !
Page Break After X Records
I have a printer friendly report that needs to have a page break in it after x amount of records returned. Is this possible with PHP?

View Replies !
Display Only 5 Records Per Page.
I need one example of paging.I have a db and want to display only 5 records per page.

View Replies !
OOP Page: Where To Put Update, Insert, Delete
I have a page that shows info from MySQL. It is for an online education
site. It uses different classes arranged in a hierarchy. Each lesson is
roughly laid out like this:

Lesson
|-Intro
|
|-Section
| |-Procedure
| |-text, video, images
|
|-Section
| |-Procedure
| |-text, video, images
|
|-Summary

I have all the classes working properly for displaying info from the
database. Now I am building the admin site.

Where should I put the update/insert/delete code? Would those go inside the
classes? Should I use the lesson object when doing the maintenance? Or,
should I just have a separate page that handles the database stuff and only
use the objects to display the data from the database?

View Replies !
MySQL DELETE: How To Get Page To Refresh?
I have a script that deletes records in a table. It works fine. However, it redirects the browser back to the page and the record stills shows there. Only after the page is manually refreshed does it disappear.

I've used both header("Refresh...") and header("Location...") to accomplish the redriect, but no dice. The only thing that seems to work is if a unique URL is pushed into the address bar, which I do by appending md5(microtime()) to the end of the redirect URL.

View Replies !
Delete A Session When The Page Is Left.
I am trying to delete a session when the page is left. So basically when the page is unloaded, either shut down or if the browser has gone to another page it will delete the session.

View Replies !
Option To Enable "Site Maintenance" On The Main Page
i have a script (classifieds) that has an admin area. Unfortunately there isn't an option to allow the site to show "Site Maintenance" on the main page if enabled. Code:

View Replies !
Display All The Records On The Html Page
I know how to display records on an html page from a mysql database with PHP. I am using

$db = mysql_connect("localhost", "root");

mysql_select_db("test",$db);

$result = mysql_query("SELECT * FROM st",$db);

while ($myrow = mysql_fetch_row($result)) {

echo "<td align="left" class="heading2g" nowrap>", $myrow[12], "</td>";}

which works fine.

Now I have a table which has several records. Each field is either 0 or 1. What I want is to display all the records on the html page like before but instead of displaying 0 or 1, if it is a 0 then a little graphic is displayed and if it is a 1 then another little graphic is displayed.

View Replies !
How To Limit The Seach To 10 Records Per Page ?
i want search results to be limited to 10 records per page. say, if a search on a database return 95 records, i want the results to be formatted to 10 pages.

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved