jesushax Posted April 14, 2009 Share Posted April 14, 2009 hi all, When posting my form to be processed, register.php if certain fields arent filled in redirecst the user back to the form with error text but all the data they already inputted is lost is there an easy way to recall this data? Thanks Link to comment https://forums.phpfreaks.com/topic/154066-recall-form-data/ Share on other sites More sharing options...
methodlessman Posted April 14, 2009 Share Posted April 14, 2009 You can use sessions to store data between pages but I'm new to php and I don't how you could implement it on your site. Before the first HTML tag of your page(if you have one) put: <? session_start(); ?_SESSION['ARRAY_NAME'] = "$some_data"; ?> It can be recalled on another page using this above the first <HTML> tag: <? session_start(); // AND LATER ON IN THE CODE CALL IT LIKE: print_r($_SESSIONS['ARRAY_NAME']; ?> These sites may help: http://www.w3schools.com/PHP/php_sessions.asp http://www.php.net/session Link to comment https://forums.phpfreaks.com/topic/154066-recall-form-data/#findComment-809840 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.