Reply
<?php echo $PHP_SELF ?>
Old 02-23-2005, 05:54 PM <?php echo $PHP_SELF ?>
Junior Talker

Posts: 1
Can anyone please tell why i get this?

Parse error: parse error, unexpected T_STRING in /home/rubberne/public_html/drs/edit.php on line 33

<form method="post" action="<?php echo $PHP_SELF?>">
poudt is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 02-23-2005, 05:57 PM
Christopher's Avatar
Iced Cap

Posts: 3,111
Location: Toronto, Ontario
You're missing a semicolon.

Code:
<form method="post" action="<?php echo $PHP_SELF; ?>">
------------------------------------------------^
Christopher is offline
Reply With Quote
View Public Profile Visit Christopher's homepage!
 
Old 02-23-2005, 06:37 PM
Gaffer Sports's Avatar
Ultra Talker

Posts: 397
Name: Steve
Location: Scotland
Code:
<form method="post" action="<?php echo "$PHP_SELF" ?>">
No colon needed.

Steve.
__________________
Media Help & Discussion
Gaffer Sports is offline
Reply With Quote
View Public Profile Visit Gaffer Sports's homepage!
 
Old 02-23-2005, 11:37 PM
Christopher's Avatar
Iced Cap

Posts: 3,111
Location: Toronto, Ontario
Yes, or that way I just don't like using quotes You don't need them, as long as you put a space after it.

// Edit
Never mind, my mind is somewhere else. The ? isn't a valid variable character, you shouldn't even require a space. The original code should work. The error is likely somewhere before the line it pointed to.
Christopher is offline
Reply With Quote
View Public Profile Visit Christopher's homepage!
 
Old 02-24-2005, 12:22 PM
Experienced Talker

Posts: 40
sorry, but why not use the method:

<?=$PHP_SELF?>

This is a perfectly viable, and far simpler alternative...

Dan
iFuse is offline
Reply With Quote
View Public Profile
 
Old 02-24-2005, 03:02 PM
Christopher's Avatar
Iced Cap

Posts: 3,111
Location: Toronto, Ontario
That requires the php.ini setting 'short_open_tag' to be on. Using the short tags are depreciated.
Christopher is offline
Reply With Quote
View Public Profile Visit Christopher's homepage!
 
Old 02-24-2005, 03:23 PM
Skilled Talker

Posts: 62
Quote:
Originally Posted by Chroder
That requires the php.ini setting 'short_open_tag' to be on. Using the short tags are depreciated.
You think so?
I'd say about 99% of servers running PHP allow short tags, and most coders use them.
The Jasong is offline
Reply With Quote
View Public Profile
 
Old 02-24-2005, 07:26 PM
Experienced Talker

Posts: 40
Chroder the only reason i suggested it is every install of PHP is pre-configured with short tags turned on, the only way that they are not going to work is if you have manually turned them off...

Dan
iFuse is offline
Reply With Quote
View Public Profile
 
Old 02-24-2005, 07:40 PM
Christopher's Avatar
Iced Cap

Posts: 3,111
Location: Toronto, Ontario
I never said it doesn't work and won't work, just that it's depreciated
Christopher is offline
Reply With Quote
View Public Profile Visit Christopher's homepage!
 
Old 02-25-2005, 08:13 AM
lajkonik86's Avatar
Ultra Talker

Posts: 389
probably is one the line before
__________________
Know what to Download
http://www.top-download.net
lajkonik86 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to <?php echo $PHP_SELF ?>
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.15328 seconds with 12 queries