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

  • Home
  • SEARCH
  • 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 8509797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:31:55+00:00 2026-06-11T03:31:55+00:00

Maybe this sounds odd, but I have the feeling I am doing something wrong

  • 0

Maybe this sounds odd, but I have the feeling I am doing something wrong in my code. I did test it locally and it worked fine, however, when I try to send the data online, it doesn’t get entered into the database. I don’t know what I am doing wrong at the moment, and I can’t see the error (might have looked to much to the code or something like that). Sometimes a fresh look might help better.

The HTML:

<form method="post" class="signin" action="inc/actions/processing.php">
        <fieldset class="textbox">
            <label class="username">
                <span>Username</span>
                <input id="username" name="username" value="" type="text" autocomplete="off" placeholder="username">
            </label>
            <label class="charactername">
                <span>Charactername</span>
                <input id="charactername" name="charactername" value="" type="text" autocomplete="off" placeholder="Your character's first name">
            </label>
            <label class="password">
                <span>Password</span>
                <input id="password" name="password" value="" type="password" placeholder="Password">
            </label>
            <button class="submit button" name="RegisterUser" type="submit">Register User</button> 
        </fieldset>
  </form>

The PHP, processing part:

if(isset($_POST['RegisterUser'])){
        $Username = $_POST['username'];
        $Pass_nomdf5 = $_POST['password'];
        $Password = md5($Pass_nomdf5);
        $Charactername = $_POST['charactername'];       
        RegisterMember($Charactername,$Username,$Password);
        CloseConnection();
        header( "Location: http://" . strip_tags( $_SERVER ['HTTP_HOST'] ) . "/newHolo/" );
        exit;           
}

The PHP for the RegisterMember function:

function RegisterMember($Charactername,$Username,$Password){
    $query = "INSERT INTO User(CharacterFname,Username,Password) VALUES ('".$Charactername."','".$Username."','".$Password."');";
    SendQuery($query);
}

I ran it over quite a few times, but I have the feeling it’s a setting in my database that screws me. I switched all the NOT_NULLs to NULLs, except for the ID fields (see pic of database table below).

enter image description here
I am just not sure where my error is, cause locally it ran fine before i uploaded it. I did run though on an older version of PHP, and I have a feeling it might have to do with that as well. Can anyone help me out here?

  • 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-06-11T03:31:57+00:00Added an answer on June 11, 2026 at 3:31 am

    As i stated above, it was an sql error that came back, and had indeed nothing to do with my code. I cleared the error message, when I noticed that I didnt fill in any data yet into the datafields of Sgroup.

     #1452 - Cannot add or update a child row: a foreign key constraint fails (darktide_newdarktide/User, CONSTRAINT User_ibfk_1 FOREIGN KEY (SgroupId) REFERENCES Sgroup (SgroupId))
    

    Dumb, I should have known that if i have a constraint on a field, It should be at least filled with the data. So, i filled up that table, and voila, that did the trick. Thanks for your input people.

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

Sidebar

Related Questions

Maybe this sounds a little bit crazy, but I need to come up with
Maybe this is something very easy to do it but so far it's taking
this sounds weird, but maybe there is exist one... i googled for it, but
OK, this sounds simple and or like something that should have probably been done
OK, I don't know how to word this question, but maybe my code will
maybe this sounds silly... but as an amateur android developer, i want to know
Maybe this is a poor question, but, I can't find a tutorial or even
Maybe this isn't possible due to Security implications... I have a Deployment Package created
Maybe this is a dumb question, but do event listeners use CPU cycles like
Maybe this isn't really feasible. But basically, I've been developing a snippet-sharing website and

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.