Event Handling

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Shantanu
Forum Newbie
Posts: 8
Joined: Wed Apr 02, 2003 11:15 pm

Event Handling

Post by Shantanu »

Dear all,
I am new to PHP.

I want to write a PHP script on the click on the click of a button.
Pls. guide me in the same.

Thanks in advance.

Shantanu
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

I'm not sure exactly what you are asking but if it is 'Can I run a PHP script from an onclick event?' then the answer is no, PHP is not like JavaScript and scripts can only be run if the page is reloaded:
viewtopic.php?t=1030

viewtopic.php?t=6969&highlight=php+onclick
viewtopic.php?t=7069&highlight=php+onclick
viewtopic.php?t=6339&highlight=php+onclick

Mac
Shantanu
Forum Newbie
Posts: 8
Joined: Wed Apr 02, 2003 11:15 pm

Event handling

Post by Shantanu »

hii Mac,
Thanks for the reply.

1. The thing I want to do is :
I've a php page acting as a template,having 2 buttons next and previous.(first.php)
On the click of next/back button, I fetch data from database and display it on the first.php. For fetching the data from databse I'm using a session varible in the where clause. This variable has to be incremented by 1 on click of next button and decremented by 1 on click of back button.

Looking fwd for ur kind help.....

Thanks,

Shantanu
Post Reply