The PHP file can access the value of the userName textbox through GET userName

The php file can access the value of the username

This preview shows page 23 - 25 out of 25 pages.

The PHP file can access the value of the userName textbox through $ _GET [' userName '] and will output the result in the <div id =" responseMessage "> part as illustrated below:
Image of page 23
PHP code on the server <?php $ userName = array (); $ userName [0]=” Tom "; $ userName [1]=" Bobby "; $ userName [2]=" Harry "; if(! in_array ($_GET[ 'userName '],$ userName )){ print " You can use this user name! }else{ print " The name ".$_ GET [ 'userName ']." is used by other users! } ?> validaRon.php "; "; "
Image of page 24
References AJAX
Image of page 25

You've reached the end of your free preview.

Want to read all 25 pages?

  • Fall '13
  • Dr. C. Wu
  • Ajax, Web page, World Wide Web, Web server

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture