Reputation Activity
-
AJReading got a reaction from ayoungh in What PHP framework do you use?The point of a framework is to make it easier to develop applications by taking care of common tasks for you from things like cleaning users input to database interaction, session management, validation, templating, email, encryption etc.
They are usually based on the Model View Controller (MVC) which seperates code into three parts, data access/manipulation (model), application presentation (view) and application logic (controller).
They can take a while to learn and get your head around the concept but after using a framework for a while it speeds up development time and encourages the re-use of code. I've developed libraries for certain projects that I can simply and seamlessly use for other projects.
I've linked the wikipedia article on MVC if you want to know more.
-
I am very against using black hat methods personally and work hard to make organic search work. Writing clearly so people will read your content (and convert to sales!) is the most important part of SEO.
It might take a bit longer to write, but it will pay off for years to come...
-
AJReading got a reaction from Stevo in Using the $_POST arrayYou could loop through the POST array and assign a variable for each item in the array, this would probably not be a good idea though as people could potentially post anything they want and start messing with your variables.
Perhaps this would be better than manually assigning each variable.
$form = array('Name', 'Address', 'Postcode', 'Etc'); foreach ($form as $field) { if (isset($_POST[$field])) { $$field = $_POST[$field]; } }
This will create $Name, $Address, $Postcode etc for you and on line 4 where the variables are defined you can use any clean up functions you may want to perform on the user input.