/    Sign up×
Community /Pin to ProfileBookmark

PHP & Facebook Share problem

I got this problem at my page, I got a quiz (check it out at [url]http://blt950.com/quiz[/url])

You get the score etc, but when I share on facebook, it always says the score is 0. No matter what I really get.

Can somone help me?

Source code:

[code=php]
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>

<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Blt950 – Quiz: Results</title>
<link rel=”stylesheet” href=”style.css” />

<meta name=”title” content=”Blt950 – Computer & Networking Quiz” />
<meta name=”url” content=”http://blt950.com/quiz/” />
<meta name=”image” content=”http://blt950.com/quiz/img/pc_man.png” />

<?php
if($_POST[‘Q1’] == “PC”) { $points++; }
if($_POST[‘Q2’] == “Windows 7”) { $points++; }
if($_POST[‘Q3’] == “NTFS”) { $points++; }
if($_POST[‘Q4’] == “4 GB”) { $points++; }
if($_POST[‘Q5’] == “F1”) { $points++; }
if($_POST[‘Q6’] == “8 Bit”) { $points++; }
if($_POST[‘Q7’] == “Basic Input/Output System”) { $points++; }
if($_POST[‘Q8’] == “Random Access Memory”) { $points++; }
if($_POST[‘Q9’] == “Personal Computer”) { $points++; }
if($_POST[‘Q10’] == “Processor”) { $points++; }
if($_POST[‘Q11’] == “Bytecode”) { $points++; }
if($_POST[‘Q12’] == “HyperText Markup Language”) { $points++; }
if($_POST[‘Q13’] == “A database where you can store values and strings”) { $points++; }
if($_POST[‘Q14’] == “1989 & 1993″) { $points++; }

if($points == 0) { $points = 0; }

if($points == 0)
{
echo ‘<meta name=”description” content=”I took a Computer & Networking Quiz at blt950.com/quiz
and I scored whole 0/14 points!”/>’;
}
elseif($points == 1)
{
echo ‘<meta name=”description” content=”I took a Computer & Networking Quiz at blt950.com/quiz
and I scored whole 1/14 points!”/>’;
}
elseif($points == 2)
{
echo ‘<meta name=”description” content=”I took a Computer & Networking Quiz at blt950.com/quiz
and I scored whole 2/14 points!”/>’;
}
elseif($points == 3)
{
echo ‘<meta name=”description” content=”I took a Computer & Networking Quiz at blt950.com/quiz
and I scored whole 3/14 points!”/>’;
}
elseif($points == 4)
{
echo ‘<meta name=”description” content=”I took a Computer & Networking Quiz at blt950.com/quiz
and I scored whole 4/14 points!”/>’;
}
elseif($points == 5)
{
echo ‘<meta name=”description” content=”I took a Computer & Networking Quiz at blt950.com/quiz
and I scored whole 5/14 points!”/>’;
}
elseif($points == 6)
{
echo ‘<meta name=”description” content=”I took a Computer & Networking Quiz at blt950.com/quiz
and I scored whole 6/14 points!”/>’;
}
elseif($points == 7)
{
echo ‘<meta name=”description” content=”I took a Computer & Networking Quiz at blt950.com/quiz
and I scored whole 7/14 points!”/>’;
}
elseif($points == 8)
{
echo ‘<meta name=”description” content=”I took a Computer & Networking Quiz at blt950.com/quiz
and I scored whole 8/14 points!”/>’;
}
elseif($points == 9)
{
echo ‘<meta name=”description” content=”I took a Computer & Networking Quiz at blt950.com/quiz
and I scored whole 9/14 points!”/>’;
}
elseif($points == 10)
{
echo ‘<meta name=”description” content=”I took a Computer & Networking Quiz at blt950.com/quiz
and I scored whole 10/14 points!”/>’;
}
elseif($points == 11)
{
echo ‘<meta name=”description” content=”I took a Computer & Networking Quiz at blt950.com/quiz
and I scored whole 11/14 points!”/>’;
}
elseif($points == 12)
{
echo ‘<meta name=”description” content=”I took a Computer & Networking Quiz at blt950.com/quiz
and I scored whole 12/14 points!”/>’;
}
elseif($points == 13)
{
echo ‘<meta name=”description” content=”I took a Computer & Networking Quiz at blt950.com/quiz
and I scored whole 13/14 points!”/>’;
}
elseif($points == 14)
{
echo ‘<meta name=”description” content=”I took a Computer & Networking Quiz at blt950.com/quiz
and I scored whole 14/14 points!”/>’;
}
?>

</head>
<body>
<center>

<p><img src=”img/logo.png” width=”279″ height=”53″ alt=”Blt950 Quiz” /></p>
<br />
<div id=”menu”>
<p><strong>Computer &amp; Network</strong></p>
<p><strong>Knowledge Quiz Result</strong></p>
</div>
<br />

<div id=”whitebox”><img src=”img/pc_man.png” width=”129″ height=”155″ alt=”Your Result” /></div>
<br />
<div id=”whitebox”>
<p><strong>Congratulations!</strong></p>
<p>You scored <?php echo $points; ?>/14 points!</p>
<p><a name=”fb_share” type=”button” href=”http://www.facebook.com/sharer.php”>Share</a><script src=”http://static.ak.fbcdn.net/connect.php/js/FB.Share” type=”text/javascript”></script>&nbsp;</p>
</div>
</center>
</body>
</html>
[/code]

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @blt950 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 5.19,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...