This script was made by my friend, but he is unavailable at the time being to go to for some help, so I'd see if I could get some here. I know only of HTML + CSS
Let me lay out a bit of the code I have.
$prod = $_POST['prod'];
header("Location: inc/paypal.php?username=". $username ."&prod=". $prod);
further down the page
<input type="text" value="<?php echo $data['username']; ?>" name="username" disabled>
<form method="post">
<select name="prod">
<option value="1">Product 1 - $1.00</option>
<option value="2">Product 2 - $19.99</option>
<option value="3">Product 3 - $29.99</option>
<option value="4">Product 4 - $39.99</option>
<option value="5">Product 5 - $49.99</option>
</select>
</form>
<input type="submit" name="submit1" value="Pay Via PayPal" />
Instead of using a dropdown, how can I use an image as an option to select, for instance:
<div id="img_display">
<img src="img/product-1.png" value="1">
<img src="img/product-2.png" value="2">
<img src="img/product-3.png" value="3">
</div>
I'd like to be able to select an image and get the value and forward it to the $prod
variable.
I have had a look around, and found things such as this http://jsfiddle.net/9rFKB/
But without a decent knowledge of JavaScript or PHP, I'm struggling badly. Any suggestions?