Page 1 of 1

Form question

Posted: Fri May 30, 2008 10:33 am
by Todlerone
Hello all and TGIF (if it applies to you). [standard]Thank-you in advance for help with this posting[/standard]; Hehe..I have come along way in order to have fun with this code, however, I have a simple question and hope that the people who respond take it easy on me. I have only been coding with php since last November and have managed to provide my baseball league with a MySQL/PHP site for a full schedule, scores and standings which are self calculating (I'm happy with the result of the successful code I have written). It's seems I'm stuck on simple output for this question. To this point I have manually entered the scores into the database using phpMyAdmin. I tried making a form that used $_SERVER["PHP_SELF"] and was unsuccessful. I then created separate pages and was successful. The main reason why $_SERVER["PHP_SELF"] didn't work for me was how to handle the output of the form and the results. By this I mean I wanted the form to be put at the top of the page and the results underneath. I tried for several hours than just gave up. So please let me know how much of an idiot I'm being. My goal of this page is to add scores to a database. I first ask to select a date to enter scores for (selection list populated by MySQL database-this works great). I then generate a second form by querying and retreiving the selected dates info from the database (this also works great) I finally will INSERT the last forms info into the database. This all works if I keep them separate, I was just wondering how to do it with $_SERVER["PHP_SELF"] and how output is added in the loop if the condition for the loop if (!isset($_POST["AddScores"])) sometimes needs to display the form and other times to display the results? Sorry to be longwinded... :crazy:

Re: Form question

Posted: Fri May 30, 2008 11:04 am
by panic!