Guest

Untitled

By: a guest on Jan 28th, 2012  |  syntax: None  |  size: 0.69 KB  |  hits: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse
This paste has a previous version, view the difference. Copied
  1. <?php
  2. defined( '_JEXEC' ) or die;
  3.  
  4. $db = JFactory::getDBO();
  5. $fullname = JRequest::getVar('fullname');
  6. $email = JRequest::getVar('email');
  7. $company = JRequest::getVar('company');
  8. $phone = JRequest::getVar('phone');
  9. $primary_cloud = JRequest::getVar('primary_cloud');
  10. $comments = JRequest::getVar('comments');
  11. $sql ="INSERT INTO registrations(`id`, `fullname`, `email`, `company`, `phone`, `primary_cloud`, `comments`)
  12.  VALUES (NULL,".$db->quote($fullname).",".$db->quote($email).",".$db->quote($company).",".$db->quote($phone).",".$db->quote($primary_cloud).",".$db->quote($comments).")";
  13.  
  14.  $db->setQuery($sql);
  15. $db->query();
  16.  
  17. mail('something@gmail.com','subject','email body blah');
  18. ?>