Results 1 to 10 of 16

Thread: Day 8 - Lets Make A Game - Part 1 - Become PHP Expert in 30 days

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2014
    Posts
    21

    Default

    what does this code do?
    Code:
     <input type="hidden" name="secretNumber" value="<?php echo $secretNumber; ?>">
    and i didnt understand how this works.

    and also why is the action left blank? shouldnt be it like action ="fileName.php"?

    http://php.flashwebhost.com/austin/day8.php
    Last edited by Austinwhite; 05-19-2014 at 01:58 PM.

  2. #2
    Join Date
    Sep 2003
    Posts
    3,040

    Default

    Quote Originally Posted by Austinwhite View Post
    what does this code do?
    Code:
     <input type="hidden" name="secretNumber" value="<?php echo $secretNumber; ?>">
    and i didnt understand how this works.

    and also why is the action left blank? shouldnt be it like action ="fileName.php"?

    http://php.flashwebhost.com/austin/day8.php

    INPUT type = hidden means an input field, but user can see it. It is used when we need to submit some data to server, but.. we don't want visitors see it.

    When

    [code]
    <form method="GET" action="">
    [/coe]

    It it submit to itself, that is all data send to the code itself. We use

    Code:
    if (isset($_GET['secretNumber'])) {
    and


    Code:
    if (isset($_GET['userNumber'])) {
    To see if any value is sent to the server.
    Become PHP Expert in 30 days
    FreeMarriage.com - Free Online Matrimonial
    FlashWebHost.com - Professional Web Hosting, Designing.

Tags for this Thread

Bookmarks

Posting Permissions

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