Results 1 to 3 of 3

Thread: [PHP] Form Help

  1. #1
    Join Date
    Dec 2006
    Posts
    3,970
    Tokens
    0

    Latest Awards:

    Default [PHP] Form Help

    Ive got a code from a website for a form.

    Here is the html code:

    HTML Code:
    <html><head><link rel="stylesheet" type="text/css" href="http://hab-house.awardspace.co.uk/style.css"></head>
    <body>
    <table width="100%" cellspacing="0" cellpadding="0"><tr height="19">
    <td width="8" background="http://i166.photobucket.com/albums/u114/hab-house/heading_left.gif"></td>
    <td background="http://i166.photobucket.com/albums/u114/hab-house/heading-2.gif"><font face="arial" size="2" color="#ffffff">News Reporter Apps</font></td>
    <td width="8" background="http://i166.photobucket.com/albums/u114/hab-house/heading_right.gif"></td>
    </tr></table>
    <br><br>
    <form method="post" action="http://hab-house.awardspace.co.uk/sendmail.php">
    What Hotel You Play On:<br>
    <input type="radio" name="1" value="uk"> Habbo.co.uk
    <br>
    <input type="radio" name="1" value="sg"> Habbo.com.sg / Habbo.sg
    <br>
    <input type="radio" name="1" value="us"> Habbo.com
    <br>
    <input type="radio" name="1" value="au"> Habbo.com.au
    <br>
    <input type="radio" name="1" value="ca"> Habbo.ca
    <br>
    <input type="radio" name="1" value="other"> <i>Other</i>
    <br><br>
      Habbo Name: <input name="2" type="text" /><br /><br>
    Email: <input name="3" type="text" /><br /><i>Your email will not be shared with anyone</i><br><br>
      Why You Want To Be A News Reporter:<br />
      <textarea name="4" rows="15" cols="40">
      </textarea><br />
    <br>
      <input type="submit" align="center" value="submit">
    </form>
    </BODY>
    </HTML>
    And this is the php code:

    PHP Code:
    <?
      
    $$_REQUEST['1'] ;
      $
    $_REQUEST['2'] ;
      $
    $_REQUEST['3'] ;
      $
    $_REQUEST['4'] ;
      
    mail"hab-house********.co.uk""News Reporter Apps",
        
    $message"From: $3" );
      
    header"Location: http://www.hab-house.awardspace.co.uk/thanks.html" );
    ?>
    But when i tested the form it said:
    Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in /home/www/hab-house.awardspace.co.uk/sendmail.php on line 2

    Whats wrong with the code?

    +Rep For Help

    Thanks,
    Tom
    Lets set the stage on fire, and hollywood will be jealous.

  2. #2
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    You might not have superglobals or whatever turned on?

    I have been led to believe $_REQUEST only works when they are turned on.

    Oh and why have a " " (space) before the ";" ?

  3. #3
    Join Date
    Jun 2005
    Posts
    4,795
    Tokens
    0

    Latest Awards:

    Default

    Variables cant start with numbers.

Posting Permissions

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