Results 1 to 3 of 3
  1. #1
    Join Date
    May 2005
    Location
    Cornwall
    Posts
    3,590
    Tokens
    2,900
    Habbo
    Feyod

    Latest Awards:

    Default Help with PHP Includes.

    Heya All!!

    right, my problem is that i'm stuck wih using PHP includes.

    I want to include a contact form within another page, however tisn't showing.

    This is my code for "contact.htm"

    HTML Code:
    <HTML>
    <HEAD>
    <TITLE>.::. StevenA - The home of madness! .::.</TITLE>
    <link rel="shortcut icon" href="images/favicon.ico" >
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
    
    <style type="text/css">
    <!-- 
    A:link {
        FONT-SIZE: 11px; COLOR: #197201; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
    }
    A:active {
        FONT-SIZE: 11px; COLOR: #197201; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
    }
    A:visited {
        FONT-SIZE: 11px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
    }
    A:hover {
        FONT-SIZE: 11px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline overline
    }
    TD {
        FONT-WEIGHT: normal; FONT-SIZE: 11px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
    }
    BODY {
        FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #ffffff; SCROLLBAR-ARROW-COLOR: #ffffff; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; SCROLLBAR-BASE-COLOR: #4C9D28
    }
    .input {
        BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; FONT-SIZE: 8px; BORDER-LEFT: #000000 1px solid; COLOR: #ffffff; BORDER-BOTTOM: #000000 1px solid; FONT-FAMILY: verdana;
    }
    -->
    </style>
    
    </HEAD>
    <BODY bgcolor="#424242" LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH="0" MARGINHEIGHT="0">
    
    
    
    <table align="center" width="785" border="0" cellpadding="0" cellspacing="0">
      <TBODY>
      <tr> 
        <td width="785" valign="top"> 
          <table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/index_02.gif">
            <tr> 
              <td width="177" rowspan="3" valign="top"><IMG height=52 src="images/index_02.gif" width=177></td>
              <td width="591" height="12" valign="top">&nbsp;</td>
              <td width="17" valign="top" rowspan="3"><IMG height=52 src="images/index_04.gif" width=17></td>
            </tr>
            <tr> 
              <td valign="top" height="22" align="middle"></td>
            </tr>
            <tr> 
              <td height="18" valign="top">&nbsp;</td>
            </tr>
          </table>
        </td>
      </tr>
      <tr> 
        <td height=62 valign="top"> 
          <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr> 
              <td width="785" height="62" valign="top"><IMG height=62 src="images/index_05.gif" width=785></td>
            </tr>
          </table>
        </td>
      </tr>
      <tr> 
        <td valign="top"> 
          <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr> 
              <td width="785" height="17" valign="top"><IMG height=17 src="images/index_06.gif" width=785></td>
            </tr>
          </table>
        </td>
      </tr>
      <tr> 
        <td valign="top"> 
          <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr> 
              <td width="14" height="16" valign="top"><IMG height=16 src="images/index_07.gif" width=14></td>
              <td width="757" valign="center" bgcolor="#cecece">
              
              <div align="center"> Welcome    to    StevenA, Happy browsing! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              </div>
              
              </td>
              <td width="17" valign="top"><IMG height=16 src="images/index_09.gif" width=17></td>
            </tr>
          </table>
        </td>
      </tr>
      <tr> 
        <td height="6" valign="top"> 
          <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr> 
              <td width="785" height="6" valign="top"><IMG height=6 src="images/index_10.gif" width=785></td>
            </tr>
          </table>
        </td>
      </tr>
      <tr> 
        <td valign="top"> 
          <table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/main_bg.gif">
            <TBODY>
            <tr> 
              <td width="14" valign="top">&nbsp;</td>
              <td width="183" valign="top"> 
                <table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/nav_bg.gif">
                  <tr> 
                    <td height="35" valign="top" colspan="3"><IMG height=35 src="images/index_13.gif" width=183></td>
                  </tr>
                  <tr> 
                    <td background="images/nav_left.gif" width="13" height="3"></td>
                    <td width="160"> 
                     
                      <b>:: Main ::</b>
                 <BR>
                 <BR>
                : <a href="/index.htm" target="_self"> Home </a><BR>
                : <a href="/about.htm"> About Me </a><BR>
                : <a href="/contact.htm" target="_self"> Contact Me </a><BR>
                : <a href="http://www.link.com"> Guest Book </a><BR>
                : <a href="http://www.link.com"> News </a><BR>    
                : <a href="http://www.link.com"> Link Us \ Afiliates </a><BR>
                : <a href="http://www.link.com"> MySpace Goodies </a><BR>
                : <a href="http://www.link.com"> Goodies </a><BR>
                : <a href="http://www.link.com"> Forum </a><BR>
                      <P></P>
                
                <b>:: Tutorials ::</b>
                  <BR>
                  <BR>
                : <a href="http://www.link.com"> Your Link </a><BR>
                : <a href="http://www.link.com"> Your Link </a><BR>
                : <a href="http://www.link.com"> Your Link </a><BR>
                : <a href="http://www.link.com"> Your Link </a><BR>
                : <a href="http://www.link.com"> Your Link </a><BR>
                : <a href="http://www.link.com"> Your Link </a><BR>    
                : <a href="http://www.link.com"> Your Link </a><BR>
                : <a href="http://www.link.com"> Your Link </a><BR>
                : <a href="http://www.link.com"> Your Link </a><BR>
                : <a href="http://www.link.com"> Your Link </a><BR>
                      <P></P>
                
                      <P></P>
                
                <p><b>:: Link To Us ::</b></p>
                <p align=center>
                <a href="http://www.sethsworld.tk" target="_blank">
                </a>        
                <BR>
                <TEXTAREA cols=15></TEXTAREA>
                </p>
                     
                    </td>
                    <td width="10" valign="top"><IMG height=3 src="images/nav_right.gif" width=10></td>
                  </tr>
                  <tr> 
                    <td colspan="3" height="14" valign="top"><IMG height=14 src="images/nav_bottom.gif" width=183></td>
                  </tr>
                </table>
              </td>
              <td width="11" valign="top">&nbsp;</td>
              <td width="565" valign="top"> 
                
                            <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#ededed">
                  <tr> 
                    <td height="31" valign="top" colspan="3"><IMG height=31 src="images/index_15.gif" width=565></td>
                  </tr>
                  <tr> 
                    <td background="images/index_17.gif" width="5"></td>
                    <td width="550"><p><b><center>
      .:: Welcome to StevenA ::.
    </center></b><BR>      
    <center>
      <p><strong>Contact Me!</strong></p>
      <p>Got a question you wish to ask me? maybe just found an error with the site!<br>
      </p>
      <p><br>
    <?php
    include("/contact.php");
    ?><br>
    &nbsp;  </p>
    </center>
                    <p>&nbsp;</p>
                    <p><BR>
                            </li>
                        </p></td>
                    <td background="images/index_19.gif" width="10"></td>
                  </tr>
                  <tr> 
                    <td height="22" colspan="3" valign="top"><IMG height=22 src="images/index_24.gif" width=565></td>
                  </tr>
                </table></TD>
              <td width="16"></td></TR></TBODY></TABLE></TD></TR>
      <tr> 
        <td height="55" valign="top">
          <table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/index_28.gif">
            <tr> 
              <td width="23" valign="top" rowspan="3"><IMG height=55 src="images/index_27.gif" width=23></td>
              <td width="745" height="19" valign="top">&nbsp;</td>
              <td width="17" valign="top" rowspan="3"><IMG height=55 src="images/index_30.gif" width=17></td>
            </tr>
            <tr> 
              <td valign="top" height="19" align="middle">&nbsp;
              </td>
            </tr>
            <tr> 
              <td height="17" valign="top">&nbsp;</td>
            </tr>
          </table>
        </td>
      </tr></TBODY></TABLE>
    </BODY>
    </HTML>
    And this is the code for "contact.php" (Not sure if needed).

    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <
    html xmlns="http://www.w3.org/1999/xhtml">
    <
    head>
    <
    meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <
    title>.::. StevenA The home of madness!</title>
    <
    style type="text/css">
    <!--
    body {
        
    background-color#EDEDED;
    }
    body,td,th {
        
    font-familyVerdanaArialHelveticasans-serif;
        
    font-size10px;
        
    color#000000;
    }
    -->
    </
    style></head>

    <
    body>
    <
    p align="center"><center>
      
    Name:
          <
    input type="text" name="name"><br/> 
          
    Email address 
          
    <input type="text" name="email"><br/> 
       
    Question<br/> <textarea name="message" cols="35" rows="5"></textarea><br/> <input type="submit" value="Send"></center>
    </
    center> &nbsp;</p>
       <
    div align="center"><em>Please wait between 24 and 48 hours for a reply if needed :-) </em></div>
    </
    body>
    </
    html
    I want to include "contact.php" into the "contact.htm" page, the location for 'contat.php is just /contact.php on the server.

    Thanks

    +Rep to those who help
    Occasionally visit and have a nose.

  2. #2
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    unless you wana go messing around in the htaccess files of use ssi, you can only use php includes in PHP files. not html ones...

  3. #3
    Join Date
    May 2005
    Location
    Cornwall
    Posts
    3,590
    Tokens
    2,900
    Habbo
    Feyod

    Latest Awards:

    Default

    Ohhhh :x

    Rofl!! Thanks Mentorrr 3

    Thread Locked.
    Occasionally visit and have a nose.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •