|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
checking a text field
I just want to check if a text field named "name" in the previous form, which was sumbitted to this page. I tried it with
if(!isset($HTTP_POST_VARS['name'])){ but it doesnt seem to work. I have the same problem with every text field. my script just always thinks there is something in it. But I want to return an error if the name is not entered. help! thx |
|
#2
|
|||
|
|||
|
RE: checking a text field
try:
if($HTTP_POST_VARS['name'] == ''){ |
|
#3
|
|||
|
|||
|
RE: checking a text field
You might want to also check the value on the client side with JavaScript.
if(form_name.name.value == ""){ alert("No Name"); return false; } Just a suggestion. |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > checking a text field |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|