Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. Does everything work now?
  2. It depends on how you are getting the value you should probably use the regex. I have no clue what you're talking about.
  3. This should work: $sql = "SELECT download_file FROM my_table WHERE download_date > DATE_SUB(NOW(), INTERVAL 7 DAY)";
  4. You spelled submitted wrong :-\ Guess it compliments the virus infested looking banner.
  5. I think you can surround your tags with & tags.
  6. - Please surround your code with tags. - You need to echo out the var. (the form action should be fine) i.e. - Also, what exactly doesn't work? What happens? Errors?
  7. Are you asking if regex is the best way to check for integers, or are you asking how to accomplish this in regex? regex: ^\d+$ PHP: is_int
  8. Maq

    XPath and PHP

    Can you post your XSL sheet? The reason is probably because you're not applying templates inside a result document.
  9. There is an OOP reference in the manual - PHP5 OOP.
  10. Oh yes, that's right. Sorry, I forgot about that. Only an Admin or Mod can help you there.
  11. You don't need parentheses or to escape the double quotes. The conventional way is to use single quotes around the pattern. $query = "SELECT * FROM Products where ProductName LIKE '%$trimmed%' or ProductBrand LIKE '%$trimmed%' or ProductDesc LIKE '%$trimmed%'";
  12. Read this - DATE_FORMAT(). Sorry, verification codes for what?
  13. The SOAP API is right here: http://docs.amazonwebservices.com/AmazonEC2/dg/2007-01-19/using-soap-api.html
  14. I'm not downloading anything, please post the relevant code.
  15. That won't work. The variables won't interpolate because you wrap the string in single quotes. Try this: $sendinfo=mysql_query("INSERT INTO `dummies`(`User`,`Pass`) VALUES ('$name', '$password')") or die("request - " . mysql_error()); EDIT - You should also perform mysql_real_escape_string on your inputs to the database to prevent security issues.
  16. You don't echo PHP. You only echo out HTML if it's within <?php tags. In your case, it would be easier to use a closing ?> tag, and display HTML normally.
  17. What exactly are you stuck on? There are plenty of identical examples/questions on phpfreaks with the regards to contact forms and uploading. Start with creating a basic contact form, then move on to the upload part.
  18. In your original post, you said you want to remove the inner single quotes. If you want to keep them, then you need to escape them, if not, then you can remove them. Which do you want to do?
  19. There is no generic tutorial you can write that fits everyones application. Frameworks/applications like PHPUnit are all different, besides, they have their own manual for this.
  20. I agree, but the 1M post is probably still about 6 months away.
  21. What are you sorting on? You can probably accomplish this right in the query. mysql_fetch_array & mysql_fetch_assoc return an array. In AlexWD's example, $row is an associative array, you can sort by the value.
  22. NP, the query should be the hardest part, and you've already got that done. If you have any questions, I would probably create a new thread in the 'PHP Help' section. So if the query is solved, please mark as so.
  23. There's examples in the manual - mysql_query. Ah yes, 'ID' not 'id'.
×
×
  • 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.