Jump to content

Help, How to make a Version Checker


shad_dow

Recommended Posts

hi

i would anybody to giude me in how i can use php to check via button in my scripts to see if theres a newer visions

so far i have this and now im stuck

[code]<?php
$currentVersion = "1.0";
header("Content-type: text/plain");

if($_GET['version'] == $currentVersion) {
// do nothing
} else {
echo "<div><p>A new version of the Sample theme, version $currentVersion, is now available. Your installed version is ${_GET['version']}.</p></div>";
}

?>
[/code]

thanks
Link to comment
Share on other sites

hi

its supposed to some how check agaist <?php $installedVersion = "1.0"; ?> on the sever

[code]<?php
$currentVersion = "1.0";
header("Content-type: text/plain");

if($_GET['version'] == $currentVersion) {
// do nothing
} else {
echo "<div><p>A new version of the Sample theme, version $currentVersion, is now available. Your installed version is ${_GET['version']}.</p></div>";
}

?>
[/code]

if version does not = currentversion it shold then run the echo ,

my prob is how do i get the $_GET['version']  from checking $installedVersion ,

do i create a form ???
Link to comment
Share on other sites

ah. so you have put the cart before the horse, so to say.

the GET method is most commonly used with dynamic links.  maybe it would help if you explained what it is that you are trying to get the version of? are you wanting the user to enter in their current version number of whatever, and then you check it? is your script supposed to auto-detect the user's version number for whatever?
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.