+ 2
Can we make relation between php and JavaScript.
Can variable of php can work with javascript. Because of top database and server side language i like php but when time for animations or something php is low in level.
2 Réponses
+ 17
<?php
$name = "noob";
echo "<script>name = ' ".$name." ';</script>";
?>
+ 1
Can this work:
<script>
(function($){
$('.class').on('click', function(){
<?php
$_POST['name'] = $name;
mysql_connect(//logindata);
//data inject query to sql
?>
}
})(jQuery);
</script>