1
vote
1answer
47 views

Optimising and consolidating multiple PHPMailer functions

So the two functions below both send emails via PHPMailer but both hold different messages (which use different data from the db). I was just wondering (as I plan to use PHPMailer more) a way to ...
8
votes
1answer
184 views

PDO sign up function inserting data into multiple tables

This is a sign up function called on form submission. It firstly inserts key user data into the users table. If successful, secondary data is then inputted into ...
1
vote
1answer
86 views

How to improve a file access permission/deny function?

I've quickly made a function to deny or allow access to files that are only used thru Ajax Calls. Key Generator ...
3
votes
2answers
68 views

Secure row insertion using a position-based prepared statement

I have the following function to insert a new row into a table: ...
2
votes
1answer
96 views

How to optimize function that checks if a directory is empty when having over a million files inside?

I have the following function to confirm if a directory contains files: ...
4
votes
1answer
187 views

Is this code efficient?

I was wondering if this was a decent way of handling this function. Please take a look. ...
23
votes
7answers
2k views

is_numeric_array() is missing!

I found that in PHP (or I probably can't find it) a proper is_numeric_array($array) function is missing. So I created one. The problem is that I don't think it's ...