Jump to content

gw1500se

Members
  • Posts

    1,029
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by gw1500se

  1. It would be easier to read if you used the code icon (<>) and specified PHP. However, as best I can tell there is no place where you set the color in the HTML. I would expect to see "style" tags with the color to be output.
  2. Thanks. Learned something new. So in my case the prepare is really useless.
  3. Not to hijack this thread, but isn't the preparation process the same in either case?
  4. I didn't think there was a difference between the 2. In any case one should always validate the data before using it.
  5. Are you using prepared statements? If so it is not a problem unless you don't want unauthorized users to see product details. In that case you would need to authenticate each user.
  6. Exactly what are you trying to protect? The answer depends on what 'product.php' does with 'product_id'.
  7. This is really a MySQL question. The stored procedure is executed via MySQL. To initiate it, you simply execute the proper query in PHP just like any other query. If you are looking for the syntax of that query, you need to ask in the MySQL forum.
  8. You are not creating an associative array. You need to use the '=>' notation. Seen the manual on associative arrays.
  9. Obviously the file was either moved or the permissions were changed. Since we are not clairvoyant posting your code might have helped. Use the code icon (<>) and select PHP.
  10. Don't screenshot code. Post the code using the code icon (<>) and select PHP.
  11. Then you need to post your HTML form. Are you sure you are using GET rather than POST and that that variable is correct in your form?
  12. Since you are not doing any error checking after the query, I guess there is no point in asking for the error message you are getting. You need to learn how to do error checking when dealing with database actions. Also did you echo the query string to make sure the syntax is correct?
  13. First please use the code icon (<>) for inserting your code and choose PHP. It makes it much easier to read. Second, the most important part of your code was omitted, the query string ($sql). Without that we can't tell if you are filtering or sorting correctly. Did you output the rows to make sure they contains what you expect in the order you expect? echo "<pre>"; print_r($row); echo "</pre>";
  14. Which is line 41? Also what do you expect this to do as the end of your query string? .'';
  15. This is not a PHP question. That is just the command to run. You need to determine when and how often you want to run that job. You need to precede the command with the time format string when you edit the cron table (crontab -e).
  16. Is the host on which this is running also an SMTP server? By default that is how PHPMailer works. If you have a different email server (e.g. gmail.com) then you need to specify that SMTP server and your login information. The PHPMailer page has an example.
  17. Looks to me like you are missing the code that sets the SMTP host info.
  18. First create an array of even numbers. You can find which are even by using the remainder operator dividing by 2. A zero remainder means it is even. Then use the max function to find the largest.
  19. As ginerjm suggests, rewrite your page to segment it. Then you will find it much easier to debug and perhaps you won't even need any help from us. If you do, post your better organized code.
  20. I only see select2 as an HTML ID. I don't see anywhere that you are collecting the sum of the cost for selected items. Unless I am misunderstanding your question, you need to have a variable where you add the cost of each selected item.
  21. Just a guess based on the XML but I think you need top process it based on job ID. Check the staff ID for that job and if it is what you want, use the associated data from that job 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.