Jump to content


Member Since 06 May 2003
Offline Last Active Yesterday, 04:38 PM

Posts I've Made

In Topic: Open sourcing a website, good idea or?

02 October 2015 - 07:15 PM

Thank you guys SO MUCH for your help and for being so nice to explain the Git stuff ! Unfortunately my hosting doesn't support Git, however I will start to study it ( for now I only know as much as to publish and commit repositories in GitHub ) and I will try to kick FTP and use Version Control.
Thank you again to all of you!

Start by installing on your workstation and using git for your development work. You can also set up a free account on bitbucket, that will allow you to make private repositories. You can utilize it as a free backup.

-Develop locally, git commit your code each time you have a working build
-Git push to your bitbucket remote

Doing this will get you started and familiar with git as well as giving you the benefit of having change control of your projects. Many a person has accidentally deleted or overwritten an important file. Git will bail you out on those mistakes. It also helps you diff so you can see what you changed revision to revision.

In Topic: Basic PHP Question/Help

29 September 2015 - 07:12 AM

I plan on using the ID later in the file, for a different MySQL statement. So what should I be using for this?

This is how you create spaghetti.

functions should be discrete and do one thing. Planning to "add a different MySQL statement later" isn't the right solution. You should write a different function for that.

It's also clear that getID() is a bad name for this function. It really should be named something like:

function getEmployee($id) {

In Topic: Basic PHP Question/Help

29 September 2015 - 06:53 AM

This line:

if(getID($staffid)) {
--- depends on getID returning a boolean equivalent value. You have changed the function so that it no longer works that way. You will need to rethink the way that code is written if you want to change the way getID() works. Returning false or an array is no longer compatible with returning false OR some positive integer that will evaluate to true.

In Topic: MobileDetect - PHP Help

06 September 2015 - 04:27 AM

Strongly agree with the prior respondents.

Media queries are current best practice for responsive design, as they are built into css and supported by the browsers. With that said, they aren't focused on determining what device someone is using, but rather the size of the screen.

So long as you're not trying to have something silly like: "Hey Iphone6 user...." they are definitely the recommended path at this point, as well as HTML5, Grids, css3 etc..

QoC has some good examples.

If you do some googling you can find some nice templates that people have created you can use as boilerplate in your css.

This is a good one, but there are many others: https://responsivede...ice-breakpoints

In Topic: The correct way to use "DIE"?

06 September 2015 - 04:11 AM

While QoC's code will work and answers the question, I don't feel that a 404 is appropriate there. 404's are really for URL's that can't be found, as part of the HTTP spec.

In your case, I think you should simply return a message to the user indicating the issue. Exactly what you want to do is really a matter of personal preference, that comes down to User interface design.