
Untitled
By: a guest on Jan 28th, 2012 | syntax:
None | size: 0.69 KB | hits: 20 | expires: Never
<?php
defined( '_JEXEC' ) or die;
$db = JFactory::getDBO();
$fullname = JRequest::getVar('fullname');
$email = JRequest::getVar('email');
$company = JRequest::getVar('company');
$phone = JRequest::getVar('phone');
$primary_cloud = JRequest::getVar('primary_cloud');
$comments = JRequest::getVar('comments');
$sql ="INSERT INTO registrations(`id`, `fullname`, `email`, `company`, `phone`, `primary_cloud`, `comments`)
VALUES (NULL,".$db->quote($fullname).",".$db->quote($email).",".$db->quote($company).",".$db->quote($phone).",".$db->quote($primary_cloud).",".$db->quote($comments).")";
$db->setQuery($sql);
$db->query();
mail('something@gmail.com','subject','email body blah');
?>