
Haunted Dawg
Members-
Posts
2,933 -
Joined
-
Last visited
Never -
Days Won
1
Content Type
Profiles
Forums
Events
Everything posted by Haunted Dawg
-
[REVIEW REQUEST] - Killah-City.net - Please Review
Haunted Dawg replied to Zero-Affect's topic in Browsergames
Re: [Review] - Killah-City.net - Please Review Actualy proxy.org provides 27,000 proxies and only 6,156 of them work. It actualy let me get in after the second try because the first try normaly end's up being a proxy website that is no longer existant. -
[mccode v2] Parse The Parcel - [Re-Programmed]
Haunted Dawg replied to Haunted Dawg's topic in Free Modifications
Re: [mccode v2] Parse The Parcel - [Re-Programmed] Here is the admin panel. I would of finished it yesterday but i had to step out. <?php include("sglobals.php"); function die_n($echo); { global $h; echo $echo; $h->endpage(); exit; } switch($_GET['x']) { case 'add': add_p(); break; case 'terminate': terminate_p(); break; case 'give_to': give_p_user(); break; case 'edit_p': edit_p(); break; case 'wgi': whos_got_it(); break; default: 'Use the correct links.'; break; } function edit_p() { global $h,$ir; if($_POST['parcel']) { $p = abs(@intval($_POST['parcel'])); if(mysql_num_rows(mysql_query("SELECT p_ID FROM parcels WHERE p_ID=".$p)) == 0) { die_n('Parcel does not exist.'); } mysql_query("DELETE FROM parcels WHERE p_ID=".$p); mysql_query("UPDATE users SET parcel_got=0, parcel_time=0 WHERE parcel_got=".$p); } echo ' <form action="'.$_SERVER['PHP_SELF'].'?x=edit_p" method="post"> Delete Parcel: <option name="parcel">'; $soc = mysql_query("SELECT p_ID,p_NAME FROM parcels"); while($soc = mysql_fetch_assoc($soc)) { echo '<option value="'.$soc['p_ID'].'">'.$soc['p_NAME'].'</option>'; } echo ' </option> <input type="submit" value="Delete Parcel"> </form>'; function whos_got_it() { global $h,$ir; if($_POST['parcel']) { $p = abs(@intval($_POST['parcel'])); if(mysql_num_rows(mysql_query("SELECT p_ID FROM parcels WHERE p_ID=".$p)) == 0) { die_n("Parcel does not exist!"); } $fetch = mysql_query("SELECT userid,username FROM users WHERE parcel_got=".$p); $soc = mysql_fetch_assoc($fetch); echo '[url="viewuser.php?u='.$soc['userid'].'"]'.$soc['username'].'[/url]'; } echo ' <form action="'.$_SERVER['PHP_SELF'].'?x=wgi" method="post"> Give to who: <option name="parcel">'; $soc = mysql_query("SELECT p_ID,p_NAME FROM parcels"); while($soc = mysql_fetch_assoc($soc)) { echo '<option value="'.$soc['p_ID'].'">'.$soc['p_NAME'].'</option>'; } echo ' </option> <input type="submit" value="Check Who Has This Parcel"> </form>'; } function give_p_user() { global $h,$ir; if($_POST['userid']) { $user = abs(@intval($_POST['userid'])); if(mysql_num_rows(mysql_query("SELECT userid FROM users WHERE userid=".$user)) == 0) { die_n("This user does not exist."); } $parcel = abs(@intval($_POST['parcel'])); if(mysql_num_rows(mysql_query("SELECT p_ID FROM parcels WHERE p_ID=".$parcel)) == 0) { die_n("There is no parcel of this ID!"); } mysql_query("UPDATE users SET parcel_got=".$parcel.",parcel_time=10 WHERE userid=".$user); } echo ' <form action="'.$_SERVER['PHP_SELF'].'?x=give_to" method="post"> Give to who: <option name="p_ID">'; $soc = mysql_query("SELECT userid,username FROM users WHERE laston>unix_timestamp()-1440*60 AND parcel_got=0"); while($soc = mysql_fetch_assoc($soc)) { echo '<option value="'.$soc['userid'].'">'.$soc['username'].'</option>'; } echo ' </option> <input type="submit" value="Give To User"> </form>'; } function terminate_p() { global $h,$ir; if($_POST['p_ID']) { $id = abs(@intval($_POST['p_ID'])); $soc = mysql_query("SELECT p_ID,p_NAME FROM parcels WHERE p_ID=".$id); if(mysql_num_rows($soc) == 0) { die_n("This parcel does not exist."); } $soc = mysql_fetch_assoc($soc); mysql_query("UPDATE users SET parcel_got=0,parcel_time=0 WHERE parcel_got=".$soc['p_ID']); stafflog_add($ir['username'].' has just terminated the parcel '.$soc['p_NAME']); die_n("Parcel successfuly terminated."); } echo ' <form action="'.$_SERVER['PHP_SELF'].'?x=terminate" method="post"> Parcel To Delete: <option name="p_ID">'; $soc = mysql_query("SELECT p_ID,p_NAME FROM parcels"); while($soc = mysql_fetch_assoc($soc)) { echo '<option value="'.$soc['p_ID'].'">'.$soc['p_NAME'].'</option>'; } echo ' </option> <input type="submit" value="Terminate"> </form>'; } function add_p() { global $h,$ir,$c; if($_POST['p_name']) { $name = htmlentities(mysql_real_escape_string(trim($_POST['p_name']))); $wrap = abs(@intval($_POST['p_wrappers'])); $pic = htmlentities($_POST['p_pic']); $cash = abs(@intval($_POST['p_cash'])); $crys = abs(@intval($_POST['p_crystals'])); $item = abs(@intval($_POST['p_item'])); $itmq = abs(@intval($_POST['p_item_qty'])); mysql_query("INSERT INTO parcels (p_NAME,p_WRAPPERS,p_PIC,p_PRIZE_M,p_PRIZE_C,p_PRIZE_I,p_QTY_I) VALUES('".$name."',".$wrap.",'".$pic."',".$cash.",".$crys.",".$item.",".$itmq.")") or die(mysql_error()); stafflog_add("Parcel ".$name." has been created."); die_n("Parcel ".$name." has been created successfuly!"); } echo 'Adding a parcel: <form action="'.$_SERVER['PHP_SELF'].'?x=add" method="post"> Name: <input type="text" name="p_name"> No. Of Wrappers: <input type="text" name="p_wrappers"> Picture: <input type="text" name="p_pic"> Prize Cash: <input type="text" name="p_cash"> Prize Crystals: <input type="text" name="p_crystals"> Prize Item: '.item_dropdown($c,"p_item").' Prize Item QTY: <input type="text" name="p_item_qty"> <input type="submit" value="Create Parcel"> </form>'; } $h->endpage(); ?> Guy's test the script and tell me if there are any bug's so i can fix. -
Re: WWII Italy - 13 Japan - 21 Great Britain - 52 United States - 17 Soviet Union - 19 France - 18
-
Re: [REVIEW] Anime warz Yes that is the site.
-
Re: [Review] Death-Wars Ok i got onto your game. Liked the login page. Liked the register page. I logged in and it look's awful. :| oh and not to mention the page taking about 1 minute to load.
-
Re: estate.php I had this problem for ages but i figured it out and i fort i would help you guys out kk hers wat you do go to staff panel then click edit house edit the deafult house give it a name and change the cost from 0 to 10 or sumat like that and thats it they work then How will that help may i ask?
-
[REVIEW REQUEST] - Killah-City.net - Please Review
Haunted Dawg replied to Zero-Affect's topic in Browsergames
Re: [Review] - Killah-City.net - Please Review Yubi.. i got banned myself and me being the old owner. It was not because i did something wrong but it's a stupid proxy block that does not allowed 4 .'s to be in the IP. Just so you know zero. It does not block proxy's as that is how i looked at the site the other day :wink: -
[mccode v2] Simple Login,Register,etc. (Validated.....)
Haunted Dawg replied to shaved92bravada's topic in Free Modifications
Re: [mccode v2] Simple Login,Register,etc. (Validated.....) It would be very easy to import this into your header.php. It really would not be hard. -
[MCCodes V2] Maximum Money - Please help!
Haunted Dawg replied to Gh0st's topic in General Discussion
Re: [MCCodes V2] Maximum Money - Please help! Pog1. You actualy missed a ; :lol: -
Re: MD + CE = Free Template Yes that is him.
-
[mccode v2] Christmas Gift ( Abit Late :P )
Haunted Dawg replied to -Matt-'s topic in Free Modifications
Re: [mccode v2] Christmas Gift ( Abit Late :P ) Look's alright to me. -
[mccode v2] Parse The Parcel - [Re-Programmed]
Haunted Dawg replied to Haunted Dawg's topic in Free Modifications
Re: [mccode v2] Parse The Parcel - [Re-Programmed] Ok use this bullseye and other's as your cron minute code: $fetch_user = mysql_query("SELECT userid,username,parcel_time,parcel_got FROM users WHERE parcel_got > 0"); $soc = mysql_fetch_assoc($fetch_user); //Illusions idea! if($soc['parcel_time'] == 0) { require_once("global_func"); mysql_query("UPDATE users SET parcel_time=0, parcel_got=0 WHERE userid=".$soc['userid']); $data = mysql_query("SELECT userid,username FROM users WHERE laston>unix_timestamp()-1440*60 ORDER BY DESC RAND() LIMIT 1"); $soc_u = mysql_fetch_assoc($data); mysql_query("UPDATE users SET parcel_time=10, parcel_got=".$soc['parcel_got']." WHERE userid=".$soc_u['userid']); event_add($soc_u['userid'],'You have just got the parcel! Click [url="wrappers.php?x=unwrap"]here[/url] to unwrap and see if you got the prize!'); } else { mysql_query("UPDATE users SET parcel_time=parcel_time-1 WHERE userid=".$soc['userid']); } -
[mccode v2] Parse The Parcel - [Re-Programmed]
Haunted Dawg replied to Haunted Dawg's topic in Free Modifications
Re: [MCCodes V2] - Parse The Parcel - [Re-Programmed] Your cron is v1. Take the v2 event_add() function out of global func. And luke. Just so you know i actualy coded this to my game. And in my globals.php it's not bringing out everything from the user's table. -
[mccode v2] Parse The Parcel - [Re-Programmed]
Haunted Dawg replied to Haunted Dawg's topic in Free Modifications
Re: [MCCodes V2] - Parse The Parcel - [Re-Programmed] Look here luke & isomerizer. I was going to make parcel_users but i cba. Thanks. Admin panel will be posted tomorow. As my bike come's more important to pc life. -
[mccode v2] Pass Parcel or Secret Santa [Working Copy]
Haunted Dawg replied to Uridium's topic in Free Modifications
Re: [Mccodes v2] Pass Parcel or Secret Santa [Working Copy] Just click here! :wink: -
Ok since you all wanted to see illusions parcel mod working. Here it is. I have taken my time to recode this script so keep your smurk remarks to your self! Firstly the sql: CREATE TABLE IF NOT EXISTS `parcels` ( `p_ID` int(11) NOT NULL auto_increment, `p_NAME` varchar(255) collate latin1_general_ci NOT NULL default '', `p_DESC` varchar(255) collate latin1_general_ci NOT NULL default '', `p_WRAPPERS` int(11) NOT NULL default '0', `p_PIC` varchar(255) collate latin1_general_ci NOT NULL default 'default.jpg', `p_PRIZE_M` int(11) NOT NULL default '0', `p_PRIZE_C` int(11) NOT NULL default '0', `p_PRIZE_I` int(11) NOT NULL default '0', `p_QTY_I` int(11) NOT NULL default '0', PRIMARY KEY (`p_ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=0; ALTER TABLE users ADD parcel_got INT(11) NOT NULL DEFAULT '0'; ALTER TABLE users ADD parcel_time INT(11) NOT NULL DEFAULT '10'; Now for wrappers.php: <?php /*--------------- -- Scripted by kyle -- Idea orginaly from illusions -- Please keep notice. ---------------*/ include("globals.php"); function die_n($echo) { global $h; echo $echo; $h->endpage(); exit; } if($ir['parcel_got'] == 0) { die_n("You do not have a parcel to unwrap!"); } switch($_GET['x']) { case 'unwrap': p_unwrap(); break; } function unwrap() { global $h,$ir,$set; $fetch_data = mysql_query("SELECT p_ID,p_NAME,p_WRAPPERS,p_PIC FROM parcels WHERE p_ID=".$ir['parcel_got']); $soc = mysql_fetch_assoc($fetch_data); echo '[img='.$soc['p_PIC'].']'; if(!$soc['p_ID']) { mysql_query("UPDATE users SET parcel_got=0 WHERE userid=".$ir['userid']); die_n('This parcel ID does not exist.'); } if($soc['p_WRAPPERS'] == 0) { mysql_query("DELETE FROM parcels WHERE p_ID=".$soc['p_ID']); die_n('This parcel has got 0 wrappers left. Sorry but the parcel has been deleted.'); } if($ir['parcel'] != 0) { if($soc['p_WRAPPERS'] != 1) { mysql_query("UPDATE parcels SET p_WRAPPERS WHERE p_ID=".$soc['p_ID']); $data = mysql_query("SELECT userid,username FROM users WHERE laston>unix_timestamp()-1440*60 ORDER BY DESC RAND() LIMIT 1"); $soc_u = mysql_fetch_assoc($data); mysql_query("UPDATE users SET parcel_got=".$soc['p_ID'].",parcel_time=10 WHERE userid=".$soc_u['userid']); event_add($soc_u['userid'],'You have recieved the parcel. Go [url="wrapper.php?x=unwrap"]here[/url] to unwrap and see if you got the prize!'); die_n('You unwrapped '.$soc['p_NAME'].' parcel but unfortunatly there is more to unwrap.'); } else if($soc['p_WRAPPERS'] == 1) { $fetch_gifts = mysql_query("SELECT p_ID,pNAME,p_PRIZE_M,p_PRIZE_C,p_PRIZE_I,p_QTY_I FROM parcels WHERE p_ID=".$ir['parcel_got']); $soc_gifts = mysql_fetch_assoc($fetch_gifts); if($soc_gifts['p_PRIZE_M']) { mysql_query("UPDATE users SET money=money+".$soc_gifts['p_PRIZE_M']." WHERE userid=".$ir['userid']); $noti_m = '[b]Money:[/b] '.money_formatter($soc_gifts['p_PRIZE_M']).' '; } if($soc_gifts['p_PRIZE_C']) { mysql_query("UPDATE users SET crystals=crystals+".$soc_gifts['p_PRIZE_C']." WHERE userid=".$ir['userid']); $noti_m = '[b]Crystals:[/b] '.number_format($soc_gifts['p_PRIZE_C']).' '; } if($soc_gifts['p_PRIZE_I']) { item_add($ir['userid'],$soc_gifts['p_PRIZE_I'],$soc_gifts['p_QTY_I']); $soc_itm = mysql_query("SELECT itmname,itmid FROM items WHERE itmid=".$soc_gifts['p_PRIZE_I']); $soc_f = mysql_fetch_assoc($soc_itm); $noti_i = '[b]Item(s):[/b] '.$soc_f['itmname'].' x'.$soc_gifts['p_QTY_I'].' '; } die_n('You have been given the following: '.$noti_m.' '.$noti_c.' '.$noti_i.' [url="index.php"]Go home with your prizes[/url]'); } } else { die_n('You dont even have a parcel!'); } } $h->endpage(); ?> Header.php Code: (Add this where ever you want to display it.) if($ir['parcel_got']) { //Illusions idea! echo ' You have '.$ir['parcel_time'].' minute(s) left to unwrap! <form action="wrappers.php?x=unwrap" method="get"> <input type="submit" value="Unwrap The Parcel!"> </form> '; } Add this code to your cron_minute.php: $fetch_user = mysql_query("SELECT userid,username,parcel_time,parcel_got FROM users WHERE parcel_got!=0"); $soc = mysql_fetch_assoc($fetch_user); //Illusions idea! if($soc['parcel_time'] == 0) { mysql_query("UPDATE users SET parcel_time=0, parcel_got=0 WHERE userid=".$soc['userid']); $data = mysql_query("SELECT userid,username FROM users WHERE laston>unix_timestamp()-1440*60 ORDER BY DESC RAND() LIMIT 1"); $soc_u = mysql_fetch_assoc($data); mysql_query("UPDATE users SET parcel_time=10, parcel_got=".$soc['parcel_got']." WHERE userid=".$soc_u['userid']); event_add($soc_u['userid'],'You have just got the parcel! Click [url="wrappers.php?x=unwrap"]here[/url] to unwrap and see if you got the prize!'); } else { mysql_query("UPDATE users SET parcel_time=parcel_time-1 WHERE userid=".$soc['userid']); } Please test for error's and such. I will be creating the admin panel in a short while. Just wanted to post this so long so i can make some space on notepad++. NB: This script has not been tested as of yet! NB: Admin panel coming soon! NB: Idea came from illusions thanks.
-
[mccode v2] Pass Parcel or Secret Santa [Working Copy]
Haunted Dawg replied to Uridium's topic in Free Modifications
Re: [Mccodes v2] Pass Parcel or Secret Santa [Working Copy] ^^ might want to correct your post. And illusion's i have sent you a PM. Read it. :evil: -
Re: [mccodes] Register Coupon Lock Are you seriouse? Forum clutterer ^^ not you martial coder. But ishmell. Come on if you wanted to close your register down just put die(); at the top. Use the admin panel to create friend's, staff's account's!
-
[mccode v2] Pass Parcel or Secret Santa [Working Copy]
Haunted Dawg replied to Uridium's topic in Free Modifications
Re: [Mccodes v2] Pass Parcel or Secret Santa [Working Copy] Its free it doesn't matter when it gets done!!! That is why I don't post alot of things I do........ Shaved92bravada. No matter what you post. An excellent mod. a non working mod. a edited mod. you will get jerk off's like him that post's crap. -
[mccode v2] Player of the week...
Haunted Dawg replied to shaved92bravada's topic in Free Modifications
Re: [mccode V2] Player of the week... @ castle: <?php include "globals.php"; print "<h3>The Official MWO NewsPaper</h3>"; $q=$db->query("SELECT * FROM papercontent LIMIT 1"); $content=$db->fetch_single($q); print "<table width=75% cellspacing=1 class='table'><tr><td></td> <td></td> <td></td></tr><tr><td><h2>Player of the Week</h2>"; $q=$db->query("SELECT username, level, gender, daysold, pw_reward, display_pic FROM users WHERE player_week > 0"); $r=$db->fetch_row($q); $qn=$db->query("SELECT itmname FROM items where itmid='{$r['pw_reward']}'"); $n=$db->fetch_row($qn); $item=($n['itmname']); if($r['display_pic']) { $pic= '[img='.$r['display_pic'].']'; } else { $pic= "[img=mobster.jpg]"; } echo ' <p class="left">'.$r['username'].'</p> '.$pic.' Level: '.$r['level'].' Gender: '.$r['gender'].' Days Old: '.$r['daysold'].' Rewarded With: 10 Donator Days & '.$item.' </p> '; print "<p class='left'> You too can be chosen for Player of the Week. There is nothing special that you have to do other than stay active, and have fun playing the game. Players are chosen randomly out of everyone that is active and not in fed each week and the person chosen will receive a reward when they are chosen. </p>"; print "</td><td colspan=2>$content</td></tr></table>"; $h->endpage(); ?> -
[mccode v2] Player of the week...
Haunted Dawg replied to shaved92bravada's topic in Free Modifications
Re: [mccode V2] Player of the week... One thing with this mod. Even if you have so called item id's 1 - 30. What if id 15 is missing? and the random number is chosen as 15? The user get's no item. So why not just go like this. <?php include("config.php"); include("global_func.php"); global $_CONFIG; if($_GET['code'] != $_CONFIG['code']) { die(); } define("MONO_ON", 1); require("class/class_db_".$_CONFIG['driver'].".php"); $db = new database; $db->configure ( $_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent'] ); $db->connect(); $c = $db->connection_id; //Continue script //Select a random user. $q = $db->query("SELECT userid FROM users WHERE laston>unix_timestamp()-86400*10 AND fedjail=0 AND player_week=0 ORDER BY rand() limit 1"); //Open the while function while($rr = $db->fetch_row($q)) //Open loop { //Fetch acording id... $row = mysql_query("SELECT itmid FROM items ORDER BY itmid DESC LIMIT 1") or die(mysql_error()); $row = mysql_fetch_assoc($row); //Rand item... $item = rand(1,$row); //Fetch item info $qn = $db->query("SELECT itmname,itmid FROM items where itmid=".$item); $n = $db->fetch_row($qn); //Check if item exist's $oda = mysql_query("SELECT itmname,itmid FROM items WHERE itmid=".$n['itmid']) or die(mysql_error()); while($soc = mysql_fetch_assoc($oda)) { if(!$soc['itmid']) { $item = rand(1,$row); } } //Give the item item_add($rr['userid'], $item, 1); //Event the user event_add($rr['userid'],"You have been chosen as Player of the Week!!!! You have been awarded with 10 Donator Days and an {$n['itmname']}. Hope you enjoy your reward and thank you for being active and staying out of trouble. Thanks from the BraveNations Staff.",$c); //Update the user $db->query("UPDATE users SET donatordays=donatordays+10, player_week=7, pw_reward=".$item." WHERE userid=".$rr['userid']); //Close loop } ?> I am not sure if that is correct. If that does not work simply use this. <?php include("config.php"); include("global_func.php"); global $_CONFIG; if($_GET['code'] != $_CONFIG['code']) { die(); } define("MONO_ON", 1); require("class/class_db_".$_CONFIG['driver'].".php"); $db = new database; $db->configure ( $_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent'] ); $db->connect(); $c = $db->connection_id; //Continue script //Select a random user. $q = $db->query("SELECT userid FROM users WHERE laston>unix_timestamp()-86400*10 AND fedjail=0 AND player_week=0 ORDER BY rand() limit 1"); //Open the while function while($rr = $db->fetch_row($q)) //Open loop { $item_array = array ( 1, 2, 3, 4, 5, 6, 7, 8, 9 ); $rand_itm = rand(1,9); if(in_array($rand_itm, $item_array)) { $item = $rand_itm; } else { $item = 9; //Default. } //Fetch item info $qn = $db->query("SELECT itmname,itmid FROM items where itmid=".$item); $n = $db->fetch_row($qn); //Give the item item_add($rr['userid'], $item, 1); //Event the user event_add($rr['userid'],"You have been chosen as Player of the Week!!!! You have been awarded with 10 Donator Days and an {$n['itmname']}. Hope you enjoy your reward and thank you for being active and staying out of trouble. Thanks from the BraveNations Staff.",$c); //Update the user $db->query("UPDATE users SET donatordays=donatordays+10, player_week=7, pw_reward=".$item." WHERE userid=".$rr['userid']); } ?> This way. It checks if the item exist's or not and if not it just give's a default one in code 2 but in code 1 it will run the while function again. -
Re: [V2] Help Nedded Please help Try this. <?php include "globals.php"; if($ir['money'] < 500000) { die("You don't have enough money. You need \$500,000."); } if($ir['gang']) { die ("You're already in a gang!"); } if($_POST['submit']) { $name=htmlspecialchars($_POST['name']); $desc=htmlspecialchars($_POST['desc']); mysql_query("INSERT INTO gangs VALUES('','$name','$desc','','',0,0,100,$userid,$userid,5,0,0,'','','',)",$c); $i=$db->insert_id(); $db->query("UPDATE users SET gang=$i,money=money-500000 where userid=$userid"); print "Gang created!"; } else { print "<h3> Create A Gang </h3><form action='creategang.php' method='post'><input type='hidden' name='submit' value='1' />Name:<input type='text' name='name' /> Description: <textarea name='desc' cols='40' rows='7'></textarea> <input type='submit' value='Create Gang for \$500,000' /></form>"; } $h->endpage(); ?>
-
Re: [mccode V2] bank interest CAP This has been answered before. But why not use this rather. It's a way to get more out of the game. That way people can mug those with over 15 bill in there bank. if($ir['bankmoney'] > 15000000000) { $bm = ($ir['bankmoney'] - 15000000000); mysql_query("UPDATE users SET bankmoney=15000000000, money=money+".$bm." WHERE userid=".$ir['userid']); echo ' <h1> <font color="red"> You have gone over the cap limit of '.money_formatter(15000000000).' so we have set your bank money to '.money_formatter(15000000000).' and have credited your wallet money with '.money_formatter($bm).'. Thanks. </font> </h1>'; }
-
Re: [V2] Help Nedded Please help Go upload the script bellow. And show us the error it's giving you. <?php include "globals.php"; if($ir['money'] < 500000) { die("You don't have enough money. You need \$500,000."); } if($ir['gang']) { die ("You're already in a gang!"); } if($_POST['submit']) { $name=htmlspecialchars($_POST['name']); $desc=htmlspecialchars($_POST['desc']); mysql_query("INSERT INTO gangs VALUES('','$name','$desc','','',0,0,100,$userid,$userid,5,0,0,'')"); or die(mysql_error()); $i=$db->insert_id(); $db->query("UPDATE users SET gang=$i,money=money-500000 where userid=$userid"); print "Gang created!"; } else { print "<h3> Create A Gang </h3><form action='creategang.php' method='post'><input type='hidden' name='submit' value='1' />Name:<input type='text' name='name' /> Description: <textarea name='desc' cols='40' rows='7'></textarea> <input type='submit' value='Create Gang for \$500,000' /></form>"; } $h->endpage(); ?>
-
Is this worth it?
Haunted Dawg replied to Haunted Dawg's topic in MySQL, Oracle, Postgress or other DB
Re: Is this worth it? [Thread1] $id = "SELECT id FROM table ..." -> $id is 1 [Thread2] $id = "SELECT id FROM table ..." -> $id is 1 [Thread1] "INSERT INTO table ($id + 1) ..." -> is 1 + 1 => 2 [Thread2] "INSERT INTO table ($id + 2) ..." -> is 1 + 2 => 3 *** FAIL *** How will it fail?