html form to PHP isn't working

Discussion in 'Web Design and Development' started by italiano40, Jan 3, 2009.

  1. italiano40 macrumors 65816

    italiano40

    Joined:
    Oct 7, 2007
    Location:
    NY
    #1
    i use $_REQUEST, to get the POST method from my html form and it isn't working i can't figure it out everything works but this
     
  2. Aea macrumors 6502a

    Aea

    Joined:
    May 23, 2007
    Location:
    Denver, Colorado
    #2
    Post your code. First guess is typo, send second is you not using "name" for fields.
     
  3. italiano40 thread starter macrumors 65816

    italiano40

    Joined:
    Oct 7, 2007
    Location:
    NY
    #3
    here
    Code:
    <form action="twitterlogin.php" method="POST">
                <p>Twitter username: 
                <input type="text" name="twitterusername"></p>
                <p>Twitter Password: 
                <input type="password" name="twitterpassword"></p>
                <p><input type="submit" name="Submit" value="Submit"></p>
            </form>
    Code:
    $twitter=new Twitter($_REQUEST["twitterusername"],$_REQUEST["twitterpassword"]);
     
  4. Aea macrumors 6502a

    Aea

    Joined:
    May 23, 2007
    Location:
    Denver, Colorado
  5. italiano40 thread starter macrumors 65816

    italiano40

    Joined:
    Oct 7, 2007
    Location:
    NY
    #5
    here
    Code:
    array(3) {   ["twitterusername"]=>   string(10) "mytwittername"   ["twitterpassword"]=>   string(6) "mytwitterpassword"   ["Submit"]=>   string(6) "Submit" }
     
  6. Aea macrumors 6502a

    Aea

    Joined:
    May 23, 2007
    Location:
    Denver, Colorado
    #6
    So it seems to me the form and $_REQUEST is working correctly and something is wrong with the Twitter object.
     
  7. italiano40 thread starter macrumors 65816

    italiano40

    Joined:
    Oct 7, 2007
    Location:
    NY
  8. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA

Share This Page