Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. The second argument needs to be an array. Sounds like $p['cast'] is not an array. You can do a var_dump on it to see what it does contain. Before trying to use an argument in a function that needs an array, if there's any chance it's not, I always test it first. (I usually use count() because I don't want to use it even if it is an array and has no values.)
  2. Then why are you using return? And where is your select element?
  3. You should probably just have admin be a property of your user class, not a whole new class. But if you want it that way you can use instanceOf, or have a function isAdmin() return true in admin and false in user
  4. You have all of that within a function?
  5. 1. Please use code tags so we can read the code better. 2. You're not checking for mysql errors. See my signature. 3. Don't use user input without sanitizing it. 4. Don't put quotes around variables in PHP, or numbers in MySQL 5. Date is a reserved word, you should pick a different name for your table or use ` around it.
  6. 1. Make "Play" a button, not just plain text. 2. It took a while to start. 3. Needs directions. I tried to use the mouse at first.
  7. You should use the reply-to parameter, not the from. If you're capturing their email in the form, you'd use it just like you did subject and name.
  8. What are you talking about "manually"??
  9. Turn on error reporting and set to E_ALL so you can see the error. Are you sure the servers have the same version of PHP?
  10. You will not be able to integrate this code into yours without learning some basics. If you actually want someone to write it for you, post in freelance. If you want to learn, do some basic research. We are not here to write it for you for free.
  11. Read the manual on mysql_fetch_array
  12. Go back and do all the debugging steps again that I said the first time.
  13. No. In fact it's setting it to '' because you used = and not == But if something doesn't exist at all it can't be == '' You need isset() too.
  14. Use {$_POST['field']} And then google SQL injection and sanitizing data.
  15. You're using so many functions wrong. You need to turn on error reporting and look up functions and syntax in the manual.
  16. Yes. You were using $sql which was a string. Now you're using the CORRECT result object. If you don't understand why the code works you need to read about it and learn. You still need to remove all your @. That's bad practice. We told you the problem and how to fix it.
×
×
  • 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.