adamjblakey Posted July 31, 2007 Share Posted July 31, 2007 Hi, I have a site here: ukadulthomepage(dot)co.uk/index.php?verify=true Which functions fine apart from when i add a pixel i can add another one over the top of this which should not happen. Here is the code for the site for when a block is chosen, but i need it to check some where in here that it is not covering an existing block. <?php $posx = $_GET[x]; $posy = $_GET[y]; $startx = 0; $endx = 0; $starty = 0; $endy = 0; if ($_GET[ox] > $posx) { $startx = $posx; $endx = $_GET[ox]; } else { $startx = $_GET[ox]; $endx = $posx; } if ($_GET[oy] > $posy) { $starty = $posy; $endy = $_GET[oy]; } else { $starty = $_GET[oy]; $endy = $posy; } $width = ((($endx+1) - $startx)*10); $height = ((($endy+1) - $starty)*10); $totblocks = (($endx+1) - $startx) * (($endy+1) - $starty); $price = $totblocks * 4; ?> Thank you in advance for you help. Adam Quote Link to comment https://forums.phpfreaks.com/topic/62622-pixel-home-page-i-have-a-problem/ Share on other sites More sharing options...
adamjblakey Posted July 31, 2007 Author Share Posted July 31, 2007 Sorry i should have mentioned how the existing entries are stored. I am using an XML database. And is stored like this: <?xml version="1.0" encoding="UTF-8"?> <news> <item> <id>1</id> <user>1185868374</user> <posx>16</posx> <posy>8</posy> <image>1.noimage.JPG</image> <link>http://www.test.com</link> <alt>Test</alt> <w>10</w> <h>10</h> </item> </news> Cheers Quote Link to comment https://forums.phpfreaks.com/topic/62622-pixel-home-page-i-have-a-problem/#findComment-311752 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.