Ok, hoping I chose the right forum. Anyways I want to play around a bit with PHP/ JavaScript only I don't know how to go about doing it.
You see I'm using PHP on my current web page, but the reloading every time you want to do something is horrible. JavaScript’s ability to change the page without reloading is awesome! So combining the two would be great only I know its not an easy task.
For example I would love to run some php code on the click of a button but if I try to run this:
Code:
document.write("<?php echo 'hello!'; ?>");
nothing happens. I realize this is because PHP is server side and therefore it needs to contact the server.... but I want to alter variables using JavaScript and then get them back into my php to save them into a database. Can anyone guide me on how to do this?
If you need more of a demonstration of what I mean I'll draw of a dummy script.
Thanks!,
pikaz