Jump to content

Recommended Posts

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?

 

<?php

session_start();

// Require standard files

include("./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

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 by requinix
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.