0

Here's the scenario, upon successfully installing our software, we launch your web browser and display a thank you page.

I'm trying to figure out how to display an additional block of html that notifies the user if they've just installed an older version and provides a download link to the latest.

Upon install, an older version would display something like this: www.oursite.com/thanks/?v=2.2.0

While the current version should generate something like this www.oursite.com/thanks/?v=3.0.0.20932

(They both bring you to the same page, just have a different token)

I've considered adding redirects to our .htaccess -but we've released many incremental versions and that could get messy quick.

We're running wordpress - so php or js should work fine, i just don't have the programming chops for something like this and don't even know where to begin.

1
  • @Xeon06 has the simplest solution. There's no need include .htaccess. If they're visiting your site, store the latest version in a database, query the latest version number, then compare the $_GET. Commented Sep 7, 2011 at 16:21

1 Answer 1

3

You could simply compare the version string with a "latest version" constant that you would update manually.

<?php
    define(LATEST_VERSION, "3.0.0.20932");

    if ($_GET['v'] != LATEST_VERSION)
        echo "<p>You don't have the latest version.</p>";
?>
Sign up to request clarification or add additional context in comments.

1 Comment

If I have helped you, please consider clicking the green checkmark to the left of my post to accept my answer as the solution to your problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.