This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
if ( !isset( $_SESSION[ 'bestellingen' ] ) ) | |
$_SESSION[ 'bestellingen' ] = array(); | |
if ( isset( $_POST[ 'leegmaken' ) ) | |
{ | |
$_SESSION[ 'bestellingen' ] = array(); | |
} | |
elseif ( isset( $_POST[ 'product_id' ] ) ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$database_connectie = new MySQLi( | |
'localhost' , 'root' , '' , 'webwinkel' | |
); | |
$id = $database_connectie->real_escape_string( $_GET[ 'id' ] ); | |
$sql = "SELECT * FROM `producten` WHERE product_id='$id' LIMIT 1 "; | |
$resultaat = $database_connectie->query( $sql ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php # | |
# meer informatie over MySQLi is te vinden op http://php.net/mysqli | |
# Verbinding maken met de database. | |
$database_connectie = new MySQLi( | |
# verbindingsgegevens: host, database-username, database-userpassword, database-name | |
'localhost' , 'root' , '' , 'webwinkel' | |
); | |
# Vraag klaarzetten die aan databaseserver gesteld gaat worden | |
$sql = "SELECT * FROM `producten` LIMIT 0, 30 "; | |
# Vraag aan databaseserver stellen en antwoord onthouden/opslaan in variabele $resultaat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Naam-ding</title> | |
<script type="text/javascript"> | |
var naam = function () | |
{ | |
var geefNaam = function ( e ) | |
{ | |
var naam = document.getElementById( 'naam' ).value; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file IfException.php | |
* @author | |
* - immeëmosol (programmer dot willfris at nl) | |
* @date 2011-09-22 | |
* Created: ĵaŭ 2011-09-22, 02:14.46 CEST | |
* Last modified: ĵaŭ 2011-09-22, 05:02.52 CEST | |
**/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Updated: 2010/12/05 | |
// | |
// the regular expression composed & commented | |
// could be easily tweaked for RFC compliance, | |
// it was expressly modified to fit & satisfy | |
// these test for an URL shortener: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" some things are probably in this file twice, some don't work. | |
" furthermore i expect the following files and directories to exist: | |
" ~/.vim/backups | |
" ~/.vim/swap_files | |
" ~/.vim/skeletons ( in it files: my.phtml my.php my.class.php my.js | |
" in the files certain character-sequences are expected, e.g. <CLASS_NAME> | |
" too find the other sequences and or places where these paths are used the following regex can be used | |
" (search for a regex in vim by typing a forward slash `/` in "normal mode", | |
" after that you can type the following( wihtout the leading double quote `"` and space ` ` of course): | |
" \~\/\.vim |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
** @file autoloader.inc.php | |
** @author immeëmosol (programmer dot willfris at nl) | |
** @date 2010-12-06 | |
** Created: lun 2010-12-06, 14:05.13 CET | |
** Last modified: lun 2010-12-06, 15:19.01 CET | |
**/ | |
$classes_directory = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'classes'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Note: You'll need PHP5.3 to run this script! | |
*/ | |
/* | |
* Patterns originate from http://mathiasbynens.be/demo/url-regex | |
* | |
* Note: None of the patterns had the S-modifier. I added it to speed up the tests. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
set_include_path( './classes/' . PATH_SEPARATOR . get_include_path() ); | |
spl_autoload_extensions( '.php , .class.php' ); | |
spl_autoload_register(); | |
function linux_namespaces_autoload ( $class_name ) | |
{ | |
/* use if you need to lowercase first char * | |
$class_name = implode( DIRECTORY_SEPARATOR , array_map( 'lcfirst' , explode( '\\' , $class_name ) ) );/* else just use the following : */ | |
$class_name = implode( DIRECTORY_SEPARATOR , explode( '\\' , $class_name ) ); | |
static $extensions = array(); |