£20 reward for first solution to this:
Posted: Mon May 16, 2011 3:39 pm
OK, follwing on from this post:
viewtopic.php?f=1&t=129755
I desperately need a solution. I am offering £20 (or equivalent currency) payable through Paypal to solve my problem. I have produced a really cut down test-case here:
If you run this code you will see it goes wrong when you "Click left" when I am trying to run the code that links to a spot in the file. When you "Click right" the code works fine as there is no attempted use of an anchor. So either my understanding of php/html is wrong, or I have just made a basic mistake.
To claim the £20, I need
1) To know where I am going wrong
2) To be given the correct solution (i.e.code)
Please note, "Use javascript" is not a satisfactory reponse to get the Wonga. I can deal with php, html and CSS, but a JS solution is no good to me unless you provide the exact code that will work when I put it in my real code.
Any questions, please PM me. I am UK based, so there me a time delay.
If this is against forum rules I appologise in advance.
viewtopic.php?f=1&t=129755
I desperately need a solution. I am offering £20 (or equivalent currency) payable through Paypal to solve my problem. I have produced a really cut down test-case here:
Code: Select all
<?php
if(!isset($_SESSION)) {
session_start();
}
if(!isset($_SESSION['hits'])) {
$_SESSION['hits'] = 0;
}
if( isset($_GET['image_shift'])) {
if( $_GET['image_shift'] == "right" ) {
$_SESSION['hits'] = $_SESSION['hits'] + 1;
}
if( $_GET['image_shift'] == "left" ) {
$_SESSION['hits'] = $_SESSION['hits'] + 1;
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Rotate images</title>
</head>
<body text="#000000" style="background-color:#f1f0f1; text-align:center; height:1400px;">
<div style="background-color:#ffffff;text-align:left;margin-left:auto;margin-right:auto;position:relative;width:800px;height:1400px;">
<?php
echo "<div style=\"position:absolute; left:410px; top:420px; width:100px; height:90px;\">";
echo "<a href=\"wrong.php?image_shift=right\">\n";
echo "Click right";
echo "</a>\n";
echo "</div>\n";
echo "<div style=\"position:absolute; left:100px; top:420px; width:100px; height:90px;\">";
echo "<a href=\"wrong.php?image_shift=left#bob\">\n";
echo "Click left";
echo "</a>\n";
echo "</div>\n";
echo "<div style=\"position:absolute; top:200px; left:250px;\">\n";
echo $_SESSION['hits'] . " hits on my counter<br />";
echo "</div>\n";
echo "<div style=\"position:absolute; left:90px; top:600px; width:260px; height:90px;\">";
echo "<a name=\"bob\">text that the left hit jumps to</a>\n";
echo "</div>";
?>
</div>
</body>
</html>To claim the £20, I need
1) To know where I am going wrong
2) To be given the correct solution (i.e.code)
Please note, "Use javascript" is not a satisfactory reponse to get the Wonga. I can deal with php, html and CSS, but a JS solution is no good to me unless you provide the exact code that will work when I put it in my real code.
Any questions, please PM me. I am UK based, so there me a time delay.
If this is against forum rules I appologise in advance.