1 Reply Latest reply on May 29, 2012 12:45 AM by BenPleysier

    show region is recordset is empty

    Jos46 Level 1



      Sorry for my poor English, it's not my first langague!


      I have a registration table (user_registration) with lot of fields but to similutate the user to register I have put only 3 field

      name, email, password


      When they log for the first time, I want to query my table to check for the phone entry. I did not request the phone in my registration form so I know the phone is not there.

      What I'm trying to do is to query for the phone entry and since the phone is missing I want to show a text "you did not complet your profile"

      once they complet the registration I'm going to display all results


      I'm using session variable MM_Username in my profile page. It's working...only show if empty or show if not empty it's not working. I don't know what do to...


      //if no phone

      <?php if ($totalRows_users['phone'] == 0) { // Show if recordset empty ?>



            <td>if phone is missing we display - complet your profile bla bla bla</td>



      <?php } // Show if recordset empty ?>


      //if phone is present

      <?php if ($totalRows_user['phone'] > 0) { // Show if recordset not empty ?>

        <p>displya all information from the table

          <?php } // Show if recordset not empty ?>


      What I'm doing wrong?