Jump to content

Form to iFrame on another page?


CraigH

Recommended Posts

Hi.

 

I'm currently trying to get a form to process from one page to another to bring up the info inside of an iframe. I can get this to work no bother is the frame is on the same page, but i can't seem to get then form's information to process to another page.

 

I've been trying to do this in ASP as a friend had code which was similar to what i was after, but i don't know anything about ASP so i'm having trouble with that, i know a little PHP coding in that would be best.

 

If anyone knows how to do this, or has a tutorial on it that would be great.

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/98792-form-to-iframe-on-another-page/
Share on other sites

this isn't a PHP problem is a HTML/CSS problem your need to post their

 

as a side note,

it seams a little weird (at least to me) what your trying to do.

you could post to its own page and update the scr of the iframe to include the get ie

src="frame.php?name=123&lastname=345"

Hi

 

Thanks for replying.

 

With the ASP code that i got it has ASP on the in the search page which picks up the search from the index page. I'm really looking to get those 4 options from one page to another, so for that i wouldn't need any ASP, this is just a HTML thing?

 

http://blue42media.co.uk/henson/index.asp

i don't see why your using iframe..

 

heres a very basic example of php posting to itself from a form

 

<html>
<head>
<title>any old form</title>
</head>
<body>
Just a normal page with a form and a little php
<?php
if(isset($_POST))
{
$car = $_POST['car'];
$bike = $_POST['bike'];
$whatever = $_POST['whatever'];
echo "you typed: $car, $bike, $whatever";
}else{
?>
<form method="post">
<input name="car" type="text" value="balr" /><br>
<input name="bike" type="text" value="balr" /><br>
<input name="whatever" type="text" value="balr" /><br>
</form>
<?php
}
?>
</body>
</html>

 

if you didn't want the whole page to refresh then you would need to look into ajax.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.