Skip to content

Instantly share code, notes, and snippets.

@dvaisman
dvaisman / 4-7 HUAC
Last active August 29, 2015 14:18
DH HUAC Code Gist for 4-7-15
//PHP ACTION FORM
//conditional statement to execute block
//Example: if user selects 'witness type'(key) and 'friendly'(value), send query to DocCloud API
//QUESTIONS ON CONDITIONALS IN PHP:
// Knowing that the function: if (condition) {
// code to be executed if condition is true;
// if ($x == $y) {
//will this be read as: if x and y have same key/value pair, return true?
@dvaisman
dvaisman / 4-7 HUAC
Created April 7, 2015 21:30
DH HUAC Code Gist for 4-7-15
//PHP ACTION FORM
//conditional statement to execute block
//Example: if user selects 'witness type'(key) and 'friendly'(value), send query to DocCloud API
//QUESTIONS ON CONDITIONALS IN PHP:
// Knowing that the function: if (condition) {
// code to be executed if condition is true;
// if ($x == $y) {
//will this be read as: if x and y have same key/value pair, return true?
<!DOCTYPE html>
<html>
<body>
## This function will read the contents of a text. However, needs to
## be passed through DocumentCloud first
<?php
$myfile = fopen("docCloudText.txt", "r") or die("Unable to open file!");
echo fread($myfile,filesize("docCloudText.txt"));
<!DOCTYPE html>
<html>
<body>
## This function will read the contents of a text. However, needs to
## be passed through DocumentCloud first
<?php
$myfile = fopen("docCloudText.txt", "r") or die("Unable to open file!");
echo fread($myfile,filesize("docCloudText.txt"));
@dvaisman
dvaisman / display.php
Created March 28, 2015 20:44
Display
<html>
<body>
<form action="welcome.php" method="post">
FirstName: <input type="text" name="firstname"><br>
LastName: <input type="text" name="lasatname"><br>
<input type="submit">
</form>
</body>