I am building my first PHP based application, and I ran into a problem.
This is a page where they get to add jokes to the database, I haven’t added the code to the part where it ads yet but I built it so it checks if a joke has been submitted, it shows a message, if not then it shows a form. However I keep getting this message as an error:
Parse error: parse error in C:\\wamp\\www\ esting\ est.php on line 38
This is my code:
<html>
<head>
<title>Add a joke!</title>
<link type="text/css" rel="stylesheet" href="style.css" />
</head>
<body>
<?php
if(!isset($_GET['submit'])):
?>
<div class="wrapper">
<h2 class="test">Submit Your Own Joke!</h2>
<form class="simple-form" action="" method="" name="">
<label class="label">Name:</label>
<input type="text" name="input-1" class="inputfield" />
<label class="label">E-mail:</label>
<input type="text" name="input-2" class="inputfield" />
<label class="label">Joke Text:</label>
<textarea name="input-2" id="input-2" cols="29" rows="9">
Enter your joke here...</textarea>
<input type="submit" name="submit" class="submit" value="Add the Joke!">
</form>
</div>
<?php else: ?>
<h2>Your Joke has been placed in Que for Moderation,<br />
If you followed the guidelines, then it will be added<br />
shortly. Thank you for your submission!</h2>
<? endif; ?>
</body>
</html>
Thanks in advance!