php session create using javascript value how


#1

Hello members
i create session using php code and javascript but i failed please help
i used this code

<?php session_start(); $session = ""; echo $session; $_SESSION["adcode"] = $session; ?>

when session check no record show
help me


#2

What are you trying to do? Because the way you are trying to do it is incorrect.

Sample:

[php]<?php
session_start();

if(!isset($_SESSION[‘name’])){
$_SESSION[‘name’] = ‘kako0000000’;
}
echo $_SESSION[‘name’];

[/php]


#3

please read my question again
copy my code and paste
message.php
and run it
show result
…success…
but session not create


#4

What are you expecting to happen and how do you know the session was not created? The session you are doing, poorly, is a JS snippet. So, what are you doing to determine if that value is stored or not?


#5

#6

what mean sir,