Update Iframes using php?
- Fruitpastles
-
Fruitpastles
- Member since: Oct. 13, 2005
- Offline.
-
- Forum Stats
- Member
- Level 10
- Blank Slate
I'm am aware of how to read the data submitted in html forms with php, but is there anyway to send things back? e.g. update the src of an iframe?
- henke37
-
henke37
- Member since: Sep. 10, 2004
- Offline.
-
- Forum Stats
- Member
- Level 30
- Blank Slate
Php works on the http level. The best it can do is to ask some sort of software that does or will run on the client to alter the state at the client.
Or in lazyman terms: use javascript.
Each time someone abuses hittest, God kills a kitten. Please, learn real collision testing.
- different
-
different
- Member since: Jul. 8, 2004
- Offline.
-
- Forum Stats
- Member
- Level 35
- Blank Slate
At 12/4/06 06:34 PM, Fruitpastles wrote: I'm am aware of how to read the data submitted in html forms with php, but is there anyway to send things back? e.g. update the src of an iframe?
Sure..
<html>
...
<body>
<iframe src="<?php echo $src; ?>"></iframe>
</body>
</html>
Then just change $src when you post your form. Though a much better (and compatible with all browsers) method would be to use includes.
> twitter.
- Fruitpastles
-
Fruitpastles
- Member since: Oct. 13, 2005
- Offline.
-
- Forum Stats
- Member
- Level 10
- Blank Slate
Thanks you two, especially different. Thanks a lot!

