Hardwarez Posted October 13, 2006 Share Posted October 13, 2006 Ok, my proram is working off post data. I have run into a place where I need to be able set a post name and value without using a form. How can I do that?I catch submitted forms like this:if ($_POST['looking'] == 'Button A') dosomething();So how do I set a post value named looking to "myValue"?Without a button or form.. Link to comment https://forums.phpfreaks.com/topic/23853-how-can-i-post-a-value-without-using-a-form/ Share on other sites More sharing options...
akitchin Posted October 13, 2006 Share Posted October 13, 2006 simple:[code]$_POST['looking'] = 'myValue';[/code]superglobals are ALWAYS initiated, whether they contain anything or not. that means you are always able to add values to them dynamically without having to force the engine to initiate them. Link to comment https://forums.phpfreaks.com/topic/23853-how-can-i-post-a-value-without-using-a-form/#findComment-108352 Share on other sites More sharing options...
Hardwarez Posted October 13, 2006 Author Share Posted October 13, 2006 GR8! Thank you.. :) Link to comment https://forums.phpfreaks.com/topic/23853-how-can-i-post-a-value-without-using-a-form/#findComment-108387 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.