Results 1 to 6 of 6
  1. #1

    php issues with database

    ok. so the issue as of rn i been watching tutorials and teach myself how to do this ans so far been able to do it up to this point with php. it does connect to my database successfully but as of now. when i register it just says connection successful as in its not reading the last bit of the code in register_parse and just reading the included file for the sql connection. is there a better way of doing it or what is the fix. all this is done on a godaddy website if that changes much.

  2. #2

    php issues with database

    i changed all passcodes and usernames to *** for saftey
    below is all my code

  3. #3

    php issues with database

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">

    <html lang="en">

    <link rel="stylesheet" type="text/css" href="fonts.css"/>
    <style type="text/css">
    p {text-align: center;}
    form {text-align: center;}
    .here {text-align: center;}

    <img src="cover-photo-custom-copywriteTHEDOG.png">
    <li><a href="login.html">Login</a></li>
    <li><a href="register.html">Register</a></li>
    <li><a href="chat.html">Live Chat</a></li>
    <li><a href="forums.html">Forums</a></li>
    <li><a href="servers.html">Server List</a></li>
    <p>Hello. Please Fill Out Any feilds below to register. </p>
    <form action="register_parse.php" method="POST">
    Username: <input type="text" name="username" maxlength="15" >
    <br />
    Password: <input type="passwprd" name="password">
    <br />

  4. #4

    php issues with database


    $servername = "localhost";
    $username = "*****";
    $password = "******";
    $name = "****";

    // Create connection
    $conn = new mysqli($servername, $username, $password, $name);

    // Check connection
    if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
    echo "Connected successfully";

  5. #5
    content from reference site

  6. #6

    php issues with database


    $username = $_POST["username"];
    $password = $_POST["usernmae"];

    $sql = "INSERT INTO ThegdogForum.users(username, password)
    VALUES ('$username', '$password');

    $res = mysql_query($sql);

    if ($res) {
    echo "Successfully registered as : ".$username;
    } else {


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts