NEWBIE QUESTION

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
davec
Forum Newbie
Posts: 2
Joined: Tue Jan 09, 2007 4:48 pm

NEWBIE QUESTION

Post 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]
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post 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']); ?>" />
davec
Forum Newbie
Posts: 2
Joined: Tue Jan 09, 2007 4:48 pm

Post by davec »

Apologies for that.

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