/    Sign up×
Community /Pin to ProfileBookmark

Forum Software Update Problems…should be easy

Alright, here the code:

[code=php]$thisVersion = “0.5”;
echo “<p id=’version’>Frosty Forums Software Vesrion $thisVersion”;
$latestVersion = trim(@file_get_contents(“http://frostyforums.com/updatecheck/version.txt”));
if(!empty($latestVersion)) // in case this installation does not allow url fopen
{
if($thisVersion < $latestVersion)
{
echo ” (version $latestVersion is now available)”;
}
}
if(!empty($latestVersion)) // in case this installation does not allow url fopen
{
if($thisVersion = $latestVersion)
{
echo ” (You are up-to-date)”;
}
}
echo “</p>n”;

//
// http://frostyforums.com/updatecheck/version.txt
// Currently equals 1.0
//
[/code]

So, there is something wrong here and I can’t find it.
In the both variables show up.

Can someone help please?

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@The_Little_GuyMay 10.2006 — Try replacing this:
[code=php]if($thisVersion = $latestVersion) [/code]
With this
[code=php]if($thisVersion == $latestVersion) [/code]
Copy linkTweet thisAlerts:
@Paintball24authorMay 10.2006 — Alright, I'll try it.
Copy linkTweet thisAlerts:
@Paintball24authorMay 10.2006 — w00t!

Problem solved.

Thank you.

Would you like a personalize comment near that code?
Copy linkTweet thisAlerts:
@The_Little_GuyMay 10.2006 — Its up to you

And your welcome
Copy linkTweet thisAlerts:
@Paintball24authorMay 10.2006 — Its up to you

And your welcome[/QUOTE]

I will. ?
×

Success!

Help @Paintball24 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...