Register for your free account! | Forgot your password?

You last visited: Today at 16:18

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

Advertisement



Syntax hp fehler

Discussion on Syntax hp fehler within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2014
Posts: 122
Received Thanks: 27
Syntax hp fehler

Parse error: syntax error, unexpected 'mySQL' (T_STRING) in /home/cythosia/public_html/hp/vote/vote.php on line 23

Habe einen Fehler, kann einer helfen ?

Quote:
<?php
// Einstellungen
$dbhost = 'meineip'; //mySQL IP
$dbuser = 'root'; //mySQL Username
$dbpassword = 'pw halt'; //mySQL Passwort
$database = 'account'; //mySQL Datenbank

$coins = '50'; //Menge an Coins pro Vote
$wartezeit = '18'; //Wartezeit in Stunden


$s1 = 'https://topmetin.org/site/vote/1216_Cythosia'; //Vote Seite 1
$s2 = 'https://topmetin.org/site/vote/1216_Cythosia //Vote Seite 2




// Einstellungen Ende


//Ab hier NICHTS mehr verδndern!

$conn = mysql_connect($dbhost, $dbuser, $dbpassword) or die ('mySQL Connecting Error');
mysql_select_db($database);
$ip = $_SERVER['REMOTE_ADDR'];
$site = $_POST['site'];

$website = array(1, $s1, $s2);


if($site) {
$wartezeit = $wartezeit * 3600;
$time = time();
$earnedpoints = false;
$account = $_POST['name'];
$account = mysql_real_escape_string($account);



if ($account == "") {
echo 'Enter your AccountID!';
exit();
}


$query = mysql_query("SELECT *, SUM(`times`) as amount FROM vote WHERE account='$account' OR ip='$ip'");
$lasttime = mysql_fetch_array($query);
$amount = $lasttime['amount'];
$insertnew = false;
if ($amount == "") {
$insertnew = true;
}
$timecalc = $time - $lasttime['Site' . $site];
if (!$insertnew) {
if ($timecalc < $wartezeit) {

echo '<html>
<head>
<title>Vote for Coins</title>
</head>
<body background="bg.jpg" text="grey" link="#0000CC" vlink="#000066" alink="#000000">
<h1>Vote for Us!</h1>';
echo ' Hallo '. $account .' Du hast bereits mit diesem Account: ('. $account .') oder deiner IP: ('. $ip .') in den letzten ' . $wartezeit / 3600 . ' Stunden bereits gevotet.!';
echo ' <br><br>Letzter Vote am: '. date('M d\, h:i:s A', $lasttime['Site' . $site]) .'';
echo '<html>';
echo '<head>';
echo '</head>';
echo '<body>';
echo '</body>';
echo '</html>';
exit();
} else {
$update = mysql_query("UPDATE vote SET account='$account', Site" . $site . "='$time', times=times+1 WHERE ip='$ip'");
if (!$update) {
$message = 'Invalid query: ' . mysql_error() . "\n";
$message .= 'Whole query: ' . $update;
die($message);
} else {
$earnedpoints = true;
}
}
} else {
$success = mysql_query("INSERT INTO vote (`account`, `ip`, `Site" . $site . "`, `times`) VALUES ('$account', '$ip', '$time', 1)");
if (!$success) {
$message = 'Invalid query: ' . mysql_error() . "\n";
$message .= 'Whole query: ' . $success;
die($message);
} else {
$earnedpoints = true;
}
}




if ($earnedpoints) {
$points = mysql_query("UPDATE account.account SET coins = coins + " . $coins . " WHERE login='$account'");
if (!$points) {

$message = 'Invalid query: ' . mysql_error() . "\n";
$message .= 'Whole query: ' . $query;
die($message);
}
mysql_close($conn);
header("Location: http://" . $website[$site] . "");
exit();

} else {
echo 'There was an error processing your request.';
exit();
}

}
?>



<html>
<head>
<title>Vote for Coins</title>
</head>
<body background="bg.jpg" text="grey" link="#0000CC" vlink="#000066" alink="#000000">
<h1>Vote for Us!</h1>
<center>
<font color="grey"><i>Du bekommst Pro Vote: <?php echo $coins; ?> Coins und du kannst alle <?php echo $wartezeit;?> Stunden voten.<br>
<br>Du kannst auf jeder Seite einmal Voten! </i><br /> </font>
<form action="" method="POST">
<table cellspacing=1 cellpadding=5>
<tr>
<td class=list><input type="radio" name="site" value="1"> Vote 1</td>
<td class=list><input type="radio" name="site" value="2"> Vote 2</td>
</tr>
</table>


<table cellspacing=1 cellpadding=5>
<tr><td class=list align=right><font size="5"><b>AccountID:</b></font></td><td class=list><input type=text name=name maxlength="15"></td></tr>
<tr><td class=listtitle align=center colspan=2><input type="image" src="vote.png" alt="Absenden"></td></tr>
</form>
</table>
</center>
</body>
</html>
iEsDeath is offline  
Old 05/09/2015, 18:55   #2
 
Heydey's Avatar
 
elite*gold: 0
Join Date: Jul 2013
Posts: 227
Received Thanks: 23
Hey, (Die Topliste hat einen eigenen Vote 4 coins script den einfach einbauen !!! )

Kann dir helfen einfach adden wenn du es nicht hin bekommst :=)
Heydey is offline  
Reply


Similar Threads Similar Threads
Metin2 40K Game Syntax fehler
01/20/2015 - Metin2 Private Server - 0 Replies
hat sich erledigt.
Syntax Fehler Game !
09/29/2013 - Metin2 Private Server - 1 Replies
Syntax Fehler ich habe festgestellt wenn ich eine log per dif deaktiviere kommt dieser Fehler. Die logs sollen ausgenoppt sein und der Fehler soll nicht mehr erscheinen kann jemand Helfen ? SYSERR: Sep 27 18:42:22 :: ChildLoop: AsyncSQL: query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 (query:...
Fehler syntax: /goto <empire>!
05/29/2013 - Metin2 Private Server - 1 Replies
Heai Community, wie kann ich den /go befehl fixxen da dieser nicht funktioniert ! wenn ich /go eingebe komme ich net auf die map und wenn ich die Koordis eingebe funktioniert es , aber da es das Rote Reich ist, kann ich kein Charackter im Roten-Reich erstellen! ... Folgender Fehler tretet bei dem Befehl '/go a' auf. Cannot find map command syntax: /goto <mapname>
[C#] Debug zeigt Syntax Fehler, aber ich finde ihn ncht :-(
01/14/2013 - .NET Languages - 2 Replies
//Edit: Fehler gefunden ;-)
[PHP&MySQL]Fehler bei der UPDATE Syntax
08/04/2012 - Web Development - 5 Replies
Hallo elitepvpers, ich habe da ein Problem bei dem Updaten von einer Zelle. Fehlermeldung: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'character=testcharacter WHERE name=test' at line 2 PHP Code:



All times are GMT +1. The time now is 16:20.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

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