|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
Please help
Hello, Matt
I tried your form code from online. I copied it to my local server. But for some reason when I click "Click Me". It will give me "Hmm...you must have come to this script without clicking the button." message The right answer should be "Great! You clicked the button!" after I click the button. Do you know why possibly that happened? Thanks alot. Here is your code: <HTML> <HEAD> <TITLE>A simple form</TITLE> </HEAD> <BODY> <FORM method="POST" action="form.php"> <INPUT type="submit" name="mybutton" value="Click me!"> </FORM> </BODY> </HTML> <HTML> <HEAD> <TITLE>Doing something with the form</TITLE> </HEAD> <BODY> <? if(isset($_POST['mybutton'])) { echo "Great! You clicked the button!n"; } else { echo "Hmm...you must have come to this script without clicking the button.n"; } ?> </BODY> </HTML> |
|
#2
|
|||
|
|||
|
RE: Please help
there is nothing wrong with that code. In fact i tested it out just to make sure i wasnt missing anything, works fine. Are you sure thats exactly what you copied?
|
|
#3
|
|||
|
|||
|
RE: Please help
What version of PHP do you use.
If lower then 4.1.0 you should use $HTTP_POST_VARS['mybutton'] instead of $_POST['mybutton'] |
|
#4
|
|||
|
|||
|
RE: Please help
Good call v_jansen, that is the only thing I can think of also. Pre v4.1.0 didn't have the $_POST superglobal...
|
|
#5
|
|||
|
|||
|
RE: Please help
actually I am not sure which version of PHP. All I do was upload the php files to Red Hat Linux server which owned by my school. Should I ask my school about it? But what should I ask them?
please don't mind my silly questions. Thanks all |
|
#6
|
|||
|
|||
|
RE: Please help
Hi everybody, I just asked my school's adm. I used version it is under PHP 4.0. I fixed my problem.
Thank you guys very much and I think this place is great!! |
|
#7
|
|||
|
|||
|
RE: Please help
In the furure to get all your information create a page call it phpinfo.php and add the following line
Code:
<? phpinfo(); ?> Then view your page in a browser |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > Please help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|