Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi
i have the following into a html page
[syntax="html"]<form action="process.php" method="post">
<table>
<tr><td>
Name:<br />
<input type="text" name="userName" id="userName" size="20"></input><br />
Comment:<br />
<textarea rows="10" cols="20" name="body"></textarea><br />
<input type="submit" name="submit" id="submit" value="Submit"></input>
<input type="reset" name="reset" id="reset" value="Reset"></input>
</td></tr>
</table>
</form>make an array that contains numbers from 0 to 9 and randomly pick 2 numbers and display them between <textarea> and the buttons, something like "what is $firstRndNum + $secondRndNum equal to?<br /><input type="text" name="usersAns" id="usersAns"></input>
than when submit is clicked presses.php will take everything in(Name, body,$firstRndNum + $secondRndNum and usersAns)
and check if usersAns is == to $firstRndNum + $secondRndNum.
i have no clue how to implement this in html.
any ideas?
ps: i realise that this isn't going to stop the spam but i'm trying to learn how to work with php<->html
The Ninja Space Goat | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]