Jump to content

Load php page automatically


tiota

Recommended Posts

Hi,

 

I've been wondering if it is possible to load a php page according to certain time.

For example at 12:00 pm a php form will pop up automatically informing an employee to fill in something in the form, another form will pop up at 4:00 pm, etc...

 

 

Thanks in advance

 

Link to comment
Share on other sites

It can be done with cron jobs. Run a specific script at specific time from cron job and trigger a flag in database.

 

Like

PAGE: cronjob.php    @ 4.00 pm

mysql_query("UPDATE pf_events SET notify='1'");

 

PAGE : index.php

 

Select flag from database.

 

$selectflag = "SELECT * FROM pf_events'";
$selectflag2=mysql_query($selectflag);
$selectflag3=mysql_fetch_array($selectflag2);
if($selectflag3[notify] == "1")
{
// paste your popup code here
}
}

Also, you can create another cron job script and run it on 4:05 PM daily to set notify flag again to 0

Link to comment
Share on other sites

Another scenario, by using windows scheduler you can ...

 

1. php script is on website

2. employee does not currently have browser open

3. at appointed time, scheduler starts browser pointed to website script

4. employee performs task

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.