Commit 65f819ed by yuward

m

parent 14076830
...@@ -44,29 +44,6 @@ if ($_POST['submit']) { ...@@ -44,29 +44,6 @@ if ($_POST['submit']) {
mysqli_close($link); mysqli_close($link);
} }
function area_options()
{
$area_options = array(
"square_inches" => 0.0254,
"square_feet" => 0.3048,
"square_yards" => 0.9144,
"square_miles" => 1609.344,
"square_millimeters" => 0.001,
"square_centimeters" => 0.01,
"square_meters" => 1,
"square_kilometers" => 1000,
"acres" => 63.614907234075,
"hectares" => 100
);
$choice = '';
while (list($k, $v) = each($area_options)) {
$choice .= '<option value = "' . $k . '">' . $k . '</option>';
}
return $choice;
}
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
......
<?php <?php
function length_options(){ function length_options(){
$selected = 'selected'; $selected = 'selected';
$length_options = array( $length_options = array(
"inches" => 0.0254, "inches" => 0.0254,
...@@ -21,4 +21,25 @@ function length_options(){ ...@@ -21,4 +21,25 @@ function length_options(){
return $choice; return $choice;
} }
function area_options()
{
$area_options = array(
"square_inches" => 0.0254,
"square_feet" => 0.3048,
"square_yards" => 0.9144,
"square_miles" => 1609.344,
"square_millimeters" => 0.001,
"square_centimeters" => 0.01,
"square_meters" => 1,
"square_kilometers" => 1000,
"acres" => 63.614907234075,
"hectares" => 100
);
$choice = '';
while (list($k, $v) = each($area_options)) {
$choice .= '<option value = "' . $k . '">' . $k . '</option>';
}
return $choice;
}
?> ?>
\ No newline at end of file
<?php <?php
if (file_exists('dbconnect.php')) { if (file_exists('dbconnect.php')) {
require('dbconnect.php'); require('dbconnect.php');
if (mysqli_connect_error()) { if (mysqli_connect_error()) {
die('Connect Error (' . mysqli_connect_errno() . ')' . mysqli_connect_error()); die('Connect Error (' . mysqli_connect_errno() . ')' . mysqli_connect_error());
} }
} }
//Add function file //Add function file
if (file_exists('../includes/functions.php')) { if (file_exists('../includes/functions.php')) {
require_once('../includes/functions.php'); require_once('../includes/functions.php');
...@@ -145,7 +145,7 @@ $temp_options = array( ...@@ -145,7 +145,7 @@ $temp_options = array(
$opt = optionize($unit); $opt = optionize($unit);
echo "<option value=\"{$opt}\""; echo "<option value=\"{$opt}\"";
if ($from_unit == $opt) { if ($from_unit == $opt) {
echo " selected"; echo "selected";
} }
echo ">{$unit}</option>"; echo ">{$unit}</option>";
} }
......
...@@ -18,8 +18,8 @@ Simple, Fancy and Currency conversion ...@@ -18,8 +18,8 @@ Simple, Fancy and Currency conversion
<meta name="description" content="Unit Calc."> <meta name="description" content="Unit Calc.">
<meta name="author" content="Yusef,Zeyad"> <meta name="author" content="Yusef,Zeyad">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--Browsing for Tablet or Phone dimensions-->
<!--Browsing for Tablet or Phone dimensions-->
<link rel="stylesheet" href="css/style.css"/> <link rel="stylesheet" href="css/style.css"/>
<style> <style>
@import url('https://fonts.googleapis.com/css?family=Passion+One|Roboto+Slab'); @import url('https://fonts.googleapis.com/css?family=Passion+One|Roboto+Slab');
......
...@@ -68,9 +68,9 @@ function protect($string){ ...@@ -68,9 +68,9 @@ function protect($string){
$("#login").on('click',function(){ $("#login").on('click',function(){
var username = $("#username").val(); var username = $("#username").val();
var email = $("#email").val(); var email = $("#email").val();
var password= $("#password").val(); var password = $("#password").val();
var continue = $("#continue").val(); var continue = $("#continue").val();
if (email == "" && password == "" && username == "") if (email.length == 0 && password.length == 0 && username.length == 0)
alert('Please check input'); alert('Please check input');
//continue; //continue;
else{ else{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment