nohoper Posted December 27, 2014 Share Posted December 27, 2014 Hello to everyone! I've got a script written in php4 and would like to convert it to php5, I can't find either a paid or open source version of any script similar. I don't know enough to do this myself, but can work it all out if someone could give me a hand with this first part, how would this be written in php5? <?phpsession_start();// Require standard filesinclude("./require/config.php");require("./require/authmember.php");require("./require/functions.php");include("./include/get_config.inc.php");$content="./include/index.inc.php";if(session_is_registered("valid_user")) {$menu="./include/menu_v.inc.php";} else {$menu="./include/menu_u.inc.php";}//Page Description$page_title="Welcome to $site_name";//Meta description tag$description="";//Meta keywords tag$keywords="";include("./include/header.inc.php");include("./include/body.inc.php");include("./include/footer.inc.php");?> Your help would be most appreciated, thanks in advance. Link to comment https://forums.phpfreaks.com/topic/293378-php-4-to-5-help-please/ Share on other sites More sharing options...
requinix Posted December 27, 2014 Share Posted December 27, 2014 The only part to replace is if(session_is_registered("valid_user")) {with if(isset($_SESSION["valid_user"])) { Its use of session_is_registered() suggests that you'll have a lot more work to do in other places... Link to comment https://forums.phpfreaks.com/topic/293378-php-4-to-5-help-please/#findComment-1500815 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.