Jump to content

$_SERVER['PHP_SELF']


simonchis

Recommended Posts

MorningI have a problem with the following bit of code

echo "<FORM name="$this->formName" action="".$_SERVER['PHP_SELF']."" method=POST>n";

I get an error at this point, it is telling meParse error: parse error, unexpected T_VARIABLE, expecting ',' or ';' in C:\Program Files\Apache Group\Apache2\htdocs\would someone let me know what this means as I have placed ';' into the line of code and it does not make much difference.Thanks again,

Link to comment
Share on other sites

Hi.. Use following instead of ur line echo "<FORM name=\"".$this->formName."\" action=\"".$_SERVER['PHP_SELF']."\ method=\"post\"";Suppose this will help u..Regards,Vijay

Link to comment
Share on other sites

That will help him, yes. Because just so you know; you cannot use " (doble quotes) within two doble quotes.

Wrong: <?php echo "<a href="index.php">Some text</a>"; ?>Right: <?php echo "<a href=\"index.php\">Some text</a>"; ?>Right: <?php echo "<a href='index.php'>Some text</a>"; ?>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...