SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard
    Join Date
    Jul 2006
    Location
    New Zealand
    Posts
    1,300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Attack Page once again

    As for the attack page i want it so the user has more than one choice of button say in level 2 they get

    Power up,flight,Punch

    they choose Punch after that

    it prints out and message and when the next move select flight but the message from punch still displays on the page and i want it to repeat for every move so depeding on wat they click first it still stays on the page can that be doen?

  2. #2
    SitePoint Enthusiast
    Join Date
    Mar 2006
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi
    i did this i do not know if this is what you want...
    <?php

    session_start();

    $a = $_GET['a'];
    $b = $_GET['b'];
    $c = $_GET['c'];
    if(!isset($_SESSION['f']))
    {

    if(!empty($a)) { $_SESSION['f'] = $a; }
    if(!empty($b)) { $_SESSION['f'] = $b; }
    if(!empty($c)) { $_SESSION['f'] = $c; }
    }
    ?>
    <form action='move.php' method='get'>
    <input type='hidden' name='a' value='message a' />
    <input type='submit' value=' a ' />
    </form>

    <form action='move.php' method='get'>
    <input type='hidden' name='b' value='message b' />
    <input type='submit' value=' b ' />
    </form>

    <form action='move.php' method='get'>
    <input type='hidden' name='c' value='message c' />
    <input type='submit' value=' c ' />
    </form>
    <hr />

    <?php


    print $_SESSION['f']."<br />";
    print $a."<br />";
    print $b."<br />";
    print $c."<br />";

    if($c == true) { session_destroy(); }
    ?>

    hopes help

    thanks

  3. #3
    SitePoint Wizard
    Join Date
    Jul 2006
    Location
    New Zealand
    Posts
    1,300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that kinda help but when i click on the button it tries to go to ?a=message+a in the address bar

  4. #4
    SitePoint Wizard
    Join Date
    Jul 2006
    Location
    New Zealand
    Posts
    1,300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    and i want it to print it to the screen of which ever the user clicks on firsts and stays there


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
  •