getting php into fp2003 (Full Version)

All Forums >> [Web Development] >> Microsoft FrontPage Help



Message


ctryman47 -> getting php into fp2003 (10/16/2005 4:40:45)

I have been trying to get whm autopilot int my front page site and do not know what is the problem. I created the header and the footer and the start here table but it will not load off the server. any ideas. Thanks




coreybryant -> RE: getting php into fp2003 (10/16/2005 17:06:36)

Are you trying to view everything locally?




ctryman47 -> RE: getting php into fp2003 (10/19/2005 6:51:50)

no I have it uploaded to my host here is the error I get

go to http://www.okcwebworks.net/order_page.php

that will produce the error. I have been into the whm autopilot forum and got the proper code to insert the billing mgr and it gives me this. any one that uses php with front page any help getting this done would be great




jaybee -> RE: getting php into fp2003 (10/19/2005 7:39:48)

Can I see the code you have on that page? it's saying you have too many < I suspect you have your php call in the wrong place but I can't get at the code to see.




ctryman47 -> RE: getting php into fp2003 (10/19/2005 8:10:05)

<?PHP
if($maintenance=="yes")
{
header("Location: ".$http_web."/maintenance.php");
exit;
}
echo("
<HTML>
<HEAD>
<TITLE> ".$site_title." </TITLE>
");
<link rel="stylesheet" type="text/css" href="http://www.okcwebworks.net/styles.css">
<title>Order Page</title>
echo("
</HEAD>
<BODY
");
if (ereg("step_one.php", $PHP_SELF)==true)
{
echo"onLoad='select_row(\"plan\", ".$tick.");'";
}
else if (ereg("step_two.php", $PHP_SELF)==true)
{
echo"onLoad='select_row(\"plan\", ".$tick.");'";
}

echo">";
?>
<?php include('inc/header2.php'); ?>

<body topmargin="0" marginwidth="0" leftmargin="0" marginheight="0" rightmargin="0">

<table summary="This table is used for layout purposes." cellspacing="0" border="0" cellpadding="0" style="border-collapse: collapse" width="100%" id="table1">
<tr>
<td align="center">
<!--webbot bot="Include" U-Include="includes/logo.htm" TAG="BODY" --></td>
</tr>
<tr>
<td background="images/menubarbg.gif" align="center">
<table summary="This table is used for layout purposes." cellspacing="0" border="0" cellpadding="6" style="border-collapse: collapse" width="750" id="table2">
<tr>
<td class="menu">
<!--webbot bot="Navigation" S-Orientation="horizontal" S-Rendering="html" S-Bar="Bars" S-Btn-Nml="<A HREF="#URL#" TARGET="#TARGET#" STYLE="{text-decoration: none;}">#LABEL#</A>" S-Btn-Sel="#LABEL#" S-Btn-Sep="&nbsp;|&nbsp;" S-Type="top" B-Include-Home="TRUE" B-Include-Up="FALSE" --></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center">
<table summary="This table is used for layout purposes." cellspacing="0" border="0" cellpadding="0" style="border-collapse: collapse" width="734" id="table3">
<tr>
<td>
<img border="0" src="images/spacer.gif" alt=" " width="734" height="15"></td>
</tr>
<tr>
<td background="images/insidetitle.jpg">
<table summary="This table is used for layout purposes." cellspacing="0" border="0" cellpadding="15" style="border-collapse: collapse" width="100%" height="60" id="table4">
<tr>
<td align="right">
<p class="insidetitle">
<!--webbot bot="Navigation" S-Type="banner" S-Orientation="horizontal" S-Rendering="text" --></p>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table summary="This table is used for layout purposes." cellspacing="0" border="0" cellpadding="5" style="border-collapse: collapse" width="100%" id="table5">
<tr>
<td width="25%" valign="top" class="leftcolumn">
<p class="menu"><b>in this section...</b><br>
<!--webbot bot="Navigation" S-Orientation="vertical" S-Rendering="html" S-Bar="Bars" S-Btn-Nml="<A HREF="#URL#" TARGET="#TARGET#" STYLE="{text-decoration: none;}">#LABEL#</A>" S-Btn-Sel="#LABEL#" S-Btn-Sep="<br>" S-Type="top" B-Include-Home="TRUE" B-Include-Up="FALSE" --></p>
</td>
<td width="75%" valign="top">
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="22"</td>
<td width="496" align="left">
<!-- START AUTOPILOT HERE -->
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center">
<img border="0" src="images/spacer.gif" alt=" " width="734" height="15"></td>
</tr>
<tr>
<td align="center" background="images/menubarbg.gif">
<!--webbot bot="Include" U-Include="includes/copyright.htm" TAG="BODY" --></td>
</tr>
</TABLE>
<?PHP
echo("
</BODY>
</HTML>
");
?>




jaybee -> RE: getting php into fp2003 (10/19/2005 8:51:25)

quote:

echo("
<HTML>
<HEAD>
<TITLE> ".$site_title." </TITLE>
");
<link rel="stylesheet" type="text/css" href="http://www.okcwebworks.net/styles.css">
<title>Order Page</title>
echo("
</HEAD>
<BODY
");


OK, your problem is there. If I break it down you'll be able to see it better.

echo("<HTML><HEAD><TITLE> ".$site_title." </TITLE>");

<link rel="stylesheet" type="text/css" href="http://www.okcwebworks.net/styles.css">
<title>Order Page</title>

echo("</HEAD><BODY");

The first line issues a write statement for the html head and title as does the last line but your middle two lines are native html.

Do you need that second title?




ctryman47 -> RE: getting php into fp2003 (10/19/2005 8:58:17)

Hello Thanks,

Would you mind putting the tags exactly how you are stating so I can just cut and past I have been at this 3 days. I am not up on the scripting to do it efficiently enough. that would be so great I could get some sleep then[:D]




ctryman47 -> RE: getting php into fp2003 (10/19/2005 9:02:25)

OK I see it now Im not sure if I need the 2nd title or not but again if you write this out for me I will be forever greatful[:)]




jaybee -> RE: getting php into fp2003 (10/19/2005 9:18:21)

Hang on a minute, I've just looked at the rest of the code, what was the code you picked up from autopilot to put into the page? You seem to have managed to duplicate some stuff.




ctryman47 -> RE: getting php into fp2003 (10/19/2005 9:28:01)

yeah take a look now at what it says.
http://www.okcwebworks.net/order_page.php
it is tellin me on which lines are missing.
here is the site info I got this from.

http://www.whmautopilot.com/forum/index.php?showtopic=7460&st=0&p=39510&#entry39510

Thanks for the help
Joe




ctryman47 -> RE: getting php into fp2003 (10/19/2005 9:36:54)

here is the link to the instruction page which makes no sense to me AT ALL but you will be able to make heads or tails out of it im sure

http://www.whmautopilot.com/partners.php




jaybee -> RE: getting php into fp2003 (10/19/2005 9:46:24)

OK, bear with me I'll go through it.




jaybee -> RE: getting php into fp2003 (10/19/2005 9:51:30)

Have you saved your header2.php file into an includes folder on your host?




ctryman47 -> RE: getting php into fp2003 (10/19/2005 9:55:21)

yes I have I wen from <head> to </head> and called it header2.php and placed it in the inc folder

here it is:
<HTML>
<HEAD>
<TITLE> ".$site_title." </TITLE>
");
echo("
<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.okcwebworks.net/styles.css\">
");
echo("
</HEAD>




jaybee -> RE: getting php into fp2003 (10/19/2005 10:06:04)

But you still have all that code in the page as well and what you have in the head is wrong.

I'm a bit worried that you're taking on more than you can chew here. You seem to be setting up a web design and hosting site without knowing the basics. I'm not trying to get at you but are you going to be able to handle it when clients start asking for complex sites?

You need to understand HTML at the very least before you start trying to plug php in. I think your best bet here is to go back to the autopilot forum and see if someone has a template they can talk you through.

I can give you all the code but it's just going to go haywire the first time you try to change it unless you learn HTML first.




ctryman47 -> RE: getting php into fp2003 (10/19/2005 10:15:44)

This is just for the auto billing the company I am working with handles the support. I use front page for editing and I did the head just like you sent it to me. I have been working the hosting thing for 3 years.and just ran accross this with PHP when the company I had was sold out. and they are a better company that bought them. If you dont have the time I understand sorry to have bothered you




jaybee -> RE: getting php into fp2003 (10/19/2005 10:55:40)

No, it's not that I don't have the time and you're not bothering me I just don't want you to end up completely confused and getting a working page that you can't change without it all going belly up which it will if you don't understand what you're doing.

If I do it I'll need the original code for the page you had, before you made any changes to it.

I also need to know whether you're using the centred, left or right version of the billing.

I suggest you PM it to me




jaybee -> RE: getting php into fp2003 (10/19/2005 11:20:53)

According to their guidelines you should have, at the very least:

 <?PHP
if($maintenance=="yes")
{
header("Location: ".$http_web."/maintenance.php");
exit;
}
echo("
<HTML>
<HEAD>
<TITLE> ".$site_title." </TITLE>
");
<link rel="stylesheet" type="text/css" href="http://www.okcwebworks.net/styles.css">
<title>Order Page</title>
echo("
</HEAD>
<BODY
");
if (ereg("step_one.php", $PHP_SELF)==true)
{
echo"onLoad='select_row(\"plan\", ".$tick.");'";
}
else if (ereg("step_two.php", $PHP_SELF)==true)
{
echo"onLoad='select_row(\"plan\", ".$tick.");'";
}

echo">";
?>
<?php include('inc/header2.php'); ?>

<body topmargin="0" marginwidth="0" leftmargin="0" marginheight="0" rightmargin="0">

<table summary="This table is used for layout purposes." cellspacing="0" border="0" cellpadding="0" style="border-collapse: collapse" width="100%" id="table1">
<tr>
<td align="center">
<!--webbot bot="Include" U-Include="includes/logo.htm" TAG="BODY" --></td>
</tr>
<tr>
<td background="images/menubarbg.gif" align="center">
<table summary="This table is used for layout purposes." cellspacing="0" border="0" cellpadding="6" style="border-collapse: collapse" width="750" id="table2">
<tr>
<td class="menu">
<!--webbot bot="Navigation" S-Orientation="horizontal" S-Rendering="html" S-Bar="Bars" S-Btn-Nml="<A HREF="#URL#" TARGET="#TARGET#" STYLE="{text-decoration: none;}">#LABEL#</A>" S-Btn-Sel="#LABEL#" S-Btn-Sep=" | " S-Type="top" B-Include-Home="TRUE" B-Include-Up="FALSE" --></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center">
<table summary="This table is used for layout purposes." cellspacing="0" border="0" cellpadding="0" style="border-collapse: collapse" width="734" id="table3">
<tr>
<td>
<img border="0" src="images/spacer.gif" alt=" " width="734" height="15"></td>
</tr>
<tr>
<td background="images/insidetitle.jpg">
<table summary="This table is used for layout purposes." cellspacing="0" border="0" cellpadding="15" style="border-collapse: collapse" width="100%" height="60" id="table4">
<tr>
<td align="right">
<p class="insidetitle">
<!--webbot bot="Navigation" S-Type="banner" S-Orientation="horizontal" S-Rendering="text" --></p>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table summary="This table is used for layout purposes." cellspacing="0" border="0" cellpadding="5" style="border-collapse: collapse" width="100%" id="table5">
<tr>
<td width="25%" valign="top" class="leftcolumn">
<p class="menu"><b>in this section...</b><br>
<!--webbot bot="Navigation" S-Orientation="vertical" S-Rendering="html" S-Bar="Bars" S-Btn-Nml="<A HREF="#URL#" TARGET="#TARGET#" STYLE="{text-decoration: none;}">#LABEL#</A>" S-Btn-Sel="#LABEL#" S-Btn-Sep="<br>" S-Type="top" B-Include-Home="TRUE" B-Include-Up="FALSE" --></p>
</td>
<td width="75%" valign="top">
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="22"></td>
<td width="496" align="left">


that lot in your header. There are also some errors in the html with closing tags missing.

OK, your pm has just come in, I'll look at the code and see what's going on.




jaybee -> RE: getting php into fp2003 (10/19/2005 12:21:27)

For future reference for anyone who is using autopilot and finds this thread......

The confusion above seems to stem from the mis-apprehension that you put the autopilot code into your page. The idea is to set up your page layout in html then extract bits and put them into the autopilot files.

So, design your page.

Make sure all references to images etc are full URLs or you will have problems later on. So if an image is coded as images/mypic.jpg, change it to http://www.myweb.com/images/mypic.jpg.

Once you are happy with the page you chop it up into two parts, header and footer. To make this easier. Put a line in where the split will be. You can use a comment
<!-- Autopilot start -->
or a bit of text which will show up in design view
<p>Autopilot goes here</p>

If you use the latter DO NOT include it in the header or footer when you start to cut the page up.

The things that you always want at the top of the page become your header and you cut out the code in the page from immediately AFTER the <body> tag down to the line you put in to show where autopilot will sit.

You paste this into a new page using a text editor or the FP code view. If you are using the FP code view remove all the code that FP generates before pasting your code in.
Save this as header2.php

Go back to your built page. Cut everything left between the line you put in to show where autopilot sits and </body> tags. Paste that into a new empty page as described above but this time save it as footer.php

discard what is left of your original page.

Upload header2.php and footer.php to the host

Now, find a file already on your host that you should have uploaded along with the rest of the autopilot script, called header.php and open it in a text editor.

Find the following lines

<BODY
");
if (ereg("step_one.php", $PHP_SELF)==true)
{
echo"onLoad='select_row(\"plan\", ".$tick.");'";
}
else if (ereg("step_two.php", $PHP_SELF)==true)
{
echo"onLoad='select_row(\"plan\", ".$tick.");'";
}

echo">";
?>


Put the cursor after the final > and press enter to make a new line then type the following

<?php include('inc/header2.php'); ?>

and save the file. Upload it to the host.

To see your results open a page called step_one.php in your browser. The exact name depndes on where you've put it on your host.




jaybee -> RE: getting php into fp2003 (10/19/2005 13:15:24)

The autopilot site states the requirements for using the script:

The front end ( client end / order system ) is designed as barebones as it can be so that it can integrate easier into design. There are some basic limitations as to where it can be integrated and, that is only gauged by space.
At least 450 pixels of space
Ability to create standard headers or wrappers
Good HTML know how
Good Plain Text Editor for PHP code

If you don't understand HTML then you are asking for problems integrating this as you are hacking the code around. You can't do this from FP design view as FP does not handle php.

There is a full support section on their site and if you have purchased the code they will help you integrate it.
http://www.whmautopilot.com/support.php




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.09375