Jump to content

gw1500se

Members
  • Posts

    1,040
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by gw1500se

  1. Use sprintf. You can convert the number to whatever format you want to enforce. $test3 = sprintf('%04d',$test3key);
  2. Sounds like an Ajax app to me.
  3. Javascript is client side code and does not interface with the server. I don't know why/where you got the information that it was dangerous for the server. If it calls a php program on the server the there may be a vulnerability but you can write your php code to assure no unauthorized access.
  4. Use PHPMailer as it is much easier.
  5. I guess the first question is why are you adding and deleting tables? Those should be stable for the most part and from that just adding/deleting rows. The implication is that there is something wrong with your schema. Please explain you thinking on this.
  6. Not sure how you want it but you can use array_merge. $ingredients = ["sugar", "flour", "water"]; $spec_recipe = array_merge(["apple", "cinnamon"], $ingredients);
  7. Please edit your post and put your code using the code icon in the menu above (<>). It formats the the code properly making it easier to read and remove all the excess spaces.
  8. You also need to authorize any email addresses. You add that address to the contacts list on MailJet which will send an authorization email. You need to click on the link in that email to authorize it, then you should be good to go.
  9. Please use the code icon (<>) and select PHP for your code. It formats the code to make it easier to read.
  10. You need to use the MailJet API.
  11. $mSuccessMessage=mysql_query("Update_studentinfo(125, 'Shimla')");
  12. Do you have the following in your php.ini? extension=php_oci8.dll extension=php_oci8_11.g.dll
  13. This is really an HTML question. Have you tried using the <font> tag to format the output?
  14. Looks like PHP was built without --with-oci8 parameter. You can install it thus: pecl install oci8
  15. Please show your code and remember to use the code icon(<>) at the top. Also be sure to choose PHP as it will properly format your code.
  16. Look for an error in the httpd logs. This error in PHP, I think, is generic.
  17. A flat file database is the worst decision you can make for keeping records. For a whole host of reasons I won't bother to go into here. Databases such as MySQL are easy to set up and easy to use with PHP (easier than managing a flat file). The only time I've seen a requirement for a flat file database is for school homework.
  18. Probably the wrong approach. That information should be secured in a database. Google examples of PHP log in pages.
  19. So this is what I thought I should do: function getCount(arrayA,arrayB) { const requesterList = arrayB.tasks.map((i) => i.project.requester_name); // const missing = arrayA.requesters.filter((i) => !requesterList.includes(i)); const missing=requesterList.filter((i) => !arrayA.requesters.includes(i)); console.log(missing); return(missing.length); } Unfortunately I am not understanding the functions as this never returns anything (always 0).
  20. You need to make sure your calculation is using the same units. You probably need to convert GB to MB or vice versa.
  21. Thanks. I guess I do want it the other way around but I don't think it is that simple. The keys are diufferent.
  22. I'm a bit confused by your code: const missing = arrayA.requesters.filter((i) => !requesterList.includes(i)); Missing contains the entries in arrayA.requesters rather than a list of those in requesterList.
  23. I forgot about that, Thanks.
  24. Getting this error: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'filter') at getCount (auto_select.js:62:38) at myExtension (auto_select.js:95:16) at async main (auto_select.js:148:7) on this line: const missing = arrayA.requesters.filter((i) => !requesterList.includes(i)); This is my function: function getCount(arrayA,arrayB) { const requesterList = arrayB.tasks.map((i) => i.project.requester_name); const missing = arrayA.requesters.filter((i) => !requesterList.includes(i)); return(missing); }
  25. Use foreach.
×
×
  • 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.