hey,
i have about 30 variables which are created and modified by user (none of which comes from input, so submitting a form is not really an option), once modification finished a JS function process the variables and spouse to post them to the controller which will then send the to the model.
now, as appears in the title, my question is what is the best way for me to send them?
thnx for time and attention,
Ido
Modern browsers and newer versions of PHP both support JSON, and there are supporting libraries you can use if the browsers you need to support or the PHP version you’re stuck with are old. I’d recommend this as a way of getting data back and forth.
Client side JS:
Then on the server-side:
Hope this helps!