CraigH Posted March 31, 2008 Share Posted March 31, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/98792-form-to-iframe-on-another-page/ Share on other sites More sharing options...
MadTechie Posted March 31, 2008 Share Posted March 31, 2008 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" Quote Link to comment https://forums.phpfreaks.com/topic/98792-form-to-iframe-on-another-page/#findComment-505518 Share on other sites More sharing options...
CraigH Posted March 31, 2008 Author Share Posted March 31, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/98792-form-to-iframe-on-another-page/#findComment-505532 Share on other sites More sharing options...
MadTechie Posted March 31, 2008 Share Posted March 31, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/98792-form-to-iframe-on-another-page/#findComment-505542 Share on other sites More sharing options...
CraigH Posted March 31, 2008 Author Share Posted March 31, 2008 I'm using an iframe for the Autotrader links, when you click on one of the cars if you've used PHP to bring in the content then they don't work, so i have to keep it inside of an iframe. Quote Link to comment https://forums.phpfreaks.com/topic/98792-form-to-iframe-on-another-page/#findComment-505549 Share on other sites More sharing options...
MadTechie Posted March 31, 2008 Share Posted March 31, 2008 if you use framesets you can just change the target to the name of the frame and the new page Quote Link to comment https://forums.phpfreaks.com/topic/98792-form-to-iframe-on-another-page/#findComment-505562 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.