andibakker Posted April 27, 2009 Share Posted April 27, 2009 what is the preferred method of passing data between pages ? querystring or session variables or something else ? I have a page with all customers shown in a table and an edit link to edit which goes to editcustomer.php. I want to pass the customercode and want to know the best way to do this. Thanks Link to comment https://forums.phpfreaks.com/topic/155802-passing-data-between-pages/ Share on other sites More sharing options...
ILMV Posted April 27, 2009 Share Posted April 27, 2009 Unless you have sensative information slap it in a $_GET variable, the problem with using sessions is that the data stays around after the page has loaded. Link to comment https://forums.phpfreaks.com/topic/155802-passing-data-between-pages/#findComment-820128 Share on other sites More sharing options...
FezEvils Posted April 27, 2009 Share Posted April 27, 2009 on you page , create link editcutomer.php?id=<?php echo $id;?> then on the other page use, $_GET['id']; this is url parameter the other one is using form to post an element to next page, others passing data are using cookies or session Link to comment https://forums.phpfreaks.com/topic/155802-passing-data-between-pages/#findComment-820130 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.