473,320 Members | 1,961 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,320 software developers and data experts.

Getting a rollover image to execute php

29
Hi everyone ... Hope you are all well ...

I have a rollover image button that I need to do several things:
1. Update a variable: <?PHP $VarNum = $VarNum + 1 ?>
2. Open a pdf file: <a href="Catalog.pdf"
- and if possible -
3. Update a database variable: <?PHP mysql_query("UPDATE tableA SET M = $VarNum"); ?>

All on one click ... Could someone please give me an idea of the syntax.

Thanks

Robert
May 8 '08 #1
1 1524
TheServant
1,168 Expert 1GB
PHP will not work for rollover things nor buttons like you want... You will need Javascript or AJAX.

PHP is server side, which means that it is only done when the page is requested. Once the page has been requested it cannot change, so PHP variables are only available while the server is outputting the page. The only way to change a PHP variable would be to refresh the page by sending a command to itself. I don't recommend this and encourage you to look into javascript.
May 8 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Brian Angliss | last post by:
I'm relatively new to scripting in JavaScript, so I'm not too surprised I'm having difficulty scripting up an animation effect for my personal site. What I'm trying to do is the following: When...
4
by: Matt | last post by:
i know more-or-less zero about javascript, but my client wants a rollover and he created this code, which doesn't work. All comments are appreciated. 1. the tag: <td align="center" width="66"...
3
by: JOSEPHINE ALVAREZ | last post by:
I have this code that I want to use to do a rollover. However, because the company I am doing it for is continually changing the text, I want to be able to use dynamic text to change the text on...
6
by: AJBopp | last post by:
I'm wrestling with CSS variations between Firefox and IE. I'm trying to create rollover buttons in a menu frame. It is working perfectly in Firefox but in IE only the first button is properly...
3
by: Rob R. Ainscough | last post by:
Just curious why a VERY commonly used affect of rollover was NOT implemented in .NET 2.0 for web controls? Does anyone have a link to VB code that will show me how to build my own UserControl...
2
by: Casimir | last post by:
I am looking into making pure CSS image rollovers. Do you have any clever (and robust) CSS rollover-tricks? Or links to such "in the wild"? I have figured out two methods for this, but have...
3
by: smartphreak | last post by:
not sure if this is the right forum but i will try explain myself. lets start by giving the code <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.