473,387 Members | 1,844 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Action link

Greetings,

Does anyone have a solution for this problem:

- I would like a PHP script to execute an action before a user clicks
on a link (updating the value of a variable, for instance).

Is there an easy way to do this?

Thanks,
Mark

Apr 13 '06 #1
2 7656
Mark Towner wrote:
- I would like a PHP script to execute an action before a user clicks
on a link (updating the value of a variable, for instance).
What do you mean? A PHP script is only executed when it is told to so by
eihter Apache (via the user), a cron job, or some other method.

What are you trying to accomplish? If you want to just update a variable,
put it at the top of the script.
Is there an easy way to do this?
A few:
- Just put it at the top of the script
- Cron jobs (scheduled tasks)
- Ajax/JS

Carl
Thanks,
Mark


--
Carl Vondrick
Web-Engineer
www.carlsoft.net
Apr 13 '06 #2
Mark Towner wrote:
Greetings,

Does anyone have a solution for this problem:

- I would like a PHP script to execute an action before a user clicks
on a link (updating the value of a variable, for instance).

Is there an easy way to do this?

Thanks,
Mark


Mark,

If I understand your question correctly, no, you can't do anything before the
user clicks on a link. PHP is server-side only, and nothing happens until the
user does something to request the page.

It sounds like you need something client-side, like javascript.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Apr 13 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Armin Irger | last post by:
Hi, i'am running a debian sarge with the delivered apache2 mysql and php4. The file "mitarbeiter_eingabe.php" gets the data over a html <FORM> and send it to...
1
by: Michael Brennan-White | last post by:
If I submit my for using a get action the resulting page loads . If I use a post action I get an error page saying "The page cannot be found". I am calling the originating page!!! This happens...
0
by: James | last post by:
Running on Xp with WSAD5.0.1 (acts the same in 5.1) an action class is simply not being called when it is configured identically with others called in the same manner. It never gets into the...
5
by: Slartybartfast | last post by:
I have a link that when clicked does something on another machine, and it all works fine. <a href=http://www.remotedomain.com/cgi-bin/task.cgi?identifier>Do That Thing</a> But I thought it...
5
by: bissatch | last post by:
Hi, I have been trying to come up with an idea to reduce double submissions where a user clicks refresh and, for example, another row is INSERT into a table. Originally, I would have a form...
5
by: deko | last post by:
How to run action query against linked table? I have an Access 2003 mdb with an Excel 2003 Workbook as a linked table. When I attempt to run an action query against the linked table I get this...
2
by: Paul Malcomson | last post by:
Hi. I'm having terrible trouble with a form that displays several parent/child relationships at one time. It is a sales force hierarchy - Sales force, district, territory, sales rep are the...
4
by: =?Utf-8?B?S29sbG1vcmdlbg==?= | last post by:
I have an asp page that outputs a word document. Wnen the user attempts to open this page from a hyberlink in an email document the word document opens fine but if they save then an action...
3
by: Jankie | last post by:
hi all, I am in a situation where I need a form inside another. The nested form asks the user to scan their file,takes the posted file and sends it to a web url.The parent form submits the user...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.