"-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Listing 5.2 An if Statement That Uses else</title>
</head>
<body>
<div>
<?php
// $satisfied = "very";
if ( $satisfied == "very" ) {
print "We are pleased that you are happy with our service";
// register customer satisfaction in some way
} else {
print "Please take a moment to rate our service";
// present pulldown
}
?>
</div>
</body>
</html>
Eredmény:
Notice: Undefined variable: satisfied in E:\STY PHP in 24 Hours\Hour 05\listing5.02.php on line 12 Please take a moment to rate our service
Nincsenek megjegyzések:
Megjegyzés küldése