Need help writing a scripts sessions

i need to write a script that get the home.php file from the member folder name with the member id and firstname (id_firsname).

I have this code (at bottom), but it don’t put the folder that should be name after the member id_firstname.
just www.help.com/members//_/home.php. the page can’t be found.

…CODE…

<?php error_reporting(7); session_start(); if (!$_SESSION["logged_1"] ) header("Location: www.linkasagi.com/login_form.php"); ?><?php

require_once(’./HDWRegistrationAndLogin/config.php’);
require_once(’./HDWRegistrationAndLogin/tables.php’);

function HDW_FRL_LocateTable($id)
{
global $hdw_tables_array;
foreach ($hdw_tables_array as $item)
if ($item[“id”] == $id)
return $item;
return array();
}
$atable = HDW_FRL_LocateTable(“1”);
define(HDW_TABLENAME, strtolower($atable[“name”]));
$database = mysql_connect(HDW_HOST, HDW_USERNAME, HDW_PASSWORD)
or die(“Could not connect to database server. Please confirm that the access details are correct and confirm if the MySQL server is not down.”);
mysql_select_db(HDW_DATABASE, $database) or die(“Could not select database. Please confirm that the access details are correct.”);
$rsmem = mysql_query(“SELECT * FROM “.HDW_TABLENAME.” WHERE ".$atable["username"]."=’”.$SESSION[“logged_username”]."’", $database);
$mem = mysql_fetch_array($rsmem);
header(“Location: members/”.$mem[“accountType”]."/".$mem[“hdw_id”]."
".$mem[“firstName”]. “/home.php”);
?>

Problem solve

Sponsor our Newsletter | Privacy Policy | Terms of Service