Page 1 of 1

[SOLVED] {$_SERVER['PHP_SELF']} inside echo

Posted: Tue May 31, 2005 5:50 am
by facets
Hi Gang,

Having trouble putting the {$_SERVER['PHP_SELF'] statement inside an echo.
Error is : Parse error: parse error, expecting `','' or `';'' (form line)
Any ideas?

Cheers, Will.

Code: Select all

echo "<form method=\"post\" action=\"<?php echo {$_SERVER['PHP_SELF']}; ?>\">";
?>

<!--Paper Category -->

<table><tr>
<td width=200px colspan=2 valign=top>Paper Category</td>
<td width=200px colspan=3>

<? listCat(); ?>

</td></tr>

Posted: Tue May 31, 2005 5:53 am
by JayBird

Code: Select all

echo "<form method=\"post\" action=\"".$_SERVER['PHP_SELF']."\">";