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); Quote Link to comment https://forums.phpfreaks.com/topic/189687-php-grabbing-data-from-javascript/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.