- RAD build rapid applications
- less repetition of code
- free
- lightweight and provides a lot of libraries for functionality to allow one to use code that is already there (less programming)
- Codeigniter is a well documented framework
- large community using Codeigniter
- form and data validation
- no configuration
- provides security and xss filtering.
- custom routing
The Codeigniter framework is one of many, others being: onextrapixel and kohana.
So far the small in class project seems to be a challenge and even though a small project was working 2 weeks ago it is not working now!!!The idea is split our final year project into separate areas for login and registeration and other functionality that should occur. Last week (our week off for Easter break) was spent debugging the project from class. I only go so far. Then this week I came into class and the loginUserForm file was working and now it is not! There was an issue alright with the notes from the php programming class - uppercase and lowercase objects and methods being called and this was confusing. There were also about 5 key errors in the code and this is hard as I am just a beginner programmer in the creative multimedia programming game. Prior to this my projects were built using tiny bits of code being strung together from simpler languages.
I think my main error occured two days ago have to go through all the function in the user.php page to to see that the pages name ie user.php matches what it is being called for through functions. This is a tedious task but hopefully I will start to fix on my own.
Image 1: 404 Error userLoginPage |
public function handleLogon(){
$this->load->view('User/UserLoginForm');
}
public function RegisterUser(){
//prepare an array o f User info submited via the POST
//left db right same as form
$user = array(
'UserName' => $_POST['UserName'],
'Password' => $_POST['Password'],
'FirstName' => $_POST['FirstName'],
'SurName' => $_POST['SurName'],
'Mobile' => $_POST['Mobile'],
'AddressLine1' => $_POST['AddressLine1'],
'AddressLine2' => $_POST['AddressLine2'],
'AddressLine3' => $_POST['AddressLine3'],
'Email' => $_POST['Email'],
'UserID' => $_POST['UserID'],
);
//shows what gets sent as an array
//var_dump($user);
So in the above the UserLoginForm does not need the / as I understand it but in other parts of the MVC it does as in this below does:
this getuser.php page needs the hard escape to call up the next page which is RegisterUser/
<!DOCTYPE html>
<?php
$this->load->helper('url');
$base = base_url(). index_page();
?>
<html>
<head></head>
<body>
<form id="form1" name="form1" method="POST" action="<?php echo "$base/User/RegisterUser/"; ?>">
UserName <input type = "text" name = "UserName"><br>
Password <input type = "text" name = "Password"><br>
Firstname <input type = "text" name = "FirstName"><br>
SurName <input type = "text" name = "SurName"><br>
Mobile <input type = "text" name = "Mobile"><br>
Address1 <input type = "text" name = "AddressLine1"><br>
Address2 <input type = "text" name = "AddressLine2"><br>
Address3 <input type = "text" name = "AddressLine3"><br>
Email <input type = "text" name = "Email"><br>
<input type = "submit" value="submit">
</form>
</body>
</html>
I am trying to debug and think like a programmer but the creative multimedia programming part is definitely out for now until I get this basic functionality working! So to echo the sentiment in the title of my blog 'Codeigniter and php - How do progress in creative multimedia programming?' i don't know but I know I just have to go back over every main file, every function and check! If anyone reading this (in the world) wants to help me I have team viewer and a phone! My email is: fionakiely1@hotmail.com :)
Image 2: Typical 'Undefined Index' error
Image 3: Undefined index for user details code
No comments:
Post a Comment