Re: [PHP] combining PHP with JS

2011-04-20 Thread Jim Giner
Sounds like you need to have the user make a decision before you go to this php script that is processing the case statement. Since the script's process is predetermined by this time (when you want the user's input) you should be able to have the user make his input before the script begins.

[PHP] Re: combining PHP with JS

2011-04-20 Thread Florin Jurcovici
You can't combine PHP and JS this way. PHP is executed entirely on the server, before Javascript is even parsed. From Javascript you need to set something, for instance a special value into an input type=hidden / in your HTML file. Then, when the file is submitted, you need to decide whether