I really really would like one
PHP ERRORS
Moderator: General Moderators
PHP ERRORS
Is there an site somewhere that explains all the errors for php?
I really really would like one
.
I really really would like one
'All' is a very loose term.
php.net's own is a good start, then just continue from there, by clicking the various links on the page aso aso.
php.net's own is a good start, then just continue from there, by clicking the various links on the page aso aso.
'String Terminator' if i recall correctly.
The error is seen happen in row 3, but exists earlier (here; line 2).
There are some more here but not all are included
Code: Select all
<?php
echo "foo';
echo "foo";
?>Code: Select all
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in page.php on line 3There are some more here but not all are included
you mean something like this?
Code: Select all
// she wants me to learn her to program :p
$tim_has_new_girlfriend = true;
if ($tim_has_new_girlfriend)
{
$result = mysql_query("UPDATE chicks SET count=count+1");
if ($result)
{
echo "Added 1 to the counter...";
}
else
{
echo "Something went wrong: " . mysql_error();
}
}What just happened? Sorry, that wasnt my intentional fault, wait a min

Code: Select all
if ($addtime > $crimetime2)
()
else
(
die "You still have "$difference" to go before you can do another crime";
$rand = rand(200,367);
mysql_connect("localhost", "admin", "ak7456";
mysql_select_db ("stats")or die ("Could not select database");
$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 "0":
print "You failed and were caught by the cops!";
break;
case "1":
print "You sold some DVDs and CDs and got /$"$moneyget"";
break;
}
if ( $success == 1 )
(mysql_connect("localhost", "admin", "ak7456";
mysql_select_db ("stats")or die ("Could not select database");
$money = “SELECT money FROM stats WHERE username=$_SESSION['username']”;
$result = mysql_query($query);
while ($row = mysql_fetch_array($result));
mysql_query($money);
)Please read the manual http://www.php.net/manual Chapter 16. Control Structures... It will save you and us a lot of time... While you are at it, notice that curly brackets { } are used and not ( )