Your best and safest way is to make use of your session that you already declared in your 'button_clicked.php' page -
Quote:
Session variables works by storing user information to be used across multiple pages (e.g. username, course names, etc). By default, session variables last until the user closes the browser or the session is closed.
To set your variables -
<?php
$_SESSION["courseID"] = $courseID;
$_SESSION["courseName"] = $courseName;
?>
To use these values in your new page 'course_display.php' -
<?php
session_start();
echo "User ID is - " . $_SESSION["courseID"] . ".<br>";
echo "Course Name is - " . $_SESSION["courseName"] . ".";
?>
You can use these values on any page for as long as the session is open and valid.
To view all of the variables contained in a session -
<?php
print_r($_SESSION);
?>
ALWAYS destroy your session when you are done with it -
<?php
session_start();
session_unset();
session_destroy();
?>
This is teh basics of session handling, there are much more to it which you will find by searching Google, it will however point yuou in the right direction. Also read more on this -
PHP Sessions[
^]