I’m designing a bookmarking website for a school project and it all looks fine, but when I enter my input nothing changes. i think the problem may be with sessions?
<?php
session_start();
if(!isset($_SESSION['where'] ) ){
$_SESSION['where'] = array();
}
function save($where, $title, $link, $notes){
$desc = school();
$desc['title'] = $title;
array_push($_SESSION[$where], $desc);
}
function show($desc) {
$items = $_SESSION[$school];
foreach($items as $item);
$title = $item['title'];
$link = $item['link'];
$notes = $item['notes'];
}
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="external.css"/>
</head>
<body>
<div id="header">
<h1>Bookmarker</h1><br/>
<div id="book"> <img src="http://www.iconshock.com/img_jpg/SEVEN/general/jpg/256/book_icon.jpg" style="height:200px;width:200px;">
</div>
</div>
<div id="menu">
<b>Menu</b><br>
<a href='tester.php'>Main Page</a><br>
<a href='about.php'>About Bookmarker</a></div>
<div id="content">
<form action='' method='GET'>
<center>
<input type="text" name="title" placeholder="Title of link"/>
<input type="text" name="link" placeholder="Link"/>
<input type="text" name="notes" placeholder="Notes/comments"/>
<input type="submit" value="Save!"/>
</center>
</form>
<div>
<div id="school">
<p style="
font-size:14pt;
color:#67380E;
font-weight:bold;
">
Saved
</p>
<?php
if( isset( $_SESSION['title']) && isset( $_SESSION['link']) && isset( $_SESSION['notes']))
print("<a href=$link>$title</a><br/>$notes");
?>
</div>
the website looks like this right now: