Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2008
    Location
    pakistan
    Posts
    109

    Unanswered: 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

  2. #2
    Join Date
    Nov 2008
    Posts
    117
    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';
    }
    
    ?>

  3. #3
    Join Date
    Jun 2008
    Location
    pakistan
    Posts
    109
    thanks dude

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •