Member Avatar

Hi all. I'm writing my first javascript game. It's a role playing game where the user fights an Ogre, and not elaborate at all. I'd like the game to end when the Ogre's life is at zero OR the users life is at zero. I can't figure out how to have the program keep track of the amount of damage the user and the Ogre inflict on each other. Any ideas? Also, if this has been asked before, please point me in the direction of the completed discussion and I'll look it up there. Thanks. <!DOCTYPE HTML> <head> <script> var …

Member Avatar
+0 forum 9
Member Avatar

Ok, so this is cool. On my site, I learned how to create a simplified "wall" like facebook has... sort of. It's great for me to have done that because I am self taught with all of this. There is a problem, however. My <option> is not displaying the names correctly. It should display each name listed in the database separately, instead it is showing displaying them as a runon sentence. I don't understand why the <br> command isn't working. Here is the php: <?php $query=mysqli_query($rcon,"SELECT userid FROM registration"); while ($row=mysqli_fetch_array($query)){ echo $row['userid'] . '<br>';} ?> and here is the …

Member Avatar
+0 forum 3
Member Avatar

So, when I run this code on xampp, it works and I can see the variables, without the header. <html> <head> </head> <body> <?php $user=""; $server=""; $db=""; $pass=""; $con=mysqli_connect($server,$user,$pass,$db); $id=$_POST['loginid']; $password=md5($_POST['password']); $result=mysqli_query($con,"SELECT * FROM passwords WHERE userid='$id' AND password='$password'"); session_start(); if($row=mysqli_fetch_array($result)){ require('../connect/registerdb.php'); $rresult=mysqli_query($rcon,"SELECT * FROM registration WHERE userid='$id'"); while($rrow=mysqli_fetch_array($rresult)){ $_SESSION['name']=$rrow['name']; $_SESSION['dob']=$rrow['dob']; $_SESSION['userid']=$rrow['userid']; $_SESSION['sex']=$rrow['sex']; $_SESSION['family']=$rrow['family']; $_SESSION['describe']=$rrow['describe']; $_SESSION['pic']=$rrow['pic']; $_SESSION['visibility']=$rrow['visibility']; $_SESSION['registeredon']=$rrow['registeredon']; $_SESSION['lastlogin']=$rrow['lastlogin']; require('../connect/emaildb.php'); $eresult=mysqli_query($econ,"SELECT email FROM emaillist WHERE userid='$id'"); while($erow=mysqli_fetch_array($eresult)){ $_SESSION['email']=$erow['email']; } } header('Location:../mainpage.php'); } ?> </body> </html> When I add the header, I get: Notice: Undefined index: loginid in C:\xampp\htdocs\website\session\session.php on line 12 Notice: Undefined index: password in C:\xampp\htdocs\website\session\session.php on line 13 …

Member Avatar
+0 forum 4
Member Avatar

Ok, so here is the CSS code in an external sheet: #header{ position:fixed; width:100%; height:15%; } #hedr{ position:fixed; height:5%; width:6%; top:5%; left:30%;} #nme{ position:fixed; font-size:400%; top:3%; left:10%; } Here is the php document: <!DOCTYPE HTML> <html> <head> <meta name="keywords" content="Roun, David Roun, Rounsworld, Heather Roun"> <meta name="description" content="Personal website"> <meta name="author" content="David Roun"> <meta charset"UTF-8"> <link rel="stylesheet" type="text/css" href="bground.css"> </head> <body> <?php session_start();?> <div id="header"> <table> <tr><td><img id="hedr" src="pages/<?php echo $_SESSION['name'] . '/' . $_SESSION['picture'];?>"/></td><td id="nme"><?php echo $_SESSION['name'];?></td></tr> </table> </div> </body> </html> The problem is that the CSS code works when it is on the same page as the php …

Member Avatar
+0 forum 5

The End.