PHP Syntax Error

06/15/2013 23:48 Frostix™#1
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.
06/18/2013 22:03 danatael#2
Maybe try with odbc, not mssql.
06/19/2013 03:46 GM.Triest#3
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."'
06/19/2013 13:42 infinite59#4
error is here
Code:
"'.$site."'
Look at the quotes.
replace it with this ;)
Code:
 '".$site."'
06/19/2013 22:34 Frostix™#5
Quote:
Originally Posted by infinite59 View Post
error is here
Code:
"'.$site."'
Look at the quotes.
replace it with this ;)
Code:
 '".$site."'
God damn, that easy ...
Thank you for that :)