I need to put a javascript variable in js file to php variable in php file to do action in sql db later. I use local server Apache to do this. My javascript variable is "uid"
In my js file I've insert this :
function post()
{
  $.ajax({
    type: "POST",
    url: "proc.php",
    data: uid, 
  });   
}
In my php file named "proc.php" the code is :
<?php
$myvar = $_POST['uid'];
echo 'myvar';
?>
Is it possible to display by echo "myvar" in alert box to know if my code works ?
