Page 1 of 1

NEWBIE QUESTION

Posted: Tue Jan 09, 2007 5:03 pm
by davec
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Hi all

Im looking for the image link url thats inputted in form item 1 and 2, to display the actual image in the resulting php page, not the text but the image itself :-

FORM.HTM

[syntax="html"]<html>
<body>

<form action="htmlform.php" method="post">
image link 1 <input type="text" name="image1" />
image link 2 <input type="text" name="image2" />
Product Description: <textarea rows="2" name="product" cols="20"></textarea>
<input type="submit" />
</form>

</body>
</html>
HTMLFORM.PHP[/syntax]

Code: Select all

<html>
<body>
Image 1 = <?php echo $_POST["image1"]; ?>.<br />
Image 2 = <?php echo $_POST["image2"]; ?> br />
Product Description =  <?php echo $_POST["product"]; ?>
</body>
</html>
Can anyone give me an answer to this as Ive tried many different ways but cant get the result needed

Thanks


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

[quote="[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1"][b]2.[/b] Use descriptive subjects when you start a new thread. Vague titles such as "Help!", "Why?" are misleading and keep you from receiving an answer to your question.[/quote]

Posted: Tue Jan 09, 2007 5:09 pm
by aaronhall
Be sure to read the posting guidelines -- you've already violated a couple.

Code: Select all

<img src="<?php echo urlencode($_POST['image1']); ?>" />

Posted: Tue Jan 09, 2007 5:32 pm
by davec
Apologies for that.

Thank you very much for the solution and for the extremely fast reply,