Parse Error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mike08
Forum Commoner
Posts: 57
Joined: Mon Apr 19, 2004 3:18 am

Parse Error

Post by mike08 »

could someone try and help me sort this out, just really annoying me

the error is
Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in C:\Program Files\Apache Group\Apache2\htdocs\shopbots\poll1\vote.php on line 72

points to this line, think it has something to do with the target

Code: Select all

echo "<font face="Verdana" size="1"><a href="".$PHP_SELF."?results=1" target="http://localhost/shopbots/admin/poll_index.php">View results</a></font>";
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

mike08
Forum Commoner
Posts: 57
Joined: Mon Apr 19, 2004 3:18 am

Post by mike08 »

Thanks for that, that's sorted that line out.

could you check if this is correct please

Code: Select all

<form method="post" action="<?=$PHP_SELF?>" target="http://localhost/shopbots/admin/poll_index.php">
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

as long as you got short tags on yep.
mike08
Forum Commoner
Posts: 57
Joined: Mon Apr 19, 2004 3:18 am

thanks

Post by mike08 »

can i ask what you mean by short tags on

how do i put them on. is there a setting or something, sorry im fairly new to all this.


Another quick question do these two php_auth user and php_pw - are they set anywhere, because im stuggling to get http authentication to work, the window comes up and i type in user and open but nothing happens just bounces back. Any ideas why?





$PHP_AUTH_USER != 'user' ) || ( $PHP_AUTH_PW != 'open' ) ) {
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

short tags:
<? code
<?= echo'd stuff

I don't know how the authentication user/password is set.. but I'd bet it's stored in $_SERVER.
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

Feyd and phenom are late :P

Mike needs to learn how to make his own topic instead of jacking someone else's..
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

LiLpunkSkateR, LOL :lol: I agree!
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

Just a hint.

1. Try finding a editor that supports syntax highlighting. There are several threads on this forum about editors, so do a serach.
2. Use the preview, before posting PHP code in your post.

This because the syntax highlighting will reveal alot of issues in code, that is not allways visible as plain text. Just take a look at the issues above within PHP tags...
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Topic split from another - please don't hijack threads.

Mac
Post Reply