pass for ellements to other pages using sessions
i created a sesion on gallery_pages.php where the form is
<?php
if (!session_id()) session_start();
if(isset($_POST["add-gallery-yes"])) {
$_SESSION["gallery_name"] = "".((isset($_POST["galleryname"]))?$_POST["galleryname"]:"") ."";
}
?>
then i binded the form element
<input name="galleryname" type="text" class="validate['required']" id="galleryname" value="<?php echo $_SESSION['gallery_name']; ?>" />
on this page i want the session name to appear
choose_gallery.php
<div id="error">error that gallery <?php echo $_SESSION['gallery_name']; ?>allready exists</div>
or
<div id="success">success <?php echo $_SESSION['gallery_name']; ?> has been created</div>
i have this at the top of choose_gallery.php
<?php
if (!isset($_SESSION)) {
session_start();
}
?>
then to clear sesion i want to use the add_gallery button
when i try to apply this i get this error
while executing onload in wact_clearsesion.html, the following javascripts error occurred
in file wact_clearSession initializedui is not defined