Hello, I have a main page say main.php that brings up a poll program with iframe. The poll file is called pollq.php.
Main page brings the polll like this:
<iframe src="poll/pollq.php" frameborder="0">
</iframe>
In pollq, I have the following code, to obtain the page name. $kat below equals poll.
$a= $_SERVER['PHP_SELF'];
$aa=explode("/",$a);
$kat=$aa[1];
My question is, when I bring up the pollq in main.php, I want the php_self to bring up main page's name. Not pollq. But it still brings up pollq. When I included pollq with php include command in main page, it was working. But that wasnt good because everytime I hit submit button it used to refresh the whole page which I didnt want. So iframe works, but when I put pollq in it, php self brings pollq. not main. How can I make pollq bring up main pages name?