php include file-dem-code



PHP include file-dem-code


<?php
include "include/connection.php";
 include "include/functions.php";

?>


----------------------------->
<?php
 session_start();

/* if(@$_REQUEST['userId']!='')
 {
 $_SESSION['showUserId'] = $_REQUEST['userId'];   
 header("Location:showUserProfile.php");   
 }*/
 if(@$_SESSION['userId']=='')
 {
 header("Location:index.php");   
 }
 include "include/connection.php";
 include "include/functions.php";
 $msg='';
// $userId=$_SESSION['showUserId'];
 $userId=$_SESSION['userId'];
 $sql_prof="select * from `user_profile` where `userId`='$userId' ";
 $res_prof=mysql_query($sql_prof);
 $count=mysql_num_rows($res_prof);
 $r_prof=mysql_fetch_array($res_prof);

 if($count < 1){
  header("Location:index.php");   
 }

 ?>