Doublea Posted July 23, 2010 Share Posted July 23, 2010 Hi guys, I'm currently trying to send some text when a button is clicked via PHP without using a form. I've managed to send text from a form and get that sent using post method: <form name="" action="<?=$config['baseurl']?>" method="post"> <label for="eventbox">Facebook Events</label> <br /> <textarea id="eventbox" name="tt" cols="50" rows="5">I am attending Cadenza - 4th July and signed up via Ibizatalk.com</textarea> <br /> <input type="submit" name="eventbox" value="Attend Event on Facebook" /> </form> and then my PHP: if (isset($_POST['tt'])){ try { $statusUpdate = $facebook->api('/me/feed', 'post', array('message'=> $_POST['tt'], 'cb' => '')); } catch (FacebookApiException $e) { d($e); } } So currently I have it posting 'tt' but I need it to not post the form content but just post text. How can I send text that isn't in a form? Thanks guys, really need your help! Link to comment https://forums.phpfreaks.com/topic/208672-sending-text-via-button-without-form/ Share on other sites More sharing options...
litebearer Posted July 23, 2010 Share Posted July 23, 2010 several possible ways... ... a form that only has a hidden field ... pass via url variable ... use sessions to pass the value probably many more Link to comment https://forums.phpfreaks.com/topic/208672-sending-text-via-button-without-form/#findComment-1090204 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.