1

I created a product using php that I want to put on a website, but before I can do that I have to get it to update automatically. For example I have version 1.0 and there is a new version 1.2 it has to automatically ask the user to update and update if he/she has chosen to. I have part of the code to show the newest version:

$newest_version = '1.2.0';
$old_version = '1.1.0';

So actually I want it to do:

    Ask the user if he/she want to update their version of the product.
    Update the version if the user selected to.
    Check for newer version every couple of minutes/seconds.

Basically:

    Let the user upgrade their installations of my product automatically.(With PHP)

Community
  • 1
  • 1
  • `if ($_SESSION['current_version'] < $newset_version) { promptUserToUpdate() ; }` – Royal Bg Nov 16 '13 at 11:43
  • @andrewsi, Sean, torazaburo, DaveA, Soner.I have provided enough information so why is my question on hold –  Nov 17 '13 at 16:32
  • See: http://stackoverflow.com/questions/723791/what-are-best-practices-for-self-updating-phpmysql-applications – Shog9 Jan 12 '14 at 20:21

1 Answers1

0

Try using this:

if($_SESSION['current_version'] < $newest_version)
    {
        promptUpdate();
    }
123
  • 515
  • 1
  • 5
  • 20