Calender application not updating "directly" after

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lcky13
Forum Newbie
Posts: 8
Joined: Sat Nov 26, 2005 9:28 pm

Calender application not updating "directly" after

Post 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?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post 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.
lcky13
Forum Newbie
Posts: 8
Joined: Sat Nov 26, 2005 9:28 pm

Post 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 ?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post 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
lcky13
Forum Newbie
Posts: 8
Joined: Sat Nov 26, 2005 9:28 pm

Post 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!
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

As I suggested :lol: Enjoy!
Post Reply