Welcome Guest, Not a member yet? Register   Sign In
Need Help Creating Registration/Login Form
#9

(This post was last modified: 02-09-2016, 10:16 AM by Rumiko.)

(02-08-2016, 06:26 PM)InsiteFX Wrote: Could be a permissions setting in Safari's options.

I tested it in Firefox (without setting the base_url in the config and got the same kind of message. When I tested it in Chrome, the signup button did absolutely nothing.


(02-08-2016, 07:03 PM)RobertSF Wrote: Hi. I confess I'm not familiar with ::1 notation, and you can't google for strings like that, so I found nothing.

Clearly, Safari can open pages on your server, since you get as far displaying the form. When the form is displayed, what is the URL in the browser's address bar? Is it ::1/something/something or is it localhost/something/something?

Are you already familiar with PHP? Maybe try to narrow down the point at which it gets that error. You can do this by inserting an exit; statement in your code until the error message appears. That is, if execution hits the exit statement before whatever is causing the error, execution will end and you won't get the error. If that happens, move the exit statement forward. When you get the error, it means you moved the exit statement ahead of the error. If you did this line by line, the line above the exit statement is causing the error.

When the form page is loaded up, it says "localhost:8888" in the address bar. No subfolder or anything afterward. My route.php is set up so that the default controller is the controller handling the user_registration_view.php (my form), so that's what loads up automatically.

I've dabbled in PHP, but it's been quite a while and I need to refresh on it.


(02-08-2016, 07:37 PM)skunkbad Wrote: I would guess that it would work if you used http://localhost or http://127.0.0.1 instead of http://::1.

See: http://superuser.com/questions/877587/wh...-127-0-0-1

It would seem that in order for Apache to work with ipv6, there is some configuration that needs to be done.


I'm not sure why it's going to ::1. I'm physically typing in "localhost:8888" to get to the form, just like I usually do when i'm working in my local server and want to preview a file. Yet, upon submitting the form, the address switches to ::1.


Do you guys have any comment on the "base_url" thing? It had gotten rid of the ::1 error when I set it to "http://localhost:8888/myProjectFolder." Which I guess is progress? (haha)

Now it just says "The requested URL /myProjectFolder/index.php/User/register was not found on this server."

Not sure what the User/register is supposed to be, but I'm guessing it has to do with the code below in the user_registration_view.php :

Code:
<div class="row">
   <div class="col-md-6 col-md-offset-3">
       <div class="panel panel-default">
           <div class="panel-heading">
               <h4>User Registration Form</h4>
           </div>
              <div class="panel-body">
     HERE ->   <?php $attributes = array("name" => "registrationform");
               echo form_open("User/register", $attributes);?>  <- TO HERE
               <div class="form-group">
                   <label for="name">First Name</label>
                   <input class="form-control" name="fname" placeholder="Your First Name" type="text" value="<?php echo set_value('fname'); ?>" />
                   <span class="text-danger"><?php echo form_error('fname'); ?></span>
               </div>

               <div class="form-group">
                   <label for="name">Last Name</label>
                   <input class="form-control" name="lname" placeholder="Last Name" type="text" value="<?php echo set_value('lname'); ?>" />
                   <span class="text-danger"><?php echo form_error('lname'); ?></span>
               </div>
               
               <div class="form-group">
                   <label for="email">Email ID</label>
                   <input class="form-control" name="email" placeholder="Email-ID" type="text" value="<?php echo set_value('email'); ?>" />
                   <span class="text-danger"><?php echo form_error('email'); ?></span>
               </div>

               <div class="form-group">
                   <label for="subject">Password</label>
                   <input class="form-control" name="password" placeholder="Password" type="password" />
                   <span class="text-danger"><?php echo form_error('password'); ?></span>
               </div>

               <div class="form-group">
                   <label for="subject">Confirm Password</label>
                   <input class="form-control" name="cpassword" placeholder="Confirm Password" type="password" />
                   <span class="text-danger"><?php echo form_error('cpassword'); ?></span>
               </div>

               <div class="form-group">
                   <button name="submit" type="submit" class="btn btn-default">Signup</button>
                   <button name="cancel" type="reset" class="btn btn-default">Cancel</button>
               </div>
               <?php echo form_close(); ?>
               <?php echo $this->session->flashdata('msg'); ?>
           </div>
       </div>
   </div>
</div>


I know it's accessing index.php (which right now is just whatever Code Igniter has for it as code by default) because the "Index File" config is set to : $config['index_page'] = 'index.php';

I'm assuming I would change that to the home page of my site (after the successful registration), correct?

Either way, I don't know what the User/register is at the end of that address. But that's probably what's causing the 404 error now.
Reply


Messages In This Thread
RE: Need Help Creating Registration/Login Form - by Rumiko - 02-09-2016, 10:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB