BEST HOME INVENTORY MANAGEMENT SOFTWARE FREE AND EASY

Index File

Of course, the index file is pretty simple. We just include the header, menu and footer files.

<?php include_once('header.php');?>
<?php include_once('menu.php');?>
<h1>Inventory</h1>
<p>Create account to keep track of your home inventory</p>

<?php include_once('footer.php'); ?>

Sign-up Script

Well, the first thing everyone sees on an app is a sign up page. We made this nice and easy and used a little bit of AJAX to process the script.

<?php include_once('header.php');?>
<?php include_once('menu.php');?>
<h1>Inventory Signup Page</h1>
<form>
<div class="form-group">
<label for="name">Name:</label>
<input id="name" class="form-control" type="text" placeholder="Name">
<label for="email">Email:</label>
<input id="email" class="form-control" type="email" placeholder="Email">
<label for="password">Password:</label>
<input id="pass" class="form-control" type="password" placeholder="Password">
<label for="spam">Spam Control: Type Yes in the box below</label>
<input id="spam" class="form-control" type="text" placeholder="Yes">
<button type="submit" id="submit" class="btn btn-default">Submit</button>
</div>
</form>
<div id="display"></div>
<script>
$(document).ready(function(){
$("#submit").click(function(){
var name = $("#name").val();
var email = $("#email").val();
var pass = $("#pass").val()
var spam = $("#spam").val()
var dataString = 'name1='+ name + '&email1='+ email+ '&pass1='+ pass+'&spam1='+ spam;
if(name==''||email==''||pass==''||spam=='')
{
$("#display").html("Please Fill All Fields");
}
else
{
$.ajax({
type: "POST",
url: "processor.php",
data: dataString,
cache: false,
success: function(result){
$("#display").html(result);
}
});
}
return false;
});
});
</script>
<?php include_once('footer.php'); ?>

Processor File

Here is where we process the sign ups. We enter all the data into the database, filter and sanitize it all. We also use PASSWORD_BCRYPT to create the password. Then we echo it all back to the user via AJAX. 🙂

<?php
include_once('config.php');
$name = filter_var($_POST['name1'], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH);
$email = filter_var($_POST['email1'], FILTER_SANITIZE_EMAIL, FILTER_FLAG_STRIP_HIGH);
$pass = filter_var($_POST['pass1'], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH);
$spam = filter_var($_POST['spam1'], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH);
if($spam == 'Yes'){
  $hash=password_hash($pass, PASSWORD_BCRYPT);
mysqli_query($con,"INSERT INTO users(`name`, `email`, `password`)VALUES('$name','$email','$hash')");
echo '<strong>'.$name.'</strong><br/>';
echo '<strong>'.$email.'</strong><br/>';
echo 'This is the password:<strong>'.$pass.'</strong><br/>';
echo 'This is the encrypted password: <strong>'.$hash.'</strong><br/>';
$con->close();
}else{
  echo '<div class="alert alert-danger">You need to type Yes in the spam box.</div>';
  die();
}
?>

The Zip File

I have to tell you that this would be an awfully long article so I am just going to give you all the scripts. You can go over them all and contact me if you have questions. Watch the programming video for this is you like, it is very long. Here is the zip file.

Only cool people share!

BEST HOME INVENTORY MANAGEMENT SOFTWARE FREE AND EASY was last modified: July 27th, 2022 by Maximus Mccullough
BEST HOME INVENTORY MANAGEMENT SOFTWARE FREE AND EASY

Pages:Previous 1 2 3 4

8 Comments

  • Morten Nordby says:

    Hey, very nice app. I can see that your online version is updated a lot since the first version. Is there any chance of getting do download the updated php files for the updates you have done to the inventory app?

  • Hi Maximus, i have been thinking about this app for the last week, and i have several improvements i would like to propose to you for this app. But i would really like to get my hand on the source files for your latest updated version of the app before i can start suggesting new functions and so on. And i would really like to be able to do some testing on my local installation before i send you any suggestions. So as you can see i am waiting to get my local installation upgraded to your latest version to be able to go forward with using and sending you questions about new features and so on 🙂 I hope i may get my hands on the latest source files sooner than later to be able to move forward 🙂 Kind regards, Morten

  • Andrew says:

    I added a category field in the merch table and I believe I have edited all of the relevant files to take that field into consideration. Have you thought about adding a category field to the online application?

  • Andrew says:

    OK, I see…the online application is set up so that you can enter a location or category in the location field. I just entered a separate field for the category so that there is a location and category field. As for the tags, I have to read up some more about them, as I am not sure how they really work.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.