Well, we have setup a Wamp server and got it all going and now we are learning some basic code writing. One of the assignments is to make a phpfile where we have 3 links (that just link back to the same file though) and if we press one, a message will say so.
this is what my code looks like:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"xml:lang="sv" >
<head>
<title>
</title>
</head>
<body>
<a href="mall5.php?action=Slumpa">Slumpa</a><br />
<a href="mall5.php?action=Sortera">Sortera</a><br />
<a href="mall5.php?action=Skriv ut">Skriv ut</a>
<?php
if(issett($_GET["action"])){
$action = $_GET["action"];
switch ($action){
case "Slumpa":
echo("Du tryckte på slumpa");
break;
case "Sortera":
echo("Du tryckte på sortera");
break;
case "Skriv ut":
echo("Du tryckte på skriv ut");
break;
}
}
?>
</body>
</html>
but i get a error message, reading:
Fatal error: Call to undefined function issett() in C:\wamp\www\mall5.php on line 18
the line is if(issett($_GET["action"])){
whats wrong??
Thanks in advance,
Manne
Totally new to PHP, need help with an error in our first assignment
Started by Darkone85, Apr 18 2010 10:09 AM
2 replies to this topic


Sign In
Create Account


Back to top









