Skip to content
Advertisement

Dropdown onchange calling PHP Function

What I’m attempting to do with the below code is call a PHP function from an drop-down menu.

Is there a clean way of doing this?

code:

JavaScript

Advertisement

Answer

simple ajax using jquery

index page

JavaScript

in submit.php

JavaScript

for simple js ajax use XMLHttpRequest

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement