Jump to content

robsstevejobs

Members
  • Posts

    30
  • Joined

  • Last visited

Everything posted by robsstevejobs

  1. hi, what solution do you offer me in this area, what is the code I can use to check and then eliminate empty space in the database.
  2. ok, look at my code in html and PHP with the image of my database, it skips the line and it leaves empty box on the table. HTML CODE Form <form id="news" action="insert.php" method="POST"> <label for="name">Nom</label> <input type="text" name="name" placeholder="votre nom"> <Br> <br> <label for="email">E-mail</label> <input type="email" name="email" placeholder="votre mail"> <br> <br> <input type="submit" name="button" value="newsletters"> </form> PHP CODE This is insert.php file <?php $servername = "localhost"; $username = "root"; $password = "Robss123"; $dbname = "newsletter_database"; // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die("connection failed:" .$conn->connect_error); } $name = mysqli_real_escape_string($conn, $_POST['name']); $email = mysqli_real_escape_string($conn, $_POST['email']); $sql = "INSERT INTO data_user_insert (name, email) VALUES ('$name','$email')"; if ($conn->query($sql) === TRUE) { echo "Votre enregistrement à reussi"; } else { echo "Error: " . $sql . "<br>" . $conn->error; } $conn->close(); if ($_SREVER["REQUEST_METHOD"] == "POST"){ $name = test_input($_POST["name"]); $email = test_input($_POST["email"]); } function test_input ($data){ $data = trim($data); $data = stripcslashes($data); $data = htmlspecialchars($data); return $data; } ?>
  3. robsstevejobs

    Database

    hi everyone, is there anyone to help me, I created a database with PHPmyadmin with a registration form. to my surprise when I save a member the database assigned random incrementation and then it leaves empty box in database. what can I do?
  4. you can advise me which language, which I can manage easily.
  5. hello to everyone, I wanted to know how I can receive the mail in a form create by bootstrap
×
×
  • Create New...