Jump to content

Hypnos

Members
  • Posts

    375
  • Joined

  • Last visited

    Never

Everything posted by Hypnos

  1. When email servers get overloaded they queue emails to be processed at a later time to even out the load. Wouldn't doubt for a second that this is what's happening. You don't have to use their email server. If you aren't sending too many emails/SMSes per day just use Swift Mailer pointed to a Gmail account.
  2. Creating an array like this is impossible. Keys have to be unique. You have 8 twice. That's as close as you will get.
  3. You should be able to use base64_decode() but I would sooner use a MIME class from PEAR or somewhere.
  4. I just noticed that the thread title says "deleting rows with same value in a single column". What you would want to loop through the rows, and build up an array of titles, each time you step through an array checking if the title is in your array. If it is, run a delete query. Little bit of sample code: $result = mysql_query("SELECT * FROM songs"); $titlecache = array(); while($row = mysql_fetch_assoc($result)) { if(in_array($row['title'], $titlecache)) { //Add code to delete the row of $row['id'] } $titlecache[] = $row['title']; //Add the title of this row to our array. } EDIT: Also you would probably want to do a strtoupper() on both in_array arguments to make it case insensitive.
  5. Depends on how you want to display the duplicates. The easiest way would be a COUNT() query to show the amount of rows that share a title. http://www.tizag.com/mysqlTutorial/mysqlcount.php
  6. You need to use quotes on the key names for $row. Like $row[uri] should be $row['Uri'].
  7. You should post in the javascript forum. Here's how I would do it though. Do an onclick event that adds like a 2 second timer to redirect the user to another page. Something like: <a href="download.php" onclick="setTimeout('document.location("http://www.google.com")', 2000); return true">download this!</a> That's not code I've tested (just typed off the top of my head), but should give you the idea.
  8. Having two buttons would work too. It's your app. Certainly would be more accurate than scraping a text field.
  9. Radios would be better than two submit buttons. http://www.tizag.com/htmlT/htmlradio.php
  10. Well, there's another problem with that check. You're using $time. $time is 2 hours ahead. You don't add the other 2 hours until you set $time_new. You should add in all 4 hours at once, instead of 2 hours at a time.
  11. Your code looks right, other than your $time + $level_up_time = $finish. $finish is being pulled from the database, but $time isn't. That's why it doesn't add up. The difference will be whatever seconds have passed since the last time it was loaded.
  12. This is why many PHP applications will have a path variable in their config. You can do something like $path = '/var/www/html/"; in your config.php, then make your includes/requires like this: require_once($path . 'includes/objects/database.class.php'); Or you can stop using include functions in your included files (as I said, daisy chaining your includes).
  13. That doesn't add up... One of those variables must be incorrectly set. Can you post more code?
  14. Can you give an example of a value for $level_up_time? Like what is it when you echoed it just now?
  15. Avoid daisy chaining includes. If you do, you should use absolute paths. Not relative ones. The reason it doesn't work is the same reason that if you put require_once("../../config.php"); into test.php it wouldn't work. It's looking two directories down from test.php. Not database.class.php. It doesn't matter that database.class.php is in a subdirectory. Hope that makes sense.
  16. Your code should do exactly what you're describing, unless $level_up_time isn't being set correctly. Try echoing $level_up_time right before the addition.
  17. You can't output anything before setting headers. session_start() sets headers. Make sure you don't have any spaces before your first <?php.
  18. Why do you add 7200 to the current time twice? You're adding 4 hours to the current time on top of however many seconds $level_up_time is. If you want to just add 500 seconds to the current time, just do: $time_new = time() + 500; Or if $level_up_time is 500... $time_new = time() + $level_up_time;
  19. Looks right. Try changing your die() to this: die("Failed to copy $Source"); and see what it says.
  20. $query2 = "UPDATE pstats SET Crank = '$dcrank', Hrank = '$dhrank', Ykills = '$dykills', LWkills = '$dlwkills', Tkills = '$dtkills', VYpoints = '$dvypoints', VLWpoints = '$dvlwpoints' ,VTpoints = '$dvtpoints'"; $insert2 = mysql_query($query2) This is likely your problem. You don't have a WHERE clause so it will UPDATE everything.
  21. You can't with this file. Any additional output will be downloaded as apart of the file you're sending. You need to do it with javascript on the page that they are clicking to download. Like an onclick event.
  22. Can you provide the database column type and the problematic code?
  23. <?php if($itemDescription[0] === "1") { //Do whatever }
  24. Can you explain what the problem is?
×
×
  • 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.