Sending the contents of an iframe to php


#1

I want to send the data of an iframe to a PHP script. I searched everywhere but I can’t find how should I send the data.


#2

Um, why?

:see_no_evil::hear_no_evil::speak_no_evil:


#3

What is the REAL problem you are trying to solve, not your attempt at solving it?


#4

I am rendering the user input data to an iframe. But I also want to store the user input as text files. So I want to send the contents of the iframe to php.


#5

Is there a form in the I-frame?


#6

The iframe is inside a form like this:


#7

And the only way I can see a need for this is for spoofing a site and trying to collect the information entered. If this is your form, you WOULD NOT need an iframe to get values from anything.


#8

I need this because I am making an online live HTML preview app. The user will enter the code and would see the results instantly. I have made it work. But I think I should make a way so that the user could save what they have written. For this, I want to send the contents of the iframe to PHP so that the server would store the code that the user has entered and can retrieve it whenever required.


#9

That still doesn’t make sense. You wouldn’t need to store the iframe contents if they entered code into an input that the iframe uses. Try again.


#10

Yes, you are right, I should store the code that the user enters in the input area rather than storing the iframe. I think this should do my job. Thanks!