Including a php script inside a <td> </td>

  • adizo
  • Born
  • Born
  • adizo
  • Posts: 2

Post 3+ Months Ago

I'm new with PHP and I need help ! On my web page there is a vertical navigation bar. When I push button "Carte Vizitatori" it is Carte_vizitatori.html starting. In the middle of this page there is something like this :

<TD width="642" height="381" valign="top" style="border: ridge; border-color: transparent; background: none; border-spacing: 0em">
<table border="0" cellspacing="0" cellpadding="7">
<tr><td><P><FONT size=4></FONT></P></td></tr>
<tr><td><?php ("../Fis_php/Carte_vizitatori/guestbook_ro.php");?></td></tr>
<tr><td><p><font face=Verdana size=2></font></p></td></tr>
<tr><td><p><font face=Verdana size=2></font></p></td></tr>
</table></td>
My question : how can i launch guestbook_ro.php without change the "Carte_vizitatori.html" page design ?

Thank you !
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • 3dmk
  • Newbie
  • Newbie
  • 3dmk
  • Posts: 12
  • Loc: Tucson, AZ, USA

Post 3+ Months Ago

This is a basic include script below. Nothing fancy and pretty much straight forward. Hope it helps. :)

Page one is a small portion of html that you will want to include somewhere. It can run by itself, or with other items. Page Two has a layout which would then use the pageone.php item.

One thing though, is your server equiped to parse php within html? I have done that on a copuple legacy sites that I have assumed control of, but most of the time I stick with *.php.

PageOne.php
Code: [ Select ]
<?php

$variable = 'Hello World';

?>
<table>
 <tr>
  <td>
   <? echo $variable; ?>
  </td>
 </tr>
</table>
  1. <?php
  2. $variable = 'Hello World';
  3. ?>
  4. <table>
  5.  <tr>
  6.   <td>
  7.    <? echo $variable; ?>
  8.   </td>
  9.  </tr>
  10. </table>


PageTwo.php
Code: [ Select ]
<?php
$myfile = 'pageone.php';

?>
<table>
 <tr>
  <td>
   Sow my include in the next row. :)
  </td>
 </tr>
 <tr>
  <td>
   <? include $myfile; ?>
  </td>
 </tr>
</table>
  1. <?php
  2. $myfile = 'pageone.php';
  3. ?>
  4. <table>
  5.  <tr>
  6.   <td>
  7.    Sow my include in the next row. :)
  8.   </td>
  9.  </tr>
  10.  <tr>
  11.   <td>
  12.    <? include $myfile; ?>
  13.   </td>
  14.  </tr>
  15. </table>
  • adizo
  • Born
  • Born
  • adizo
  • Posts: 2

Post 3+ Months Ago

I'm new with PHP and I need help ! On my web page there is a vertical navigation bar. When I push button "Carte Vizitatori" it is Carte_vizitatori.html starting. In the middle of this page there is something like this :

<TD width="642" height="381" valign="top" style="border: ridge; border-color: transparent; background: none; border-spacing: 0em">
<table border="0" cellspacing="0" cellpadding="7">
<tr><td><P><FONT size=4></FONT></P></td></tr>
<tr><td><?php ("../Fis_php/Carte_vizitatori/guestbook_ro.php");?></td></tr>
<tr><td><p><font face=Verdana size=2></font></p></td></tr>
<tr><td><p><font face=Verdana size=2></font></p></td></tr>
</table></td>
My question : how can i launch guestbook_ro.php without change the "Carte_vizitatori.html" page design ?

Thank you !
PS I post this question on Programming/scripting forum but I think that I was wrong !
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

Ugh, unable to form an adequate reply due to people not knowing how to use [code] tags or how to click "Disable HTML in this post".

Dude, edit your post and fix this so this thread doesn't look all screwed up :)
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

Ahhh, there we go....

What you'd have to do, is...

Code: [ Select ]
<tr><td><?php include('../Fis_php/Carte_vizitatori/guestbook_ro.php'); ?></td></tr>

Assuming, of course, that guestbook_ro.php sends its results back in an echo();
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6376
  • Loc: twitter.com/unflux

Post 3+ Months Ago

merged since the topics were identical

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: spork and 83 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.