xyn Posted October 19, 2007 Share Posted October 19, 2007 Hey, Can someone tell me the proper usage of unset(); as it doesnt unset my $_POST vars. my code: # Upload files # Email recipient unset($_POST); Link to comment https://forums.phpfreaks.com/topic/73933-unset/ Share on other sites More sharing options...
papaface Posted October 19, 2007 Share Posted October 19, 2007 Just do unset($_POST); $_POST = array(); to unset them. Link to comment https://forums.phpfreaks.com/topic/73933-unset/#findComment-373075 Share on other sites More sharing options...
igor berger Posted October 19, 2007 Share Posted October 19, 2007 Why are you trying to unset $_POST variable? $_POST is a reserved enviromental variable and will be unset when the script finishes running. Pass the value of $_POST to user defined variable then you can unset that if needed. so $myvar=$_POST; echo $myvar; echos the value of $myvar; unset($myvar); echo $myvar; result will be empty. Link to comment https://forums.phpfreaks.com/topic/73933-unset/#findComment-373227 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.