In my android application i call php web service .at the first service is checking the login page if the user and the password are correct ,i create a new session for this user and i call this variable in another php page to treat some request .. The problem is when i call this variable from my android app it tells me:Undefined index :id_utilisateur in c:/wamp..../ajouteroffre.php
My login page is:
session_start();
include("mesfonction.php");
require "init.php";
$user_name =@$_POST["login_name"];
$user_pass =@$_POST["login_pass"];
$rows = checkloginConnexion($user_name, $user_pass);
$count = count($rows);
if( $count==1 )
{
$_SESSION['id_utilisateur']=$rows[0]['ID_User'];
$_SESSION['profile']=$rows[0]['Profil'];
$_SESSION['login']=$user_name;
$_SESSION['pass']=$user_pass;
if ($_SESSION['profile'] =='Employeur')
{
echo "Connecte en tant que Employeur..";
}
if ($_SESSION['profile'] =='Chercheur')
{
echo "Connecte en tant que Candidat..";
}
}
else
{
echo "Erreur:Connexion...Reesseyez!";
}
?>
My second page is:
<?php
session_start();
require "init.php";
include("mesfonction.php");
$id_user =$_SESSION["id_utilisateur"];
$ThisUser = getInfopro($id_user);
?>
Thank you for help