Skip to content

Instantly share code, notes, and snippets.

View websmith's full-sized avatar

Nate Cornelius websmith

View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="x-apple-disable-message-reformatting">
<title>Camp Gladiator</title>
<select>
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DE">Delaware</option>
<option value="DC">District Of Columbia</option>
<?php
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
else {
$sql = "SELECT `Event_ID`, `Event_Name` FROM `Events_Catalog`";
$result = mysqli_query($conn, $sql);
if (mysqli_num_rows($result) > 0) {
// output data of each row
while($row = mysqli_fetch_assoc($result)) {
<div role="main" class="ui-content">
<?php
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
else {
$sql = "SELECT Event_ID, Event_Name FROM Events_Catalog";
$result = mysqli_query($conn, $sql);
if (mysqli_num_rows($result) > 0) {
// output data of each row
<?php
if(isset($_POST['submit'])) {
// Save the values of all of our form data as variables
$username = $_POST['username'];
$email = $_POST['email'];
$message = $_POST['message'];
//Validate $username
<form>
<label style="font-weight: bold; padding: 15px 0px;" for="slider">Number of guests</label>
<input type="range" name="slider" id="slider" data-highlight="true" min="50" max="1000" value="50">
<fieldset data-role="control-group" id="cuisine-choices">
<legend style="font-weight: bold; padding: 15px 0px;">Choose your cuisine</legend>
<input type="radio" name="cuisine-choice" id="cuisine-choice-cont" value="15" checked="checked" />
<label for="cuisine-choice-cont">Continental</label>
<input type="radio" name="cuisine-choice" id="cuisine-choice-mex" value="12" /><label for="cuisine-choice-mex">Mexican</label>
<input type="radio" name="cuisine-choice" id="cuisine-choice-ind" value="14" /><label for="cuisine-choice-ind">Indian</label>
</fieldset>
@websmith
websmith / us-state-names-abbrevs.php
Created January 28, 2016 15:22 — forked from maxrice/us-state-names-abbrevs.php
US State Names & Abbreviations as PHP Arrays
<?php
/* From https://www.usps.com/send/official-abbreviations.htm */
$us_state_abbrevs_names = array(
'AL'=>'ALABAMA',
'AK'=>'ALASKA',
'AS'=>'AMERICAN SAMOA',
'AZ'=>'ARIZONA',
'AR'=>'ARKANSAS',
@websmith
websmith / Contract Killer 3.md
Last active August 29, 2015 14:26 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@websmith
websmith / wp.sh
Last active August 29, 2015 14:07 — forked from bgallagh3r/wp.sh
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Database Name: "
read -e dbname
echo "Database User: "
read -e dbuser
@websmith
websmith / wpdbinstall.sh
Last active August 29, 2015 14:06
Installs parts required for Wordpress install and sets up the database
echo -e '\E[1;33;44m' "Install php mysql and apache services"; tput sgr0
parts install php5 php5-apache2 php5-pdo-mysql php5-zlib mysql
echo -e '\E[1;33;44m' "Start the apache and mysql services"; tput sgr0
parts start apache2 mysql
echo -e '\E[1;33;44m' "Create the MySQL database that WP will use"; tput sgr0
# This script uses the default password 'password' - IT IS NOT SECURE!
echo "CREATE DATABASE wordpress;" > msqlcmds.txt
echo "USE wordpress;" >> msqlcmds.txt