Click to See Complete Forum and Search --> : Madlib


Jonathan
07-14-2003, 11:43 AM
I have an Idea on how to make one, but I am not sure if I do know or not, can someone help?



<FORM Method="post" action="I don't know what to put here... The problem is that I dont know whether I should create a php file or not...">
<input type=text name=verb value=Give me a verb>





<?PHP
$verb = echo $_POST[verb1];

echo $verb
?>

brendandonhue
07-14-2003, 12:44 PM
Heres a sample
madlib.html
<form name="madlib" action="madlib.php" method="post">
Past tense verb <input type="text name="word1"><br>
Name<input type="Text" name="word2"><br>
Another name<input type="text" name="word3>
</form>

Madlib.php
<?php
$word1 = $_POST['word1'];
$word2 = $_POST['word2'];
$word3 = $_POST['word3'];
$message = $word2 . $word1 . $word3;
echo($message)
?>

Jonathan
07-14-2003, 12:56 PM
so for madlib.php I would have to do this with the text./..

<?PHP
$word1 = $_POST['word1'];

echo("If you grow $word1 then you bad!")
?>

Jonathan
07-14-2003, 12:57 PM
Or is it like javascript...

("If you grow" +$word1+ "then you bad")

brendandonhue
07-14-2003, 12:58 PM
<?PHP
$word1 = $_POST['word1'];

echo("If you grow $word1 then you bad!")
?>
is correct

Jonathan
07-14-2003, 01:00 PM
thankls