Jump to content

ManiacDan

Staff Alumni
  • Posts

    2,604
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by ManiacDan

  1. It's going to be slow, but: WHERE tblinvoiceitems.description LIKE CONCAT('%', tblhosting.domain, '%') -Dan
  2. Everything I said is true. If you don't like my tone, go get free help from experts somewhere else. I would charge a client more than $3,000 for the help I've given you so far. Once you start paying my rate, I'll phrase things more diplomatically.
  3. Make a table. Put a number in the table. Make a form that will update the number when the user puts a new number in. Use the number from the table in your calculations. This is sort of the entire purpose of databases.
  4. good thing I didn't waste 10 minutes typing out an explanation for you then, huh?
  5. If you have to ask, you're not ready to do it. These are the ways to accept payments: 1) Paypal or google checkout or some other third party process in front of the scenes, the users are aware. 2) Aria/Zuora in-line card processing behind the scenes, the users are unaware. 3) You submit the credit cards to the payment processor (paymentech/authorizenet, etc) directly and store the transaction details (but not the credit card details) in your database. 4) You store the credit card numbers yourself and send them to the payment processors in batches. This is how Amazon and iTunes work, and you are nowhere near skilled enough to do this.
  6. What, exactly, are you asking here? Databases have no concept of taxes, they're just numbers. You have to write the logic yourself.
  7. rand accepts a min and max argument.
  8. You sort of stumbled upon the right answer in your post in that thread, but it was still the right answer. The best thing you can do is say "I'm not sure but this seems to work" and leave it open ended. If you're not positive what you're saying is correct, tell the user that so they don't take what you say as gospel and move on with their life without coming back to the thread for additional information. Also, check that thread again for more data on comparison operators.
  9. Everyone (except requinix since he's read it three times already) should read this
  10. Please don't bump your threads or report a moderate as an abusive member. Your thread is in the correct section and if someone is interested in replying they will.
  11. The @ before your mail() call suppresses errors. Perhaps that would help you actually see the errors. also, you should be using paypal or google checkout or something to handle your payment processing.
  12. You should not be using htmlentities on these addresses, you should be using mysql_real_escape_string. Glad you got it working.
  13. I really can't help you if you don't read the message. Again: The code that INSERTS the email addresses into this table has a dot in it, where there should not be a dot. Emails don't just magically show up in your database, something puts them there. That something is wrong.
  14. There's probably a dot in the query that INSERTS these emails. You have to fix that, then delete everything from this table and start over. If this site is "live" and these are real addresses, you'll have to update them all to be correct.
  15. There is no such output in your code.
  16. Does the email address entered match an email address in the table exactly? Including spaces and tabs? Seriously, read that twice before answering.
  17. So you get the error about "emailaadress" without "emailaadress" being in the code anymore?
  18. You have one constant "step": the execution time of the program. Every "Step," the program spits out another unit. When that happens, calculate how far the printer has gotten on the buffers. If there's a free buffer, put the unit in there and continue to the next step. If not, wait.
  19. Please read and respond to entire posts, not just the first sentence. Note that I gave you debug steps in #2 above that you have not addressed. Are there spaces? Does the database match their input EXACTLY?
  20. Remember that?
  21. What I'm saying is: this is a PHP forum. This question is more suited to a low-level programming language which would actually be expected to deal with things like buffers...or printers for that matter. PHP deals with neither. Also, your textbook probably defines "software output buffers," generally we don't know what to do with the information that the buffer is 5. 5 what?
  22. In your code here, $result is the result of mysql_query. $result is either: A) A mysql_resultset resource, on which you can call mysql_fetch_array, mysql_num_rows, etc. B) false, which indicates a query error. So: if ( $result == false ) { echo "THERE WAS AN ERROR: " . mysql_error(); die(); } Of course, there are far better ways to handle errors, but this will actually show you on the screen what the error is. You should also echo the query itself, so it shows up alongside the error and you can see if something is misspelled, like it is in this case. -Dan
  23. There's a number of things here: 1) You absolutely positively must stop this instant and wrap everything in mysql_real_ecape_string if it comes from the user. Your site is grievously vulnerable to SQL injections. 2) If this isn't working, find out why. What did they enter? How does it not match what's in the DB? Are there spaces? Your code is fine aside from #1 above.
  24. Please stop using the [ m ] tag to format your PHP, you must use [ php ] tags.
  25. This course is at a much lower level than PHP.
×
×
  • 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.