Skip to content

Instantly share code, notes, and snippets.

View Maikuolan's full-sized avatar
🎯
Still alive and quietly getting things done.

Caleb Mazalevskis Maikuolan

🎯
Still alive and quietly getting things done.
View GitHub Profile
@Maikuolan
Maikuolan / contact.php
Last active March 19, 2016 21:43 — forked from rushdimohamed09/contact.php
Refer to the included comments.
<?php
/**
* "Undefined index" means that you're trying to fetch data from a variable
* that doesn't exist (or isn't "defined"). Looking at your code here,
* personally, what I would do here, firstly, is check whether your $_REQUEST
* variables are empty, and if they're not, *then* set your $action variable,
* rather than before.
*/
if (!empty($_REQUEST['action'])) {
$action = $_REQUEST['action'];