Results 1 to 3 of 3

Thread: php hide and unhide form

  1. #1
    Join Date
    Jul 2010
    Posts
    228
    Thanks
    18
    Thanked 0 Times in 0 Posts

    Default php hide and unhide form

    Good day!

    i want to know if it is possible in php code that the form would be hide and unhide?

    What shoud be the syntax for that?


    Thank you

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Surround it in a conditional (if) statement.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    loading the page as
    http://www.site.com/page.php?show=1
    will show the form. Loading it as
    http://www.site.com/page.php
    will not.
    PHP Code:
    <?php
    if (isset($_GET['show']) && $_GET['show'] == '1') {
    ?>
    <form>
    <input type="text" />
    <input type="submit" />
    </form>
    <?php
    } else {
    ?>
    Don't show.
    <?php
    }
    ?>
    [CENTER][/CENTER]
    Corrections to my coding/thoughts welcome.

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
  •