Hey.
Mit spørgsmål går ud på at, jeg er ved og lave et spil. men vil godt ha sæt det over i et desgin. jeg har prøvet på alle de måder jeg kender. altså echo , ".$blabla." osv.
Men det gider bare ikke virke. så håber i ved hvordan man gør.
Php scriptet:
<body bgcolor="#000000">
<?php
include 'connect.php';
session_start();
?>
<link rel="stylesheet" href="style.css" type="text/css">
<?php
if (isset($_SESSION['player']))
{
$player=$_SESSION['player'];
$userstats="SELECT * from km_users where playername='$player'";
$userstats2=mysql_query($userstats) or die("Could not get user stats");
$userstats3=mysql_fetch_array($userstats2);
if($userstats3[dead]=='Yes')
{
print "<font color='#FFFFFF'>Du er blivet dræbt af $userstats3[killer]</font><br>";
print "<form action='revive.php' method='post'>";
print "<input type='hidden' name='ID' value='$userstats3[ID]' style='color: #FFFFFF; font-family: Verdana; font-size: 10 px; border: 1px solid #FFFFFF; background-color: #000000'>>";
print "<input type='submit' name='revives' value='Genopliv' style='color: #FFFFFF; font-family: Verdana; font-size: 10 px; border: 1px solid #FFFFFF; background-color: #000000'>></form>";
}
else
{
$updaterefresh="update km_users set justattacked=0 where ID='$userstats3[ID]'";
mysql_query($updaterefresh) or die("Died");
print "<center><img border='0' src='images/topbanner.jpg' width='730' height='140'></center>";
print "<center><table class='maintable'>";
print "<tr class='headline'><td>";
print "<center><b>Velkommen $player. </b></center>";
print "</td></tr></table></center><br><br>";
print "<center><table class='maintable'>";
print "<tr><td valign='top'>";
print "<table class='maintable'><tr class='headline'><td><center>Skift Kodeord</center></td></tr>";
print "<tr class='mainrow'><td><b>Skift kodeord:</b> <A href='setpass.php'><font color='#FFFFFF'>Skift kodeord</font></a></td></tr></table><br><br>";
print "<table class='maintable'><tr class='headline'><td><center>Statistik og Regler</center></td></tr>";
print "<tr class='mainrow'><td><A href='top.php'><font color='#FFFFFF'>Toplist (Skill)</font></a></td></tr>";
print "<tr class='mainrow'><td><A href='playerclose.php'><font color='#FFFFFF'>Spiller tæt på dig</font></a></td></tr>";
print "<tr class='mainrow'><td><A href='tophonor.php'><font color='#FFFFFF'>Toplist (Honor)</font></a></td></tr>";
print "<tr class='mainrow'><td><A href='topland.php'><font color='#FFFFFF'>Toplist (Land)</font></a></td></tr>";
print "<tr class='mainrow'><td><A href='challengeinfo.php'><font color='#FFFFFF'>Regler og Info</font></a></td></tr>";
print "</table><br><br>";
print "<table class='maintable'><tr class='headline'><td><center>Køb Land</center></td></tr>";
print "<tr class='mainrow'><td>Koster 500kr pr tønder land.<br>";
print "<form action='buyland.php?ID=$userstats3[ID]' method='post'>";
print "Køb hvor meget: <input type='text' name='landacres' size='6' style='color: #FFFFFF; font-size: 10 px; font-family: Verdana; border: 1px solid #FFFFFF; background-color: #000000'><br>";
print "<input type='submit' name='submit' value='Køb Land' style='color: #FFFFFF; font-family: Verdana; font-size: 10 px; border: 1px solid #FFFFFF; background-color: #000000'></form></td></tr></table><br><br>";
print "<table class='maintable'><tr class='headline'><td><center>Køb mate(s)</center></td></tr>";
print "<tr class='mainrow'><td>";
print "Mate med Colt koster: 100kr - Mate med AWP koster: 150kr - Bombe mænd koster: 300kr<br>Man kan ikke sælge dem igen<br>";
print "<form action='buyarmy.php?ID=$userstats3[ID]' method='post'>";
print "Mate med Colt: <input type='text' name='off' size='6' style='color: #FFFFFF; font-size: 10 px; font-family: Verdana; border: 1px solid #FFFFFF; background-color: #000000'><br>";
print "Mate med AWP: <input type='text' name='dff' size='6' style='color: #FFFFFF; font-size: 10 px; font-family: Verdana; border: 1px solid #FFFFFF; background-color: #000000'><br>";
print "Bombe mænd: <input type='text' name='bomb' size='6' style='color: #FFFFFF; font-size: 10 px; font-family: Verdana; border: 1px solid #FFFFFF; background-color: #000000'><br>";
print "<input type='submit' name='submit' value='Køb mate(s)' style='color: #FFFFFF; font-family: Verdana; font-size: 10 px; border: 1px solid #FFFFFF; background-color: #000000'></form>";
print "</td></tr></table><br><br>";
print "<table class='maintable'><tr class='headline'><td><center>Køb Mate Trænings Point</center></td></tr>";
print "<tr class='mainrow'><td>";
print "Hvert point koster 50kr<br>";
$max=$userstats3[land]*10;
if($userstats3[land]<=0)
{
print "Du har ikke nok land til og købe";
}
else
{
$percent=$userstats3[science]/$max*100;
print "Du har: $userstats3[science] point($percent %)";
}
print "<form action='buyscience.php?ID=$user3stats[ID]' method='post'>";
print "Køb hvor meget: <input type='text' name='scipts' size='6' style='color: #FFFFFF; font-size: 10 px; font-family: Verdana; border: 1px solid #FFFFFF; background-color: #000000'><br>";
print "<input type='submit' name='submit' value='submit' style='color: #FFFFFF; font-family: Verdana; font-size: 10 px; border: 1px solid #FFFFFF; background-color: #000000'></form>";
print "</td></tr></table><br>";
print "<table class='maintable'><tr class='headline'><td><center>Køb Turer</center></td></tr>";
print "<tr class='mainrow'><td>Koster 150kr pr tur.<br>";
print "<form action='buyturns.php?ID=$userstats3[ID]' method='post'>";
print "Køb hvor meget: <input type='text' name='numturns' size='6' style='color: #FFFFFF; font-size: 10 px; font-family: Verdana; border: 1px solid #FFFFFF; background-color: #000000'><br>";
print "<input type='submit' name='submit' value='Køb Tur(er)' style='color: #FFFFFF; font-family: Verdana; font-size: 10 px; border: 1px solid #FFFFFF; background-color: #000000'></form></td></tr></table><br><br>";
print "</td>";
print "<td valign='top'>";
print "<table class='maintable'>";
print "<tr class='headline'><td><center>Status</center></td></tr>";
print "<tr class='mainrow'><td><b>Tur(er):</b> $userstats3[numturns]</td></tr>";
print "<tr class='mainrow'><td><b>Skill point:</b> $userstats3[skillpts]</td></tr>";
print "<tr class='mainrow'><td><b>Honor:</b> $userstats3[honor]</td></tr>";
print "<tr class='mainrow'><td><b>Penge:</b> $userstats3[gold]</td></tr>";
print "<tr class='mainrow'><td><b>Tønder land:</b> $userstats3[land]</td></tr>";
print "<tr class='mainrow'><td><b>Mænd (Colt):</b> $userstats3[offarmy]</td></tr>";
print "<tr class='mainrow'><td><b>Mænd (AWP):</b> $userstats3[dffarmy]</td></tr>";
print "<tr class='mainrow'><td><b>Bombe mænd:</b> $userstats3[bombarmy]</td></tr>";
print "<tr class='mainrow'><td><b>Trænings Point:</b> $userstats3[science]</td></tr>";
print "</table><br>";
print "<table class='maintable'>";
print "<tr class='headline'><td><center>Hurtig Spil</center></td></tr>";
print "<tr class='mainrow'><td>";
print "<form action='slaymonster.php' method='post'>";
print "Vælg en modstander<br><br><select name='monstername' length='20' style='color: #FFFFFF; font-family: Verdana; font-size: 10 px; border: 1px solid #FFFFFF; background-color: #000000'>";
$monster1="SELECT * from km_monsters order by skill asc";
$monster2=mysql_query($monster1) or die("Could not select Monster");
while ($monster3=mysql_fetch_array($monster2))
{
print "<option>$monster3[name]</option>";
}
print "</select><br>";
print "<br><input type='submit' name='submit' value='Start' style='color: #FFFFFF; font-family: Verdana; font-size: 10 px; border: 1px solid #FFFFFF; background-color: #000000'></form>";
print "</td></tr></table><br>";
print "<table class='maintable'>";
print "<tr class='headline'><td><center>Udfordrer mod en bruger</center></td></tr>";
print "<tr class='mainrow'><td>";
print "Skriv ID# på den bruger du vil Udfordrer:<br>";
print "<form action='challengeplayer.php' method='post'>";
print "<input type='text' name='playerID' size='20' style='color: #FFFFFF; font-size: 10 px; font-family: Verdana; border: 1px solid #FFFFFF; background-color: #000000'><br>";
print "<input type='submit' name='submit2' value='Udfordrer' style='color: #FFFFFF; font-family: Verdana; font-size: 10 px; border: 1px solid #FFFFFF; background-color: #000000'></form>";
print "</td></tr></table><br><br>";
print "<table class='maintable'>";
print "<tr class='headline'><td><center>Angreb en bruger's land </center></td></tr>";
print "<tr class='mainrow'><td>";
print "Skriv ID# på den bruger's land du vil spille imod<br>";
print "<form action='attack.php' method='post'>";
print "<input type='text' name='victimid' size='20' style='color: #FFFFFF; font-size: 10 px; font-family: Verdana; border: 1px solid #FFFFFF; background-color: #000000'><br>";
print "<input type='submit' name='submit' value='Angreb' style='color: #FFFFFF; font-family: Verdana; font-size: 10 px; border: 1px solid #FFFFFF; background-color: #000000'></form>";
print "</td></tr></table><br><br>";
if($userstats3[numturns]<=0)
{
print "<table class='maintable'>";
print "<tr class='headline'><td><center>Brug for hjælp</center></td></tr>";
print "<tr class='mainrow'><td>";
print "Har du ikke flere turer eller penge?<br>Så kan vi give dig 10 turer.<br> Du har brugt $userstats3[lasthelp]/2 af dine Livliner<br>";
print "<form action='help.php' method='post'>";
if($userstats3[lasthelp]<2)
{
print "<input type='submit' name='help' value='Brug en livline' style='color: #FFFFFF; font-family: Verdana; font-size: 10 px; border: 1px solid #FFFFFF; background-color: #000000'></form>";
}
if($userstats3[lasthelp]>=2)
{
print "<font color='#FF0000'>Du har brugt dine 2 livliner</font>";
}
print "</td></tr></table><br><br>";
}
print "</td></tr></table><br><br>";
print "<table class='maintable'>";
print "<tr class='headline'><td><center>Angrebet!!</center></td></tr>";
print "<tr class='mainrow'><td>";
if($userstats3[numberattck]>0)
{
print "<font color='red'>You have survived $userstats3[numberattck] attacks since your last login.</font><br><br>";
$resets="update km_users set numberattck='0' where playername='$player'";
mysql_query($resets) or die("could not query");
}
print "</td></tr></table><br><br>";
$getbattlerecords="SELECT * from km_battlerecords where victimid='$userstats3[ID]'";
$getbattlerecords2=mysql_query($getbattlerecords) or die("Could not get battlerecords");
print "<table class='maintable'>";
print "<tr class='headline'><td colspan='4'><center>Kampe siden sidste log ind</center></td></tr>";
print "<tr class='mainrow'><td>Modstanderens ID</td><td>Modstanderens navn</td><td>Resultat</td><td>Tønder land tabt</td></tr>";
while($getbattlerecords3=mysql_fetch_array($getbattlerecords2))
{
print "<tr class='mainrow'><td>$getbattlerecords3[attid]</td><td>$getbattlerecords3[attname]</td><td>$getbattlerecords3[result]</td><td>$getbattlerecords3[landlost]</td></tr>";
}
print "</table><br><br>";
$delrecords="Delete from km_battlerecords where victimid='$userstats3[ID]'";
mysql_query($delrecords) or die("Could not delete battle records");
}
}
else
{
print "<body bgcolor='#000000' text='#FFFFFF'>Du er ikke logget ind<br><br><A href='login.php'>Log ind</a><br>";
}
?>
Designet i html
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />
<link href='style.css' rel='stylesheet' type='text/css' />
<title>CS Force</title>
</head>
<body>
<div id='container'>
<div id='header'></div>
<div id='menu'>
<ul>
<li><a href=''>Nyheder</a></li>
<li><a href=''>Profil</a></li>
<li><a href=''>Toplister</a></li>
<li><a href=''>køb</a></li>
<li><a href=''>chat</a></li>
<li><a href=''>Regler og info</a></li>
</ul>
<h1>Velkommen nick</h1>
<h2>Status</h2>
</div>
<div id='main'><br />
<div id='content'>
<div id='left'>
<p style='text-align: center'>
<iframe name='vindue' width='465' height='586' border='0' frameborder='0' align='center'>
Webbrowseren understøtter ikke indbyggede rammer eller er aktuelt konfigureret til ikke at vise indbyggede rammer.</iframe>
</div>
<div id='right'>
<div class='member'>
<a href=''>
<img src='images/member1.gif' alt='member' width='85' height='84' /></a>
<span><a href=''>Cyberstriker</a></span>
</div>
<div class='member'>
<a href=''>
<img src='images/member2.gif' alt='member' width='85' height='84' /></a>
<span><a href=''>Swatman</a></span>
</div>
<div class='member'>
<a href=''>
<img src='images/member3.gif' alt='member' width='85' height='84' /></a>
<span><a href=''>Hunter</a></span>
</div>
<div class='member'>
<a href=''>
<img src='images/member4.gif' alt='member' width='85' height='84' /></a>
<span><a href=''>Cosmic</a></span>
</div>
<div class='member'>
<a href=''>
<img src='images/member2.gif' alt='member' width='85' height='84' /></a>
<span><a href=''>Wolfcry</a></span>
</div>
<div class='member'>
<a href=''>
<img src='images/member1.gif' alt='member' width='85' height='84' /></a>
<span><a href=''>Blade</a></span>
</div>
<div class='member'>
<a href=''>
<img src='images/member4.gif' alt='member' width='85' height='84' /></a>
<span><a href=''>Zerocool</a></span>
</div>
<div class='member'>
<a href=''>
<img src='images/member3.gif' alt='member' width='85' height='84' /></a>
<span><a href=''>Newbie</a></span>
</div>
</div>
<div class='clear'></div>
</div>
</div>
<div id='footer'>
<br /><br />
<ul>
<li><a href=''>Nyheder</a></li>
<li><a href=''>profil</a></li>
<li><a href=''>toplister</a></li>
<li><a href=''>køb</a></li>
<li><a href=''>chat</a></li>
<li class='lastchild'><a href=''>regler og info</a></li>
</ul>
<span>© CsClan 2007. All rights reserved.</span> </div>
</div>
</body>
</html>
P.S Jeg beder ikke om i laver det hele. bare viser hvordan man skal gøre