I have a php script which prints href links on the page like this:
//...
echo"<link><a href=\"nextpage.php\">$table_list[$i]</a><br>";
//...
$table_list has table names from my database, and I want to go to nextpage with say $_SESSION['tablename']=$table_list[$i];
How can I do it?
Thanks.
You can pass the value you want by appending a query string to the link. Something like:
Then in
nextpage.php, grab the value of$_GET['tablename']and put it in the user’s session.