freelancer Posted February 12, 2007 Share Posted February 12, 2007 Well, I got PHP script called addresult.php witch cointains input fields and form action is insert.php, if i put something into fields then this data will be stored into my database, but if I leave all fields empty then it still stores it into db as empty. How I can avoid this? Thanks Link to comment https://forums.phpfreaks.com/topic/38134-solved-sql-problem/ Share on other sites More sharing options...
btherl Posted February 12, 2007 Share Posted February 12, 2007 Check if the inputs are empty, using the function empty(). If they are empty, don't insert the data into the database. Link to comment https://forums.phpfreaks.com/topic/38134-solved-sql-problem/#findComment-182561 Share on other sites More sharing options...
freelancer Posted February 12, 2007 Author Share Posted February 12, 2007 Thank you mate I forgot this Link to comment https://forums.phpfreaks.com/topic/38134-solved-sql-problem/#findComment-182570 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.