470,866 Members | 1,943 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,866 developers. It's quick & easy.

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 7570
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by James | last post: by
5 posts views Thread by Slartybartfast | last post: by
4 posts views Thread by =?Utf-8?B?S29sbG1vcmdlbg==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.