Make Any Sense?
Posted: Mon May 30, 2005 2:34 pm
This is my script:
The ***** is my username
****** is my password
This is the error I get:
Parse error: syntax error, unexpected ';' in c:\program files\apache group\Apache\htdocs\cddvd.php on line 4
I checked the rand function and it definitely needs the ; (I know that sounds stupid but I had to check)
Make any sense?
When I took away the ; I got this:
Parse error: syntax error, unexpected T_VARIABLE in c:\program files\apache group\Apache\htdocs\cddvd.php on line 4
Any ideas
Code: Select all
<div align="e;center"e;></div>
<?php
$rand = rand(200, 367);
$link = mysql_connect("e;localhost"e;, "e;*****"e;, "e;******"e;;
mysql_select_db ("e;stats"e;)or die ("e;Could not select database"e;);
$query = “SELECT cstat FROM stats WHERE username=$_SESSIONї'username']”;
$result = mysql_query($query);
while ($row = mysql_fetch_array($result));
mysql_close();
$chancemoney = $rowї‘cstat’] * 3
$moneyget = $rand + $chancemoney
$rand2 = rand(0,100)
$dvd = $rowї‘cstat’] + 10
if ( $dvd > $rand2 )
(
$success = 1;
)
else
(
$success = 0;
)
switch ($success) {
case "e;0"e;:
print "e;You failed and were caught by the cops!"e;;
break;
case "e;1"e;:
print "e;You were successful and got /$"e;$moneyget"e;"e; $successful = 1;
break;
}
if ( $successful == 1 )
($link = mysql_connect("e;localhost"e;, "e;*****"e;, "e;******"e;;
mysql_select_db ("e;stats"e;)or die ("e;Could not select database"e;);
$money = “SELECT money FROM stats WHERE username=$_SESSIONї'username']”;
$result = mysql_query($query);
while ($row = mysql_fetch_array($result));
mysql_query($money);
$money = $rowї‘money’]
$updatedmoney = $money + "e;$getmoney"e;
$updatedmoney1="e;UPDATE stats SET money= "e;$updatedmoney"e; WHERE username='$_SESSIONї'username']'"e;;
$cstat = “SELECT cstat FROM stats WHERE username=$_SESSIONї'username']”;
$result = mysql_query($query);
while ($row = mysql_fetch_array($result));
mysql_query($cstat);
$cstat1 = $rowї‘cstat’]
$updatedcstat = $cstat1 + 0.1
$updatedcstat1="e;UPDATE stats SET cstat= "e;$updatedcstat"e; WHERE username='$_SESSIONї'username']'"e;;
mysql_query($updatedcstat1);
mysql_close();
)
else
(
);
?>****** is my password
This is the error I get:
Parse error: syntax error, unexpected ';' in c:\program files\apache group\Apache\htdocs\cddvd.php on line 4
I checked the rand function and it definitely needs the ; (I know that sounds stupid but I had to check)
Make any sense?
When I took away the ; I got this:
Parse error: syntax error, unexpected T_VARIABLE in c:\program files\apache group\Apache\htdocs\cddvd.php on line 4
Any ideas