1

Ok thanks to the great people on this site I was able to create a php file that directed to a form dependent variable url. What I would like to try and set up is to either mask the directed url so the variable url is not shown or at least have it open to an iframe so the address bar is at least not present.

Some things I have tried: On the Form page created that has the action thats directed to a my php file I created an iFrame and set the target to the iFrames name------- iFrame shows up on the form, but upon submission full page loads, not in iFrame

Created an iFrame.html doc had the Form page action set to the html doc, then set the iFrame source in the doc to the php file with the action------same thing loads in the same window and no iFrame ever shows

Tried to insert iFrame in the php doc but got parsing errors

Any help would be appreciated even if its just a point in the right direction.

1 Answers1

0

If you want to simply hide the parameters in he URL (for example to not allow users to easily edit them) you can simply change the form to use POST as opposed to GET: <form action="serverside.php" method="post">. On the server side you will also have to change $_GET to $_POST or $_REQUEST (the last one combines the get and post variables with post having higher preference).

mtsvetkov
  • 885
  • 11
  • 18
  • Yeah its set to post already. I would just like it to not show the url at all if possible. Thats why I would like an iFrame at least. – user1637284 Aug 31 '12 at 09:15
  • Sorry, I thought you meant just hide the parameters. [This question](http://stackoverflow.com/questions/168455/how-do-you-post-to-an-iframe) has quite a bit of info on using iframes as form targets and some of its intricacies. Other than that, on the overkill end of the spectrum, there's the mod_rewrite module that let's you do whatever you want to your urls. Sorry I can't be of more help. – mtsvetkov Aug 31 '12 at 10:16