If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > PHP > how to chek this

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-14-10, 15:13
don_log don_log is offline
Registered User
 
Join Date: Jun 2008
Location: pakistan
Posts: 109
how to chek this

i have a filed namely 'name'
i want to check if user fill it so it continue but if your doesn't fill it
give me error that name filed is empty
i found a code about that but i am not sure and i am not chek this

if(is_empty($etc)){
echo "Fill something here";
}
is that right or i have to write another code and 1 thing more

how to check user fill email address or not like i heard that it checks if at the rate sign or any other thing
Reply With Quote
  #2 (permalink)  
Old 02-18-10, 03:24
bharanidharanit bharanidharanit is offline
Registered User
 
Join Date: Nov 2008
Posts: 115
you must post your variables first to do this.
page1.php have form like this
Code:
<form method="post" action="page2.php" >
<input type="text" name="some_name" />
<input type="submit" />
</form>
page2.php
Code:
<?PHP
if(empty($_POST['some_name']))
{
echo 'Enter Username';
}

?>
Reply With Quote
  #3 (permalink)  
Old 02-18-10, 04:31
don_log don_log is offline
Registered User
 
Join Date: Jun 2008
Location: pakistan
Posts: 109
thanks dude
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On