'After submitting the data from the form it directs to white screen

I have an issue when I clicked the button and submit the data from the form.it gets directly to the white screen and nothing happen I checked the database it does not add. it doesn't have error so its hard for me to figure out how to solve this

here is my code for index.php

<?php
require('./read.php');

?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>BASIC CRUD</title>
    <link rel="stylesheet" href="style.css">
    <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
</head>
<body>
    
    <section class="main container">
    <form class="create-main align-items-center mt-5 mb-5" action="/crud/create.php" method="post">
        <h1>Create User</h1>
        <input type="text" name="username" placeholder="Enter your username" required/>
        <input type="password" name="password" placeholder="Enter your password" required/>
        <input type="submit" name="create" value="CREATE">
    </form>

    <table class="table">
  <thead>
    <tr>
      <th scope="col">#</th>
      <th scope="col">First</th>
      <th scope="col">Last</th>
      <th scope="col">Handle</th>
      <th scope="col"></th>
      <th scope="col"></th>
    </tr>
  </thead>
  <tbody>
      <?php while($results = mysqli_fetch_array($sqlAccounts)) {?>
    <tr>
      <th scope="row"><?php echo $results ['id']?></th>
      <td><?php echo $results ['username']?></td>
      <td><?php echo $results ['password']?></td>
      <td>
          <form action="#" method="get">
          <input type="submit" name="edit" value="EDIT">
          </form>
      </td>
      <td>
          <form action="#" method="get">
          <input type="submit" name="delete" value="DELETE">
          </form>
      </td>
    </tr>
    <?php }; ?>
  </tbody>
</table>

    </section>

 <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
</body>
</html>


Solution 1:[1]

You are very likely having a 500 error. Best if you go to your active php.ini file and find display_errors and make sure it's = On as in display_errors = On. Also check your error_log in your php.ini for the file that records your errors and you might want to check it out too. Looking at your code, errors can come from either not finding the included files, to what happens in /crud/create.php

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Djongov