954,591 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

need a lil help

hello guys, need some help-- building a little site and when i tried to install the coments script onto the page this is the error i get:

Parse error: syntax error, unexpected '<' in /home/shatter/public_html/newtest.php on line 204

now-- i am very inexperienced and trying to loearn how to do this-- but what could be causing this error and do you have somewehre to point me for reference on how to fix it? thanks for the help

clutch
Newbie Poster
2 posts since Jan 2007
Reputation Points: 10
Solved Threads: 0
 

Please post the code in newtest.php.
Thats the only way someone can help. :)

digital-ether
Nearly a Posting Virtuoso
Moderator
1,293 posts since Sep 2005
Reputation Points: 461
Solved Threads: 101
 


"Torn Between Two"




Home

About Allen Portfolio Publications Personalized Poetry Guestbook Forum

PicturePicturebars1.jpg



Torn Between Two

I need you with a clear
mind

to make the right decisions

about your heart and mine.

I know you are caught between two,

but only if you knew

how much I'm in love with you...

Torn Between Two

I never pulled your hair, or put you down,

or beat you up, or threw you to the ground;

that's not what real men do

to the love of their life,

I just want you to be my wife...

Torn Between Two

Will you give us a chance

or will you rip us apart?

Your torn between two,

one love is real,

and the others may give you the chills...

Torn Between Two

I can't make that decision

on who you choose;

but if you like to be abused

and used,

I'm not that dude.

So I will choose for you,

but know I do love you...

Torn Between Two

Comment Comments: Name: Email: Comments: <?php include('settings.php'); if ($page_id=="") { echo $format_no_id_view; } else { $fp = fopen( $view_file,"r"); $data = fread($fp, 80000); fclose( $fp ); $data_array = split ("$spilter", $data); $total_post = count($data_array) - 1; $data_format = "$dataTotal $total_post comments posted here so far."; if (total_post =="0") { echo $no_post; } else { echo $data_format; } } ?> ?>s

Future Area for comments on the above poem

Gallery

Coming Soon

  • Coming Soon
  • Coming Soon
  • Coming Soon
  • Coming Soon
  • Coming Soon

Coming Soon

Some Links



Forum

MySpace Urban Dictionary Home


Blog

DG.com Home Home


Original design by Trey B.
(c)
2005 shatteredhearts ent llc.

clutch
Newbie Poster
2 posts since Jan 2007
Reputation Points: 10
Solved Threads: 0
 

Hi,

Not sure what the cause of the error is but there are a few things in your code that caught my eye...

Is there a reason why you're including the files via the web?
[php]
include('http://www.shatteredheartspoetry.com/comments_manager/form.php');
[/php]

This will create a new HTTP connection to the retrieve the page.
It doesn't look very secure also.. if you're executing code received from HTTP, you're never entirely sure if it hasn't been tampered with.

Its also an unnecessary reliance on having php configuration allow remote file inclusion. (dependent on allow_url_fopen)

On line 145, the PHP tags are in shorthand notation.

[php]<? echo $page_id ?>[/php]

Its good practice to use:

[php]<?php echo $page_id; ?>[/php]

in case you need to move your code to another server that will not read the shorthand notation.

digital-ether
Nearly a Posting Virtuoso
Moderator
1,293 posts since Sep 2005
Reputation Points: 461
Solved Threads: 101
 

Thanks for posting your code in [ code ] tags. Please tell us, though, where is line 205?

Dani, is there any chance of getting line numbers in the [ code ] sections?

Puckdropper
Posting Pro
500 posts since Jul 2004
Reputation Points: 23
Solved Threads: 23
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You