Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Suppose we receive a form submitted by a post to subscribe to a newsletter. This form has only one field, an input text field named email. How would we validate whether the field is empty? Print a message "the email cannot be empty" in this case?



Suppose we receive a form submitted by a post to subscribe to a newsletter. This form has only one f..

Answer / Uttam Kumar Singh

In PHP, you can use the $_POST superglobal array to access the submitted data. To check if the 'email' field is empty, you can use the empty() function: if(empty($_POST['email'])) { echo "the email cannot be empty"; }

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

How to read the entire file into a single string?

1 Answers  


What are the ways we can destroy a session variable ?

3 Answers  


Would you initialize your strings with single quotes or double quotes?

4 Answers  


What are the two types of variables?

1 Answers  


In what are the ways you can encrypt the password ?

7 Answers  


What is php and how do you use it?

1 Answers  


How do you find the length of a string in php?

1 Answers  


If the variable $a is equal to 5 and variable $b is equal to character a, what’s the value of $$b? Can anyone explain how's the value of $$b=100

15 Answers   ABC, Asan, Indivar, Swistro Marketing Solutions,


What is the difference between get & post ?

1 Answers  


Is php faster than python?

1 Answers  


Where is session value stored?

1 Answers  


client side scripting language Vs server side scripting language

7 Answers   IBM, IRT,


Categories