Monkuar Posted May 10, 2009 Share Posted May 10, 2009 <?php require_once "ipbsdk_class.inc.php"; $SDK =& new IPBSDK(); $message = $_REQUEST['email'] ; $title = $_REQUEST['title'] ; $SDK->write_pm ("1", "$title", "Hello! This is a test message sent to user id 1"); ?> that's my form.php and this is my html: <form method="post" action="form.php"> Email: <input name="email" type="text" /><br /> Message:<br /> <textarea name="title" rows="15" cols="40"> </textarea><br /> <input type="submit" /> </form> Is this right? because for some reason it's not working help ? It just blanks page and it's not send Quote Link to comment https://forums.phpfreaks.com/topic/157556-solved-do-i-put-_post-in-the-formphp-or-in-a-html-page/ Share on other sites More sharing options...
Ken2k7 Posted May 10, 2009 Share Posted May 10, 2009 No errors that I can tell. Does $SDK->write_pm() send the PM as well? Quote Link to comment https://forums.phpfreaks.com/topic/157556-solved-do-i-put-_post-in-the-formphp-or-in-a-html-page/#findComment-830761 Share on other sites More sharing options...
Monkuar Posted May 10, 2009 Author Share Posted May 10, 2009 I added a s/s no the skd -> write_pm just makes so it so i can send pm with that simple line i guess lol Quote Link to comment https://forums.phpfreaks.com/topic/157556-solved-do-i-put-_post-in-the-formphp-or-in-a-html-page/#findComment-830763 Share on other sites More sharing options...
Monkuar Posted May 10, 2009 Author Share Posted May 10, 2009 <?php require_once "ipbsdk_class.inc.php"; $SDK =& new IPBSDK(); $SDK->write_pm ("1", "Hello!", "$message"); ?> That's my form.php and this is my html: <form method="post" action="form.php"> Email: <input name="email" type="text" /><br /> Message:<br /> <textarea name="message" rows="15" cols="40"> </textarea><br /> <input type="submit" /> </form> And when i do submit it has no errors but it doesnt send me the PM.. but if take out $message and put "hey biatch" it sends pm what's wrongg lol Quote Link to comment https://forums.phpfreaks.com/topic/157556-solved-do-i-put-_post-in-the-formphp-or-in-a-html-page/#findComment-830767 Share on other sites More sharing options...
Ken2k7 Posted May 10, 2009 Share Posted May 10, 2009 What's wrong is $message is NOT defined or set. Change that to $_POST['message']. Quote Link to comment https://forums.phpfreaks.com/topic/157556-solved-do-i-put-_post-in-the-formphp-or-in-a-html-page/#findComment-830772 Share on other sites More sharing options...
Monkuar Posted May 10, 2009 Author Share Posted May 10, 2009 i did $message = $_POST['message']; nice php is awesome, topic solved thanks bro <3 Quote Link to comment https://forums.phpfreaks.com/topic/157556-solved-do-i-put-_post-in-the-formphp-or-in-a-html-page/#findComment-830773 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.