Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 07:26 pm EDT

Geeklog Forums

Block Prase Error


Del

Anonymous

I have turned on PHP execute for my static pages and I am trying to code some PHP scripts... but I keepgetting a parse error.

Here is the code I am using:
$email = $_REQUEST['email'] ;
$message = $_REQUEST['blahblah'] ;

mail( "myemail@yahoo.com", "Feedback Form Results",
$message, "From: $email" );
header( "Location: http://www.example.com/thankyou.html" );
?>

Name: Email:


Here is the parse error:

Parse error: parse error, unexpected '

wtf???? why doesnt it work??? where is the parse error?
 Quote

Del

Anonymous
that turned out wrong

here is the code I am using:

Text Formatted Code
<?php
  $email = $_REQUEST['email'] ;
  $message = $_REQUEST['blahblahblahblah'] ;

  mail( "myemail@yahoo.com", "Feedback Form Results",
    $message, "From: $email" );
  header( "Location: http://www.example.com/thankyou.html" );
?>


 
 Quote

Del

Anonymous
why do I get this parse error with that code? it looks good to me!

Text Formatted Code

Parse error: parse error, unexpected '<' in /my/path/public_html/staticpages/index.php(59) : eval()'d code on line 1

 
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
As mentioned in the documentation, you shouldn't enclose your code in PHP tags ...

bye, Dirk
 Quote

Del

Anonymous
ok, I removed the
any ideas now Dirk?
 Quote

Del

Anonymous
that was supposed to read ..

"I removed the PHP tags" and it still doesnt work

any ideas now Dirk?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Sorry, but my crystal ball seems to be out of service right now ...

In other words: What error do you get now?

bye, Dirk
 Quote

Del

Anonymous
the exact same error:

Text Formatted Code
Parse error: parse error, unexpected '<' in /my/path/public_html/staticpages/index.php(59) : eval()'d code on line 1
 
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by Del: the exact same error

That's impossible if you really removed the PHP tags, since there wouldn't be any '&lt;' sign left to complain about ...

bye, Dirk
 Quote

Nygrah

Anonymous
I am having exactly the same problems with my static pages. I have not been about to include PHP and I followed all the documentation. Please help!
 Quote

Nygrah

Anonymous
Forgot to add that I am simply trying to use the php
include_once(''); command.
 Quote

Nygrah

Anonymous
Is there any thing I should put with the include command in order to get it to work? I really need to get the php to work in the static pages.
 Quote

Nygrah

Anonymous
No one else is having this problem?
 Quote

Status: offline

DTrumbower

Forum User
Moderator
Registered: 01/08/03
Posts: 507
Example code is always easier to help with, then guessing.
 Quote

Nygrah

Anonymous
I think I already explained that I simply wanted to do a php include. Only in this instance I wanted to include another staticpage into a staticpage.

I used include_once('http://www.xxx.com/staticpages/index.php/table'); It doesn't appear within in the staticpage. I also tried to include it as plain html.
ie.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by Nygrah: include_once('http://www.xxx.com/staticpages/index.php/table');

Are you sure this is really what you want to do? Besides, that will only work if url_fopen is enabled.

bye, Dirk
 Quote

All times are EDT. The time is now 07:26 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content