could you guys help me make a simple one of these:
jail system
crime system
thanks..(for a game btw)
could you guys help me make a simple one of these:
jail system
crime system
thanks..(for a game btw)
This might be the least descriptive post I've seen.
=[
i suck
what is a jail system and crime system as a game?
like im making a game
and i dont know how to code this bit
i coded the login, register , profile
so far and i need the jail
the jail wouldnt do the user do anything until hes let out and the jail page would have the time left for him to get out, and the crime is basically for the user doing crimes, gaining money, -energy
thanks again
How does one refrain from laughing when reading this thread?
jail.php
mysql_dumb.sqlPHP Code:<?php
@mysql_connect("localhost",$user,$pass);
@mysql_select_db($db);
$criminal = $_COOKIE[criminal];
$sheriff = $_COOKIE[sheriff];
$day = date("m/d/Y");
if(isset($sheriff)) {
} else {
?>
Wah howdy, partner!<br>
These folks been doin' crimes round these parts.
<table align="center" border="1">
<tr>
<th>Criminal</th>
<th>Day Released</th>
<th>Crime</th>
</tr>
<?php
$criminals = mysql_query("SELECT * FROM jail") or die(mysql_error());
while($c = mysql_fetch_array( $criminals )) {
?>
<tr>
<td><?php echo $c[criminal]; ?></td>
<td><?php echo $c[releaseDay]; ?></td>
<td><?php echo $c[crime]; ?></td>
</tr>
<?php
$crime = mysql_query("SELECT * FROM jail WHERE criminal='$criminal'") or die(mysql_error());
while($c = mysql_fetch_array( $crime )) {
if($c[releaseDay] > $date) {
echo '<h1>You\'re released from jail!</h1>';
} else {
?>
<p align="center">
You've been arrested for <b><?php echo $c[crime]; ?></b><br>
You're released on <b><?php echo $c[releaseDay]; ?></b><br>
</p>
<?php
}
}
}
?>
Code:CREATE TABLE `test`.`jail` ( `id` INT NOT NULL AUTO_INCREMENT , `criminal` VARCHAR( 255 ) NOT NULL , `crime` VARCHAR( 255 ) NOT NULL , `releaseDay` VARCHAR( 255 ) NOT NULL , PRIMARY KEY ( `id` ) ) ENGINE = InnoDB
- Josh
thanks, but i get this
Parse error: parse error in C:\xampp\htdocs\jail.php on line 49
line 49 is ?>
I thinks it's missing one of these }. Try this:
PHP Code:<?php
@mysql_connect("localhost",$user,$pass);
@mysql_select_db($db);
$criminal = $_COOKIE[criminal];
$sheriff = $_COOKIE[sheriff];
$day = date("m/d/Y");
if(isset($sheriff)) {
} else {
?>
Wah howdy, partner!<br>
These folks been doin' crimes round these parts.
<table align="center" border="1">
<tr>
<th>Criminal</th>
<th>Day Released</th>
<th>Crime</th>
</tr>
<?php
$criminals = mysql_query("SELECT * FROM jail") or die(mysql_error());
while($c = mysql_fetch_array( $criminals )) {
?>
<tr>
<td><?php echo $c[criminal]; ?></td>
<td><?php echo $c[releaseDay]; ?></td>
<td><?php echo $c[crime]; ?></td>
</tr>
<?php
$crime = mysql_query("SELECT * FROM jail WHERE criminal='$criminal'") or die(mysql_error());
while($c = mysql_fetch_array( $crime )) {
if($c[releaseDay] > $date) {
echo '<h1>You\'re released from jail!</h1>';
} else {
?>
<p align="center">
You've been arrested for <b><?php echo $c[crime]; ?></b><br>
You're released on <b><?php echo $c[releaseDay]; ?></b><br>
</p>
<?php
}
}
}
}
?>
woooo, ur cool![]()
thanks
Bookmarks