php session create using javascript value how

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

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]

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

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?

what mean sir,

Sponsor our Newsletter | Privacy Policy | Terms of Service