aktuelle.kurse/old_m133/4_Modulinhalte_und_Uebungen/05-SystemProgrammierUmgebung-Sessions/03 global Variablen/Global_Variable_Aufg2/control/control_global.php

27 lines
999 B
PHP
Raw Normal View History

2022-02-24 09:37:43 +01:00
<?php
/*************************************************************/
/** Modul: Global (M-133) **/
/** Filename: control_global.php **/
/** Author: VOM **/
/** Version: 1.0 **/
/** **/
/*************************************************************/
session_start();
// Button Save Global data was selected
if (isset($_REQUEST['saveglobal']))
{
$Inhalt_Text = $_REQUEST['globaldata'];
$GLOBALS['GlobalText']= $Inhalt_Text;
$_SESSION['GlobalText']= $Inhalt_Text;
echo ("<meta http-equiv='refresh' content='0; url=http://localhost/M_133/Global_Variable_Aufg2/GlobalVariable.html' />");
exit;
}
// Button Show Global data was selected
if (isset($_REQUEST['showglobal']))
{
$html_out = ("<b>Show Session Global Data</b><br>");
$html_out .=$_SESSION['GlobalText'];
echo $html_out;
}
?>