Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
* * * * * 2 votes

Creating login/registration forms with PHP

registration form registration login

105 replies to this topic

#97 Orjan

Orjan

    CC Mentor

  • Moderator
  • 2918 posts
  • Location:Karlstad, Sweden
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Pascal
  • Learning:Java, C#

Posted 29 December 2012 - 05:26 AM

No that has to be organized 1 user to one specifik page, and please how can i turn this to secure login form , what should i change or add
Thnx

Just add the link in a new field in the user table in the database and move on to that location after login.
  • 0

I'm a System developer at XLENT Consultant Group mainly working with SugarCRM.
Please DO NOT send mail or PM to me with programming questions, post them in the appropriate forum instead, where I and others can answer you.


#98 Kleidi

Kleidi

    CC Lurker

  • New Member
  • Pip
  • 3 posts
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, PL/SQL
  • Learning:C#, PHP, PL/SQL, Visual Basic .NET, Transact-SQL

Posted 31 December 2012 - 01:49 AM

Notice: Undefined index: logged in C:\wamp\www\logink.php on line 10 Call Stack # Time Memory Function Location 1 0.0007 695656 {main}( ) ..\logink.php:0

( ! ) Notice: Undefined index: userlogin in C:\wamp\www\logink.php on line 51 Call Stack # Time Memory Function Location 1 0.0007 695656 {main}( ) ..\logink.php:0 2 0.0013 696864 checkpass( ) ..\logink.php:22


( ! ) Notice: Undefined index: password in C:\wamp\www\logink.php on line 51 Call Stack # Time Memory Function Location 1 0.0007 695656 {main}( ) ..\logink.php:0 2 0.0013 696864 checkpass( ) ..\logink.php:22


sorry for assking so many questions but i havee errors :SSS
pls help
  • 1

#99 SaumilPatel

SaumilPatel

    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 31 December 2012 - 09:22 PM

nice
  • 0

#100 DarkHeart

DarkHeart

    CC Newcomer

  • Member
  • PipPip
  • 16 posts

Posted 27 March 2013 - 05:37 AM

When I run all the attached files it says "Table 'test.users' doesn't exist".. how do I fix it? I need this exact code for a test


  • 0

#101 cabiru

cabiru

    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 11 May 2013 - 03:41 AM

pls add update and insert thank you


  • 0

#102 KaneNZ

KaneNZ

    CC Newcomer

  • Member
  • PipPip
  • 22 posts

Posted 13 July 2013 - 05:27 PM

I know this probly a stupid question but how would I use this login/reg script to lock a website I have so only ppl that are members can view the site


  • 0

#103 VivekRajAgarwal

VivekRajAgarwal

    CC Lurker

  • Just Joined
  • Pip
  • 2 posts
  • Programming Language:C, C++, C#, PHP, JavaScript, PL/SQL, Transact-SQL, Logo
  • Learning:C, C++, Objective-C, C#, PHP, JavaScript, PL/SQL, Transact-SQL

Posted 15 October 2013 - 10:02 AM

plz tell me i have made a custom profile page of user i want to open it when user log in every time

 

so tell me the syntax of loading that php file and wheree i have to put it plz tell


  • 0

#104 DanielBunt

DanielBunt

    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 30 December 2013 - 09:54 PM

Your tutorial is easy to follow, however... there are a few errors in the code visible upon execution.

 

EG: index.php on Line10 & Line26.

 

(I won't provide the solution as I believe others are learning, and this is a simple fix and good opportunity to learn).

 

Basically, when putting PHP and HTML in one document it`s very important to keep PHP out of your HTML as much as possible, and visa versa. A recommended structure for each HTML/PHP page is this:

 

<?php

/* PHP functions and variables declarations go here */

?>

<!DOCTYPE html>

<html lang="en-us">

<head>

</head>

<body>

<!-- References to those variables go here as needed -->

</body>

</html>

Another thing to mention is that your forgetting the fact most users have set a password for their localhost, so they need to add extra lines to cater for it.

 

EG: Register.php

 

$servername="localhost";

$username="root";

$password="passwordgoeshere"; (this line is missing)

 

You also need to change this line to:

 

$conn= MySQL_connect($servername,$username,$password) or die(MySQL_error());

 

Or you instantly have access denied.

 

Happy Coding!


Edited by DanielBunt, 30 December 2013 - 10:05 PM.

  • 0

#105 VivekRajAgarwal

VivekRajAgarwal

    CC Lurker

  • Just Joined
  • Pip
  • 2 posts
  • Programming Language:C, C++, C#, PHP, JavaScript, PL/SQL, Transact-SQL, Logo
  • Learning:C, C++, Objective-C, C#, PHP, JavaScript, PL/SQL, Transact-SQL

Posted 31 December 2013 - 01:47 AM

hey i want to secure login details of user by using md5 function please where to put it so that whenever any one login , URL is modified by md5 please help me with this issue....


  • 0

#106 Dewlance

Dewlance

    CC Newcomer

  • Member
  • PipPip
  • 10 posts

Posted 18 April 2017 - 08:43 PM

Thank you, Bookmarked for learning it once I will complete my current tutorial.


  • 0





Also tagged with one or more of these keywords: registration form, registration, login