$pname = "postback_".$data; $_SESSION["$pname"] = $data;
It is not working. How to use it?
Make sure that you have put session_start(); on top of your script.
session_start();
the correct usage would be $_SESSION[$pname]
$_SESSION[$pname]
<?php session_start(); $pname = "postback_".$data; $_SESSION[$pname] = $data; ?>