Html içine php eklerken ne yapmam lazım.Yani eklemek istediğim yerde direk kopyala yapıştır mı yapmalıyım yoksa <?php gibi bişey(bunun dışında varsa) açıp öyle mi yapıştırmalıyım?
Elimde şöyle bir kod var mesela ;
<?=$header?>
<?=$top?><TABLE WIDTH="<?=$tablewidth?>" bgcolor="<?=$tablebackground?>" BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR>
<?=$left?>
<TD width="100%" align="<?=$contentalign?>" valign="top">
<!--begin page content-->
<?php if ($templatedir == "business"){ echo "<table align=\"left\" width=\"$contentwidth\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr><td width=100% height=40 align=left valign=top><img src=templates/$templatedir/images/welcome2.jpg height=40 width=45></td></tr>";
} else { echo "<table width=\"$contentwidth\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr><td width=100% height=40> </td></tr>"; } ?>
<tr>
<td align="center" class="texttitle"><?=HSIGNUPTITLE?> <?=$help_icon?></td>
</tr>
<tr>
<td align="center"><b class=red><?=$dmsg?></b><br><br>
</td>
</tr>
<tr>
<td align=center width="100%">
<table width="500"><tr><td align="center">
<?=$boxtop?><?=HSIGNUPBOXTITLE?></td></tr>
<form method=post action=hsignup.php name=form1 onSubmit="submitonce(this);showObject(false,true);">
<input type=hidden name=hwplan value=<?=$plan?>>
<input type=hidden name=pt value=<?=$pt?>>
<tr style="padding-left:5;padding-right:10;">
<?php if($cart_list!="" and $dom_list==""){
echo "<script language=\"JavaScript\" src=\"js/hsignup.js\"></script>";
}else if($cart_list=="" and $dom_list!=""){
echo "<script language=\"JavaScript\" src=\"js/hsignup4.js\"></script>";
}else if($cart_list!="" and $dom_list!=""){
echo "<script language=\"JavaScript\" src=\"js/hsignup3.js\"></script>";
}else{
echo "<script language=\"JavaScript\" src=\"js/hsignup2.js\"></script>";
}
?>
<?php if($cart_list!=""){ ?><td nowrap><br><input type=radio name=type value=cart OnClick="fnEnableCart()" checked> <?=DOMAINFROMCART?></td></tr>
<tr style="padding-left:5;padding-right:10;"><td align="center"><?=DOMAIN?>: <select class=formfield name=chsld id=chsld><?=$cart_list?></select></td></tr>
<?php } ?>
<?php if($dom_list!=""){ ?><tr style="padding-left:5;padding-right:10;"><td nowrap><br><input type=radio name=type value=domainlist OnClick="fnEnableDom()" checked> <?=DOMAINFROMLIST?></td></tr>
<tr style="padding-left:5;padding-right:10;"><td align="center"><?=DOMAIN?>: <select class=formfield name=dhsld id=dhsld><?=$dom_list?></select></td></tr>
<?php } ?>
<td nowrap style="padding-left:5;padding-right:10;"><br><input type=radio name=type value=register OnClick="fnEnableTop()" checked> <?=REGISTERNEW?> <?=$companyname?></td></tr>
<tr style="padding-left:5;padding-right:10;"><td align="center"><?=DOMAIN?>: <input type=text class=formfield name=thsld id=thsld value=<?=$thsld?>> <b>.</b>
<select class=formfield name=thtld id=thtld><?=$rtld_list?></select></td></tr>
<tr style="padding-left:5;padding-right:10;"><td><br><input type=radio name=type value=transfer OnClick="fnEnableMiddle()"> <?=TRANSFERMYDOMAIN?></td></tr>
<tr style="padding-left:5;padding-right:10;"><td align="center"><?=DOMAIN?>: <input type=text class=formfield name=mhsld id=mhsld value=<?=$mhsld?>> <b>.</b>
<select class=formfield name=mhtld id=mhtld><?=$ttld_list?></select></td></tr>
<?php if($enom_plan!=1){ ?>
<tr style="padding-left:5;padding-right:10;"><td nowrap><br><input type=radio name=type value=nsonly OnClick="fnEnableBottom()"> <?=LEAVEATCURRENTREGISTRAR?></td></tr>
<tr style="padding-left:5;padding-right:10;"><td align="center"><?=DOMAIN?>: <input type=text class=formfield name=bhsld id=bhsld value=<?=$bhsld?>> <b>.</b>
<input type=text class=formfield name=bhtld id=bhtld size=5 value=<?=$bhtld?>>
<?php }else{ ?>
<tr style="padding-left:5;padding-right:10;"><td nowrap><br><input type=radio name=type value=nsonly OnClick="fnEnableBottom()" disabled> <?=LEAVEATCURRENTREGISTRAR?></td></tr>
<tr style="padding-left:5;padding-right:10;"><td align="center"><?=DOMAIN?>: <input type=text class=formfield name=bhsld id=bhsld value=<?=$bhsld?>> <b>.</b>
<input type=text class=formfield name=bhtld id=bhtld size=5 value=<?=$bhtld?>>
<?php } ?>
</td></tr>
<tr style="padding-left:5;padding-right:10;"><td align=center><br><input type=submit name=submit class=formfield value=Next><br><br>
</td>
</tr></form>
<?=$boxbottom?>
</td></tr></table>
</td>
</tr>
</table>
<!--end page content-->
</td>
<?=$right?>
</tr>
</table>
<?php
if($thsld!=""){
echo "<script language=javascript>fnEnableTop()</script>";
}else if($mhsld!=""){
echo "<script language=javascript>fnEnableMiddle()</script>";
}else if($bhsld!=""){
echo "<script language=javascript>fnEnableBottom()</script>";
}else if($chsld!=""){
echo "<script language=javascript>fnEnableCart()</script>";
}else if($dhsld!=""){
echo "<script language=javascript>fnEnableDom()</script>";
}else{
echo "<script language=javascript>fnEnableTop()</script>";
}
?>
<?=$bottom?>
Burda öncelikle kırmızılı kısımları kaldırmam gerekiyor.Bunları kaldırdıktan sonra html sayfa içine entegre edip php olarak kaydetmek istiyorum yada bi şekilde php olarak kaydetmek istiyorum diyeyim.
Bu kodu yerşeltirdiğimde 3. tablo(en altta) dışarı kayıyor.Yazılar tablo içinden çıkıp sayfanın arka plan rengi üzerinde kalıyor.Bunu nasıl engelleyebilirim?
Kusura bakmayın biraz uzun oldu ama umarım çözülür.