Jump to content

Lv-Kris

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Everything posted by Lv-Kris

  1. Kill Monster Script from http://www.chipmunk-scripts.com/ <?php parse_str("$QUERY_STRING"); $db = mysql_connect("localhost", "root", "pwd") or die("Could not connect."); if(!$db) die("no db"); if(!mysql_select_db("km",$db)) die("No database selected."); if(!get_magic_quotes_gpc()) { $_GET = array_map('mysql_real_escape_string', $_GET); $_POST = array_map('mysql_real_escape_string', $_POST); $_COOKIE = array_map('mysql_real_escape_string', $_COOKIE); } else { $_GET = array_map('stripslashes', $_GET); $_POST = array_map('stripslashes', $_POST); $_COOKIE = array_map('stripslashes', $_COOKIE); $_GET = array_map('mysql_real_escape_string', $_GET); $_POST = array_map('mysql_real_escape_string', $_POST); $_COOKIE = array_map('mysql_real_escape_string', $_COOKIE); } ?> Error was: Notice: Undefined variable: QUERY_STRING in c:\program files\easyphp1-8\www\mmorpg\test\km2\connect.php on line 2 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:\program files\easyphp1-8\www\mmorpg\test\km2\connect.php:2) in c:\program files\easyphp1-8\www\mmorpg\test\km2\index.php on line 4 Or Pwngame script from http://www.chipmunk-scripts.com/ Error Notice: Undefined index: pwngame in c:\program files\easyphp1-8\www\mmorpg\test\pwngame\index.php on line 4 Index.php: <?php session_start(); include "connect.php"; $username=$_SESSION['pwngame']; $getuser="SELECT * from eatyou_login where eatname='$username'"; $getuser2=mysql_query($getuser) or die("Could not get user"); $getuser3=mysql_fetch_array($getuser2); ?> <link rel='stylesheet' href='style.css' type='text/css'> <?php if(isset($_SESSION['pwngame'])) { print "<table class='maintable'>"; print "<tr valign='top'><td width=25%>"; include "left.php"; print "</td>"; print "<td width=75%>"; //main table print "<table width=90% class='maintable'> <tr class='headline'><td>Main screen</td></tr>"; print "<tr class='mainrow'><td>"; print "This is your main user control panel, from here you change your password and change your avatar. To pwn people, point them to this URL:<br> $path/pwn.php?ID=$getuser3[eatid]<br><br>"; print "You have pwned $getuser3[score] people so far.<br><br>"; print "<A href='topscores.php'>Top 100 pwners</a>"; print "</td></tr></table></td>"; print "</table><br><br>"; print "<center><font size='1'>Script produced by © <A href='http://www.chipmunk-scripts.com'>Chipmunk Scripts</a></font></center>"; } else { print "<table class='maintable'>"; print "<tr valign='top'><td width=100%>"; print "You are not logged in."; print "</td></tr></table>"; } ?> And yea, both of them are fresh downloads with no modifications, except the configuration Hope it's the right code Thanks
  2. At the beginning i thought its something in the script. Turned out, that it happens to many other scripts i tried to run. Apache1.3.33 PHP 4.3.10 PHPMyAdmin 2.6.1 MySQL 4.1.9 Mayebe im just using old scripts, that don's support this php version? Any ideas how to fix it? :-\ ??? Thanks!
  3. Thank You for the reply. When I try to echo the result of query, it just shows Resource id #29 Any suggestions? Kris
  4. Ok, hers the situation: Here are some of mine tables: user data, user_weapons, game_weapons The idea is to store only the weapon_id and amount of those user has in the user_weapons table. Then its linked to game_weapons, where we get weapon details from. Well i need a little help on joining them all together... For example user attacks other user with his weapon, he chooses the weapon id and the amount of damage depends on the weapon stats stored in game_weapons table. I am willing to do this because of easier modifying later Hope You got the idea. Kris
  5. I have a need to insert the same user_id from users table into another table upon registering, however in the users table user_id is an auto incrementing number. If i put user_id of table2 auto incrementing there could be some id mixing if many people register at once. Maybe i could somehow link both id's? I was thinking about inserting another register page where if the id is not found, it inserts it... Any ideas about solving this? Hope You get my idea... Kris
  6. Hello. I've came across a need to connect my `users` tables `user_id` with the same `user_id` from `user_stuff` table. Ive been reading about InnoDB and is this the case I should use it? Ive tried the phpMyAdmin function `link tables` but it doesn't seem to work. Well i could write the `user_id` in all the tables needed upon registering, but, as i suppose, it will cause more server workload and loose efficiency. Thank You for any advice. Kris
  7. Hello.  ;D Well I am willing to display a html table and form within the php. Why? because i have an if/else statement that checks if the user is logged  in. Then it should display a html table with some forms. Ive tried to do it with the echo statement by changing html quotes "" with php quotes ''. well is seems to understand it and the form is displayed, but the $_POST isn't working when i try to post it on some other page. I tried the same form out of php and the post value works perfectly. Yea, some other stuff- i have a users table in my MySQL db, for example i have many items for example-medals and each user can have more than one of a kind. So could i store that in a single column or make a column for each of the items showing the count of items user has? Thank You for advices Kris ;D
×
×
  • 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.