Can someone do this for me, please..
----------------------------------------
Create a from such as the one below. POST the information over to a new php document which will test to see if the user guessed correctly. You'll use te php function rand() to generate a random number between 1 and 10. Then compare the random number with the users guess. (as in the example from class)
----------------------
HEre is code
<html>
<head>
<title>Pick a Number</title>
<style type="text/css">
<!--
.style1 {
color: #0000CC;
font-size: x-large;
}
-->
</style>
</head>
<body>
<div align="center"><span class="style1">I'm thinking of a number from 1 - 10 guess what it is.</span></div>
<center><form action="" method="post">
<select name= "guess" >Take a guess!</option>
<option value='1'>1</option>
<option value='2'>2</option>
<option value='3'>3</option>
<option value='4'>4</option>
<option value='5'>5</option>
<option value='6'>6</option>
<option value='7'>7</option>
<option value='8'>8</option>
<option value='9'>9</option>
<option value='10'>10</option>
</select>
<p><input name="" type="submit"></p>
</form></center>
</body>
</html>
--------------------
Can someone do the rest of the task, please...
Help me with this task please..
Started by gpeer, Dec 03 2009 03:26 AM
6 replies to this topic
#1
Posted 03 December 2009 - 03:26 AM
|
|
|
#2
Posted 03 December 2009 - 06:35 AM
I think you should probably have a go at creating the PHP yourself first :)
Is this homework? It doesn't sound too difficult for you if it is exactly as you described. What part is it you are finding hard to start with?
You basically grab the value by using:
so the value they have chosen is now in $var. You can then store the random number in a variable and compare them.
From there you let the user know if they guess right!
But if you want help in a specific part, you are going to have to be a bit more specific yourself. :) And at least have a go!
Is this homework? It doesn't sound too difficult for you if it is exactly as you described. What part is it you are finding hard to start with?
You basically grab the value by using:
$var = $_POST['guess'];
so the value they have chosen is now in $var. You can then store the random number in a variable and compare them.
From there you let the user know if they guess right!
But if you want help in a specific part, you are going to have to be a bit more specific yourself. :) And at least have a go!
#3
Posted 03 December 2009 - 08:20 AM
POST the information over to a new php document which will test to see if the user guessed correctly. You'll use te php function rand() to generate a random number between 1 and 10. Then compare the random number with the users guess.
This part is a problem :)
Can you do it for me, pleasee..
This part is a problem :)
Can you do it for me, pleasee..
#4
Posted 03 December 2009 - 08:45 AM
this is pretty simple
we don't do it for you, but we help you do it.
don't you know anything of the thing above?
we don't do it for you, but we help you do it.
don't you know anything of the thing above?
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall
I study Information Systems at Karlstad University when I'm not on CodeCall
#5
Posted 03 December 2009 - 09:05 AM
This is for school. I just started with this class and I know very little about it..
#6
Posted 03 December 2009 - 02:27 PM
anyone...
please
please
#7
Posted 03 December 2009 - 02:32 PM
if you show me a try of how this second page could look like in your eyes, I'll help you fill in stuff
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall
I study Information Systems at Karlstad University when I'm not on CodeCall


Sign In
Create Account

Back to top









