Moron Posted August 25, 2006 Share Posted August 25, 2006 I'm working on an employee leave program. The employee puts the employee number in and all sorts of wonderful things happen! :oBut..... if they put in an invalid (nonexistent) employee number or just some gobbledegook, how can I give them a nice, clean "invalid entry" notice as opposed to SQL errors all over the page? Quote Link to comment Share on other sites More sharing options...
AndyB Posted August 25, 2006 Share Posted August 25, 2006 Do a SELECT from database using their empl. number and then check the number of database rows returned from the query result (use mysql_num_rows). If the number of rows returned isn't 1, then their emp. number wasn't found. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.