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. Quote 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 (edited) 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... Edited December 27, 2014 by requinix Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.