Search
Left Quote    Treat your password like your toothbrush. Don't let anybody else use it, and get a new one every six months.
- Clifford Stoll    
Right Quote
 
[login] | [Register]
Forum Index » PHP and mySQL » Viewing Topic and Replies
Post Reply


        Viewing Topic: A little lost any help?
  This user is offline  mikecopeland
  Subject: "A little lost any help?" Posted: @ 1:12 am on Dec 05 2007   
Member #: 499
Rank: User - (8)
Since: 12/05/07
Posts: 8

Ok ill try and make this clean looking!

I am trying to add:
<? include($_SERVE R['DOCUMENT_ROO T'].'/comments. php'); ?>
into my photo gallery.

my error is this:
Parse error: parse error, unexpected T_ENCAPSED_AND_ WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING

i am adding the code here:
$result_fina l .= "<tr> ;\n\t<td align='center'& gt;
<br />
<img src='".$im ages_dir." /".$photo_ filename." ' border='0' alt='".$ph oto_caption.&qu ot;' />
<br />
$photo_cap tion
<br />
<br />
<? include($_SERVE R['DOCUMENT_ROO T'].'/comments. php'); ?>
</td> ;
</tr> ;";

}


I know how i have it is wrong! but i needed to show where i am trying to add it at! is there a way i can add this code here by changing how to code works or functions? maybe a variable or a print?

Any help is appreciated!


Michael C.
    Viewed: 25,487 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: A little lost any help?" Posted: @ 2:48 am on Dec 05 2007    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

You can post the code using the BBCode "Code&qu ot; button above in the reply box, next to quote, link, italic and bold. Paste in your code where it says, "enter code here."

I see no error in the line: <? include($_SERVE R['DOCUMENT_RO OT'].'/commen ts.php'); ?> by itself. Did it give you a line number of the error? What code is that? I would say that your error is above this line of code...




-bs0d | AllSyntax.com

    Viewed: 25,441 Times | Reply to This | To top
  This user is offline  mikecopeland
  Subject: "re: A little lost any help?" Posted: @ 7:13 pm on Dec 05 2007    
Member #: 499
Rank: User - (8)
Since: 12/05/07
Posts: 8

Sorry may not of posted enough of the code! The error is with what i said bu i failed to mention that i am trying to place it in a arleady going php tag you will notice at the end of that code }.

The idea is that it brings in the code froma different script and displays it directly on the page, like a addon or plugin say simular to a callender. so the real question is
how to place that line of code

"<? include($_SERVE R['DOCUMENT_RO OT'].'/commen ts.php'); ?>"

into a php script that will have no html or body, the php post the info itself.
And i need it to work in the php script inside

$result_final .= "<tr&g t;\n\t<td align='center '>
<br />
<img src='".$ images_dir.&qu ot;/".$ph oto_filename.& quot;' border='0' alt='".$ photo_caption. "' />
<br />
$photo_cap tion
<br />
<br />
<? include($_SERVE R['DOCUMENT_RO OT'].'/commen ts.php'); ?>
</td> ;
</tr> ;";

}

this is the portion on the script i am wanting this code to work!

where you see it is where i am wanting it.

I have tried a few ways to get this to work it only will work in a html script. but not as i intended. need it to appear inside <?php ?> tages as i show above!




Michael C.

    Viewed: 25,427 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: A little lost any help?" Posted: @ 9:23 pm on Dec 05 2007    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

Well, thats how you would include it... It has to be within a .php file. If it's a .html file, then the server will not recognize the code.

on the line that says: $photo_caption< br />
are you trying to display that variable? should it be echo($photo_cap tion); ?

If you're already "in php" then you wont need the <? and ?> around the include();




-bs0d | AllSyntax.com

    Viewed: 25,420 Times | Reply to This | To top
  This user is offline  mikecopeland
  Subject: "re: A little lost any help?" Posted: @ 12:51 am on Dec 06 2007    
Member #: 499
Rank: User - (8)
Since: 12/05/07
Posts: 8

the $photo_caption works fine its great even!
I did try to take out the <? ?> tags still didnt work i will redo it. both the file i have this code in and the comments file is php. why i am a little confused why it wont work! i will take out the tags and post the code and run it agian and post the other error it gives!




Michael C.

    Viewed: 25,412 Times | Reply to This | To top
  This user is offline  mikecopeland
  Subject: "re: A little lost any help?" Posted: @ 12:53 am on Dec 06 2007    
Member #: 499
Rank: User - (8)
Since: 12/05/07
Posts: 8

Ok still the same type of error taking out the <? ?> tags

Parse error: parse error, unexpected T_ENCAPSED_AND_ WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING

Is there another way to write this line to include in a php script?

Its like calling a php script inside a php script with out using html after the php tags only inside the php script itself!

Any ideas?




Michael C.

    Viewed: 25,409 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: A little lost any help?" Posted: @ 3:56 am on Dec 06 2007    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

Yea you would just call the include(); function no problem. Using the bbcode for code (button above), can you poste the full code, that maybe most helpful.




-bs0d | AllSyntax.com

    Viewed: 25,401 Times | Reply to This | To top
  This user is offline  mikecopeland
  Subject: "re: A little lost any help?" Posted: @ 4:27 am on Dec 06 2007    
Member #: 499
Rank: User - (8)
Since: 12/05/07
Posts: 8

ok here yeah this might be easier!
I need the code added in the initial php script 3rd section with the full photo view! the full photo starts on line 104 if <?php is on line one.
lines 132 - 133 is where i want the code line to work!

Code:


<?php
include(" include/session .php";
include(" ;config.inc.php ";

if($session-&g t;logged_in){
}else{
header("L ocation: main.php"< img src=http://www. allsyntax.com/f orums/images/sm ilies/wink.gif border=0>;
}

// initialization
$result_array = array();
$counter = 0;

$cid = (int)($_GET['c id']);
$pid = (int)($_GET['p id']);

// Category Listing

if( empty($cid) && empty($pid) )
{
$number_of_ca tegories_in_row = 4;

$result = mysql_query( "SELECT c.category_id,c .category_name, COUNT(photo_id)
FROM gallery_categor y as c
LEFT JOIN gallery_photos as p ON p.photo_categor y = c.category_id
GROUP BY c.category_id& quot; );
while( $row = mysql_fetch_arr ay( $result ) )
{
$result_arra y[] = "<a href='photos.p hp?cid=". $row[0]." '>".$ row[1]."& lt;/a> "." (".$row[2 ]."" ;;
}
mysql_free_re sult( $result );

$result_final = "<tr&g t;\n";

foreach($resu lt_array as $category_link)
{
if($counter == $number_of_cate gories_in_row)
{
$counter = 1;
$result_fin al .= "\n</ tr>\n<tr >\n";
}
else
$counter++;

$result_fina l .= "\t<t d>".$c ategory_link.& quot;</td> ;\n";
}

if($counter)
{
if($number_o f_categories_in _row-$counter)
$result_fina l .= "\t<t d colspan='&quo t;.($number_of_ categories_in_r ow-$counter).& quot;'>& ;nbsp;</td&g t;\n";

$result_fina l .= "</tr& gt;";
}
}


// Thumbnail Listing

else if( $cid && empty( $pid ) )
{
$number_of_th umbs_in_row = 5;

$result = mysql_query( "SELECT photo_id,photo_ caption,photo_f ilename FROM gallery_photos WHERE photo_category= '".addsl ashes($cid).&q uot;'" );
$nr = mysql_num_rows( $result );

if( empty( $nr ) )
{
$result_fina l = "\t<t r><td> No Category found</td> ;</tr>\n ";
}
else
{
while( $row = mysql_fetch_arr ay( $result ) )
{
$result_arr ay[] = "<a href='photos.p hp?cid=$cid& ;pid=".$r ow[0]."' ><img src='".$ images_dir.&qu ot;/tb_". $row[2]." ' border='0' alt='".$ row[1]." ' /></a> ";
}
mysql_free_r esult( $result );

$result_fina l = "<tr&g t;\n";

foreach($res ult_array as $thumbnail_link )
{
if($counter == $number_of_thum bs_in_row)
{
$counter = 1;
$result_fi nal .= "\n</ tr>\n<tr >\n";
}
else
$counter++;

$result_fin al .= "\t<t d>".$t humbnail_link. "</td&g t;\n";
}

if($counter)
{
if($number_ of_photos_in_ro w-$counter)
$result_fina l .= "\t<t d colspan='&quo t;.($number_of_ photos_in_row-$ counter)." ;'>&nbs p;</td>\ n";

$result_fin al .= "</tr& gt;";
}
}
}

// Full Size View of Photo
else if( $pid )
{
$result = mysql_query( "SELECT photo_caption,p hoto_filename FROM gallery_photos WHERE photo_id='&qu ot;.addslashes( $pid)."' " );
list($photo_c aption, $photo_filename ) = mysql_fetch_arr ay( $result );
$nr = mysql_num_rows( $result );
mysql_free_re sult( $result );

if( empty( $nr ) )
{
$result_fina l = "\t<t r><td> No Photo found</td> ;</tr>\n ";
}
else
{
$result = mysql_query( "SELECT category_name FROM gallery_categor y WHERE category_id=' ".addslash es($cid)." ;'" );
list($catego ry_name) = mysql_fetch_arr ay( $result );
mysql_free_r esult( $result );

$result_fina l .= "<tr&g t;\n\t<td& gt;
<a href='photos.p hp'>Categor ies</a> &gt;
<a href='photos.p hp?cid=$cid'&g t;$category_nam e</a>< /td>\n</ tr>\n" ;;

$result_fina l .= "<tr&g t;\n\t<td align='center '>
<br />
<img src='".$ images_dir.&qu ot;/".$ph oto_filename.& quot;' border='0' alt='".$ photo_caption. "' />
<br />
$photo_cap tion
<br />
<br />
</td> ;
</tr> ;";

}
}

?>
<html>
<head>
<meta http-equiv=&qu ot;Content-Type " content=" text/html; charset=iso-885 9-1">
<link href="def ault.css" rel="styl esheet" type="tex t/css"> ;<title>P hoto Gallery</tit le>
<style type="tex t/css"> ;
<!--
.style1 {color: #0000FF}
-->
</style>
</head>
<body>
<table width="10 0%" border="0 " cellpadding=&q uot;0" cellspacing=&q uot;0" align="ce nter">
<tr>
<td>
<table width="10 0%" border="0 " cellspacing=&q uot;0" cellpadding=&q uot;0"> ;
<tr>
<td>< ;img src="imag es/index01.jpg " alt="&qu ot; width="49 0" height="1 14">&l t;/td>
<td align="ri ght" valign="t op">
<form name="for m1" method="p ost" action=" ">
</form> ;
</td>
</tr>
</table>
<table width="10 0%" border="0 " cellspacing=&q uot;0" cellpadding=&q uot;0"> ;
<tr>
<td width="19 4">
<table width="19 4" border="0 " cellspacing=&q uot;0" cellpadding=&q uot;0"> ;
<tr>
<td colspan=" 3">< ;img src="imag es/index03.gif " alt="&qu ot; width="19 4" height="4 0">< ;/td>
</tr>
<tr>
<td>< ;a href="#& quot;><im g src="imag es/index04.gif " alt="&qu ot; width="74 " height="2 6" border="0 ">< /a></td&g t;
<td>< ;a href="mai n.php"> ;<img src="imag es/index05.gif " alt="&qu ot; width="51 " height="2 6" border="0 ">< /a></td&g t;
<td>< ;a href="con tact.php" ><img src="imag es/index06.gif " alt="&qu ot; width="69 " height="2 6" border="0 ">< /a></td&g t;
</tr>
</table>
</td>
<td>
<table width="10 0%" border="0 " cellspacing=&q uot;0" cellpadding=&q uot;0"> ;
<tr>
<td width="12 6" background=&qu ot;images/index 07.gif"&g t;<a href="mai n.php"> ;<img src="imag es/index08.jpg " alt="&qu ot; width="12 6" height="4 1" border="0 ">< /a></td&g t;
<td width="11 0" background=&qu ot;images/index 07.gif"&g t;<a href="blo g.php"> ;<img src="imag es/index09.jpg " alt="&qu ot; width="11 0" height="4 1" border="0 ">< /a></td&g t;
<td width="11 0" background=&qu ot;images/index 07.gif"&g t;<a href="pho tos.php"& gt;<img src="imag es/index10.jpg " alt="&qu ot; width="11 0" height="4 1" border="0 ">< /a></td&g t;
<td width="11 0" background=&qu ot;images/index 07.gif"&g t;<a href="sta ts.php"&g t;<img src="imag es/index11.jpg " alt="&qu ot; width="11 0" height="4 1" border="0 ">< /a></td&g t;
<td width="11 0" background=&qu ot;images/index 07.gif"&g t;<a href="con tact.php" ><img src="imag es/index12.jpg " alt="&qu ot; width="11 0" height="4 1" border="0 ">< /a></td&g t;
<td background=&qu ot;images/index 07.gif"&g t;&nbsp;< ;/td>
</tr>
<tr>
<td colspan=" 6" background=&qu ot;images/index 13.gif"&g t;<img src="imag es/index13.gif " alt="&qu ot; width="30 " height="2 5">< ;/td>
</tr>
</table>
</td>
</tr>
</table>
<table width="10 0%" border="0 " cellspacing=&q uot;0" cellpadding=&q uot;0"> ;
<tr>
<td>< ;img src="imag es/spacer.gif& quot; alt="&qu ot; width="1 " height="1 ">< /td>
<td>< ;img src="imag es/spacer.gif& quot; alt="&qu ot; width="1 " height="1 ">< /td>
<td>< ;img src="imag es/spacer.gif& quot; alt="&qu ot; width="1 " height="1 ">< /td>
<td>< ;img src="imag es/spacer.gif& quot; alt="&qu ot; width="1 " height="1 ">< /td>
<td>< ;img src="imag es/spacer.gif& quot; alt="&qu ot; width="1 " height="1 ">< /td>
</tr>
<tr valign="t op">
<td width="1 "><i mg src="imag es/spacer.gif& quot; alt="&qu ot; width="1 " height="1 ">< /td>
<td width="19 2">
<table width="19 2" border="0 " cellspacing=&q uot;0" cellpadding=&q uot;0"> ;
<tr>
<td background=&qu ot;images/index 14.gif"&g t;<img src="imag es/index15.gif " alt="&qu ot; width="23 " height="3 1">< ;img src="imag es/index16.gif " alt="&qu ot; width="14 9" height="3 1">< ;/td>
</tr>
<tr>
<td>< ;img src="imag es/spacer.gif& quot; alt="&qu ot; width="1 " height="1 ">< /td>
</tr>
<tr>
<td class="bg 1">
<table width="18 0" border="0 " cellspacing=&q uot;0" cellpadding=&q uot;0"> ;
<tr>
<td width="12 ">< img src="imag es/spacer.gif& quot; alt="&qu ot; width="12 " height="5 ">< /td>
<td width="18 ">< img src="imag es/spacer.gif& quot; alt="&qu ot; width="18 " height="1 ">< /td>
<td width="15 0">< ;img src="imag es/spacer.gif& quot; alt="&qu ot; width="15 0" height="1 ">< /td>
</tr>
<tr>
<td>&am p;nbsp;</td& gt;
<td>< ;img src="imag es/index18.gif " alt="&qu ot; width="8 " height="9 " hspace="2 " vspace="1 0">< ;/td>
<td>< ;a href="mai n.php" class="li nk1">H ome</a>&l t;/td>
</tr>
<tr>
<td>< ;img src="imag es/spacer.gif& quot; alt="&qu ot; width="1 " height="1 ">< /td>
<td colspan=" 2">< ;img src="imag es/index19.gif " alt="&qu ot; width="16 8" height="2 ">< /td>
</tr>
<tr>
<td>&am p;nbsp;</td& gt;
<td>< ;img src="imag es/index18.gif " alt="&qu ot; width="8 " height="9 " hspace="2 " vspace="1 0">< ;/td>
<td>< ;a href="con tact.php" class="li nk1">C ontact</a> ;</td>
</tr>
<tr>
<td>< ;img src="imag es/spacer.gif& quot; alt="&qu ot; width="1 " height="1 ">< /td>
<td colspan=" 2">< ;img src="imag es/index19.gif " alt="&qu ot; width="16 8" height="2 ">< /td>
</tr>
<tr>
<td>&am p;nbsp;</td& gt;
<td>< ;img src="imag es/index18.gif " alt="&qu ot; width="8 " height="9 " hspace="2 " vspace="1 0">< ;/td>
<td>< ;a href="sta ts.php" class="li nk1">W ho's on</a>< ;/td>
</tr>
<tr>
<td>< ;img src="imag es/spacer.gif& quot; alt="&qu ot; width="1 " height="1 ">< /td>
<td colspan=" 2">< ;img src="imag es/index19.gif " alt="&qu ot; width="16 8" height="2 ">< /td>
</tr>
<tr>
<td>&am p;nbsp;</td& gt;
<td>< ;img src="imag es/index18.gif " alt="&qu ot; width="8 " height="9 " hspace="2 " vspace="1 0">< ;/td>
<td>< ;a href="reg ister.php" ; class="li nk1">R egister</a&g t;</td>
</tr>
<tr>
<td>< ;img src="imag es/spacer.gif& quot; alt="&qu ot; width="1 " height="1 ">< /td>
<td colspan=" 2">< ;img src="imag es/index19.gif " alt="&qu ot; width="16 8" height="2 ">< /td>
</tr>
<tr>
<td>&am p;nbsp;</td& gt;
<td>< ;img src="imag es/index18.gif " alt="&qu ot; width="8 " height="9 " hspace="2 " vspace="1 0">< ;/td>
<td>< ;?
if($session-> ;logged_in){
echo "<a href=\"b log.php\" ; class=\" link1\"& gt;Blog</a&g t;";
} ?></td> ;
</tr>
<tr>
<td>< ;img src="imag es/spacer.gif& quot; alt="&qu ot; width="1 " height="1 ">< /td>
<td colspan=" 2">< ;img src="imag es/index19.gif " alt="&qu ot; width="16 8" height="2 ">< /td>
</tr>
<tr>
<td>&am p;nbsp;</td& gt;
<td>< ;img src="imag es/index18.gif " alt="&qu ot; width="8 " height="9 " hspace="2 " vspace="1 0">< ;/td>
<td>< ;?
if($session-> ;logged_in){
echo "<a href=\"p hotos.php\&qu ot; class=\" link1\"& gt;Photos</a >";
} ?></td> ;
</tr>
<tr>
<td>< ;img src="imag es/spacer.gif& quot; alt="&qu ot; width="1 " height="1 ">< /td>
<td colspan=" 2">< ;img src="imag es/index19.gif " alt="&qu ot; width="16 8" height="2 ">< /td>
</tr>
<tr>
<td>&am p;nbsp;</td& gt;
<td>< ;img src="imag es/index18.gif " alt="&qu ot; width="8 " height="9 " hspace="2 " vspace="1 0">< ;/td>
<td& gt;<?
if($session-> ;logged_in){
echo "<a href=\"u serinfo.php?use r=$session-> username\&quo t; class=\" link1\"& gt;My Account</a&g t;";
} ?></td> ;
</tr>
<tr>
<td>< ;img src="imag es/spacer.gif& quot; alt="&qu ot; width="1 " height="1 ">< /td>
<td colspan=" 2">< ;img src="imag es/index19.gif " alt="&qu ot; width="16 8" height="2 ">< /td>
</tr>
<tr>
<td>&am p;nbsp;</td& gt;
<td>< ;img src="imag es/index18.gif " alt="&qu ot; width="8 " height="9 " hspace="2 " vspace="1 0">< ;/td>
<td>< ;/td>
</tr>
<tr>
<td>< ;img src="imag es/spacer.gif& quot; alt="&qu ot; width="1 " height="1 ">< /td>
<td colspan=" 2">< ;img src="imag es/index19.gif " alt="&qu ot; width="16 8" height="2 ">< /td>
</tr>
<tr>
<td>&am p;nbsp;</td& gt;
<td>< ;img src="imag es/index18.gif " alt="&qu ot; width="8 " height="9 " hspace="2 " vspace="1 0">< ;/td>
<td>< ;/td>
</tr>
<tr>
<td>< ;img src="imag es/spacer.gif& quot; alt="&qu ot; width="1 " height="1 ">< /td>
<td colspan=" 2">< ;img src="imag es/index19.gif " alt="&qu ot; width="16 8" height="2 ">< /td>
</tr>
<tr>
<td>&am p;nbsp;</td& gt;
<td>< ;img src="imag es/index18.gif " alt="&qu ot; width="8 " height="9 " hspace="2 " vspace="1 0">< ;/td>
<td>< ;/td>
</tr>
<tr>
<td>< ;img src="imag es/spacer.gif& quot; alt="&qu ot; width="1 " height="1 ">< /td>
<td colspan=" 2">< ;img src="imag es/index19.gif " alt="&qu ot; width="16 8" height="2 ">< /td>
</tr>
<tr>
<td>&am p;nbsp;</td& gt;
<td>< ;img src="imag es/index18.gif " alt="&qu ot; width="8 " height="9 " hspace="2 " vspace="1 0">< ;/td>
<td>< ;?
if($ses sion->logged _in){
if($session-> ;isAdmin()){
echo "<a href=\"p reupload.php\ " class=\" link1\"& gt;Upload Photos</a> ;";
} ?><? } ?></td> ;
</tr>
<tr>
<td>< ;img src="imag es/spacer.gif& quot; alt="&qu ot; width="1 " height="1 ">< /td>
<td colspan=" 2">< ;img src="imag es/index19.gif " alt="&qu ot; width="16 8" height="2 ">< /td>
</tr>
<tr>
<td>&am p;nbsp;</td& gt;
<td>< ;img src="imag es/index18.gif " alt="&qu ot; width="8 " height="9 " hspace="2 " vspace="1 0">< ;/td>
<td>< ;?
if($ses sion->logged _in){
if($session-> ;isAdmin()){
echo "<a href=\"s mp.php\" class=\" link1\"& gt;Update Center</a> ;";
} ?><? } ?></td> ;
</tr>
<tr>
<td>< ;img src="imag es/spacer.gif& quot; alt="&qu ot; width="1 " height="1 ">< /td>
<td colspan=" 2">< ;img src="imag es/index19.gif " alt="&qu ot; width="16 8" height="2 ">< /td>
</tr>
<tr&g t;
<td>&am p;nbsp;</td& gt;
<td>< ;img src="imag es/index18.gif " alt="&qu ot; width="8 " height="9 " hspace="2 " vspace="1 0">< ;/td>
<td>< ;?
if($ses sion->logged _in){
if($session-> ;isAdmin()){
echo "<a href=\"a dmin/admin.php \" class=\" link1\"& gt;Admin Center</a> ;";
} ?><? } ?>
</td>
</tr>
<tr>
<td>< ;img src="imag es/spacer.gif& quot; alt="&qu ot; width="1 " height="1 ">< /td>
<td colspan=" 2">< ;img src="imag es/index19.gif " alt="&qu ot; width="16 8" height="2 ">< /td>
</tr>
<tr>
<td>&am p;nbsp;</td& gt;
<td>< ;img src="imag es/index18.gif " alt="&qu ot; width="8 " height="9 " hspace="2 " vspace="1 0">< ;/td>
<td>
<?
if($session-> ;logged_in){
echo "<a href=\"p rocess.php\&q uot; class=\" link1\"& gt;Logout</a >";
} ?>
</td >
</tr>
<tr>
<td>< ;img src="imag es/spacer.gif& quot; alt="&qu ot; width="1 " height="1 ">< /td>
<td>< ;img src="imag es/spacer.gif& quot; alt="&qu ot; width="1 " height="1 ">< /td>
</tr>
</table>
</td>
</tr>
</table>
<table width="19 2" border="0 " cellspacing=&q uot;0" cellpadding=&q uot;0"> ;
<tr>
<td background=&qu ot;images/index 14.gif"&g t;&nbsp;< ;/td>
</tr>
<tr>
<td>< ;img src="imag es/spacer.gif& quot; alt="&qu ot; width="1 " height="1 ">< /td>
</tr>
<tr>
<td align="ce nter" background=&qu ot;images/index 21.gif"&g t;<img src="imag es/index22.gif " alt="&qu ot; width="16 8" height="2 ">< /td>
</tr>

</table>
</td>
<td width="1 "><i mg src="imag es/spacer.gif& quot; alt="&qu ot; width="1 " height="1 ">< /td>
<td align="ce nter">
<table width="10 0%" border="0 " cellpadding=&q uot;0" cellspacing=&q uot;0"> ;
<tr>
<td background=&qu ot;images/index 14.gif"&g t;<img src="imag es/index15.gif " alt="&qu ot; width="23 " height="3 1">< ;img src="imag es/index30.gif " alt="&qu ot; width="50 0" height="3 1">< ;/td>
</tr>
<tr>
<td>< ;img src="imag es/spacer.gif& quot; alt="&qu ot; width="1 " height="1 ">< /td>
</tr>
</table>
<table width="10 0%" border="0 " cellspacing=&q uot;15" cellpadding=&q uot;0"> ;
<tr>
<td class="al ign-justify&qu ot;>
<P>< ?=$result_final ?></P>
</td>
</tr>
</table>
</td>
<td width="1 "><i mg src="imag es/spacer.gif& quot; alt="&qu ot; width="1 " height="1 ">< /td>
</tr>
</table>
<table width="10 0%" border="0 " cellspacing=&q uot;0" cellpadding=&q uot;0"> ;
<tr>
<td height="5 1" align="ce nter" background=&qu ot;images/index 41.gif"&g t;
<table border="0 " cellspacing=&q uot;0" cellpadding=&q uot;0"> ;
<tr>
<td>< ;a href="mai n.php"> ;<strong> Home</strong ></a>& lt;/td>
<td>< ;img src="imag es/index43.gif " alt="&qu ot; width="7 " height="7 " hspace="1 0">< ;/td>
<td>< ;a href="blo g.php"> ;<strong> Blog</strong ></a>& lt;/td>
<td>< ;img src="imag es/index43.gif " alt="&qu ot; width="7 " height="7 " hspace="1 0">< ;/td>
<td>< ;a href="pho tos.php"& gt;<strong&g t;Photos</st rong></a& gt;</td>
<td>< ;img src="imag es/index43.gif " alt="&qu ot; width="7 " height="7 " hspace="1 0">< ;/td>
<td>< ;a href="sta ts.php"&g t;<strong> ;Who's On</strong&g t;</a>< ;/td>
<td>< ;img src="imag es/index43.gif " alt="&qu ot; width="7 " height="7 " hspace="1 0">< ;/td>
<td>< ;a href="con tact.php" ><strong& gt;Contact</ strong></ a></td> ;
</tr>
</table>
</td>
</tr>
<tr>
<td height="4 8" align="ce nter" background=&qu ot;images/index 42.gif"&g t;<span class="te xt3">
All rights reserved.</s pan></td& gt;
</tr>
<tr>
<td>&am p;nbsp;</td& gt;
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>



Edited at 01:45:42 pm on 12/06/07


Michael C.

    Viewed: 25,398 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: A little lost any help?" Posted: @ 1:46 pm on Dec 06 2007    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

Ok heres your snippet of code:
Code:

$result_final .= "<tr&g t;\n\t<td align='center '>
<br />
<img src='".$ images_dir.&qu ot;/".$ph oto_filename.& quot;' border='0' alt='".$ photo_caption. "' />
<br />
$photo_caption< br /> <br />
<br />
<? include($_SERVE R['DOCUMENT_RO OT'].'/commen ts.php'); ?>
</td>
</tr>&qu ot;;

Change this to:
Code:
$result_final .= "<tr&g t;\n\t<td align='center '>
<br />
<img src='".$ images_dir.&qu ot;/".$ph oto_filename.& quot;' border='0' alt='".$ photo_caption. "' />
<br />
$photo_caption< br /> <br />
<br />"; include($_SERVE R['DOCUMENT_RO OT'].'/commen ts.php');
$result_final .= "</td& gt;</tr> ";

Let me know how that works.




-bs0d | AllSyntax.com

    Viewed: 25,379 Times | Reply to This | To top
  This user is offline  mikecopeland
  Subject: "re: A little lost any help?" Posted: @ 6:07 pm on Dec 06 2007    
Member #: 499
Rank: User - (8)
Since: 12/05/07
Posts: 8

It worked to making it appear only on the full screen! no errors.
However it made the comment box and comments go to the top of the html. before my site layout starts! any idea to make it appear below the photo and stay there?

And thank you for the help!




Michael C.

    Viewed: 25,366 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: A little lost any help?" Posted: @ 6:45 pm on Dec 06 2007    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

Sounds like you included it in your "page header"; You'll need to include it in the body of your pages or script that generates your pages.




-bs0d | AllSyntax.com

    Viewed: 25,361 Times | Reply to This | To top
  This user is offline  mikecopeland
  Subject: "re: A little lost any help?" Posted: @ 10:37 pm on Dec 06 2007    
Member #: 499
Rank: User - (8)
Since: 12/05/07
Posts: 8

I figured since it is a include and i am not telling it where it should show it decides that it should be the first thing followed by my layout!

Since the $result_final is being called inside my layout by the <?=$result_f inal?> i need to do something like that also for the comments!

So is there a way to get the include:
<? include($_SERVE R['DOCUMENT_RO OT'].'/commen ts.php'); ?>

to work as a function inside this script?
Include comments.php => function comments() => $show_comments< br />
Maybe something like that ?or i could just try and add both scripts together!

Any idea is appreciated!




Michael C.

    Viewed: 25,348 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: A little lost any help?" Posted: @ 12:14 am on Dec 07 2007    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

Wherever you put the comments in your code, thats where they will appear on the page (accordingly). It's as simple as that.




-bs0d | AllSyntax.com

    Viewed: 25,344 Times | Reply to This | To top
  This user is offline  mikecopeland
  Subject: "re: A little lost any help?" Posted: @ 2:07 am on Dec 07 2007    
Member #: 499
Rank: User - (8)
Since: 12/05/07
Posts: 8

I will give a idea i have a shot and see what happens! Thank you for helping me out!




Michael C.

    Viewed: 25,341 Times | Reply to This | To top
  This user is offline  gravy
  Subject: "re: A little lost any help?" Posted: @ 2:29 am on Dec 23 2007    

Member #: 294
Rank: User - (63)
Since: 03/07/07
Posts: 66
From: MN

  mikecopeland said...

< i> I will give a idea i have a shot and see what happens! Thank you for helping me out!

Are you still having problems with this? Might be able to help ya out...




Photo Hosting Scripts? It's what I do....

    Viewed: 24,846 Times | Reply to This | To top
Viewing Page: 1 of 1


1 |

You must be logged in to post on the forums. Login or Register








"AllSyntax.com" Copyright © 2002-2018; All rights lefted, all lefts righted.
Privacy Policy  |  Internet Rank