jaydeesmalls Posted March 3, 2008 Share Posted March 3, 2008 Hi All, I work for a company where our staff is around 400 people, broken into departments of around 50-60. Everyday, we email everyone in the company "coverage" of who is here and who is not for each dept. And for those not here, who is covering for them, who is helping other people, who is training new people, who is in meetings, etc. Then as the day goes by, and people's agenda's start changing, the "coverage" starts to change and by the end of the day, one might have 50 emails regarding that day's coverage. That's about 1000 emails a month just for coverage. So, I'm trying to create a webpage where everyone in the company can go to see the coverage, instead of having it emailed to them. I've created a form consisting of drop down menus and text areas, which then gets processed using php. you can view it here http://www.indigeniuspeoples.com/bio_form.html to be displayed here http://www.indigeniuspeoples.com/biotest_form2.php the first problem I'm encountering is that unless you yourself have entered the info into the form, you cannot see the results. By this I mean, that if your buddy across the room filled out this form, you could not see what he filled out on your computer monitor. The second problem is auto refreshing. I keep getting something about POSTDATA. Third, how can I change the output color of the text from the text area. Fourth, how do I make a second submit button, which has a different function ( I want it to submit tentative coverage for the next day). I know this sound like a lot, and I appreciate any guidance with this. I am very new to php, and am sure I am ignorant to a lot of thing. Thanks in advance for any advice. Peace Quote Link to comment Share on other sites More sharing options...
Mario F. Posted March 3, 2008 Share Posted March 3, 2008 the first problem I'm encountering is that unless you yourself have entered the info into the form, you cannot see the results. By this I mean, that if your buddy across the room filled out this form, you could not see what he filled out on your computer monitor. Data will have to be stored somewhere for later retrieval. This can be a database or a simple text file. Judging from your requirements I'd say you need a database. You'll then need to create a new xxx.php to get data from the database, not from the form. The form will publish your data to the database instead. You can - and probably should, due to the form complexity - present the user with an intermediate page where is data is presented well formated and with two buttons where you ask them to either confirm their entries or go back and make amends. That page design is similar to your current biotest_form2.php. When the user presses submit, data is saved to the database. When he presses return, data is sent to back to the initial form. The second problem is auto refreshing. I keep getting something about POSTDATA. The message you are getting is created by your browser when it detects you are trying to refresh a page that contains data sent to it by the POST method. That is, your POST method has this page as the action attribute. This page is meant to process the form. When you refresh your browser is asking you if you wish to resend the form data for this page to process it once again. Why do you get this warning? Because your biotest_form2.php script could be doing other things than just creating the html. It could, for instance be writing to a database, or processing your credit card. When you refresh these operations get repeated (definitely not a good thing when it comes to your credit card). Naturally this is a consequence of your flawed designed when you assumed biotest_form2.php would be seen by everyone. This problem will go away if you change your design to what I suggest on the previous question. Third, how can I change the output color of the text from the text area. Cascading Style Sheets Fourth, how do I make a second submit button, which has a different function ( I want it to submit tentative coverage for the next day). For a quick solution <INPUT type="submit" name="oper" value="coverage"> <INPUT type="submit" name="oper" value="tentative"> your php then reads the $_POST['oper'] variable and acts differently according to its value of 'coverage' or 'tentative' Hope this helps Quote Link to comment Share on other sites More sharing options...
jaydeesmalls Posted March 3, 2008 Author Share Posted March 3, 2008 Thank you very much. I will give this a try. 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.