Jump to content

Totally new to PHP, need help with an error in our first assignment

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
Darkone85

Darkone85

    Learning Programmer

  • Members
  • PipPipPip
  • 30 posts
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

#2
chili5

chili5

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 7,247 posts
The function is isset now issett.

Change to this:
if(isset($_GET["action"])){


#3
Darkone85

Darkone85

    Learning Programmer

  • Members
  • PipPipPip
  • 30 posts
yeah i noticed myself ;) laaaaal....

ty anyways man!

/Manne