How to parse SOAP response with PHP?

Need Help with php, Parse error: syntax error, unexpected T_STRING, expecting ',' or ';'?

  • hi im new to php and im doing a very basic login system, when i view my work im gettin this error when the user has logged in and clicked on the members page. Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C:\xampp\htdocs\member.php on line 9 my member.php is <?php session_start(); if (isset($_SESSION['username'])) echo "Welcome, ".$_SESSION['username'] ."!<br><a href='logout.php'>logout,</a>; else die"you must be logged in!"; ?> i know its basic but im very new to this and any help would be appriciated. thanks, liam

  • Answer:

    You need double quotes " between the </a> tag and the ; otherwise it will see everything until the double quotes after die as part of the string die is a function, so you need to put its agrument in brackets. So it should read die("you must be logged in!");

LIAM at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

You need double quotes " between the </a> tag and the ; otherwise it will see everything until the double quotes after die as part of the string die is a function, so you need to put its agrument in brackets. So it should read die("you must be logged in!");

Mike

You need double quotes " between the </a> tag and the ; otherwise it will see everything until the double quotes after die as part of the string die is a function, so you need to put its agrument in brackets. So it should read die("you must be logged in!");

Punitha J

echo "Welcome, ".$_SESSION['username'] ."!<br><a href='logout.php'>logout,</a>"; need a double quotes at the end of line...just before semicolon You should put the die function in bracket with double inverted comma. That will make your programs run and don't leave any line blank line after the IF condition, as you're not using 2nd bracket "{ }" which is always recommended, so you need to make sure that you won't leave any blank line out there. Otherwise it may give you an error. Thanks!!!!!!!!!

Steve

echo "Welcome, ".$_SESSION['username'] ."!<br><a href='logout.php'>logout,</a>"; need a double quotes at the end of line...just before semicolon You should put the die function in bracket with double inverted comma. That will make your programs run and don't leave any line blank line after the IF condition, as you're not using 2nd bracket "{ }" which is always recommended, so you need to make sure that you won't leave any blank line out there. Otherwise it may give you an error. Thanks!!!!!!!!!

You need double quotes " between the </a> tag and the ; otherwise it will see everything until the double quotes after die as part of the string die is a function, so you need to put its agrument in brackets. So it should read die("you must be logged in!");

Punitha J

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.