Hello everyone.
I have just bought a new computer and I am currently working on creating an online cloud storage service. Every thing is going fine until I am struck with a problem. At first, registering a new user works and the data is inserted into database but after testing it multiple times, it no loger works for some reason? The thing that struck me is that during the testing period, I did not tamper with any of the codes. After 5 tests, when a new user tries to register, the website says there are no errors but after going into my phpmyadmin, there is nothing there. I have tried everything and I don't know what to do! Please Help
CODE:
signup.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">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" href="assets/ico/favicon.png">
<title>GetConnect Unlimited File Hosting</title>
<link href="assets/css/hover_pack.css" rel="stylesheet">
<!-- Bootstrap core CSS -->
<link href="assets/css/bootstrap.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="assets/css/main.css" rel="stylesheet">
<link href="assets/css/colors/color-74c9be.css" rel="stylesheet">
<link href="assets/css/animations.css" rel="stylesheet">
<link href="assets/css/font-awesome.min.css" rel="stylesheet">
<!-- JavaScripts needed at the beginning
================================================== -->
<script type="text/javascript" src="http://alvarez.is/demo/marco/assets/js/twitterFetcher_v10_min.js"></script>
<!-- MAP SCRIPT - ALL CONFIGURATION IS PLACED HERE - VIEW OUR DOCUMENTATION FOR FURTHER INFORMATION -->
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyASm3CwaK9qtcZEWYa-iQwHaGi3gcosAJc&sensor=false"></script>
<script type="text/javascript">
// When the window has finished loading create our google map below
google.maps.event.addDomListener(window, 'load', init);
function init() {
// Basic options for a simple Google Map
// For more options see: https://developers.google.com/maps/documentation/javascript/reference#MapOptions
var mapOptions = {
// How zoomed in you want the map to start at (always required)
zoom: 11,
scrollwheel: false,
// The latitude and longitude to center the map (always required)
center: new google.maps.LatLng(40.6700, -73.9400), // New York
// How you would like to style the map.
// This is where you would paste any style found on Snazzy Maps.
styles: [ { featureType:'water', stylers:[{color:'#74c9be'},{visibility:'on'}] },{ featureType:'landscape', stylers:[{color:'#f2f2f2'}] },{ featureType:'road', stylers:[{saturation:-100},{lightness:45}] },{ featureType:'road.highway', stylers:[{visibility:'simplified'}] },{ featureType:'road.arterial', elementType:'labels.icon', stylers:[{visibility:'off'}] },{ featureType:'administrative', elementType:'labels.text.fill', stylers:[{color:'#444444'}] },{ featureType:'transit', stylers:[{visibility:'off'}] },{ featureType:'poi', stylers:[{visibility:'off'}] }]
};
// Get the HTML DOM element that will contain your map
// We are using a div with id="map" seen below in the <body>
var mapElement = document.getElementById('map');
// Create the Google Map using out element and options defined above
var map = new google.maps.Map(mapElement, mapOptions);
}
</script>
<!-- Main Jquery & Hover Effects. Should load first -->
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="assets/js/hover_pack.js"></script>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
</head>
<body>
<! ========== HEADERWRAP ====================================================================================================
=============================================================================================================================>
<div id="headerwrap">
<div class="container">
<div class="row centered">
<div class="col-lg-8 col-lg-offset-2 mt">
<h1 class="animation slideDown">Please complete the following form to signup for our service.</h1>
<form name="register" action="registerprocess.php" method="post">
<tr>
<td>USERNAME:</td>
<td><input type="text" name="username" maxlength="20" /></td>
</tr>
<tr>
<td>PASSWORD:</td>
<td><input type="password" name="password1" /></td>
</tr>
<tr>
<td>EMAIL:</td>
<td><input type="text" name="email" id="email" /></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" value="Register" /></td>
</tr>
</form>
</div>
</div><!-- /row -->
</div><!-- /container -->
</div> <!-- /headerwrap -->
<! ========== BLOG POSTS ====================================================================================================
=============================================================================================================================>
<! ========== CALL TO ACTION 1 ==============================================================================================
<! ========== PORTFOLIO SECTION =============================================================================================
=============================================================================================================================>
<! ========== BRANDS & CLIENTS ===============================================================================================
=============================================================================================================================>
<! ========== BLACK SECTION =================================================================================================
=============================================================================================================================>
<div id="black">
<div class="container">
<div class="row mt centered">
<div class="col-lg-4 col-lg-offset-4">
<h3>Our Work Process</h3>
<hr>
</div><!-- /col-lg-4 -->
</div><!-- /row -->
<div class="row mt">
<div class="col-lg-8 col-lg-offset-2">
<p>We strive to ensure you get the cloud storage space you deserve. What ever your needs, you can trust GetConnect as your #1 cloud service!</p>
</div><! --/col-lg-8 -->
</div><!-- /row -->
</div><!-- /container -->
</div><!-- /black -->
<! ========== FOOTER ========================================================================================================
=============================================================================================================================>
<div id="f">
<div class="container">
<div class="row">
<!-- ADDRESS -->
<div class="col-lg-3">
<h4>Somewhere</h4>
<p>
Planet Earth,<br/>
</p>
<p>
<i class="fa fa-mobile"></i> <br/>
<i class="fa fa-envelope-o"></i> shay05@sherborneq.org
</p>
</div><! --/col-lg-3 -->
<!-- TWEETS -->
<div class="col-lg-3">
<h4>Recent Tweets</h4>
<div id="showtweets"></div>
<script>
twitterFetcher.fetch('258157205101088768', 'showtweets', 2, true, false, false, '', false, handleTweets, false);
function handleTweets(tweets){
var x = tweets.length;
var n = 0;
var element = document.getElementById('showtweets');
var html = '<ul>';
while(n < x) {
html += '<li>' + tweets[n] + '</li>';
n++;
}
html += '</ul>';
element.innerHTML = html;
}
</script>
<p>Follow us <b>@shayandoust</b></p>
</div><!-- /col-lg-3 -->
<!-- LATEST POSTS -->
<div class="col-lg-3">
<h4>Latest Posts</h4>
<p>
<i class="fa fa-angle-right"></i> Just opened the service!<br/>
</p>
</div><!-- /col-lg-3 -->
</div><! --/row -->
</div><!-- /container -->
</div><!-- /f -->
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/retina.js"></script>
<script>
$(window).scroll(function() {
$('.si').each(function(){
var imagePos = $(this).offset().top;
var topOfWindow = $(window).scrollTop();
if (imagePos < topOfWindow+400) {
$(this).addClass("slideUp");
}
});
});
</script>
</body>
</html>
registerprocess.php
<?php
$username = $_POST['username'];
$password1 = $_POST['password1'];
$email = $_POST['email'];
$con=mysqli_connect("db4free.net","-CENSORED USERNAME-","-CENSORED PASSWORD-","projectbook");
// Check connection
if (mysqli_connect_error()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
mysqli_query($con,"INSERT INTO member (name, password, email)
VALUES ('$name', '$password', '$email')");
mysqli_close($con);
?>
I WOULD APPRECIATE ANY HELP!