thewhat Posted November 28, 2007 Share Posted November 28, 2007 Hi, so I'm working with a CMS called PHPFusion. Now it's great but I'm having trouble understanding how I can link a users session to a page I customly make. I've gone to their forums but tbh, the community there isn't much help. And it's a general question really so I don't see why I shouldn't bring it here. Is my question clear enough? I need a user to be able to regularly keep track of information they pull/insert into the database but I'm unsure of how to achieve this with a pre made system. Anyone? ??? Link to comment https://forums.phpfreaks.com/topic/79203-working-with-with-pre-made-cms/ Share on other sites More sharing options...
thewhat Posted November 28, 2007 Author Share Posted November 28, 2007 I'm thinking I may need to use a session_register function. However, how can I set the variable in this to be a mysql_query? Link to comment https://forums.phpfreaks.com/topic/79203-working-with-with-pre-made-cms/#findComment-400945 Share on other sites More sharing options...
schme16 Posted November 28, 2007 Share Posted November 28, 2007 Sessions are notoriously retarded every now and tehn... whats wrong with setting a 5min cookie, or the likes eh? Link to comment https://forums.phpfreaks.com/topic/79203-working-with-with-pre-made-cms/#findComment-401041 Share on other sites More sharing options...
thewhat Posted November 28, 2007 Author Share Posted November 28, 2007 I tried doing this: <?php session_start() $result = mysql_query("SELECT * FROM example") session_register("result"); ?> but that won't work. Link to comment https://forums.phpfreaks.com/topic/79203-working-with-with-pre-made-cms/#findComment-401416 Share on other sites More sharing options...
schme16 Posted November 29, 2007 Share Posted November 29, 2007 Like I said, Why not simple set a cookie that expires when the session is over.. <?php setcookie('cookie_name', $cookie_data, time(), '/'.'/'); ?> Link to comment https://forums.phpfreaks.com/topic/79203-working-with-with-pre-made-cms/#findComment-401926 Share on other sites More sharing options...
revraz Posted November 29, 2007 Share Posted November 29, 2007 Don't mix session_start() with session_register. Look at how they do it with their other pages and copy the code. Link to comment https://forums.phpfreaks.com/topic/79203-working-with-with-pre-made-cms/#findComment-402082 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.