| Welcome to WebmasterWorld Guest from 184.108.40.206 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Become a Pro Member|
|Pass URL From Form To Iframe|
Hi all. I stink at PHP and you all rock so heres a question.
I want to make a 2 page app.
Page 1: Simple form that you can enter a url into
Page 2: Takes the URL from the form on page 1 and pops it into an iframe in page 2
Im guessing that somehow the URL on page 1 has to be passed into the URL as a variable and sucked into page 2 between the iframe tags.
Can anyone show me how to do this? Thanks so much.
[edited by: eelixduppy at 6:55 pm (utc) on Oct. 10, 2008]
[edit reason] removed URL [/edit]
<form action=page2.php method=get>
URL:<input type=text name=url size=50>
<input type=submit value=Load>
echo "<iframe src ='$url' width='100%'></iframe>";
Sorry in advance to all those who would dislike the html code above, since its not a Validation test.
When i use that I get errors:
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'inter'@'localhost' (using password: NO) in ***** on line 10
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/inter******************* on line 10
i took mysql_real_escape_string out of page 2 and it worked
Oops sorry that wasent needed, i think i was sleepy :)
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved