Hey this is a sample script someone gave me to show me something and He is not getting this error but I am
Notice: Undefined variable: action in c:\apache\apache\htdocs\sample.php on line 7
here is the script
<html>
<head></head>
<body>
<?php
//sample script
if($action == "sample"){
//link clicked
$html = "Congrats, you clicked the link!";
} else {
//no link clicked... display the link
$html = "Hello!<br>Would you like to <a href=\"$PHP_SELF?action=sample\">click me</a>?";
}
echo $html;
?>
</body>
</html>
Hope you can help me 😉