Forum Moderators: coopster

Message Too Old, No Replies

[Problem] After using $ post

         

sils

2:44 pm on Aug 30, 2009 (gmt 0)

10+ Year Member



Hey,
I wanted to update my page statues by notifying with system statues my visitors so they could see what's going on.
the options i made for myself were:
System online
system offline
maintaince Mode.
so basicly i made this system picker in my admin panel now when i choose one of them i sumbit them by using $_post to the statues.php which will be automaticly included in the site header..Problme is that it wont save the situation i picked in system.., So i ask your help to solve this problme?How do i make it save the system i sumbitted?

mack

3:29 pm on Aug 30, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



How are you trying to save the status. is it being writen to a database, text file or another method?

Also, I wouldent use post directly to the file that is being included within the pages. What I would do it post the data to a script file that isn't part of the site, have this file do the writing and then have the included fie do the reading.

One thing that springs to mind is this...

If you are writing your status info to a database does the status.php file have a database connection?

For example if your pages where set up like this...

include 'header.php';
include 'db.php';
include 'status.php';
echo 'content here';
include 'footer.php';

In the above example status.php would be able to work because the page, as a whole has a db connection, but if you simply opened status.php on its own it would have no way to connect to the database.

Mack.

sils

3:35 pm on Aug 30, 2009 (gmt 0)

10+ Year Member



Hey,
Thanks for the reply, I know have solved the issue using database..