0

Alrite, So i have a an entry page with a form on it, that simply enters the data into the specified database. I have a player stats entry page, and there are five lines for players. However, if not all 5 players play, I want it to check if that field is empty, and if it is, i don't want it to enter it into the database. Because when i enter a game, and i leave a player field blank, all it does is enter in all 0's for that player.

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by rajarajan07
0

Hi BTW8892,

Please post the code you have now so we can see what needs to be changed to help you.


Zagga

0

Just check with

if empty($_POST['player_stats'])
   echo "Not able to update in database";
else 
  //statements to update in database
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.