Jump to content

Register Page Error


jibicho

Recommended Posts

I get this kind of error on trying to follow the tutorial on php login.PHP Strict Standards:  Only variables should be passed by reference in /home/cifakeny/public_html/new/login.php on line 46

line 46 of login.php reads as follows,

 

$stmt->bind_param("ss", $input['user'], md5($input['pass'] . $config['salt']));

 

my register.php page is clumsy and not showing the scroll values.

 

 

 

 

 

Link to comment
Share on other sites

i am following procedural login(only with views and includes). lines below and above 46 are as follows.

 

 

else
    {
        // get and clean data from form
        $input['user'] = htmlentities($_POST['username'], ENT_QUOTES);
        $input['pass'] = htmlentities($_POST['password'], ENT_QUOTES);
        
        // create query
        if ($stmt = $mysqli->prepare("SELECT members.id, permissions.name FROM members, permissions WHERE username=? AND password = ? AND members.type = permissions.id"))
        {
            $stmt->bind_param("ss", $input['user'], md5($input['pass'] . $config['salt']));
            $stmt->execute();
            $stmt->bind_result($id, $type);
            $stmt->fetch();
            
            // check if there is a match in the database for the user/password combination
            if ($id)
            {
                // close statement
                $stmt->close();
                
                // set session variable
                $_SESSION['id'] = $id;
                $_SESSION['type'] = $type;
                $_SESSION['username'] = $input['user'];
                $_SESSION['last_active'] = time();
                
                // redirect to member's page
                header("Location: members.php");
            }

Link to comment
Share on other sites

Thanks for swift correspondence and support as well. the next issues are:

- The disarranged register.php page with selection content display as single line in the box i.e. selectoptionadminmember and invisible password label.

- The password reset link sent fails on click and shows the error:

The requested URL /reset_password.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

kindly help me solve these.

Link to comment
Share on other sites

I have managed to solve the second email link related error after editing my config.php page but unfortunately i couldnt solve the first one that follows:

 

- The disarranged register.php page with selection content display as single line in the box i.e. selectoptionadminmember and invisible password label.

 

The distortion is hindering me from registering a member.

 

thanks for the help so far.

Link to comment
Share on other sites

I have managed and reads 'member added successfully' but still gets disarranged after adding the member successfully i.e. the member is added but in case I made a mistake in feeling the form i cant pick from there, I mean I  have to refresh or click back the browser.

 

I have attached both v_register.php and register.php file.

 

thanks for the guide so far.

register.php

v_register.php

Edited by jibicho
Link to comment
Share on other sites

I've looked over the files, but as far as I can tell, they seem fine. Can you explain in more detail what the issues is? I'm not sure what you mean by "gets disarranged". What are you doing, what are you expecting, and how is the system not working the way you are expecting? Are you getting any specific error messages?

Link to comment
Share on other sites

kindly use the following details since i cant find the exact words to illustrate the behaviours.

link: http://www.cifakenya.co.ke/new/login.php

 

then use

 

username: admin

password: head

 

try to register a member then submit and watch out the behaviours and you will notice my concerns. for me page i get after registering a member is not fit to allow further registration. i hope you understand me better now. thanks for your response.

Link to comment
Share on other sites

Really works well. Many thanks admin. Your support is amazing. You restored my hope to explore and love working with php.

 

I am looking forward to learn oop on php and of course I have no fear to confront errors this time round since your instant troubleshooting is there for all.

 

am also looking forward for a convenient hosting plan for you which i need your advice on that.

 

 

Link to comment
Share on other sites

Everyone tends to have their own opinion about hosting. I've had good experiences with HostGator -- never really had a problem with down time, and their support has been helpful when I've ever needed it. Their basic plans run in the $5-$10 per month range. Stay away from GoDaddy for hosting. They are cheap, but you get what you pay for. 

Link to comment
Share on other sites

Thanks for your hosting plan advice. I would also like to inquire on how to integrate a forum on existing site. Also, if its possible to have a page where the admin can log in and post a job so that when public visit the site on the other end they can apply for jobs and upload their credentials. I would really appreciate if i can get a code which can do such kind of work for me. thank you in advance.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...