Jump to content

requinix

Administrators
  • Posts

    15,227
  • Joined

  • Last visited

  • Days Won

    427

Everything posted by requinix

  1. If that's how you feel about it then go right ahead.
  2. The first one uses concatenation: you start with one string, concatenate the variable, then concatenate a second string. The dot there is the operator that does string concatenation. The second one uses variable interpolation: PHP looks at what's in the string, sees a variable, and automatically "inserts" its value into that spot.
  3. Why are these nearly identical rows even allowed in the database?
  4. You mean like strncmp?
  5. ORDER BY the month thing LIMIT 3. Basically.
  6. Only way it's possible is if there's actual JavaScript code on the page that checks the URL for sorting information when the page loads. As you're describing it, no you can't do that.
  7. That would be unusual. There's a default log that should be receiving things even if there isn't a log dedicated to whatever. Have you found the logs/ directory? That's where it would be.
  8. %T (and others) isn't supported on Windows systems and strftime() will return false if you try to use it.
  9. Apache has an error log and in it will be more information about that error. What does it say?
  10. Looking at that print_r() output, how do you know which products are supposed to be removed?
  11. Are you absolutely sure they're VARCHAR columns and have that they the correct data?
  12. $sock = socket_create(AF_INET,SOCK_STREAM, 1) That 1 there is a number corresponding to the TCP protocol. At least it's "supposed" to be. On your system TCP is actually 6. I just realized there's a constant you can use instead of the function call, so the proper way of writing that code above would be $sock = socket_create(AF_INET,SOCK_STREAM, SOL_TCP)
  13. What happens if you get rid of the if(class_exists('MySQLDB') != true) { block?
  14. Does the MySQLDB class have a "prodisused" method?
  15. Then it's the other way around: $blog_posts is an array with only ever one object, so the outer loop wouldn't be necessary and you could foreach ($blog_posts[0]->data as $post) {
  16. Then scootstah's idea is still right, but it's $post->data that should be iterated on if at all. $blog_posts is an array of objects and each object has a ->data array of values. foreach ($blog_posts as $post) { foreach ($post->data as $post_data) { However I suspect that ->data will always contain exactly one value, in which case the inner loop isn't necessary and you should just use $post->data[0]->post_url.
  17. Sure. One way would be to "capture" the letters and numbers, then piece the two parts back together. I felt like drawing some ASCII art. Probably because I'm really tired. "ABCD 1234" / | \ / | \ V V V ______ ______ / \ / \ | | | | /^([A-Z]{4}) ?([0-9]{4})$/ | | | | \________/ \________/ \ / $1 \ / $2 \ / V V "$1$2" | V "ABCD1234"
  18. The simplest way would be (space)? like /^[A-Z]{4} ?[0-9]{4}$/ but there are a few other ways. It depends on what your expression is. By the way, what is it?
  19. I wouldn't be too surprised if it was the jelly beans (reacting with something, that made me sick a couple nights ago... really, please try to keep up) because I've been eating a lot. Which I've already said (which you'd know if you have been keeping up) but could use a bit more emphasis. Have a 3lb cylindrical can thing of them and I'm through 1.5lbs of it. But when I put it that way, considering I've had it for a bit more than a week it really doesn't sound like I'm going through them *that* fast. But the absolute measurement doesn't matter if the relative measurement is "enough to make me sick", right? This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=358254.0
  20. Well, it seems you already know that $_POST["checkbox"] is an array of the checkboxes the user has selected, so... use that to determine what you want to show in the second form. Can you be more specific about what you're not sure how to do?
  21. Not if you can't wait three hours on a Sunday night. Fix what problem?
  22. What does echo getprotobyname("tcp"); output?
  23. ...Of course I wrote my previous move (the one from a few minutes ago) assuming that it was the only move I'd be making tonight. I was wrong. But seriously, I don't feel so great. I need to lie down. This topic has been moved to PHP Coding Help. http://www.phpfreaks.com/forums/index.php?topic=358185.0
  24. The "enc" in enctype is for encoding, not encryption. Error messages like "undefined index: foo" have nothing to do with JavaScript or AJAX. They're just normal PHP error messages. Post your full code and the entire message you're getting.
  25. I've been eating way too many jelly beans lately. My stomach has been complaining about all the sugar, and meanwhile I'm not eating enough real food because I keep spoiling my appetite. So I'm not quite in the mood for putting some weird thing in here. (If you didn't see my last move message, I talked about food. Got tired of just changing the one "this topic has been moved" message, now I'm trying other things.) It's also 4am and I should be sleeping right now, so... This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=358182.0
×
×
  • 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.