1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

New to PHP - please help

Discussion in 'PHP' started by Kai-Itza, Dec 12, 2008.

  1. #1
    Hi,

    I've only been learning this subject for like, 2 and a half months and I'm stuck on a little piece of programming, yeah I understand it fully but, I've been checking this over and over and found nothing (from my knowledge anyway:p) wrong with it.

    I've learnt and wrote stuff that is more advanced than this. But, I can 't figure it out and knowing what is wrong with it will certainly bring my mind to rest (I tend to worry too much lol).

    If some of you distinguished programmers out there could lend me a hand through this, by cracking this case I would be greatly appeciated :)

    I'm laughing at myself for my own stupidity at this point, since spending so much time with it and going around in circles :D. (And, I bet it's something very easy that I missed out:eek:)

    I'm still pretty much a noobie with all this programming, so to let you know

    I've converted the file to notepad for loading simplicity.

    Many thanks,

    -Kai-Itza-
     

    Attached Files:

    • PHP.txt
      File size:
      622 bytes
      Views:
      65
    Kai-Itza, Dec 12, 2008 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    You basically need to do something like this:

    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <link href="css_example.css" rel="stylesheet" type="text/css"/>
    <title> Zoo - About Us </title>
    </head>
    
    <body>
    	
    
    	
    <p>Guess the Monkey's favourite food!</br></p>
    <p><img src="lion.gif"></p>
    
    <form name="guess" action="<?PHP echo $_SERVER['PHP_SELF']; ?>" method="get">
    <input type="text" name="guess" size="10" value="$_GET['guess']">
    <input type="submit" name="guess2" value="Guess!">
    </form>
    
    <?php
    $Bananas = 1;
    if(isset($_GET['guess']))
    {
        if ($_GET['guess'] == 1);
        {
            print "<p>You quessed it!</p>";
        }
        else
        {
            print "<p>You are wrong!</p>";
        }
    }
    ?>
    
    <p><a href="zoomap.html">Back</a></p>
    
    </body>
    
    Code (markup):
     
    jestep, Dec 12, 2008 IP