Jump to content
MakeWebGames

AlabamaHit

Members
  • Posts

    1,308
  • Joined

  • Last visited

Everything posted by AlabamaHit

  1. Re: omg wtf i dont get it search on here how to convert.....you have to remove all the top section NOT just the include global_func. all that has to be removed and changed to include "globals.php";
  2. Re: Weird Error........ Oh my i feel stupid......... Thank you to Killah and Thank you to Spudinski :-D :-D :-D :-D :-D :-D :-) :-D That was exactly what it was....I'm confussed on why its that way looks like ever page i make i will ahve to do this to but oh well Thanks again.
  3. Re: Weird Error........ Not trying that. The only functions on there are basic functions. This is why I'm so confussed. It is just a signup page with the basic functions on it. Like email checks validation, etc... Nothing that needs to be written.
  4. Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0 Fatal error: Unknown: Failed opening required 'tookout_the_link' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0 Thats is the error I keep getting........Completely lost..... Just wonering if someone I know could give me some help VIA PM or email.....I don't want the code getting out...Even though there is absolutly nothing special about it....But it is some personal work and personal project I'm working on and don't want it out in the public for people to start jacking, lol....
  5. Re: wtf tables are f d up look at thetop of the page make sure therew is not a space before <?php
  6. Re: crimes with 0 exp WOW all the capital letters, lol.
  7. AlabamaHit

    No Crons

    Anyone point me in the right direction? I want to experiment on running a site without crons...Say a game cause thats what I willl be testing it on...I have heard there are easy ways to this.....lol...just wonderin if someoen could help me out. :mrgreen:
  8. Re: main menu lol, if I catch it on there i willl help but it really is as simple as he said.
  9. Re: Does anyone know or have a free table script for explore.php just add a border to the table thats there already....i think there was one, lol look on explore.php if you see <table> maybe something in it....just add to this <table border='1'> that will make a border around it.
  10. New Question This one is a short one, lol.... Ok, on my game i have made some functions that i can call up by using   $h->whatever();   That works Great. No complaints...But I was thinking that I could just include instead since thats all that function is really doing... Like the endpage function really is just including a table close and you could make a page called endpage and put at the bottom of each page include "endpage.php"; Well that is kinda my question, Is there a differernce in page loading speeds? Should I use the Function or should I use the include... $h->whatever(); Does the exact same as include "whatever.php"; Do you think there would be a speed difference....Yes they load images..If that makes a difference.
  11. Re: Local Sever On Linux cool i will ask there..thank again Floydian
  12. Re: Local Sever On Linux i got everything up and going.....and that site didnt work on My version of linux...SU does nothing on this linux....but anyways i got all that... What I am having trouble with now is....Getting my DB on my computer and makeing the pages use it...I want to basically get my game on my computer so i can test stuff without being online....Any idea on there.
  13. Re: Local Sever On Linux I have done this and I get no where with it cuase they don't explain what is going on...Im very new to linux i dont understand all that stuff. That link is to the wrong kind of linux I am using Linux Mint (Ubuntu).....Please help.....Would be nice if someone could write up a good tutorial here I really don't want a link I'm sure I have seen them all and they ALL same the same thing like they where all copied and they just confuse me.
  14. Re: Please help Oh I'm sorry I misunderstood you.
  15. Re: Best way to write this? What about something like this?   $refill = sprintf("UPDATE `users` SET `energy`='%u' WHERE `userid`='%u' ", maxenergy, $userid); $refill2 = sprintf("UPDATE `users` SET `crystals`=`crystals`-'%u' WHERE `userid`='%u' ", $set['ct_refillprice'], $userid); mysql_query($refill); mysql_query($refill2);   No errors BUT does not update the users energy to max....does take the crystals though... I did do this and made it work...but I know there is probalry a better way to this.   $maxenergy=$ir['maxenergy']; $refill = sprintf("UPDATE `users` SET `energy`='%u' WHERE `userid`='%u' ", $maxenergy, $userid); $refill2 = sprintf("UPDATE `users` SET `crystals`=`crystals`-'%u' WHERE `userid`='%u' ", $set['ct_refillprice'], $userid); mysql_query($refill); mysql_query($refill2);
  16. Re: Best way to write this? lol, i edited my other post while you was posting, lol...i added some stuff to the bottom :-D
  17. Re: Best way to write this? OH I think i get it now..if I use the %u i don't need to use the mysql_real_escape_string If I use the %s then I need to use it..... What would you recommend to be the bettter of the 2? I have used the %s more so I am more familiar with it. Should I just stick with it? Though the %u looks easier......and faster...so they pretty much do same? If so I will start using the %u its alot cleaner. I guess the real question is, is there a difference in the speeds the query will run? Cause the %u looks like it will run faster.... Now would this work here since it has text and not just numbers?   $do = sprintf("UPDATE `users` SET `money`='%u' WHERE `username`='%u' ", 50000, {$ir['username']});   This is just an example of course, lol... And when you add to the money say like would this be how its done?   $do = sprintf("UPDATE `users` SET `money`=`money`+'%u' WHERE `username`='%u' ", 50000, {$ir['username']});   Or   $do = sprintf("UPDATE `users` SET `money`='%u' WHERE `username`='%u' ", money+50000, {$ir['username']});   Sorry for the million questions but I really am learning alot right now. And your help is a lot more appreciated than you can believe
  18. Re: Best way to write this?   Sorry that part lost me....so do i even need it like that? or are you saying the %s is all i need not the %u or are they the same difference? or do you mean that i can use $db->query("UPDATE `users` SET `money`=50000 WHERE `userid`=$userid"):   would that be the same as the   $do = sprintf("UPDATE `users` SET `money`='%u' WHERE `userid`='%u' ", mysql_real_escape_string(50000), mysql_real_escape_string($userid)); mysql_query($do);   Or defenty use the last one? For sakes of security I want to be secure as I can be and learn to write the cleanest and easiest to read code I can :wink:
  19. Re: Best way to write this? Cool see I'm learning already :-D So %u is the best to use since no Negitive correct? So this would be better? $do = sprintf("UPDATE `users` SET `money`='%u' WHERE `userid`='%u' ", mysql_real_escape_string(50000), mysql_real_escape_string($userid)); mysql_query($do); and that will keep them from using a negative entry....well guess that don't matter though I blocked that competley from my site, lol..But I need to know..I like learning. So is that the right way? ^^^^ If not please tell me, lol. Now you said the the string is hard coded (not sure what that means) So does that mean that this would be ok? And safe? $william=$db->query("SELECT COUNT(*) as cnt FROM `users` WHERE `laston` > unix_timestamp()-200*720"); while($raye=$db->fetch_row($william)) print "blah blah";   I think my biggest thing is knowing where to use certain things. Liek the mysql_escape..where do I need to use that and where can I use a normal entry like $db-query(""); I guess knowing that is the trick, lol. Oh and the Post and Gets...any tips on that?
  20. (Viewing PHP pages and having a SQL DB on my computer (Offline) is what I'm going for) I have just recently moved to Linux on one of my computers. And have to say I think I like it, lol... Really I'm liking it more than windows right now. Because 1. Everything's Free 2. No blue screen so far, LOL 3. Don't have to reboot all the time cause windows running slow or freezing up.. 4. Customize....WOW If you use(d) linux you know... I'm using Linux Mint. Its (ubuntu) with extras (gnome). I'm using Compiz I think its called. It's cool...Gets old fast though.....didn't cut off but quit playing with it so much. But still crazy as heck to show off. Like (look what I can do, LMAO). Ok, but to the reason for this post. I am so lost on this. I can't find anything on it...(That makes since to me anyway.) I have googled, and googled, and googled, and googled...just don't understand what they are saying. I have saw on here people talk about it. I don't use windows....(on this computer)...and since I went to Linux I refuse to use WINE to run windows programs (pointless to do so to me....) Just wondering if someone could put up a tutorial on how to set up a Apache, PHP, SQL database on a Linux Box...I think it would be a good sticky...At least I hope I'm asking for the right thing. I think I am. Thanks for your help :mrgreen:
  21. Just wondering what would be the best way to write this? The only thing the query is calling is the (username) nothing else. Option #1 By far the easiest so I don't think it's the best. $chas=$db->query("SELECT * FROM `users` WHERE `userid`={$lol['userid']}"); while($bill=$db->fetch_row($chas))   Option #2 $chas=$db->query("SELECT `username` FROM `users` WHERE `userid`={$lol['userid']}"); while($bill=$db->fetch_row($chas))   Now I have been starting to use this kind of stuff alot more....Is this even right? $do = sprintf("UPDATE `users` SET `money`='%s' WHERE `userid`='%s' ", mysql_real_escape_string(50000), mysql_real_escape_string($userid)); mysql_query($do);   I have read on this at php.net...still confussed. I thought at first that the %s made a difference that there was a different varible to use on numbers or text...but it works both ways, this is why I think I am doing it wrong....Cause if the %s lets it go though both ways.....how is it different from say $amt=5000; $db->query("UPDATE `users` SET `money`=($amt) WHERE `userid`=$userid"); I'm sure there is a diffence I just don't know what it is...I really appreciate any help you can give...Just to let you know I'm not really good at reading for hours on end to learn something. But if I see it then I know it..So please don't call me stupid and point me straight back to the php manual...Please give me an example. One small one. Nothing Big. I can figure out from there but with your example I can learn faster and better than reading on any site.. Also I want to learn about the GET & POST so example on that would be nice. I ahve seen some so really on that not that big of a deal But what I have see where really long Functions....Do you have to put that above EVERY (POST and GET)? And only one more question for now :-D Can you use the mysql_real_escape_string on say a query that you are doing a count on or say one like my Options 1 and 2 where it has to fetch_row? For example would something like this be possible...this Don't work have tried, lol. $cnt = sprintf("SELECT COUNT(*) as cnt FROM `users` WHERE '%s' > unix_timestamp()-200*720 ", mysql_real_escape_string(laston)); while($ct=db->fetch_row($cnt)) print " blah blah"; Also have tried $cnt = sprintf("SELECT COUNT(*) as cnt FROM `users` WHERE '%s' > unix_timestamp()-200*720 ", mysql_real_escape_string(laston)); while($ct=mysql_fetch_row($cnt)) print " blah blah";   Both just give me errors...can't remeber them though...So any help would be greatly appreciated. 8-)
  22. Re: Database...Annoying! Post 10 Lines before and After that query....then I might be able to help...
  23. Re: Please help It is supposed to take 50%..................................That is what this means... $youdata['energy']= floor($youdata['maxenergy']/2); $me=floor($youdata['maxenergy']/2);   What that means is YOUR max energy divided by 2.....Which in this case your Max Energy is 100 so divided by 2 is 50... I hope you understand that. I know Im not the best at explaining.......
  24. Re: securing against mysql injection So this   $amt=5000; $query = sprintf("UPDATE users SET money=money+($amt) WHERE userid='%s' ", mysql_real_escape_string($userid)); mysql_query($query);   would be better than this?   $amt=5000; $db->query=("UPDATE users SET money=money=($amt) WHERE userid=$userid");   Or is there a better way to write that? Please an example. :-D
  25. Re: Tables ID So even though i had a list up to 15. i could have done ALTER TABLE `cities` AUTO_INCREMENT = 1; and it would ahve dont the same thing?
×
×
  • Create New...