Skip to main content

Questions tagged [php5]

The fifth version of the PHP: Hypertext Preprocessor (PHP) scripting language. It features the Zend Engine 2, better object model support, and many other improvements over PHP 4.

4 votes
2 answers
229 views

I am a newbie and have been following a tutorial I bought on Udemy. But I was told it is old and teaches bad code practices. I used this in some code from my old projects. Now I'd like to know how ...
user13477176's user avatar
-3 votes
3 answers
406 views

I was following a tutorial for a social network. I want to know how secure this code is because I plan on launching it to the public web. ...
user13477176's user avatar
0 votes
1 answer
270 views

The goal is to upload the columns from the csv into the SQL Pro database. I am able to select the column names that have been uploaded from the csv file, the columns from the csv file are then ...
Victor Melvin's user avatar
1 vote
2 answers
780 views

$elements is an array, which may contain 'x' or 'y' keys, I want to check if they exist, otherwise assign a 0. I'm looking for a clean way to validate it. I'm new ...
gogasca's user avatar
  • 609
3 votes
0 answers
58 views

I need to validate the fields of user sent by an API. All works fine but the only one problem is that I don't like the solution is not an OOP solution. In the controller I call the service created by ...
klsdskldsd's user avatar
1 vote
1 answer
111 views

I've found myself today really struggling with this subject and I'm pretty sure that there must be a better way to do this. First of all my arrays have the same layout, I need to merge them and sum ...
ccb123g's user avatar
  • 11
3 votes
2 answers
2k views

After a little bit of troubleshoots, I've finished this simple users registration and login class. It uses PDO to connect to a mysql database, I've tried also to ...
user9741470's user avatar
1 vote
1 answer
137 views

I am working with PHP5 (Laravel 5.1), and I couldn't optimize my function, which takes more 4 minutes turning, and fails in the end when I have a huge data (around 6500 rows, but working when i test ...
Gothiquo's user avatar
  • 127
0 votes
1 answer
49 views

I have made this code to determine the users grade for a quiz. However I've just been thinking that maybe I could shorten the code somehow? as its just a lot of if and elif statements. ...
user avatar
1 vote
1 answer
90 views

At my office we have an internal monitoring tool we use on customer systems to monitor various vitals and notify us via Slack. Our Lead Dev and Chief Architect are very paranoid about Git, and ...
Mayube's user avatar
  • 181
0 votes
1 answer
70 views

My method counts the number of times an error occurs. I have a feeling my snippet isn't the best practice way of doing this. So when one of the validation methods fails I want to stop the method. <...
Miguel Stevens's user avatar
1 vote
2 answers
2k views

I have a web application which is being used by users from different parts of the world. In order for users of the site, to be able to view the timestamps in their local time, I've a settings page set ...
asprin's user avatar
  • 187
2 votes
1 answer
147 views

I'm developing a MVC structured RESTful API project (thanks to the help of Mārtiņš Tereško for explaining it). Almost all of my functions look similar to this: ...
DaAmidza's user avatar
  • 289
1 vote
1 answer
192 views

I am using Joomla and connecting to an MSSQL database to store the resulting set(s) in arrays. I am utilizing this syntax, but there must be a more efficient way of coding this. ...
BellHopByDayAmetuerCoderByNigh's user avatar
4 votes
4 answers
9k views

I'm trying to work out which is cleaner, having a large constructor or having to use many setters on a new object before doing some work with it. Large constructor: ...
CJ Dennis's user avatar
  • 249

15 30 50 per page
1
2 3 4 5
16