kennedysee Posted January 25, 2010 Share Posted January 25, 2010 Apparently i try to save the data into the mysql, but it didnt work.. Anyone help? create_users.php <script type="text/javascript"> var mac = macs.getMacAddress(); $.get('/create_users.php?mac=' + mac, function() { alert('yeah done'); }) </script> checkAvailability.php $mac = $_GET['mac']; $mac = mysql_real_escape_string($mac); $sql = "INSERT INTO test(mac) VALUES ('$mac')"; mysql_query($sql); Link to comment https://forums.phpfreaks.com/topic/189687-php-grabbing-data-from-javascript/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.