Register for your free account! | Forgot your password?

You last visited: Today at 15:38

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



PHP Syntax Error

Discussion on PHP Syntax Error within the Shaiya Private Server forum part of the Shaiya category.

Reply
 
Old   #1

 
Frostix™'s Avatar
 
elite*gold: 72
Join Date: Dec 2012
Posts: 515
Received Thanks: 709
PHP Syntax Error

I got a small Problem with Php at a voting script...
I get this Error:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\xampp\htdocs\blabla\bla\blablabla\vote\vote.php on line 136

Thats Line 136
PHP Code:
$result3 mssql_query("SELECT * FROM PS_UserData.dbo.user_votes WHERE ip = '".$ip."' AND Site = '".$site."' || UserID = '".$UserID."' AND Site = "'.$site."' ",$mslink); 
Would be great if anyone would be able to help me, ty for any answers.
Frostix™ is offline  
Thanks
1 User
Old 06/18/2013, 22:03   #2
 
elite*gold: 0
Join Date: Feb 2013
Posts: 41
Received Thanks: 9
Maybe try with odbc, not mssql.
danatael is offline  
Thanks
1 User
Old 06/19/2013, 03:46   #3
 
GM.Triest's Avatar
 
elite*gold: 0
Join Date: Feb 2009
Posts: 192
Received Thanks: 151
Run
Code:
<?php
//Config for testing
$host = '127.0.0.1';
$user = 'Shaiya';
$pass = 'Shaiya123';

echo "<center>";
echo "<h3>MSSQL Function Tests</h3>";

//testing for MSSQL function
if(function_exists('mssql_connect')){
echo "MSSQL functions existing...";
$mcon = mssql_connect($host,$user,$pass);
if($mcon){echo "and connections are possible!";}
}else{echo "MSSQL functions non existant!";}

echo "<br>";

//testing for ODBC function
if(function_exists('odbc_connect')){
echo "ODBC functions existing...";
$ocon = odbc_connect("Driver={SQL Server};Server=$host;", $user, $pass);
if($ocon){echo "and connections are possible!";}
}else{echo "ODBC functions non existant!";}

echo "<br>";

//Printing PHP Version
echo "PHP version: ".phpversion();

echo "<center>";
?>
And tell me what you get. Also, It could be that || by ".$site."'
GM.Triest is offline  
Thanks
1 User
Old 06/19/2013, 13:42   #4
 
elite*gold: 0
Join Date: Oct 2012
Posts: 145
Received Thanks: 203
error is here
Code:
"'.$site."'
Look at the quotes.
replace it with this
Code:
 '".$site."'
infinite59 is offline  
Thanks
1 User
Old 06/19/2013, 22:34   #5

 
Frostix™'s Avatar
 
elite*gold: 72
Join Date: Dec 2012
Posts: 515
Received Thanks: 709
Quote:
Originally Posted by infinite59 View Post
error is here
Code:
"'.$site."'
Look at the quotes.
replace it with this
Code:
 '".$site."'
*** ****, that easy ...
Thank you for that
Frostix™ is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[PHP] syntax error
12/15/2012 - Web Development - 0 Replies
Ausversehen 2 mal abgeschickt hab schon clsrq abgeschickt
Parse error: syntax error, unexpected T_VARIABLE
08/05/2012 - Web Development - 3 Replies
Hallo, bekomme diese Meldung: An sich findet man meistens den Fehler, ich bin jetzt aber schon mehrmals die vorherigen 31 Zeilen durchgegangen und hab keinen einzigen Fehler feststellen können. Das sind die ersten 33 Zeilen: <html> <head></head> <body>
error: syntax
11/21/2011 - Shaiya - 3 Replies
hello I install the script of the inscription I create an account and gives me this error Fatal error: Call to undefined function mssql_connect() in E:\xampp\htdocs\inscription\config.php on line 6 :confused:
[Hilfe]Parse error: syntax error
10/27/2009 - Metin2 Private Server - 6 Replies
Also hab IS -Script per xampp on und beim einloggen kommt der fehler hier Parse error: syntax error, unexpected $end in C:\xampp\htdocs\default1.php on line 875 Help pls Thx Freaky
Syntax ERROR?!
10/27/2008 - General Coding - 9 Replies
hi, ich wollte an den start meines Script ein HotKeySet einfügen aber wenn ich das mache kommt: Syntax ERROR hier mein Script(beispiel): HotKeySet("{numpad1},"start") MsgBox(0,"titel","text") ich glaub ich bin zu blöd was ist da falsch?...wenn ihr meint da fehlt ein " hab ich schon probiert geht nicht, oder ich hab es an der falschen Stelle eingefügt.



All times are GMT +1. The time now is 15:38.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.