View Single Post
  #1 (permalink)  
Old 08-08-2007, 01:46 AM
Simon66 Simon66 is offline
Junior Member
 
Join Date: Jul 2007
Posts: 6
Default Affiliate Contact form broken

The affiliate contact form doesn't seem to work.
I created this table in the database:

/*Table structure for table `xp_contacts` */

CREATE TABLE `xp_contacts` (
`id` int(6) NOT NULL auto_increment,
`fullname` varchar(255) NOT NULL default '',
`reason` text NOT NULL,
`email` varchar(100) NOT NULL default '',
`date` date default '0000-00-00',
`ip` varchar(64) default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;


And I changed the variables in 'contact.php' to $aFullname, $aEmail and $aBody. This allows the email to be saved in the database as there seemed to be a function that was ready for this.
I could not figure out how to apply a 'sendmail' function to this form as my php is not up to this level.

Any idea when this might be fixed?
Simon66

Don't worry I fixed the 'sendmail' thing by using the $gXpDb->mMailer->sendEmail function in XpMailer.php. I also added a field in the xp_contacts table of the database called affiliate_id that collects the ID from a new hidden form field called 'affiliateID'.
This gives me an ID in the email and in the database of the Affiliate who filled in the contact form. If there is no ID it must be from a new visitor enquiring about joining.

Last edited by Simon66 : 08-09-2007 at 05:57 AM. Reason: Fixed the problem
Reply With Quote