Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6656335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:37:50+00:00 2026-05-26T01:37:50+00:00

I am trying to create a simple registration form. I have the following: include(‘User.datatype.php’);

  • 0

I am trying to create a simple registration form. I have the following:

include('User.datatype.php');

class NewUser {

    function inquireSubmit() {
        if(isset($_POST['register'])) {
            $username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);
            $password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);
            }
        else {
            exit;
            }
    }

    function registerUser() {
        if ($username = '' or $password = '') {
            $msg = 'Please enter the required information.';
            header('Location: index.php?error=$msg');
            }

        else {
            $user = new User;
            $user->username = $username;
            $user->password = $password;
            $user->profile = $profile;
            }
    }
}

class UserManager {
    public function storeData() {
        $database = mysql_connect("localhost", "root", "");
        mysql_select_db("test") or die(mysql_error());

        $username_e = mysql_real_escape_string($NewUser->username);
        $password_e = mysql_real_escape_string($NewUser->password);

        $query = "INSERT INTO users (username, password) VALUES ($username_e, $password_e)";
        mysql_query($query);
    }
}

Here is the HTML form:

    <form id="register" action="register.php">
            <table cellpadding="2" cellspacing="2" border="0">
                <tr valign="top">
                    <td>
                        Username: <input name="username" type="text" id="username" />
                    </td>
                </tr>
                <tr valign="top">
                    <td>
                        Password: <input name="password" type="password" id="password" />
                    </td>
                    <td>
                        <button id="register">Register</button>
                    </td>
                </tr>
            </table>
    </form>

Whenever I test it, I just get a blank page as a result. What did I do wrong? Also, (and where) do I display a confirmation message upon success or failure? Many thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T01:37:51+00:00Added an answer on May 26, 2026 at 1:37 am

    Add method=”post” to your form tag, also type=”submit” to the register button.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create simple user registration form. I have an index.html file
I'm trying to create a simple Spring 3 application and have the following files.
I am trying to create a simple tag cloud in PHP. The following is
Hi I'm trying to create a simple registration form with ajax validation. I've got
I'm trying to create a simple registration form. In order to align everything neatly
I'm trying to create a simple database table using the PHP MySQL query Create
Trying to create a simple form: <%@ Page Language=C# AutoEventWireup=true CodeBehind=register.aspx.cs Inherits=AlphaPack._Default MasterPageFile=MasterPages/Main.master title=Hi
I'm trying to create a simple date class, but I get an error on
I'm trying to build a safe user authentication system. The code is from http://net.tutsplus.com/tutorials/php/simple-techniques-to-lock-down-your-website/
I`m trying to create simple QML application. I have QtSDK installed with latest QtCreator.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.