Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. OP: Can you show us your perfect "Hello World" script that is entirely OOP?
  2. The error is telling you $system is not an object. 1 time it's because it's not within the function. The other time I don't know why, it's probably not actually defined.
  3. considering a timestamp is 10 digits, you could just use time();
  4. Seriously. There's a reason I chose PHP over Java. I like the way PHP does OOP while allowing procedural.
  5. It means your query failed. You need to check if the result was false before trying to use it. This needs to be a sticky topic, I see this same post every day.
  6. I also use WampServer for local development, it works great.
  7. Considering most people use a free email service, you're really limiting your users if you reject them. I ONLY use gmail, I'm not giving out my work email for anything but work, and previously I didn't even have a work email. I've never had an issue sending mail to gmail, yahoo, hotmail etc via PHP. I would think it's a problem with the host.
  8. The syntax highlighting shows the error. It's at the end of the 2nd line.
  9. There is no mysql_execute, and I would think the OP knows if he's using mysql or mssql.
  10. I didn't, this will only find the first instance of it. You'd have to switch to array_keys as per the docs on array_search
  11. Why would you pick $query_results? Is that defined anywhere? Look at the code and read it as if it's a sentence. Does $query_results make sense to use anywhere? The entire last line makes no sense anyway. $results_num = mysql_num_rows($query); would return 0 if it's 0, you don't need a complicated ternary that makes no sense.
  12. You can have the link as plain text and most email clients will convert it to a clickable link. I don't think the HTML is the problem though.
  13. No, you changed the right part. Next problem: $query_string = "SELECT `description`, `fulldescription` FROM `productdbase` WHERE $where"; echo $query_string; $query = mysql_query($query_string) or die(mysql_error()); $results_num = ($results = mysql_query($results)) ? mysql_num_rows($results) : 0; You are running the query, then getting the number of results based on another string: $results which does not exist. You will always get 0.
  14. One quick way to find out is when you have error reporting on and try to include a file that doesn't exist, it will tell you where it tried to look. There's your path.
  15. In your where clause, you are telling to to search the COLUMN `keywords`. Do you see that?
  16. You see the code I copied from yours? Where you have keywords as the column name, change it.
  17. foreach($keywords as $key=>$keyword) { $where .= "`keywords` LIKE '%$keyword%'"; if ($key != ($total_keywords - 1)) { $where .= " AND "; You're the one who is saying to search the keywords column.
  18. I also don't see $headers defined anywhere.
×
×
  • 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.