Hi,
I’m trying to make a script for a pixel ad site. So far I have come up with this;
On the index page:
<form action=buy.php method=post ><td colspan=3 height=1000 valign=top background=images/grid3.gif>
<input name=whereami type=image class=botborder src=images/px.gif align=top width=”1000″ height=1000 />
</form>
When you click on the image on this page it takes you to buy.php
on buy.php there is a form with the x location and y location of the image that was clicked on, heres what this looks like:
<?php
$xloc = $_POST[‘whereami_x’]; // x co-ordinate
$yloc = $
//this is making the grid give blocks of 10 pixels. so first block is 0,0 next box is 1,0 and so on.
$x_loc = floor($xloc/10);
$y_loc = floor($yloc/10);
echo ‘<br />x =’.$x_loc;
echo ‘<br />y =’.$y_loc;
?>
On the form the customer can choose number of horizontal and vertical blocks for their image. Once they submit form it goes to confirm.php. Now, this is where I’m having a problem. On confirm.php I want it to check if the the number of blocks the customer chose would overlap an image of an existing customer (I have a table in mysql database that stores x and y locations, number of width blocks and height blocks of existing customers). I have absolutely no idea how to do this.
I would apreciate if anyone can give me any ideas or suggestions on this.
Many thanks in advance