Ik heb een bloedbank script gemaakt.
Maar ik heb vier verschillende bloedgroepen.
Ontvanger: A B AB O
A yes no no yes
B no yes no yes
AB yes yes yes yes
O no no no yes
Hierboven staat met welke bloedgroep wat je dan mag ontvangen?
Ik krijg het maar niet voor mekaar.
Ik heb dit al:
PHP
require("config.php");
// pageviewlimit();
// logincheck();
echo("<html>
<head>
<title>
xxx
-
Free online maffia game
</title>
<link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\">
<meta name=\"language\" content=\"dutch\">
<meta name=\"keywords\" content=\"x, xxxgame, maffia, crime, gangster, mobster\">
<!-- This source is a part of the xxx web game. You may not use or otherwise copy or duplicate any part of the source, Javascripts or CSS files without explicit prior permission of: xxx Game Copyright 2009-2010 -->
</head>
<body>");
if(isset($_POST['buy']))
{
$query = mysql_query("SELECT price, bloodgroup, city FROM Bloodprices WHERE city='" .$data['city']. "'");
$price = mysql_fetch_assoc($query);
if(empty($_POST['count']))
{
die("Je moet wel een aantal invullen.");
}
elseif(!ctype_digit($_POST['aantal']))
{
die("Ongeldig invoer.");
}
elseif($data['health'] + $_POST['count'] > 100)
{
die("Je kan niet meer dan 100% health hebben.");
}
elseif($_POST['count'] > 100)
{
die("Je kan niet meer dan 100% health hebben.");
}
elseif(($_POST['count'] * $price['price']) > $data['cash'])
{
die("Je hebt niet genoeg geld.");
}
else
{
// no errors
}
}
echo ("</body>
</html>");
Toon Meer