Hello Everyone, I have 1 textbox and a button in one form ..Now i want to make it in such a way that when he clicks the button it should go to http://mysite.com/file.php?=ENTERED+TEXT and in that page (http://mysite.com/file.php?=ENTERED+TEXT) there should be a frame with its source as ie. (src="http://anotherblog.com/ENTERED+TEXT+referrer")..So how do i do that ? Please help me ! Thank you..Contact me @ tch5416339@hotmail.com! I'm also willing to pay if you can help me out !
I'm a bit confused by your request so here's two examples, the first one will put the comments entered from the text box into the address bar, along with the referer page from which the user came from. <?php $referer = urlencode($_SERVER['HTTP_REFERER']); echo " <form action=file.php method=get> Comments:<br> <textarea name=comments cols=40 rows=6></textarea> <input name=referer type=hidden value=$referer> <P><input type=submit value=submit> </form> "; ?> PHP: file.php will simple echo out the address. <?php $referer = $_GET['referer']; $comments = urlencode($_GET['comments']); echo "http://mysite.com?file.php?comments=$comments","+","$referer"; ?> PHP: The second example will only echo out the address leaving the url intact in the address bar. <?php $referer = urlencode($_SERVER['HTTP_REFERER']); echo " <form action=file.php method=post> Comments:<br> <textarea name=comments cols=40 rows=6></textarea> <input name=referer type=hidden value=$referer> <P><input type=submit value=submit> </form> "; ?> PHP: file.php <?php $referer = $_POST['referer']; $comments = urlencode($_POST['comments']); echo "http://mysite.com?file.php?comments=$comments","+","$referer"; ?> PHP: The difference is POST & GET You should also not that you need use urlencode() and or urldecode() when you wish to view the url. example for either method: using GET or POST $referer = urldecode($_GET['referer']); $comments = urldecode($_GET['comments']); PHP: Anyway.. if its any thing else you need, just reply with more details and a full example of your requirements.
Theres no need to spam the forum with 3 replies, you have several hours to edit your post. Where are you putting the code, supply a url please or as requested explain yourself better with an example so there's no misunderstandings.