Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Nov 2018
    Location
    Manchester
    Posts
    23
    Thanks
    7
    Thanked 0 Times in 0 Posts

    can php submit button execute an mysql query - Rand()

    Just a quick question

    I have a database of names eight at the moment I know how to query a rand to get one name, my question is how I would execute the select query when the user has pressed a button on screen.

    Can this be done?

  2. #2
    Master Coder sunfighter's Avatar
    Join Date
    Jan 2011
    Location
    Washington
    Posts
    7,915
    Thanks
    36
    Thanked 1,058 Times in 1,054 Posts
    Yes, this is what AJAX is for AJAX is part of JavaScript. You should have studied JS before tackling PHP. Here's a link : https://www.w3schools.com/js/js_ajax_intro.asp
    Evolution - The non-random survival of random variants.
    Physics is actually atoms trying to understand themselves.


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •