I have studied some AJAX, and tried to understand it.
The AJAX works; i just want to write a right php document too. With the AJAX, I load the php file write.php. Here is what is in write.php:
<?php
$NAME = 'data.txt';
$HANDLE = fopen($NAME, 'w') or die ('CANT OPEN FILE');
fwrite($HANDLE,'1');
fclose($HANDLE);
?>
But how to choose what to write, instead of '1', with JavaScript? Like Having a variable in JavaScript with the content, and loading that content into the php file?:?:
Thanks!