So, whenever I load register page, on the input field, the username and password field get autofilled with my phpmyadmin id and password (which is root and 1234)
So, here is the Controller user.php
<?php
class User extends CI_Controller {
public function register() {
// load View
$data['main_content'] = 'register';
$this->load->view('layouts/main', $data);
}
}
?>
Here is the main.php in folder views/layouts
<?php $data['main_content'] = $main_content; ?>
<?php $this->load->view('layouts/includes/header', $data); ?>
<!-- Display Main Content -->
<?php $this->load->view($main_content); ?>
<?php $this->load->view('layouts/includes/footer'); ?>
And here is the Views register.php
<div class="container-fluid category-home-text">
<h3 class="text-center text-uppercase">Register</h3>
</div>
<div class="container-fluid login-container">
<form id="form1" name="form1" method="post">
<div class="register-block">
<div class="form-group">
<label>Name*</label>
<input type="text" class="form-control" name="fullname" placeholder="Enter Your Full Name">
</div>
<div class="form-group">
<label>Email Address*</label>
<input type="email" class="form-control" name="email" placeholder="Enter Your Email Address">
</div>
<div class="form-group">
<label>Chose Username*</label>
<input type="text" class="form-control" name="username" placeholder="Create A Username">
</div>
<div class="form-group">
<label>Password*</label>
<input type="password" class="form-control" name="password" placeholder="Enter A Password">
</div>
<div class="form-group">
<label>Confirm Password*</label>
<input type="password" class="form-control" name="cpassword" placeholder="Enter Password Again">
</div>
<button type="submit" class="btn btn-primary btn-block">Register</button>
</div>
</form>
</div>
I dont understand because I don't set a value on the view at all.
