Advertisement
Guest User

Untitled

a guest
Apr 21st, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. var attributes = elem_name.attributes;
  2. text = ''
  3. for (var key in attributes) {
  4. /* Выбираем именно html-атрибуты */
  5. if (attributes[key].nodeName) {
  6. text += attributes[key].nodeName + ':' + attributes[key].nodeValue + ','
  7. }
  8. }
  9.  
  10. $.ajax({
  11. type: "GET",
  12. url: "index.php",
  13. data: text
  14. }).done(function( data ) {
  15. });
  16.  
  17. $сlass= $_GET['сlass'];
  18. $id= $_GET['id'];
  19.  
  20. $con = mysqli_connect('bla','bla','bla','bla');
  21. $result = mysqli_query ($con,"INSERT INTO bla (class, id) VALUES ('$class','$id')");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement