View Full Version : html form to PHP isn't working
italiano40
Jan 3, 2009, 10:14 PM
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
Post your code. First guess is typo, send second is you not using "name" for fields.
italiano40
Jan 3, 2009, 10:20 PM
here
<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>$twitter=new Twitter($_REQUEST["twitterusername"],$_REQUEST["twitterpassword"]);
var_dump($_REQUEST);
What's the output?
italiano40
Jan 3, 2009, 10:27 PM
here
array(3) { ["twitterusername"]=> string(10) "mytwittername" ["twitterpassword"]=> string(6) "mytwitterpassword" ["Submit"]=> string(6) "Submit" }
So it seems to me the form and $_REQUEST is working correctly and something is wrong with the Twitter object.
italiano40
Jan 3, 2009, 10:31 PM
ok thanks anyway
angelwatt
Jan 3, 2009, 11:26 PM
You may want to take a look at this Twitter API tutorial. (http://woork.blogspot.com/2007/10/twitter-send-message-from-php-page.html) It uses a function called postToTwitter, rather than just Twitter.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.