Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. Information about object: obj_login
  2.  
  3. Sprite: spr_login
  4. Solid: false
  5. Visible: true
  6. Depth: 0
  7. Persistent: false
  8. Parent: <no parent>
  9. Mask: <same as sprite>
  10.  
  11. Create Event:
  12. execute code:
  13.  
  14. init=gmsql_init();
  15. if(!init)
  16. {
  17. show_message("Mysql initation error!");
  18. }
  19. connect=gmsql_connect('127.0.0.1','root','','soccer');
  20. if(!connect)
  21. {
  22. show_message("Connection Error");
  23. }
  24.  
  25. Mouse Event for Left Button:
  26. execute code:
  27.  
  28.  
  29. global.my_user=obj_username.string;
  30. global.my_pass=obj_password.string;
  31.  
  32. uquery=gmsql_query('select username from soccer where username="'+global.my_user+'"')
  33. pquery=gmsql_query('select password from soccer where password="'+global.my_pass+'"')
  34. if(uquery and pquery)
  35. {
  36. room_goto_next();
  37. }
  38. else
  39. if(!uquery)
  40. {
  41. show_message("Cannot read username");
  42. }
  43. else
  44. if(!pquery)
  45. {
  46. show_message("Cannot read password");
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement