views:

42

answers:

3
$pname = "postback_".$data;
$_SESSION["$pname"] = $data;

It is not working. How to use it?

A: 

Make sure that you have put session_start(); on top of your script.

Sarfraz
+2  A: 

the correct usage would be $_SESSION[$pname]

Prix
+4  A: 
<?php
session_start();

$pname = "postback_".$data;
$_SESSION[$pname] = $data;

?>
vick