Bosma Posted February 16, 2008 Share Posted February 16, 2008 Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/garry/public_html/ocp/includes/check.php on line 1 Is the full error. Here's the check.php page: <?PHP require 'connect.php'; $username = $_COOKIE['username']; $password = $_COOKIE['password']; $credidential_query = mysql_query(" SELECT username, password FROM levelers WHERE username = '$username' and password = '$password' "); $credidentials = mysql_fetch_array($credidential_query); if($username != $credidentials['username'] and $password != $credidentials['password'] or !$username or !$password) { header("location: ../login.php"); } ?> Could someone please tell me how I would go abouts fixing this? Thanks in advance, Spencer Link to comment https://forums.phpfreaks.com/topic/91356-parse-error-syntax-error/ Share on other sites More sharing options...
awpti Posted February 16, 2008 Share Posted February 16, 2008 Works fine for me. <?PHP == <?php Might be it. Consider it's line one. Link to comment https://forums.phpfreaks.com/topic/91356-parse-error-syntax-error/#findComment-468147 Share on other sites More sharing options...
phpSensei Posted February 16, 2008 Share Posted February 16, 2008 I stripped the code in pasted it in PHPdesigner and it didn't find any errors of the sort. Please submit the FULL script of your page... Link to comment https://forums.phpfreaks.com/topic/91356-parse-error-syntax-error/#findComment-468160 Share on other sites More sharing options...
Ken2k7 Posted February 16, 2008 Share Posted February 16, 2008 Hello, Maybe it's in your connect.php. Just guessing here. Ken Link to comment https://forums.phpfreaks.com/topic/91356-parse-error-syntax-error/#findComment-468168 Share on other sites More sharing options...
phpSensei Posted February 16, 2008 Share Posted February 16, 2008 Hello, Maybe it's in your require.php. Just guessing here. Ken I agree, Sometimes LINE 1 could be the line under the open tags. Link to comment https://forums.phpfreaks.com/topic/91356-parse-error-syntax-error/#findComment-468172 Share on other sites More sharing options...
GameYin Posted February 16, 2008 Share Posted February 16, 2008 Hello, Maybe it's in your require.php. Just guessing here. Ken It's not that. You can write requires like that. Link to comment https://forums.phpfreaks.com/topic/91356-parse-error-syntax-error/#findComment-468175 Share on other sites More sharing options...
Ken2k7 Posted February 16, 2008 Share Posted February 16, 2008 Hello, Maybe it's in your require.php. Just guessing here. Ken It's not that. You can write requires like that. GameYin, Sorry, I meant to write connect.php. Thanks for the fix Ken Link to comment https://forums.phpfreaks.com/topic/91356-parse-error-syntax-error/#findComment-468176 Share on other sites More sharing options...
Bosma Posted February 16, 2008 Author Share Posted February 16, 2008 I stripped the code in pasted it in PHPdesigner and it didn't find any errors of the sort. Please submit the FULL script of your page... That is the full code, I'll post connect. Link to comment https://forums.phpfreaks.com/topic/91356-parse-error-syntax-error/#findComment-468220 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.