Jump to content

Philip

Staff Alumni
  • Posts

    4,665
  • Joined

  • Last visited

  • Days Won

    20

Everything posted by Philip

  1. I'm not going to even debate my thoughts on AD(H)D and your ability to learn. And I find it funny that instead of following my suggestion on how to explain your question better, you'd rather spend your time making us feel sorry for you.
  2. Or if thats all you want you can use SUM in MySQL: $sql = "SELECT SUM(cargo) as sum FROM pirerp WHERE status = '2'";
  3. Well, what do you need?
  4. if(strip_tags($_POST['Send'])){ $text=strip_tags(addslashes($text)); Shouldn't that be: if(strip_tags($_POST['Send'])){ $text=strip_tags(addslashes($_POST['text']));
  5. Did you check your script that inserts that data to the DB?
  6. You're fetching data from every row, because you have no limiting where clause, thus it calls all the rows. The "COUNT(p.pid) as tpost, m.id, m.name, m.joined, m.posts, m.desktop" are columns (except for COUNT( ), but the p.pid is a column) in your database, not rows.
  7. Your PHP's core comes with hash functions, which includes hash(): http://php.net/manual/en/function.hash.php You need to rename your function
  8. I don't think anybody is meaning to insult you at all, and don't pull try to pull any learning cards. Trust me, we see it all here. We are trying to help, but don't understand exactly what you're wanting to do. If you can't describe what you want to do, then show us what you want. If you can't do that, then I'm sorry but I don't think anybody can help you. Post some sample data from the database, and an example output of what you're looking for. Sample Data from database: [pre]id value another_val 1 someval1 1 2 someval2 2 3 someval3 3 4 someval4 4 5 someval5 3[/pre] I want where another_val is 3, so the data that would come out: [pre]3 someval3 3 5 someval5 3[/pre]
  9. I'm guessing you want a where clause, otherwise you're pulling all the rows from the table, and since you're only asking for the warning and banned and not the usernames/id/whatever. $query = "SELECT warning, banned FROM table WHERE user = 'user'"; Even though there is no real advantage to putting it this way.... heres into variable form: $select = array('warning','banned'); // get the columns you want $table = 'table'; // select the table $user = 'someuser'; // of course you would want to sanitize this $query = "SELECT ".implode(', ',$select)." FROM {$table} WHERE user = '{$user}'"; var_dump($query); echo '<br>'; $result = mysql_query($query) or die(mysql_error()); $rows = mysql_num_rows($result); echo "{$rows} rows returned!<br />";
  10. I'm still lost on exactly what you want. From what I've gathered, you just want to pull a 1 or 0 from the db, no matter what row it comes from.
  11. Haha I was thinking the same thing
  12. Where is $sql_site defined?
  13. Considering when you visit the main site: [pre] Name Last modified Size Description Parent Directory 04-Apr-2009 04:34 - g.exe 06-Sep-2009 10:26 829k Apache/1.3.41 Server at trenttompkins.com Port 80[/pre]
  14. why not add "Show MY 23 UNSOLVED Topics"? Maybe make it red or bold or standout in some other way. This might remind people that they have topics that need to be marked Solved. Also, what about an automatic email, maybe once a week, saying "Hey, you still have 23 unsolved topics ..."? Maybe it should only include topics that received a new post during the week since, I guess, not ALL problems get solved. You kinda answered your own question, but if we were to do something like that (unlikely) there would have to be a lot of cases to handle. Do you consider a topic that is sticky? What about a locked topic? Is there a cutoff date? What boards to we do it for, and what don't - and why? Etc... I think it would over complicate the problem at hand. And it all adds to just more confusion for the user. Personally, if we did change anything, the only thing I'd change is to place some text on the topic screen (for the OP to see only) asking if this topic is solved or not.
  15. Yeahh..... good luck with that.
  16. Guru's+ (Guru, PFR, Mod, Admin) can all mark topics solved. The problem we run into, it can be really hard to tell if the OP thinks the topic was solved. Sure, sometimes its pretty obvious and they say "Hey thanks, that solved it!", but half the time when they have a working solution, they don't come back and post anything else or they'll present more problems.
  17. Just what that says "Undefined variable" - you need to place a value to $totalCost before you can use it
  18. I still have problems every few hours, on the hour for a couple of minutes where it times out. Maybe its just me though.
  19. I'd suggest either: function showForm($erroremail=false,$errorfname=false,$errorlname=false,$errorage=false) or function showForm($errorage,$erroremail=false,$errorfname=false,$errorlname=false) That way you don't have a chance to run across: Otherwise, it should echo the message. Do you have error_reporting/display turned on?
  20. function showForm($erroremail=false,$errorfname=false,$errorlname=false,$errorage) I wouldn't recommend the last argument be the only one that is required
  21. But when you don't have the key checkbox won't it throw a notice for undefined index? Edit: answered my own question. I didn't know that empty wouldn't throw a notice
  22. Ummm, so if you know for sure that the values are unique, why do you need to check to see if they are? And there is a built in function to do this, take a look at the link I sent you.
  23. Did you look for the proper function in the PHP manual? http://php.net/manual/en/ref.array.php
  24. if(isset($_POST['checkbox']) && !empty($_POST['checkbox'])) { // checkbox is checked }
  25. Chrome is Google's child anyways, so what are you trying to do (because you can probably do it, you just might not know the shortcut)?
×
×
  • 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.