uk_martin Posted August 18, 2007 Share Posted August 18, 2007 Hi Like so many others I have been cutting pasting andcustomising existing php stuff for a while (e.g. phpBB, OScmmerce, Coppermine Galery etc) but now I need to do something that has me puzzled. Using software called Simfatic Forms. I have created a nice form which exista on its own php page. What I want however is to embed that form as a centre block of the portal.php page on my site - www.brummiesfans.com. portal.php is skinned by portal_body.tpl in the /templates/theme/ directory. Can someone please let me know in simple fool-proof speak, how to embed this form? Thanks in advance Martin [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/65604-newbie-needs-help/ Share on other sites More sharing options...
ILYAS415 Posted August 18, 2007 Share Posted August 18, 2007 use this code in a php code on ur page include "link to forms main page here"; //MUST MAKE SURE LINK IS SOMETHING LIKE forms/hello.php AND NOT //SOMETHING LIKE http://www.blabalbla.com/forms/hello.php Quote Link to comment https://forums.phpfreaks.com/topic/65604-newbie-needs-help/#findComment-327595 Share on other sites More sharing options...
uk_martin Posted August 18, 2007 Author Share Posted August 18, 2007 Thanks for the reply. OK here goes. I assume that the "include" goes into (in my case) portal.php? I have put form.php in the same directory as portal.php, and the start of the portal.php coding now looks like this: define('IN_PHPBB', true); $phpbb_root_path = './'; $album_root_path = $phpbb_root_path . 'album_mod/'; include($phpbb_root_path . 'form.php'); include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'common.'.$phpEx); include($phpbb_root_path . 'fetchposts.'.$phpEx); include_once($phpbb_root_path.'includes/functions_color_groups.'.$phpEx); include_once ($phpbb_root_path . 'includes/news.' . $phpEx ); include_once ($phpbb_root_path . 'pafiledb/includes/pafiledb_constants.' . $phpEx ); // // Start session management // $userdata = session_pagestart( $user_ip, PAGE_INDEX, $session_length ); init_userprefs($userdata); I have tried to keep in line with the other "includes" on this page. Can you please confirm if I have done this right? So how do I now call the form up in the template file - /template/theme/portal_body.tpl ? <table cellpadding="4"><tr><td> <p align="center"><b>Calling all Birmingham Speedway Fans!</b></p> <p align="justify">Ever sat at home or at work wondering if the meeting will be on or off? Then worry no more. Just fill in the form on this page to receive a text message from the stadium on the day of the meeting to let you know what the state of play is. This valuable service can either save you a wasted journey or save you missing a meeting that you might have thought would be called off.</p> <p align="center"><b>This service is FREE OF CHARGE!!!</b><</p> <p align="center">Your personal information will NOT be used for any other purposes than for this weather update facility.</p> <div align="center"> <table border="1" width="480" id="table2" bordercolordark="#FF0000" cellspacing="0" cellpadding="2" bordercolorlight="#FF0000"> <tr> <td> SOMETHING HAS TO GO IN HERE TO MAKE THE FORM APPEAR </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> <br /> <table width="100%" cellpadding="1" cellspacing="1" border="0" class="forumline"> <th height="27">Advertisement</th> By the way, here is the form in it's "naked" state - http://www.brummiesfans.com/forum/form.php and here is an idea of how I want it to look when the project is finished - http://www.brummiesfans.com/forum/portal_text.php Thanks again. Quote Link to comment https://forums.phpfreaks.com/topic/65604-newbie-needs-help/#findComment-327624 Share on other sites More sharing options...
dbillings Posted August 19, 2007 Share Posted August 19, 2007 put the include in the spot where you have "somthing has to go in here to make the form appear". The include simply includes the form in the page and the contents "forum/form.php" is simply the location the form.php file is located on your web-server. Cut and paste this... report back your results. <?php include("http://www.brummiesfans.com/forum/form.php"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/65604-newbie-needs-help/#findComment-327892 Share on other sites More sharing options...
uk_martin Posted August 20, 2007 Author Share Posted August 20, 2007 Thanks that's been a great help. Martin Quote Link to comment https://forums.phpfreaks.com/topic/65604-newbie-needs-help/#findComment-329115 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.