May 17, 2010

Results page in other window

Question by xRobot

I have this simple form:

<form method="post" action".">
<input type="text" name="title">
<input type="submit" name"send">
</form>

I want that when a user click on submit, then will be open another window of browser with the results. Is it possible ?

Answer by andr

If you just need to open a new window:

<form method="post" action="..." target="_blank">
...

If you want a popup or lightbox or anything scripty:

<form method="post" action="..." onsubmit="yourFunction()">

Answer by Starx

Use this

<form method="post" action"thepagetodisplay.php">
<input type="text" name="title" id="title">
<input type="submit" name"send">
</form>

on thepagetodisplay.php

extract($_POST);
echo $title;

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+

...

Please fill the form - I will response as fast as I can!