Devastate Posted February 17, 2010 Share Posted February 17, 2010 Ok let me really pick at the experts here on this one.. My job is supervisor of a rather large NOC in the DC metro area.. Every day I have a morning tech and an evening tech do a walkthrough. Up till now we use paper and walk around with a clipboard and physically look and then check a box when we do something.. I'd like to eliminate the paper and do this with a form.. So I've done up a form which has check boxes. My question is when I setup the query page how will it know if a box has been checked or not and how to display a checkbox? right now I have teh sql entries as tinybit(1) simplifying this of course but would the query read something like this? if back_dooralm_dca = 1 show check.jpg if back_dooralm_dca = 0 die Link to comment Share on other sites More sharing options...
DCSaints_fan Posted February 17, 2010 Share Posted February 17, 2010 Been a long time since I've messed around with that, but it sounds like you're a bit confused. The checkbox is entirely client side. The PHP code is server side. You would have to write a javascript onSubmit() to include the values in the form when you hit the submit button (or whatever you call it) Alternatively i believe you could do something every time a box is checked. Edit: check out this example http://www.w3schools.com/html/html_forms.asp Actually you don't need javascript, and I'm not sure why you would need MySQL. The PHP code can extract the values for each checkbox. I'm a bit too lazy at the moment to look up how exactly you do that. Link to comment Share on other sites More sharing options...
Smoot Point Really Posted February 18, 2010 Share Posted February 18, 2010 Why don't you have them toggle a power switch on every chassis... That way you will know they did their checks with all the alarms going off... Link to comment Share on other sites More sharing options...
PeterMP Posted February 18, 2010 Share Posted February 18, 2010 I'm not sure why'd you go to SQL just to check if boxes are checked: http://www.htmlcodetutorial.com/forms/_INPUT_TYPE_CHECKBOX.html http://www.html-form-guide.com/php-form/php-form-checkbox.html I normally only go SQL to then store the data in database and query from the database. Link to comment Share on other sites More sharing options...
Veretax Posted February 18, 2010 Share Posted February 18, 2010 you could write the data to XML or plain text file with javascript as well, php might be easier though if your more familiar with it. Link to comment Share on other sites More sharing options...
zCommander Posted February 18, 2010 Share Posted February 18, 2010 All I see in your OP some chick that needs to be checked. So are you now going to walk around with a laptop in your hand? Or you are going to still use a clipboard with a printed form on a piece of paper? Check is a bit in SQL by the way. And in a query you can say if true or yes. This is from MS SQL so might be a little different in my SQL. Why not just do it in Access database. It is alot easier and simpler. Link to comment Share on other sites More sharing options...
Devastate Posted February 18, 2010 Author Share Posted February 18, 2010 All I see in your OP some chick that needs to be checked. So are you now going to walk around with a laptop in your hand? Or you are going to still use a clipboard with a printed form on a piece of paper? Check is a bit in SQL by the way. And in a query you can say if true or yes. This is from MS SQL so might be a little different in my SQL. Why not just do it in Access database. It is alot easier and simpler. Because when they get full they get slow and stupid. Link to comment Share on other sites More sharing options...
chipwhich Posted February 18, 2010 Share Posted February 18, 2010 Because when they get full they get slow and stupid. You won't "fill" up an Access database that easy. Plus if you were to put enough data in it to get bloated (which you wont from what you describe) there are means to fix it. I would rather my employee build this in Access which would take me all of a day, then try and right a customer coded app in PHP/MySQL. As per the thread, the above post regarding javascript is the correct answer. Link to comment Share on other sites More sharing options...
Devastate Posted February 18, 2010 Author Share Posted February 18, 2010 well access is like falling off a log.. That's not going to challenge me at all. I like projects like this that serve a useful purpose and I can learn something from. I'll take a look at the js, makes sense.. Thanks guys Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.