TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 18, 2024, 06:43:31 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,164
  • Total Topics: 21,219
  • Online today: 203
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 98
  • Total: 98

{SOLVED} articles: php vs html

Started by jacci, July 09, 2007, 05:32:59 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jacci

Hi, am new to TP after being talked into installing it, and after an initially frustrating period, i am now TOTALLY converted and just love it!!!

It is the best mod I have ever seen, fabulous. I have managed to sort out the bulk of the stuff by myself but am having a little bit of difficulty with jsut one thing, and after days of bashing my head against the wall decidied i should just ask.

When making an article, if i want a normal html table, but with a php include, It seems i cannot simply put the

<?php include('path/myscript.php'); ?> into the html as i would normally

so i tried a php article and got the script to work fine. My proplem is though, i dont really know how to write php articles correctly and i just need a bit of help with a bit of snytax (at least i am assuming it is a syntax thing)

i have my code working in a php article like this

require('path/script.php');
echo '
<TABLE width="90%" border="1" bordercolor="#000000"><TBODY><TR><TD><P align="center">

     <P align="center"><FONT face="Verdana, Arial, Helvetica, sans-serif">The <A href="http://www.pretendercentre.com/pretendergallery/index.php">PretenderCentre Gallery</A> is currently the home of  over 5700 peices of Pretender Art.<BR>
              </FONT><FONT face="Verdana, Arial, Helvetica, sans-serif"><BR>
              This includes icons/avatars, animations, wallpapers, screencaps, signatures and anything you can think of.</FONT></P>
      <P align="center"><FONT face="Verdana, Arial, Helvetica, sans-serif">If you have any Pretender Art, we would love to host it at the PretenderCentre Gallery. If you have a lot of it, then the admin can batch add to save you tedious uploading. You can either create a private album to retain control over your own uploads, and they will live in the Centre files. If you want a category on the main page, then contact the admin, or drop a note here on the gallery board and we can set that up for you.</FONT></P>
    <P align="center"><FONT face="Verdana, Arial, Helvetica, sans-serif">Art in the Gallery is also showcases on Missing Pieces and the PretenderSIM.</FONT></P>
    <P align="center"> </P></TD></TR></TABLE>
<P align="center"> </P>
<P align="center"><BR>
</P>';


and that works fine. What i cant figure out is how to make that require work INSIDE the table without getting parse errors. Or even better, how to get the php include working in a html article.

thanks so much for any help or prods in the right direction here
jacci

jacci

finally figured it out

just not used to writing in php and the basic syntax is still escaping me, but now it is all good!!