this probably has a simple solution but i cant seem to see whats wrong with it

<?php

//Form Data
//error seems to occur here
echo "<h1>Registration</h1>";


$submit = $_POST['submit'];

$fullname = $_POST['fullname'];
$username = $_POST['username'];
$password = $_POST['password'];
$repeat_password = $_POST['repeat_password'];


if ($submit)
{
   
}
?>
//between these two points

<html>
<form action='register.php' method='POST'>
<table>
    <tr>
        <td>
        Choose a Username:
        </td>
        
        <td>
        <input type='text' name="username">
        </td>
    </tr>
    <tr>
        <td>
        Password:
        </td>
        <td><input type='password' name="password">
        </td>
    </tr>
    <tr>    
        <td>
        Repeat Your Password:
        </td>
        <td><input type='password' name="repeat_password">
        </td>
    </tr>
    <tr>
        <td>
        Your Full Name:
        </td>
        <td><input type='text' name="name">
        </td>
    </tr>
        </table>
        <p><input type='submit' name='submit'></p>

</form>

</html>

It cannot find one of the POST values.

Member Avatar for Zagga

Hi jamesyrawr,

As Pritaeas suggested, you have an error with one of your post values.

The form is giving an element the name of "name" but you are trying to get the value "fullname" from the $_POST array.

Try changing line 53 from <input type='text' name="name"> To <input type='text' name="fullname"> .


Hope this helps.
Zagga

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.