Goto Page: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17
Actual Results
- Nightslyr
- Forum: PHP Tutorials
- Topic: Understanding Classes
- Subject: Understanding Classes
- Replies: 10
- Views: 201
- Subject: Understanding Classes
Posted: November 19th, 2009, 5:54 am
What are you talking about? This:
Is PHP 4 syntax. The keyword 'var' exists only to maintain backwards compatibility with legacy apps, and really shouldn't be used in modern apps as it's the same as declaring a data member public, which is a bad th...
class example { var $name; var $last; }
- Nightslyr
- Forum: PHP Tutorials
- Topic: TUTORIAL: PHP 5+ OOP Part 1
- Subject: TUTORIAL: PHP 5+ OOP Part 1
- Replies: 0
- Views: 23
- Subject: TUTORIAL: PHP 5+ OOP Part 1
Posted: November 18th, 2009, 2:33 pm
Introduction: The aim of this tutorial is to introduce people somewhat familiar with PHP to Object Oriented Programming with that language. Why version 5+? OOP in version 4 was more or less a joke. The language just wasn't equipped to do things the right way. Instead, bare-bones OOP functionality w...
- Nightslyr
- Forum: Programming / Scripting / Coding Forum
- Topic: Starting on ground zero
- Subject: Starting on ground zero
- Replies: 3
- Views: 50
- Subject: Starting on ground zero
Posted: November 18th, 2009, 2:17 pm
Hi there - I need some insight from those willing to travel back to the days when they were just considering the idea of programming. Here's the scenario to be considered: As a tech newbie I have been given a task. Someone has been generous enough to donate a website programmed in VB with a .NET st...
- Nightslyr
- Forum: PHP Tutorials
- Topic: Understanding Classes
- Subject: Understanding Classes
- Replies: 10
- Views: 201
- Subject: Understanding Classes
Posted: November 18th, 2009, 2:03 pm
Why aren't you using PHP 5's superior syntax and capabilities? PHP 4 isn't even supported by Zend any longer, and PHP 5 has been around for, what, 5 or 6 years already?
- Nightslyr
- Forum: Programming / Scripting / Coding Forum
- Topic: PHP: Passing ALL Arguments using a stdClass ?
- Subject: PHP: Passing ALL Arguments using a stdClass ?
- Replies: 5
- Views: 219
Posted: September 28th, 2009, 3:20 pm
To be honest, I don't see any real benefit to it. It's a wrapper around an argument list. That kind of thing has its place (for instance, perhaps its beneficial to put a wrapper around $_REQUEST to facilitate validation and protect its values from accidental overwriting), but I don't think it's appr...
- Nightslyr
- Forum: Programming / Scripting / Coding Forum
- Topic: 10 signs of crappy PHP software
- Subject: 10 signs of crappy PHP software
- Replies: 11
- Views: 1845
- Subject: 10 signs of crappy PHP software
Posted: July 8th, 2009, 1:50 pm
To be fair, since I've talked to the guy who wrote the blog post a few times, with point 10 he's not suggesting that one should use something like Smarty all the time. In fact, he's not high on using a template engine at all . He tends to use straight PHP for output. But, yeah, he didn't articulate ...
- Nightslyr
- Forum: Programming / Scripting / Coding Forum
- Topic: 10 signs of crappy PHP software
- Subject: 10 signs of crappy PHP software
- Replies: 11
- Views: 1845
- Subject: 10 signs of crappy PHP software
Posted: July 8th, 2009, 7:26 am
A blog article describing ten common signs of crappy PHP software. Some are straight forward (reinventing the wheel, needlessly playing with the error level). Others are sure to be the cause of controversy (using globals).
http://www.phpfreaks.com/blog/10-signs-of-crappy-php-software
http://www.phpfreaks.com/blog/10-signs-of-crappy-php-software
- Nightslyr
- Forum: Programming / Scripting / Coding Forum
- Topic: Feedback on page coding.
- Subject: Feedback on page coding.
- Replies: 10
- Views: 226
- Subject: Feedback on page coding.
Posted: June 30th, 2009, 4:43 am
Ok here I go again :) Having HTML embedded in code is just a really bad idea. Rather look at implementing a templating mechanism and have your code fill in the blanks if you will. For things like grid views what you might want to do is define static Strings inside some sort of 'tag' library. that w...
- Nightslyr
- Forum: Programming / Scripting / Coding Forum
- Topic: Feedback on page coding.
- Subject: Feedback on page coding.
- Replies: 10
- Views: 226
- Subject: Feedback on page coding.
Posted: June 28th, 2009, 2:03 pm
The only PHP you would have in the actual HTML part is like loops to echo and format arrays. If done right, you wouldn't even need that. There's really no reason why you couldn't build these structures in the processing phase, store them in variables, and simply echo them at the right point in the ...
- Nightslyr
- Forum: Programming / Scripting / Coding Forum
- Topic: Feedback on page coding.
- Subject: Feedback on page coding.
- Replies: 10
- Views: 226
- Subject: Feedback on page coding.
Posted: June 27th, 2009, 3:14 pm
1. In general, your PHP structure is a bit off. While you can freely switch between PHP and HTML in your files, it's generally not a good idea. The reason being that as your pages grow in complexity, it becomes harder to maintain when various technologies are strewn throughout. You should instead pr...
- Nightslyr
- Forum: Programming / Scripting / Coding Forum
- Topic: It seems that no one using asp for developing?
- Subject: It seems that no one using asp for developing?
- Replies: 5
- Views: 189
Posted: May 31st, 2009, 1:01 pm
I've done a lot of work in C# and occasionally a page or two in ASP (both in classic and .Net framework). I don't think you'll be alone. If you run into any issues, it's worth asking the question. Someone will most likely be willing to help you find the solution you need. I'm currently learning ASP...
- Nightslyr
- Forum: Programming / Scripting / Coding Forum
- Topic: printing a number on click
- Subject: printing a number on click
- Replies: 2
- Views: 139
- Subject: printing a number on click
Posted: May 22nd, 2009, 7:01 am
I have a site in which I want to add one of the " pick a font size " buttons to change the css. I was thinking about using inbeaded styles and getting PHP to print the font size (in pt) depending on what was clicked I am just not sure how to do this... Since my site users em for the rest ...
- Nightslyr
- Forum: Programming / Scripting / Coding Forum
- Topic: Globalising a variable...
- Subject: Globalising a variable...
- Replies: 5
- Views: 177
- Subject: Globalising a variable...
Posted: May 22nd, 2009, 6:56 am
Turning register_globals on is a bad idea: http://roshanbh.com.np/2008/02/register ... oblem.html
- Nightslyr
- Forum: Programming / Scripting / Coding Forum
- Topic: If...Else syntax might be wrong?
- Subject: If...Else syntax might be wrong?
- Replies: 3
- Views: 263
- Subject: If...Else syntax might be wrong?
Posted: May 14th, 2009, 11:47 am
Well, first, your code doesn't make much sense from a logical standpoint. You essentially have: If 'advanced' has been checked: when 'advanced' is clicked, show an element. Else: when 'advanced' is clicked, hide an element. It's extraneous as a click on 'advanced' is the same as whether or not it's ...
- Nightslyr
- Forum: Programming / Scripting / Coding Forum
- Topic: Classes interfacing in PHP
- Subject: Classes interfacing in PHP
- Replies: 13
- Views: 210
- Subject: Classes interfacing in PHP
Posted: May 8th, 2009, 8:41 am
If you have to use a raw global, you're doing it wrong. Yeah because having a bathroom in every room of your house is just such a good idea. :roll: :roll: Using the 'global' keyword is the antithesis of OOP. Objects should not need to have intimate knowledge of the code that uses them, and the main...

