Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by requinix

  1. Seems you have a $db that's magically coming from... nowhere.
  2. If imgroot had just joined then I would be leery too, but I think after ~280 posts they've earned some trust. Perhaps you could try aiming all of your posts in a more helpful direction and away from the critical and insulting?
  3. The best way is to not do it yourself: sending 100k emails per day from a generic hosting company is a reliable way to get your server blacklisted and emails blocked. There are plenty of services that provide APIs.
  4. Then That's not what Barand was asking for. The question is about the data type: DATETIME, TIMESTAMP, VARCHAR, whatever. On top of that is the question of how the values are getting to the database. You mentioned time() - is that what you're using? Or date()? Maybe MySQL's NOW()? And please, I know you think it's funny, but it's off-topic. It doesn't need to be here. I mean, it's not even related to programming. Maybe check out Miscellaneous?
  5. Look at your variables. Make sure you're using the right ones in the right places.
  6. Then what did you mean when you asked
  7. PHP's time() function returns a Unix timestamp. It is the same value for everyone. You have to know something about where your user lives. With only PHP you can use geolocation on their IP address to get a good approximation. With Javascript you can get their "timezone" (UTC offset) with the Date object, which does not tell you their location.
  8. It won't print out anything because the code is invalid. We can't help you troubleshoot your code if you don't provide us with your real code.
  9. Apparently from the EXIF information that's embedded in the image. When you take a picture with most intelligent cameras now, they include metadata in the image about the orientation of the camera. Since the photo is always upright with respect to the camera, one can use the metadata to rotate the image so that it's upright with respect to the photographer. Unfortunately the camera (software) manufacturers didn't stop to consider that maybe the camera should automatically flip the image and then use EXIF to give the "original" orientation...
  10. Side comment: the image orientation should be fixed right when it's uploaded, not when it's being displayed to the user.
  11. 1. What is the URL in your browser's address bar? 2. What do you see when you View Source the page?
  12. I can't tell what code is in what file. Try this with a post: Put the filename on a line, hit the Code <> button and put the file's code in there, and repeat for the other files. That way everything is clean and separate and has syntax highlighting and doesn't force me to scroll so much.
  13. If you don't see it in the source then you added the code to the wrong template. Or you accidentally put it inside some block that's only outputted for logged-in users. Either way, needs to go somewhere else.
  14. For the record, if you're dealing with mobile devices then you can get GPS information - if the user allows you to do so. Non-mobile devices will give you information according to the IP address (user still has to approve), which will be more or less the same as the geolocation version. Basically, geolocation is only as good as a country and state. City is hit or miss.
  15. So you're saying you can find a custodian for $12 who will come clean your house for you?
  16. I really wouldn't have expected ASP Classic to be that bad at handling strings - I mean sure, strings are immutable, but reallocating that much bringing a 10x decrease in performance? While I was looking up whether it has some equivalent to StringBuilder (it doesn't) I found this that you might find interesting.
  17. H. H. Munro, aka Saki. Took me a while to find it.
  18. I know things are Slightly Unpleasant over there, but coming over here would be one of those "out of the fire, into the frying pan" things. Canada seems nice though.
  19. Be careful of Barand's quote: $50 is pretty good for an hourly rate - it's the travel costs that'll really get you.
  20. *You, supposed We can be both šŸ˜‰
  21. That also happens to be what I was trying to get you to do, so, šŸ‘
  22. First of all, that code makes my eyes hurt. <?php $dbHost = "localhost"; $dbName= "rptDatabase"; $dbUsername = "username"; $dbPassword = "password"; $conn = mysqli_connect($dbHost, $dbUsername, $dbPassword, $dbName); if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $sql = mysqli_query($conn, "SELECT * FROM tblTraffic ORDER BY ip, date, time"); $report = mysqli_fetch_array($sql); echo "<table border='1'> <tr> <th>IP ADDRESS</th> <th>PAGE VISITED</th> <th>PREVIOUS PAGE</th> <th>DATE</th> <th>TIME</th> </tr>"; if (mysqli_num_rows($report) > 0) { while($row = mysqli_fetch_array($report)) { echo "<tr>"; //FOR EACH LOOP HERE? } } else { echo "0 results"; } $conn->close(); ?> Don't you think that looks a little better? Consistent? Don't have to look all over to see where {s and }s are? As for the question, A foreach loop is for going over each value inside an array, one at a time. Is that what you want to do here? Go over each column in the row one at a time? No, it's not what you want to do. What you want is to go over each row (you're already doing that) and print out values from the row into the table structure you set up. You've started a new row with that <tr>. Now you need to output each cell (a <td>) with the value inside it (from $row). Try that.
  23. Yeah, something more needs to change here. The form only supports one entry at a time. To support more than one, you'll have to (a) store each entry somewhere, best choice being a database, and then have the user hit some sort of Finish button so they can view the results, or (b) alter the form so that the user can enter more than one at a time. The second option is probably better: the user does all the work on one page, and when they submit you can show the results immediately. What do you want to do?
  • 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.