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




Click Link To Delete Record


I am trying to add a function to one of my scripts.  I would like to be able to click a link and have it delete a particular row from by DB.  Links are generated by a PHP script and are based on entries on a DB.  In this DB I have a column called 'users'.  The table is generated by the following snippet: Code:




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Find New Record On Click
I want to make a next and a previous link with my data. here is my query:

<?php $sql = "SELECT DISTINCT pdp.PackageId, p.PackageType 
                            FROM productpackaging pdp, packaging p 
                            WHERE pdp.ProductId =2 
                            AND pdp.PackageId = p.PackageId";
$result = mysql_query($sql);

How do I write the code to get next or get previous??

Link Click Detection?
How might one detect if someone clicked on a hyperkink at your website,
so it can be logged in a database? This would have to be done before
the browser redirects.

Outbound Link Click Tracking
Does anyone know of any tutorials on how to write a script that will allow me to track clicks of outbound links on my site? Or any advice on the best way to do this?

Ideally I'd like to have a record written into a database each time an outbound link is clicked. I'd like to then be ablt to query the database and pull a report that shows the number of times each link was clicked during a time period.

Unlinking File After Click On Link
I run a script that zips some files, after it's been zipped the client get the link to the file so that he can download it.

I want to unlink the zipped file after the client has clicked on the link. This sounds easy but I don't know how to perform an action from a link ie. <a href = ../path_to_zipped_file/zipped_file.zip>download here</a>

After they click that link I want to unlink ../path_to_zipped_file/zipped_file.zip
any ideas?

Click Link To Execute Code
Can code be inserted into a database via clicking on a link?

Changing Variable String Value On A Link Click
Hi... I'm trying to change the value of my $cat variable when someone clicks on a link that consists of an image and some next

I'm not sure how to do this... but I think I need some javascript as well so if $cat="Main" and a certain link is clicked I want $cat="Something else"

A Link In An Email That, On Click, Sends The Headerinfo To A Server
Is it posible to make a link (to a php-file on a server) in an email
that, when you click on it, sends info about who the reciver of the
email is?

Lets say I send out an email thru an alias to a group of people and I
want to give them the opportunity to sign up for an event using that
link. Those that click the link are added to a post in a database
(MySQL), eg. with their email adress, initials, name... whatever. I
guess that it would be easy if it just takes the contest of the
to-field in the emails headerinfo? If a spammer can do it, so can I :o)

And... if you have an answer please assume that I know practicly
nothing about php :o) I have made a few sites with php and MySQL, but
nothing fancy - just simple guestbooks etc.

Alphabetizing A List Of Links - Click A Link And It's Not Alphabetized Anymore??
I am editing a site, I didn't make it, and I have a list of links created from a mysql db.  I am sending the info from mysql in asc order, but this only works the first time the page comes up.  If you click on a link in the list, it appears to revert back to being ordered by the date entered and stays that way through subsequent clicks.  A point in the right direction on how to make my list stay alphabetized would be very good. 

Passing POST Data On Link Click, And Not Form Button
is it possible to send a form data to a page, using a link instead of a button?

id prefer not to have to rely on javascript, so i would like it to be ras html, or the like..

Delete Record
Im some having  trouble with deleting a record, surely it isnt that hard, dont know what im doing wrong. this is the error i am gettin:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '` WHERE id=1' at line 1Here is my delete code:

Delete Record
i have this code for my site that will connect to my database and grab all my members there id email and ip the problem is that it dont have a button where you can select a member and delete that member can anyone help me with this?i want to add a button and a check box so if i check off a member and click a delete button it will delete that member here is the code:

Delete Record And Files
I have a code that uploads images along with some info into a directory and database, this all works fine. I can delete the record but the images relevent to that record continue to exsist in my images directory. How would i set up a php code to delete a file in ../images when the record of its name is stored in a column in my database. Here is my delete record code:

Mysql Delete Record
when I run this code below it doesn't delete the record or display any error message

$id = $_GET['id'];
include("../dbconnect.php");
mysql_query("DELETE FROM promotions WHERE id='$id'") or die(mysql_error());

Such a simple thing to do but I don't no why it doesn't work 

Delete Record If Older Than 5 Minutes?
Can someone help me in writing a query command, to delete a record, if the last_update field on a record is older than 5 minutes?

My table has a last_update field, which holds a value as this for example: 2007-04-08 01:33:12

I need a query that when I access a php file, if a record is older than 5 minutes, it will delete it.

Mailing A Direct Link To A Record
I have an ordering system.  When someone submits an order request it sends an e-mail to the purchasers which contains the item information and a link to manage the order our intranet site.  The problem is the link is just a general like such as http://intranet/orders

What I would like to do is link directly to the item record itself.  Is it possible to include a direct link to the record in the e-mail?

Download File And Delete File From Server With One Button Click
I want the user to be able to download a CSV file and delete the file from the server all with the click of a button.  Currently, in firefox, it will just display the CSV and not delete it. In IE, it will download the CSV and not delete it. Code:

Looking For A PHP Script That Will Call A Link By Record Number
I am looking for a script, or at least the logic behind this if anyone can help me. I keep my website records/links in mysql database. Curretly, I display them as is, being if you mouse over the link, the actual link can be seen.

What I want to do is, have just the record number included in the link where the link can not been seen when you mouseover. When the link is clicked, a PHP script will go to that record number, extract the link from the record, and open a window to the link. Is there an avaiable script out there to do this? If not what steps are need to accompish this?

Create A Link To Delete An Image?
I'm making a really simple cms, but having problem deleting images. I've managed to create a page to upload the images to a folder. I also have a page that shows all the images and file names. Now I'm trying to add a link to delete images, but I can't get it to work. First of all I don't know what to put in the href tag...? Someone said I should create a new page that deletes the image and then redirects you back to the page displaying the images...? Code:

Showing Partial Row Info With Link To Entire Record
How can I show in the results just two or three fields of a record, with one of the fields linked to show the entire record?

Need Help For Idea For Function/procedure To Link A Record In Adatabase List To An Form.
Need help to idea for how to make the following procedure or function:
What I have:

On the screen I have a simple list with with the most important fields of a the records in an MySQL database.

What I want to do:
I want a program/function/procedure so I can click a link in each record and then jump to a form showing all the fields....

Compare Record With Session Variable And Update Record If Different
I'm trying to figure out how to create a session variable from a recordset field value in a mySQL database and compare this with subsequent values from the same field each time the page reloads. When the value of the field changes (as a result of a user update) I want to trigger an event (redirecting to another page). It's probably a very basic PHP function but I am a newbie with this language.


Dynamic Download Link - Not Direct File Link
I'm posting a podcast feed that makes reference to audio files for download. Instead of linking to the files directly (e.g. www.mywebsite.com/podcast.mp3), I want to link to the file as get variables so that I can track number of listeners (e.g. www.mywebsite.com/?audio=podcast.mp3). Where would I look to get something like this to work? How do I start sending audio data to the user using a link like this?

Determine If User Came From Inner Link Or An Outside Link
any php method or function to determine if a user came from within the website or from an outside website. I have a page that I want to display in different manners depends on how did the user arrive at my site.

I know about the HTTP_REFERER function. but don't really know how to use it. I know this is the syntax:

<?php
echo $_SERVER['HTTP_REFERER'];
?>

but when i entered the code in the php page. for instance test.php, there is nothing coming up. So my questions:

1. is there any other method?
2. could any of you maybe specify a bit more details about this function and how to use it.

Click Counting
I have a links directory that I would like to count the number of times a link is clicked.

I currently have all the links being displayed by pulling the links data from a MySQL table. I have added the a 'Count' field to the existing table. The table contains the following fields: LinkID, Category, Name, URL, Description, Count.

My question is is it possible to count the clicks once the links data has been printed to HTML? I am thinking of the PHP equivalent of OnClick Count = Count + 1. Or have I got the whole logic back to front?

Set Vars On Click
I just wonder if itspossible to set an var when u click on a link. For example: When i click on www.test.com i want to make $test contain something.

Assign Value On Click
is there a way to change the value of a variable when a hyperlink is clicked? like im include()ing a variable $content. and when you click it changes from URL to links or whatever?

Click Tracking
I have a portal where people advertise and on they are allowed to display their website addresses so that people that visit the site can go directly from their site from my site.

Do you know of a class or script that would be able to monitor when someone visits an advertisers site i.e. records the click as they go across to the advertisers website.

I could build this myself, but thought that there may be a class or script that would do this already. (Would like this to be stored on a MySQL database opposed to a text fil.

Banner Click Thru
I'm looking for an easy way to keep track of click thrus on a banner. Can anyone point me in the general direction of what I'd have to do code wise?

Click Counter
Anyone know about a script/code that count how many times a link have been clicked..
I have tried hotscripts.com, phpbank.net and so on.. Only found scripts that costs money or uses a MySQL database.

I need one with no needs for MySQL. It should look like something like this: [ Download ] Been downloaded (NUMBER) times.Anyone know about a simple script to do that?

Check Click
I have a page and a sponsor. Every time a user click on a banner from our
sponsor their webpage is opened. I'd like to reward these users, but how to
check who clicked on a banner. I can't do anything on sponsor's webpage?

Click Counter
i want to make a link counter, i mean, when somebody click on a link in my web, this click is archives. Code:

Single Click Downloads
How do I ptogram with PHP a link that when clicked starts downloading the file? Basically I dont want to link directly as I want to take note of the number of times a file is downloaded so I need some way of sending the file back to the browser after I have done some housekeeping.

Any Way To Remove Referring URL From A Click-thru?
Is there anyway to make a pass-through php file that will clear the referring URL, so the target site does not know where you came from?

Disable Right Click In Opera
In my website there is requirement to disable rightclick.
I am providing the code and it is working in I.E ,Netscape and
Mozilla.But not working in Opera browser.
My code is
<body oncontextmenu='return false;'>
The above single line code is working very fine in the above browsers
not in Opera.

MySql Dump On A Click
I am developing a system, in which user or power user is allowed to take the database backup, is there ne procedure, in which, on just click,,, the dump of mysql is created for backup.

Inserting Into Two Tables At One Click
I want to insert some data into 2 of my tables through my PHP form.How can i do it?
For example, field1, field2 should be inserted into table 1 and field3, field4 should be inserted into table 2. I'm able to insert into one table but not into 2 tables simultaneously.

Referrer/click Tracking?
Anyone know of a good referrer/click tracker program? I've checked hotscripts.com, freshmeat.net, and php.resourceindex.com but didn't find anything all that great. There seem to be a ton of programs to track outgoing links, but I was looking for something that is used to track incoming links to my site (i.e. if I put a link up on some site it would go to something like http://example.com/click.php?id=1 then I would know how many people came to my site through that one).

I don't need to know how to make one of these, that's easy, but I'm too busy to be reinventing the wheel right now.

User Feedback In One Click
I have seen this on google and MSN. Google groups has star on which if
you click the topic becomes stared... MSN has 5 stars to get feedback
from user for giving rank to the pages. Sorry I don't remember on which
page they have this feature but I am very sure they have this.

I also require it for page rank, I was wondering how do they do it. I
am sure MSN is not storing the data on the clients machine.

I want if users click on 3rd stat then the 3 should go inside my mySql
DB and at the same time I don't want them to go to some other page or
open a pop up or something,

Where Do They Go? How Can I Gather Click Info In PHP
I was wondering if it is possible to find out what people click on, using
PHP.

For example, I have a PHP page with an email link and some third party links
(e.g. www.someone-else.com). I want to know where people go.

My own solution would be to make the link not to an email or a third-party
website, but to another page along the lines of

<?php
//check out where it came from and where it is going
//write info to database
header = {where it should be going}

?>

I am not sure if you can do this with email, but I am also wondering if
there is an easier/smarter way to do this.

Click To Send This By Email
In this forum there is a option called click here to send this to a friend by email, I want to know how they pass the url to a different page?

Right-click Menu Change
Is there a possibility to change/define what will appear in menu after
right-clicking on text input box ?
If not - how to do this ?



Detect Mouse Click
Is it possible to detect where on a page someone clicks with PHP? If so, can you point me in the right direction?

Form Button Click Itself.
is it possible that  on a php script that i can make the form button click itself.

so i have a button that when a certain argument happens i want to click on itself thus resetting itself and doing the php script associated with the button being clicked the php is on a form on php self.  know it sounds strange but i have some coding that needs to reset itself and only does that when the button is clicked just want a work around. failing that is it possible to use jave to achive this.

Php Insert Into A Textbox On Click
I have a textbox, where a user can write out a newsletter type deal.

I also have a list of products, that when the user click on it, it grabs all the info from the database and neatly generates html for the product.

I can deal with grabbing from the database and formatting, but i need some help with on click insert into the text box.

Refresh The Page On Click
I'm trying to find a way to refresh the page upon the clicking of a link that does not use header's.

reason being there isnt anyway i can get the statement up above all the output.

The only way ive found of doing something similar is:

<META HTTP-EQUIV=Refresh CONTENT="3; mypage.php">
Which just refreshes the page every 3 seconds.

Not really suitable to be honest.

Can anyone think of another way to handle this?

Disable Right-click On Mouse
Is there a php script that wil disable the right-click on mouse or maybe disable the copy and paste feature of the browser?

because i have a client, wherein he wants to prevent public viewing his website from copying his website content?

Left Mouse Click To Download
I need to allow user to download, ex: a movie file, using left mouse click. How can I do it?

Simulation Of Left Mouse Click
I was looking for this script for some time now
But still didmf fined a salution.
I need a script that simulates a left mouse click on specified area of
the screen when the page is loaded.

: In Netscape Emulate The IE Object.CLICK();
In IE I can send a click event to a form filed with objectName.click();
Is there a way to do this in other browsers like Netscape 6+ and Opera,
etc...?


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