Forum Topic: Execute Php Method Onclick

(193 views • 4 replies)

This topic is 1 page long.

<< < > >>
Resigned

FlyingNinjaStudios

Reply To Post Reply & Quote

Posted at: 9/29/09 12:09 PM

FlyingNinjaStudios NEUTRAL LEVEL 01

Sign-Up: 06/13/09

Posts: 32

Ok so like... I've been at this for a few hours now and no luck, tried many tutorials and nothing worked.... what im trying to do here is have a

<a href=''>

link actually execute a PHP method when clicked... i tried just sticking it in there and it worked... but not when clicked... it just executed it automatically.... any ideas??

-Sam 'DJMAX' Eddy


None

kiwi-kiwi

Reply To Post Reply & Quote

Posted at: 9/29/09 12:27 PM

kiwi-kiwi LIGHT LEVEL 08

Sign-Up: 03/06/09

Posts: 657

This sounds like a job for AJAX


None

Pilot-Doofy

Reply To Post Reply & Quote

Posted at: 9/29/09 12:48 PM

Pilot-Doofy NEUTRAL LEVEL 37

Sign-Up: 09/13/03

Posts: 12,274

There is no "onClick" method for PHP. You should use the Javascript onClick to trigger an Ajax request to a separate page on which the PHP method is executed and returned.


None

henke37

Reply To Post Reply & Quote

Posted at: 9/30/09 04:21 AM

henke37 NEUTRAL LEVEL 23

Sign-Up: 09/10/04

Posts: 3,647

This sounds like a clear case of not understanding what php is. Php is a serverside scripting language. It is not a client side scripting language (at least as far as you can publicly consider it).
Php responds to http requests, not direct user events.

Each time someone abuses hittest, God kills a kitten. Please, learn real collision testing.


None

Pilot-Doofy

Reply To Post Reply & Quote

Posted at: 10/4/09 05:40 PM

Pilot-Doofy NEUTRAL LEVEL 37

Sign-Up: 09/13/03

Posts: 12,274

At 9/30/09 04:21 AM, henke37 wrote: This sounds like a clear case of not understanding what php is. Php is a serverside scripting language. It is not a client side scripting language (at least as far as you can publicly consider it).
Php responds to http requests, not direct user events.

Hello good sir. :)


All times are Eastern Standard Time (GMT -5) | Current Time: 05:16 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!