Click here to Skip to main content
15,742,011 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am creating a forum website and when the user signs up i want the users information to go into the databases table but i cant find a way to do it . i tried various ways like youtube tutorials and other forums but nothing is helping me . i even tried tutorials from websites tat give you the code , but nothing helps. Can someone help me with code or an error i have ? I would appreciate it a lot. This is my register.php file :


<link rel="stylesheet" type="text/css" href="css.css" >
<body bgcolor="#E6E6FA">

    <div id="logo">
    <h1> InterFace</h1>

<form action="" method="POST">
  <p align="right"><input type="text" name="firstname" size="35" id="First Name" placeholder="First Name" /></p>
  <p align="right"><input type="text" name="lastname" size="35" id="Last Name"  placeholder="Last Name" /></p>
  <p align="right"><input type="text" name="username" size="35" id="Username" placeholder="User Name" /></p>
  <p align="right"><input type="password" name="password" size="35"  id="Password" placeholder="Password" /></p>
  <p align="right"><input type="password" name="password2" size="35"  id="Password2" placeholder="Confirm Password" /></p>
  <p align="right"><input type="text" name="email" size="35"  id="Email" placeholder="E-mail" /></p>
  <p align="right"><input type="text" name="email2" size="35"  id="Email2" placeholder="E-mail confirm" /></p>
  <p align="right"><input type="submit" name="reg" value="Submit"></p>


This is my database connection file :


$mysqli_hostname = "";
$mysqli_username = "root";
$mysqli_password = "";
$mysqli_database = "interface";

$db = mysqli_connect ($mysqli_hostname, $mysqli_username, $mysqli_password)
or die("Something is broken") ;


1 solution

Even though you wrote that you have tried tutorials, I'd suggest going through some, step-by-step. Don't try to solve ever aspect at once but follow the steps of the examples.

For example start from[^] and go through each page...
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900