Saturday, 31 August 2013

I can't get the html form to run a php script

I can't get the html form to run a php script

I'm just trying to get this simple php file to work:
<html>
<head>
<title>Aarons Editor</title>
</head>
<body>
<form action="index.php" method="get">
<select name="page">
<option value="default"> </option>
<option value="file">File</option>
</select>
<input type="submit">
</form>
<?php
if (page == $_GET['file']){
echo "<h1>File</h1>";
}
else {
echo "<h1>not file</h1>";
}
}
?>
</body>
</html>
Also, I can't figure out how to call a specific function in a form.

No comments:

Post a Comment