Paldo Posted May 17, 2009 Share Posted May 17, 2009 Hi guys I know that this is probably too easy for you but... How can I move a value from one site to another for exapmle via link? or is there any othre way? For example I have $information in site welcome.php and I want to use it in site transfer.php. What is the best way to do this? Quote Link to comment https://forums.phpfreaks.com/topic/158510-silly-question/ Share on other sites More sharing options...
BK87 Posted May 17, 2009 Share Posted May 17, 2009 you can send file with GET. make site 1 go to a link like this of site 2. http://www.site2.com/information.php?username=demo&email=demo@site.com information.php print_r($_GET); // to view values that you got from site #1 what exacly do you want to share over two sites? Quote Link to comment https://forums.phpfreaks.com/topic/158510-silly-question/#findComment-835959 Share on other sites More sharing options...
Ken2k7 Posted May 17, 2009 Share Posted May 17, 2009 I'm going to assume both files are in the same domain. If that is the case, then the best way would be to use sessions. Quote Link to comment https://forums.phpfreaks.com/topic/158510-silly-question/#findComment-835960 Share on other sites More sharing options...
MadTechie Posted May 17, 2009 Share Posted May 17, 2009 If its a different page on the SAME site then just use sessions or cookies if its the same site or even another site you can use POST or GET (html forms) it its same site you could include the file and all values will work.. can you explain what your trying. Quote Link to comment https://forums.phpfreaks.com/topic/158510-silly-question/#findComment-835962 Share on other sites More sharing options...
Paldo Posted May 17, 2009 Author Share Posted May 17, 2009 First of all thaks a lot for every info so far... I guess I should be more specific. What I need is get a integer that represents a bank balance of customer from a database, store it to a variable for exemple $balance. This should be happening on the first page and I think it's not problem to do for me. On second page I want to use this integer to see if user can transfer some amount of money and in second step decrese his curent balance. Big deal for me is hov to transfer this balance. I hope I made my selfe clear. Thanks for all your help. Quote Link to comment https://forums.phpfreaks.com/topic/158510-silly-question/#findComment-835983 Share on other sites More sharing options...
BK87 Posted May 17, 2009 Share Posted May 17, 2009 I would not use any of the methods posted above, if you are working with peoples money. Try using mysql database. Quote Link to comment https://forums.phpfreaks.com/topic/158510-silly-question/#findComment-835986 Share on other sites More sharing options...
Paldo Posted May 17, 2009 Author Share Posted May 17, 2009 no it's not real it' s a school project no money in stake Quote Link to comment https://forums.phpfreaks.com/topic/158510-silly-question/#findComment-835990 Share on other sites More sharing options...
BK87 Posted May 17, 2009 Share Posted May 17, 2009 ah I would still use mysql, just to show your professor that you care about security of customers =D Quote Link to comment https://forums.phpfreaks.com/topic/158510-silly-question/#findComment-836006 Share on other sites More sharing options...
Paldo Posted May 17, 2009 Author Share Posted May 17, 2009 Well thanks but I realy don't know how to use MySql and I would rather use somethin easier... Quote Link to comment https://forums.phpfreaks.com/topic/158510-silly-question/#findComment-836017 Share on other sites More sharing options...
.josh Posted May 17, 2009 Share Posted May 17, 2009 Well thanks but I realy don't know how to use MySql and I would rather use somethin easier... well evidently you don't know how to use any of the other methods either, so you may as well learn the best way to begin with. Quote Link to comment https://forums.phpfreaks.com/topic/158510-silly-question/#findComment-836032 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.