Skip to content

Instantly share code, notes, and snippets.

@sureshamk
Last active May 27, 2016 07:02
Show Gist options
  • Save sureshamk/d68ee3708897b34be20ff86f097b7c51 to your computer and use it in GitHub Desktop.
Save sureshamk/d68ee3708897b34be20ff86f097b7c51 to your computer and use it in GitHub Desktop.
if(isset($_POST['submit'])){
$firstName = isset($_POST['firstName']) ? $_POST['firstName'] : '';
$middleName = isset($_POST['middleName']) ? $_POST['middleName'] : '';
$lastName = isset($_POST['lastName']) ? $_POST['lastName'] : '';
$email = isset($_POST['email']) ? $_POST['email'] : '';
$mobile = isset($_POST['mobile']) ? $_POST['mobile'] : '';
$locations = isset($_POST['locations_list']) ? $_POST['locations_list'] : '';
$position = isset($_POST['position']) ? $_POST['position'] : '';
$message = isset($_POST['message']) ? $_POST['message'] : '';
if( ! empty($_FILES)){
if ($_FILES["file"]["size"] > 1048576){
echo "Sorry, your file is too large.";
$uploadOk = 0;
exit;
}else{
$file=$_FILES['file'];
$attachment_id = upload_user_file($file);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment