Its my first full php project, and its going good.
I need to include login.php into an existing php tag.
Heres part of the code.
<?php
require 'config.php';
if ($logged_in == 0) {
die('
<HTML>
<HEAD>
<meta http-equiv="Content-Language" content="en-us">
<TITLE>Addict PC - The Ultimate System at the Ultimate Price</TITLE>
</HEAD>
<BODY BGCOLOR=#E9E9E9 topmargin="0">
<!-- ImageReady Slices (template.psd) -->
<TABLE WIDTH=750 BORDER=0 ALIGN="CENTER" CELLPADDING=0 CELLSPACING=0 bgcolor="#FFFFFF">
<!--DWLayoutTable-->
<TR>
<TD width="63"> <IMG SRC="images/spacer.gif" WIDTH=63 HEIGHT=1></TD>
<TD width="81"> <IMG SRC="images/spacer.gif" WIDTH=81 HEIGHT=1></TD>
<TD width="3"> <IMG SRC="images/spacer.gif" WIDTH=3 HEIGHT=1></TD>
<TD width="53"> <IMG SRC="images/spacer.gif" WIDTH=53 HEIGHT=1></TD>
<TD width="80"> <IMG SRC="images/spacer.gif" WIDTH=80 HEIGHT=1></TD>
<TD width="110"> <IMG SRC="images/spacer.gif" WIDTH=110 HEIGHT=1></TD>
<TD width="40"> <IMG SRC="images/spacer.gif" WIDTH=40 HEIGHT=1></TD>
<TD width="140"> <IMG SRC="images/spacer.gif" WIDTH=140 HEIGHT=1></TD>
<TD width="80"> <IMG SRC="images/spacer.gif" WIDTH=80 HEIGHT=1></TD>
<TD width="100"> <IMG SRC="images/spacer.gif" WIDTH=100 HEIGHT=1></TD>
<TD></TD>
</TR>
<TR>
<TD COLSPAN=2 ROWSPAN=2> <IMG SRC="images/topleftlogo.gif" WIDTH=144 HEIGHT=72></TD>
<TD COLSPAN=2 ROWSPAN=2> <IMG SRC="images/logopc.gif" WIDTH=56 HEIGHT=72></TD>
<TD COLSPAN=6> <IMG SRC="images/buttonlogo.gif" WIDTH=550 HEIGHT=44></TD>
<TD> <IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=44></TD>
</TR>
<TR>
<TD> <a href="http://pc.addictgamers.com/computers.html"><img src="images/computers.gif" alt="Computers" name="computers" width="80" height="28" border="0"></a></TD>
<TD> <a href="http://pc.addictgamers.com/how.html"><img src="images/howwework.gif" alt="How We Work" name="howwework" width="110" height="28" border="0"></a></TD>
<TD> <a href="http://pc.addictgamers.com/faq.html"><img src="images/faq.gif" alt="FAQ" name="faq" width="40" height="28" border="0"></a></TD>
<TD> <a href="http://pc.addictgamers.com/agreement.html"><img src="images/agreement.gif" alt="License Agreement" name="agreement" width="140" height="28" border="0"></a></TD>
<TD> <a href="http://pc.addictgamers.com/support.html"><img src="images/support.gif" alt="Support" name="support" width="80" height="28" border="0"></a></TD>
<TD> <IMG SRC="images/template_09.gif" WIDTH=100 HEIGHT=28></TD>
<TD> <IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=28></TD>
</TR>
<TR>
<TD ROWSPAN=2> <A HREF="http://pc.addictgamers.com"> <IMG SRC="images/home.gif" WIDTH=63 HEIGHT=26 BORDER=0></A></TD>
<TD ROWSPAN=2> <A HREF="http://pc.addictgamers.com/contact.html"> <IMG SRC="images/contact.gif" WIDTH=81 HEIGHT=26 BORDER=0></A></TD>
<TD COLSPAN=8> <IMG SRC="images/barundrnav.gif" WIDTH=606 HEIGHT=18></TD>
<TD> <IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=18></TD>
</TR>
<TR>
<TD> <IMG SRC="images/template_13.gif" WIDTH=3 HEIGHT=8></TD>
<TD COLSPAN=7 ROWSPAN=2 valign="top"> <IMG SRC="images/header_how.gif" WIDTH=603 HEIGHT=85></TD>
<TD> <IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=8></TD>
</TR>
<TR>
<TD COLSPAN=3 ROWSPAN=2 valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/nav.gif">
<!--DWLayoutTable-->
<tr>
<TD width="147" height="883" valign="top"><!--DWLayoutEmptyCell--><font color="000000" face="Verdana" size="2"><?php include("login.php");?></TD>
See the last part of code> the include? Well, I cannot have php in a php code such as the beginning of the code:
if ($logged_in == 0) {
die('
How can I have an include, in HTML to show up login.php? If it cannot be done, how can I recode the
if ($logged_in == 0) {
die('
to allow php inside the tags?

New Topic/Question
Reply




MultiQuote





|