Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. What is the problem? And why all of this code?
  2. And as Kicken has already asked you - where is the part concerning your posted topic title? Can not see the fact that there is nothing related to anything 'md5 ish' in this code? PS - suggestion. Do your includes at the top of any script so that you know right away what the script has to work with. Dont bury your requires inside functions. It's kind of like burying a function inside a function. Calling one is ok - including one is not a good practice.
  3. Hmmm.... You're saying that since Friday we've been looking at your 19 lines of code and that is ALL there is to this whole topic? C'mon - Where is the rest of your script? That is what Kicken is asking to see. He wants to help you out.
  4. Once again I'll show you how I would write this and clear up some of the code at the same time.... (assuming already in php mode....) $result = mydloader($_GET["f"]); if ($result !== true) { echo $result (something else?) } //********************* function mydloader($filename=NULL) { if(isset($filename)) { $ext = pathinfo($filename, PATHINFO_EXTENSION); // ENTIRELY UN-NEEDED BRACE HERE: { if ($ext == '.iso') header('Content-Type: application/x-cd-image'); elseif ($ext =='.gz') header('Content-Type: application/zip'); else header('Content-Type: octet-stream'); // ENTIRELY UN-NEEDED BRACE HERE: } header('Content-Length: ' .filesize($filename)); header("Content-Disposition: attachment; filename={$filename}"); header('Pragma: no-cache'); header('Expires: 0'); readfile($filename); } else { return "Filename missing in mydloader function"; } return true; } There is no reason to place your function code at the top of a script nor before it is actually called. It is (hopefully) well-debugged code that can be included or placed below the mainstream portion of your script (out of the way) to avoid having to scroll by it or scan thru it while working on your task. Question - is this function something that you will call repeatedly in this script? If not, why is it even a function?
  5. Not sure what you are thanking this forum for. You haven't acknowledged the last two posts to let us know what you think of them nor to question about the errors being pointed out in your supposedly working query. We are all happy to help out people here but a two-way conversation is vital to getting you onto the right track.
  6. So - you're happy now? A suggested correction to how you are coding: echo "<table>"; echo "<tr> <th>PO Number</th> <th>Item Name</th> <th>Stockin Qty</th> <th>Status</th> </tr>"; while($row = $query->fetch_array()) { echo "<tr> <td>{$row['ponum']}</td> <td>{$row['itemname']}</td> <td>{$row['total_qty']}</td> <td>{$row['status']}</td> </tr>"; } echo "</table>"; Much cleaner when one stops entering and exiting php mode.
  7. You need to group by all of the selected fields (never use *). That query is probably not running either since it is not grouping all the un-summed fields.
  8. You're trying to do a fetch but you never check if the query actual ran.
  9. You made it sound like you wanted data from both tables. Now you are saying otherwise. So your initial post was pretty close. $q = "select itemname, status, SUM(stockqty) as total_qty from stock order by itemname group by itemname,status";
  10. You've shown us a a (1) stock table which I assume is your inventory and a (2) table of po's but which has no count in it. To join them I think you need to connect purchaseid to id. Correct? But where is the amount of items purchased? Why does your stock table have 2 items named 'Pen' with unique id's? And your naming of two columns as 'id' is a bad practice since they apparenty are not the SAME value. Give them unique names if they are not the same values in your appl
  11. Are the 2 id columns the same? Or is it purchaseid and ponum that are the same? YOu need to match the true related key values in order to get the amount in stock and the amounts sold and get the inventory left. Basically what 2 columns tie the inventory amounts to the purchases from that inventory?
  12. Maybe show us the other table as well?
  13. And what are you trying to tell us??? Your earlier post was creating a path variable to point to a config folder. Why is that? What you want is to point to the config FILE so that you can open it and GET all the paths you need to have.
  14. One click look tells me that you have a misunderstaning. php path is not going to be app_root.config It is (probably) going to be app_root/../php
  15. Well if it is EXACTLY as copied then I don't know what it is doing. If you are trying to ask "is $ext equal to .deb" then you are not doing that. Try 2 equal signs... As for your concern about the md5sums - since there is no code present showing us what is or is not happening, we can't help you.
  16. Good luck. Sorry I couldn't help.
  17. So - a script that NS wrote 'years ago' and put onto your domain works when they run it (?) but not when you run it? That makes no sense. And why did they write this 'years ago'? I thought you were working fine up til Nov.?
  18. You are saying that the script (yours) you run on your host has an option and you are sure that you are handling the checkbox correctly? And that some other script that you run somehow does not have a checkbox but does have HTML turned on and it does or doesn't work? I am getting confused and this is getting frustrating.
  19. Your if statements are wrong And why are you using this version of the same code that we cleaned up for you earlier?
  20. I"m confused. If your script is setting html to true why do you have a checkbox doing it also? Are you handling the checkbox properly?
  21. Can you send an html message to yourself? If not then I'd say it is NS's problem And you have issued "$mail->isHTML(true)" as part of your message setup?
  22. I would change hosts. My provider is very good at resolving these kinds of issues when the problem could be their doing. You said that you are able to check the is html setting and confirm that you have it set or are setting it as you prep your message?
  23. I didn't make any suggestions. Just wanted to know what you may have done to resolve this. Have you in fact made any changes since Nov. that may be unknowingly the cause of your problem? If not your fault, have you contacted Tech Support at your host to ask them? Sometimes when my host does an upgrade they leave out some settings in the ini file that cause me problems until I remind them that they left something out.
  24. Assuming that Network Solutions is your host, I suppose that YOU are running the PHPMailer code from one of your own scripts. That said, what have you done to debug 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.