Blog

Author Archive


Using PHP How to Connect, Fetch, Display, and Insert Values from/into a MySQL Database
Posted on June 19, 2015 in MySQL, PHP by Matt Jennings

In the new-connection.php file provided by Coding Dojo which allows me to connect to a MySQL database, make …

Read more


Using Hidden Input Tags in HTML and PHP for Forms
Posted on June 18, 2015 in HTML, PHP by Matt Jennings

<input type=’hidden’ name=’action’ value=’register’>

if(isset($_POST[‘action’]) && $_POST[‘action’] == ‘register’))
{
//call to validations here
}


How to Save a Random Number as a Session Variable in PHP
Posted on June 18, 2015 in PHP by Matt Jennings

<?php
session_start();

/*
If statement below saves a random number as session variable
so it won’t change when a form is submitted multiple times
until …

Read more


Sample Form Processing with Email Validation in PHP
Posted on June 18, 2015 in PHP by Matt Jennings

<?php
session_start();
$errors = array();

// If statement checks if some text has been submitted as an email and isn’t null
if(isset($_POST[’email’]) && $_POST[’email’] …

Read more


JavaScript Function(s) that Deal with Palindromes
Posted on June 17, 2015 in Algorithms, JavaScript by Matt Jennings

// Check if a string is a palindrome
function palindromeCheck(palindrome) {
var arr = palindrome.split(“”);

var reverseArr = arr.reverse();

var reverseArrJoin = reverseArr.join(“”);

if(palindrome == …

Read more