Database suddenly not inserting things

Hey guys!

I am getting the following errors for some reason: I was able to insert things into the database but then, it stops working…

Warning in .\libraries\session.inc.php#131
session_regenerate_id(): Session object destruction failed. ID: files (path: C:\xampp\tmp)

Backtrace

.\libraries\session.inc.php#131: session_regenerate_id(boolean true)
.\libraries\common.inc.php#878: PMA_secureSession()
.\sql.php#14: require_once(.\libraries\common.inc.php)

I should explain a bit more on what I was doing… I was going through the php tutorials on youtube by mmtuts and it was all working fine but suddenly, it just stops inserting datas into the database liked it just couldn’t connect to the database… I have a few files here… The first, is my registration page…


<!DOCTYPE html>
<html>
<head>
	<title></title>
</head>
<body>
<form action="includes/signup.php" method="POST">
   <input type="text" name="first_name" placeholder="first_name">
   <br></br>
   <input type="text" name="last_name" placeholder="last_name">
   <br></br>
   <input type="text" name="email_address" placeholder="email_address">
   <br></br>
   <input type="text" name="password" placeholder="password">
   <br></br>
   <input type="text" name="confirm_password" placeholder="confirm_password">
   <br></br>
   <input type="submit" name="submit" value="Register">
</form>
</body>
</html>

This is the main page where information should be inserted into the database:

<?php


   include_once 'dbh.php';

	$token1 = 'sfdsfdsfsfsdferewgagQWEDFGRTRTRGFGDFG123245345433!~';
	$token1 = str_shuffle($token1);
	$token1 = substr($token1, 0, 10);
	



$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$email_address = $_POST['email_address'];
$password = $_POST['password'];
$confirm_password = $_POST['confirm_password'];

$sql = "INSERT INTO users (user_first, user_last, user_email, user_uid, user_pwd, token) VALUES ('$first_name', '$last_name', '$email_address', '$password','$confirm_password', '$token1');";  // needs duoble quote

mysqli_query($conn, $sql);

header('Location:../includes/activateaccount.php?signup=success');

?>

This is my activateaccount page:


<?php
include_once 'dbh.php';


?>



<!DOCTYPE html>
<html>
<head>
	<title></title>
</head>
<body>
<p> Please enter the following information to activate your account</p>
<form action='activate.php' method='POST'>
	<input type='text' name='email_address' placeholder='email_address'>
	<input type='text' name='confirm_email' placeholder='confirm_email'>
	<input type='submit' name='submit' values='activate account'>
</form>
</body>
</html>

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.