Jump to content

edward1111

New Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by edward1111

  1. <?php $servername = "localhost"; $username = "username"; $password = "password"; $dbname = "myguests"; // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } // sql to create table $sql = "CREATE TABLE MyGuests ( id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, email VARCHAR(50), reg_date TIMESTAMP )"; if ($conn->query($sql) === TRUE) { echo "Table MyGuests created successfully"; } else { echo "Error creating table: " . $conn->error; } $conn->close(); ?>
  2. yeah I started it. ill upload give me a few mins.
  3. I am trying to connect to my database on xammp, Im trying to find info how to connect and set up for people that sign in to my website they can regsiter for it.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.