tamumech Posted June 16, 2007 Share Posted June 16, 2007 Howdy, I am building a website that will create a massive database. I need to make a spreadsheet where a registered user can input data that will be stored in a MySQL database. Each spreadsheet submitted will be about 25 rows and 15 columns (375 elements). Should I basically make a form with each field a cell in the spreadsheet? Or is there an easier way? Quote Link to comment https://forums.phpfreaks.com/topic/55796-making-a-spreadsheet-form-in-php/ Share on other sites More sharing options...
Psycho Posted June 16, 2007 Share Posted June 16, 2007 That is the easiest, but there are more sophisticated methods that would involve using 3rd party tools (free or paid). I've seen a spreadsheet like control that was very slick, but I cannot find it right now. But, utilizing a little CSS you could certainly utilize text fields that look and work much like a spreadsheet. I even have a script somewhere that allows me to navigate through the fields in a "table" form just like you would in Excel. I can't seem to find it though - may be on my PC at work. Anyway, take a look at this mockup: <html><head> <style> .head { background-color: #cecece; text-align: center; border: 1px solid #696969; } .cell { border: 1px solid #cecece; } .cellinput { border-width:0px; width: 100px; } </style> </head> <body> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse:collapse;"> <tr> <td class="head"> </td> <td class="head">A</td> <td class="head">B</td> <td class="head">C</td> <td class="head">D</td> <td class="head">E</td> </tr> <tr> <td class="head"> 1 </td> <td class="cell"><input type="text" class="cellinput"></td> <td class="cell"><input type="text" class="cellinput"></td> <td class="cell"><input type="text" class="cellinput"></td> <td class="cell"><input type="text" class="cellinput"></td> <td class="cell"><input type="text" class="cellinput"></td> </tr> <tr> <td class="head"> 2 </td> <td class="cell"><input type="text" class="cellinput"></td> <td class="cell"><input type="text" class="cellinput"></td> <td class="cell"><input type="text" class="cellinput"></td> <td class="cell"><input type="text" class="cellinput"></td> <td class="cell"><input type="text" class="cellinput"></td> </tr> <tr> <td class="head"> 3 </td> <td class="cell"><input type="text" class="cellinput"></td> <td class="cell"><input type="text" class="cellinput"></td> <td class="cell"><input type="text" class="cellinput"></td> <td class="cell"><input type="text" class="cellinput"></td> <td class="cell"><input type="text" class="cellinput"></td> </tr> <tr> <td class="head"> 4 </td> <td class="cell"><input type="text" class="cellinput"></td> <td class="cell"><input type="text" class="cellinput"></td> <td class="cell"><input type="text" class="cellinput"></td> <td class="cell"><input type="text" class="cellinput"></td> <td class="cell"><input type="text" class="cellinput"></td> </tr> <tr> <td class="head"> 5 </td> <td class="cell"><input type="text" class="cellinput"></td> <td class="cell"><input type="text" class="cellinput"></td> <td class="cell"><input type="text" class="cellinput"></td> <td class="cell"><input type="text" class="cellinput"></td> <td class="cell"><input type="text" class="cellinput"></td> </tr> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/55796-making-a-spreadsheet-form-in-php/#findComment-275671 Share on other sites More sharing options...
tamumech Posted June 16, 2007 Author Share Posted June 16, 2007 Ok, I figured there was some other code out there better suited for the job but I guess not. But won't submitting so many elements one by one be a bit sluggish? btw thanks for your help. Quote Link to comment https://forums.phpfreaks.com/topic/55796-making-a-spreadsheet-form-in-php/#findComment-275672 Share on other sites More sharing options...
Psycho Posted June 16, 2007 Share Posted June 16, 2007 Well, they aren't submitted one by one, they are submitted all at once. I worked on a web-based application in the past where the client had 120 x 6 fields on one page. There was no real performance issue with the submission of the data. The only delay was caused by the fact that we were creating customized PDFs based upon the input. Doing database inserts should take no time at all as long as you do it efficiently. Quote Link to comment https://forums.phpfreaks.com/topic/55796-making-a-spreadsheet-form-in-php/#findComment-275674 Share on other sites More sharing options...
tamumech Posted June 16, 2007 Author Share Posted June 16, 2007 Ok good. Well thanks for your help! Let me know if you come across those scripts. -Thanks Tim Quote Link to comment https://forums.phpfreaks.com/topic/55796-making-a-spreadsheet-form-in-php/#findComment-275871 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.