Posted by NC on 09/22/06 00:35
jayparaiso@gmail.com wrote:
>
> form action="index.php#order" method="post" name="image1" id="image1">
> <input name="image1" type="submit" id="image1" value="Buy!">
>
> form action="index.php#order" method="post" name="image2" id="image2">
> <input name="image2" type="submit" id="image3" value="Buy!">
>
> <form name="form1" method="post" action="thankyou.php">
>
> <?php
> if ($_POST[image1]) {
> echo "<img src=\"image/image1.jpg\">";
> }
> if ($_POST[image2]) {
> echo "<img src=\"image/image2.jpg\">";
> }
> ?>
>
> i want in thankyou.php to echo the selected image in index.php#order.
Your forms are messed up. Try this:
<form action="index.php#order" method="post">
<input name="image1" type="submit" id="image1" value="Buy!">
</form>
<form action="index.php#order" method="post">
<input name="image2" type="submit" id="image2" value="Buy!">
</form>
<?php
if (isset($_POST['image1'])) {
echo "<img src=\"image/image1.jpg\">";
}
if (isset($_POST['image2'])) {
echo "<img src=\"image/image2.jpg\">";
}
> ?>
Cheers,
NC
Navigation:
[Reply to this message]
|