-
Posts
1,040 -
Joined
-
Last visited
-
Days Won
17
Everything posted by gw1500se
-
Use sprintf. You can convert the number to whatever format you want to enforce. $test3 = sprintf('%04d',$test3key);
-
Sounds like an Ajax app to me.
-
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.
-
Use PHPMailer as it is much easier.
-
Database connection incl. insert, get update, and delete data.
gw1500se replied to LeonLatex's topic in PHP Coding Help
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. -
Not sure how you want it but you can use array_merge. $ingredients = ["sugar", "flour", "water"]; $spec_recipe = array_merge(["apple", "cinnamon"], $ingredients);
-
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.
-
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.
-
Please use the code icon (<>) and select PHP for your code. It formats the code to make it easier to read.
-
You need to use the MailJet API.
-
$mSuccessMessage=mysql_query("Update_studentinfo(125, 'Shimla')");
-
Call to undefined function oci_pconnect() when run php on Server
gw1500se replied to chn262's topic in PHP Coding Help
Do you have the following in your php.ini? extension=php_oci8.dll extension=php_oci8_11.g.dll -
This is really an HTML question. Have you tried using the <font> tag to format the output?
-
Call to undefined function oci_pconnect() when run php on Server
gw1500se replied to chn262's topic in PHP Coding Help
Looks like PHP was built without --with-oci8 parameter. You can install it thus: pecl install oci8 -
Look for an error in the httpd logs. This error in PHP, I think, is generic.
-
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.
- 1 reply
-
- 1
-
-
Probably the wrong approach. That information should be secured in a database. Google examples of PHP log in pages.
-
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).
-
Calculate on the disk size to make percentage
gw1500se replied to mark107's topic in PHP Coding Help
You need to make sure your calculation is using the same units. You probably need to convert GB to MB or vice versa. -
Thanks. I guess I do want it the other way around but I don't think it is that simple. The keys are diufferent.
-
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.
-
I forgot about that, Thanks.
-
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); }
-
Use foreach.