This topic is locked

how can you place a phpr form in another webpage

4/10/2012 3:44:06 PM
PHPRunner General questions
L
larryk author

hello,
I created an add (insert) form and all works well (using everything default), like the paths, directories, etc.

You upload all the files and it works.
so example:

domain.com/projectname/test_add.php
all good!
NOW, i want that form i create on the test_add.php page... TO BE placed on my own page.

To make it harder, the page I want it on can be in any directory (so i need absolute paths, not relative).
example:

I need that form (the code that phpr creates) to be put on any page, in any folder on my site:
domain.com/here/there/on_this_page.php

domain.com/maybe/here_onthis_page.php
I've tried to do this, by editing the include files and looking at the code -- BUT there are too many places to edit and to many sub files to edit.
can this be done?
if not, this should be a future feature -- the ability to EASILY edit the paths, so you can run phpr from ANY place, any folder and not be tied down to the default, hard code structure.
thanks

Sergey Kornilov admin 4/11/2012

Using iframe tag you can insert PHPRunner form into any other page:

<iframe src="http://domain.com/projectname/test_add.php"></iframe>;
L
larryk author 4/11/2012

Hi Sergey,

I did think of that too...
but i'm not up to speed on iframes (I know how to use them <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=65532&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' /> )
but for my situation -- i need the iframe to talk with the page -- not sure the iframe can do that?
meaning, the page url is dynamic/contains parameters that the phpr page needs.
plus, the other cons of having/using an iframe.
would it be too hard/too much of a pain to create a "global" path variable, which is used through phpr?

that way, if you just want the default, its there.

if you want to move the code to any page, you just edit the global path variable.
that then gives all users of phpr LOTS more flexible to the product <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=65532&image=2&table=forumreplies' class='bbc_emoticon' alt=':)' />
thanks

Sergey Kornilov admin 4/11/2012

You you need to assign your PHPRunner application different URLs look into URLRewrite options. I'm not sure if you can easily tell PHP application to read files from other location.
Check this article for more info on mod_rewrite:

http://www.asprunner.com/forums/topic/6341-mod-rewrite-for-seo-friendly-pages/