Unstoppable Domains

New code based off an old one I made.

Spaceship Spaceship
Watch

Coolprogram

Established Member
Impact
7
here is the code it is still a quiz this is whatever.php

PHP:
here is the code it is still a quiz this is whatever.php
<html>
<body>
<center>
<h1>Quiz</h1>
</center>
<h3>Which is the correct spelling?</h3>
<br>

<form action="whatever.php" method="POST">
<input type="radio" name="cool" value="Wrong"> heel
<br>
<input type="radio" name="quiz" value="Correct"> heal
<br>
<input type="submit" name="submit" value="Submit">
<input type="reset" name="reset" value="Reset All">
</form>

<?php

if($_POST['submit'])
{
$quiz = $_POST['quiz'];

if($quiz == "Correct")
{
echo 'You are Correct click <a href="next.php">here</a> to move on.';
}
else
{
echo '<h2><font color="red">Wrong.</font> try again!!';
}
}
?>
</body>
</html>

I hope you like this code it is great for quizes, I need to learn a little MySQL to show percents and that.
-CP
 
Last edited:
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
0
•••
hmmm... basic but effective anyway... can't heel used as the heel of a foot
 
0
•••
there is an error in my other code here is the one without the error.
PHP:
<html>
<body>
<center>
<h1>Quiz</h1>
</center>
<h3>Which is the correct spelling?</h3>
<br>

<form action="whatever.php" method="POST">
<input type="radio" name="quiz" value="Correct"> sise
<br>
<input type="radio" name="quiz" value="Wrong"> sise
<br>
<input type="submit" name="submit" value="Submit">
<input type="reset" name="reset" value="Reset All">
</form>

<?php

if($_POST['submit'])
{
$quiz = $_POST['quiz'];

if($quiz == "Correct")
{
echo 'You are Correct click <a href="next.php">here</a> to move on.';
}
else
{
echo '<h2><font color="red">Wrong.</font> try again!!';
}
}
?>
Sorry about that,
-CP
P.S. You can spelll heal like heel to so I changed it to size. TY Please check it out again I fixed a few errors.
 
Last edited:
0
•••
thanx dude ! you rock at programming
 
0
•••
you put sise and sise

Code:
<html>
<body>
<center>
<h1>Quiz</h1>
</center>
<h3>Which is the correct spelling?</h3>
<br>

<form action="whatever.php" method="POST">
<input type="radio" name="quiz" value="Correct"> size
<br>
<input type="radio" name="quiz" value="Wrong"> sise
<br>
<input type="submit" name="submit" value="Submit">
<input type="reset" name="reset" value="Reset All">
</form>

<?php

if($_POST['submit'])
{
$quiz = $_POST['quiz'];

if($quiz == "Correct")
{
echo 'You are Correct click <a href="next.php">here</a> to move on.';
}
else
{
echo '<h2><font color="red">Wrong.</font> try again!!';
}
}
?>


That should work :)
 
0
•••
oops, sorry about that, I forgot about that, I eddited the code before I added it to my site, so I made a typo.
TY
-CP
 
0
•••
Appraise.net

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back