I need to check for variables passed in a GET from an iframe. Is this possible?
E.G how do I echo the variable $_GET['postID'] in the iframe?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Do you mean the get variables of the parent frame, from within the iframe? If you want to do that you’ll either need to pass the variable on in the iframe src, or write the value to the session and then read the session from within the iframe (if it’s on the same domain).
The child frame is a completely separate HTTP request, and can’t read any of the non-persistent data from the parent, unless the parent explicitly passes them along, or writes them to a (semi-)persistent datastore.