introduction screenshots faq forum blog modules components download
Please use the search function and/or read the FAQ first.

Go to Topic: PreviousNext
Go to: Message ListNew TopicSearchLog InPrint View

very simple form that does not work



Posted by: shumboom
April 15, 2008 10:32AM
This is working for people using other php setups - the main problems are the php prints do not work in the html body.

Also using a > in the top php script closes the script rather than be seen aas a greater than. How can I solve this?



output:listing.html

<?php
$message="";
$num_to_guess = 42;
if (!isset($guess))
$message = "Welcome" ;

elseif ( $num_to_guess< $guess)
$message = "$guess is too big";
elseif ($guess<$num_to_guess)
$message = "$guess is too small";
else
$message="got it";
?>

<html>
<head>
<title>9.9 guessing game</title>
</head>
<body>
<h1><?php print $message ?></h1>
<form method = "POST" >
Type your guess here<input type ="text" name="guess">

</form>
</body>
</html>
Options: ReplyQuote


Go to: Message ListSearchLog In
Your Name: 
Your Email: 
Subject: 
Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.