Skip to content

Instantly share code, notes, and snippets.

@fredgibbs
fredgibbs / simpleform.php
Created September 19, 2012 14:37
PHP array help
<?
function displayData() {
$mysqli = new mysqli('localhost', 'telahaus_clio3', 'clio3Rocks!', 'telahaus_clio3');
$query = "SELECT id, name FROM battle";
$result = $mysqli->query($query);
while($row = $result->fetch_row()) {
printf("%s: <strong>%s</strong><br>", $row[0], $row[1]);
@mebrett
mebrett / person_insert
Created September 19, 2012 01:49
Form to insert new person data into the database maury1
<?php
//connect to database
$con = mysql_connect('localhost', 'root', 'root');
//check connection
if (!$con) {
die('Could not connect');}
/*else{echo 'Success';}*/
mysql_select_db('maury1');
@sashaca2
sashaca2 / The Form
Created September 17, 2012 03:12
Development Database in Progress
<html>
<head>
<title>Update Cartoon Database</title>
</head>
<body>
<h2>Add New Cartoon to Database</h2>
<form method="post" action="updatedev.php">
<?php include 'connect-db.php'?>