Page 1 of 1

Calender application not updating "directly" after

Posted: Wed Nov 30, 2005 7:16 pm
by lcky13
On my main page I have a calender (html table loop) that displays and has dropdowns for both month and year and a submit button.

The table will match the correct month and year. However, below the table I have another form to insert some stuff into the calender, such as names, times, and equipment.

My problem is after I submit the stuff into the form form below the calender, the calender does not reflect the changes until I either
A) submit another Item;
or
B) click the calender update button from up top next to the calender;

Its like the webpage reads from the database before the entry is submitted.

Any ideas?

Posted: Wed Nov 30, 2005 7:20 pm
by John Cartwright
Not particularly sure as to what you mean :?

Could you post a live example and perhaps the relevant code. If it is too much perhaps post a link to the code.

Posted: Wed Nov 30, 2005 7:24 pm
by lcky13
Another thing Id like to mention is that my form action is $PHP_SELF. IE submitting to itself.
Could this be causing the page to miss the changes to the mysql ?

Posted: Wed Nov 30, 2005 7:28 pm
by John Cartwright
lcky13 wrote:Another thing Id like to mention is that my form action is $PHP_SELF. IE submitting to itself.
Could this be causing the page to miss the changes to the mysql ?
As long as the mysql changes are on the same page or are included somewhere on the page. From what I can tell it sounds as if you are


1) Information entered and submitted form
2) Pulling the information from the database
3) THEN updating the database

2-3 should be switched if thats the case.. other than that I cannot help furthur unless you give us more information

Posted: Wed Nov 30, 2005 9:09 pm
by lcky13
Figured it out!
My problem was that I had the select statement occuring before the insert. I moved the insert along with the $_post variables from form insert variables up above the select function and the calender will now refresh after an insert!

thanks for everyones time!

Posted: Thu Dec 01, 2005 12:26 am
by John Cartwright
As I suggested :lol: Enjoy!