Jump to content

kryppienation

Members
  • Posts

    57
  • Joined

  • Last visited

    Never

Contact Methods

  • AIM
    burtonboarder698
  • Website URL
    http://www.homickshouse.com/kryppienation

Profile Information

  • Gender
    Male
  • Location
    Pa

kryppienation's Achievements

Member

Member (2/5)

0

Reputation

  1. Real decent! This worked great only had to change a few things. Thanks again so much!!
  2. well that worked totally awesome and i was able to fill the gap very well including at least 1 monster for each level... Now let me ask you this, because you can see from the way i try to do things i'm not really good with this and still learning. Is there an easy was (just like the poster was able to help me easily solve this) to say now if i want to echo the numbers 2-99 and do a count of each level to see how many monsters i have for each level? If i wanted the output to look like this: Level - monstercount 2 - 3 3 - 2 4 - 2 5 - 5 6 - 1 7 - 1 8 - 1 9 - 2 ect ect all the way until 99. I really don't know how to use the array functions well and i know that there must be a simple way to display this information.
  3. totally ftw!! Thanks a lot Pikachu2000~~
  4. all fields in the database are not null tho. let me try to explain better what i'm trying to do. I'll include a SS of the database and a SS of the output and better try to explain what i want the output to come out as. ok so as you can see in the database i have multiply monsters with the level of 2 and 63 as well as all of the other levels. All i'm trying to do is list all the numbers 2-99 that are not taken already so i know which levels i still need to add. So if the output as is, i'm trying to get the output to be like... 6 - 7 - 8 - 9 - 11 - 12 - 14 .. ect because these are the levels i have not yet created monsters for.. i hope that this makes it easier. Thanks for the reply and i hope someone knows how to do this! [attachment deleted by admin]
  5. Hey guys i'm trying to do something and i can't seem to get it done correctly. I have a preset amount of levels for a monster to be. These levels are 2-99. What i'm trying to do is go through each level 2-99, do a lookup in my monsters database, if the level is already there i would like nothing to happen, if the level is not there i'd like it to display the level so that i may know that i need to add a monster of this level. All the code is doing is listing the number all 2-99 and i only want it to list the numbers 2-99 that are already not used from the database. Can anyone help me out here? //we need a counter to go from 2 - 99 $count = 2; while ($count <= 99){ $getlevels = 'select level from monsters'; DB::connect($DB_database); $getlevelsresult = DB::query($getlevels, "get levels"); DB::close(); while ($row = mysql_fetch_assoc($getlevelsresult)) { $levels = $row['level']; } if ($levels == $count){ $count++; } else { echo ''.$count.' -'; $count++; } }
  6. I am having problems, for some reason the code below is not changing the db value, i've tried a few things and still can't get it to change. Is there anyone around who can figure out and let me know what the problem is here... The echo's work fine, displaying the username and the number 1 but for some reason the database value never changes from 0 to 1. here is the portion of code not working: $usertologin = $_SESSION["s_username"]; $loggedinid = "1"; echo $usertologin; echo $loggedinid; $setloggedinsql = 'update knusers set online = ".$loggedinid." where username = ".$usertologin."'; DB::query($setloggedinsql, "Validating user creditials"); Here is the entire code: <?php // set your infomation. include('db.php'); // connect to the mysql database server. DB::connect($DB_database); session_start(); // connect to the mysql database server. if ($_POST['username']) { // did they supply a password and username $username=mysql_real_escape_string($_POST['username']); $password=mysql_real_escape_string($_POST['password']); if ($password == NULL) { $nopass = "A password was not supplied"; } else { $checkuser = "SELECT username, wid, aid, str, def, currency, password FROM knusers WHERE username = '$username'"; $checkuser_result = DB::query($checkuser, "Validating user creditials"); $checkuser_data = mysql_fetch_array($checkuser_result); if ($checkuser_data['password'] != $password) { $loginbad = "The supplied login is incorrect, Please check your password"; } else { $_SESSION["s_username"] = $checkuser_data['username']; $_SESSION["s_weapon"] = $checkuser_data['wid']; $_SESSION["s_armor"] = $checkuser_data['aid']; $_SESSION["s_str"] = $checkuser_data['str']; $_SESSION["s_def"] = $checkuser_data['def']; $_SESSION["s_currency"] = $checkuser_data['currency']; $_SESSION["s_ipaddress"] = $_SERVER['REMOTE_ADDR']; $_SESSION["s_lastlogin"] = date('l jS \of F Y h:i:s A'); if ($_POST["returnTo"] != null) { //header("location: ../index.php"); } $usertologin = $_SESSION["s_username"]; $loggedinid = "1"; echo $usertologin; echo $loggedinid; $setloggedinsql = 'update knusers set online = ".$loggedinid." where username = ".$usertologin."'; DB::query($setloggedinsql, "Validating user creditials"); //header("location: ../index.php"); } } } ?> Any help will be greatly appriciated. Thank you.
  7. lol thanks a lot.... I feel dumb now haha, but none-the-less problem fixed. Much appriciated.
  8. I am having trouble for some reason in internet explorer with having form buttons show up. I am wondering if anyone could tell me why this form button shows up in mozilla but not in Internet explorer. Thanks everyone. Here is the code. echo '<form action="itemsshop.php" method="post">'; echo '<input type="hidden" name="userid" value="'.$id.'"'; echo '<input type="hidden" name="medname" value="'.$gottenmedname.'"'; echo '<input type="hidden" name="medcost" value="'.$gottenmedcost.'"'; echo '<input type="hidden" name="dbvalue" value="2"'; echo '<input type="submit" name="confirmbuy" value="Buy It">'; echo '</form>'; echo '<p><a href="itemsshop.php">Back</a>'; The first image is a screen shot from IE and the second on is from Mozilla. [attachment deleted by admin]
  9. Thanks so much for your help guys, this will be perfect for what I'm trying to do. I appreciate your time spent in helping me figure this out!!
  10. Thank you very much this seems to work excellent, I'm wondering tho, is there anyway that i can assign a variable to each number? I would really like to be able to work with these 5 numbers as separate variables so that they can be called upon later in the code.
  11. i tried that just now and i got a endless loop with nothing showing up at all as output.
  12. you can do this using windows scheduled tasks. RUN:path to php.exe filename START IN: path to location of file RUN AS:pcname you must set a password here if you need to login to your desktop example: RUN:C:\htdocs\php\php.exe myfile.php <--there is a space between path and filename START IN:C:\htdocs\awesomeproject\includes RUN AS:HOMEPC\username click on the checkbox for enabled change tabs for the scheduling and settings. Hope this helps out.
  13. I am trying to draw 5 random numbers between 1 and 99, the problem I'm having is trying to make sure all the numbers are different. I am wondering if someone can help me actually have this check to make sure that all 5 numbers are different or even if there is some better way for me to accomplish this. <?php $C = 0; while($C <= 4){ $drawing = rand(1, 99); echo ''.$drawing.'.'; $C++; } ?>
  14. Thank you so much, that worked perfectly. Much appriciated!!!
  15. Ok, i have tried to use this code, and i've gotten at least better results than the first time... i got no errors or nothing on the first script, just a blank white page. With this code it tried to load the images i guess but all of them are broken and none of them actually showed an image. This is the outpud of the source from the broken images. http://www.homickshouse.com/bobby/bobby%20100.jpg The following is what the output needs to actually be for the image to show up. http://www.homickshouse.com/bobby/pengame5-22-2009/bobby%20100.jpg if you would like to see the live results you can see those at http://www.homickshouse.com/bobby/viewpics.php and also for some reason it is trying to access the main directory of my http because it's asking for a username and password and that would only happen when i try to access my root directory. Well i have modified this code to show the pictures now, the only problem is that it is trying to create some kinda pictures at the beginning that are not really there... It's calling something out wrong i think. Does anyone know why this is happening? The code i used to view the pictures correctly is: <?php $files = scandir('pengame5-22-2009/'); foreach ($files as $path) { echo "<img src=\"pengame5-22-2009/$path\" /><br />"; } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.