shad_dow Posted July 6, 2006 Share Posted July 6, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/13856-help-how-to-make-a-version-checker/ Share on other sites More sharing options...
.josh Posted July 6, 2006 Share Posted July 6, 2006 so uh, what exactly are you stuck on. Quote Link to comment https://forums.phpfreaks.com/topic/13856-help-how-to-make-a-version-checker/#findComment-53924 Share on other sites More sharing options...
wildteen88 Posted July 6, 2006 Share Posted July 6, 2006 Well what do you want it do when its the correct version? Quote Link to comment https://forums.phpfreaks.com/topic/13856-help-how-to-make-a-version-checker/#findComment-53926 Share on other sites More sharing options...
shad_dow Posted July 6, 2006 Author Share Posted July 6, 2006 hiits 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 ??? Quote Link to comment https://forums.phpfreaks.com/topic/13856-help-how-to-make-a-version-checker/#findComment-53932 Share on other sites More sharing options...
.josh Posted July 6, 2006 Share Posted July 6, 2006 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? Quote Link to comment https://forums.phpfreaks.com/topic/13856-help-how-to-make-a-version-checker/#findComment-53938 Share on other sites More sharing options...
shad_dow Posted July 6, 2006 Author Share Posted July 6, 2006 basicly say there using v1.0 and on the server is v2.0 , i wanted a way for the script to check and tell them that a new version is avaible for download .and yes i am trying to run before i can walk :) Quote Link to comment https://forums.phpfreaks.com/topic/13856-help-how-to-make-a-version-checker/#findComment-53943 Share on other sites More sharing options...
shad_dow Posted July 6, 2006 Author Share Posted July 6, 2006 hiIve Solved IT Thank you to those that helped cheers Quote Link to comment https://forums.phpfreaks.com/topic/13856-help-how-to-make-a-version-checker/#findComment-54033 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.