Forums

Error when Enabling Database Storage

pjwirth 03 Mar, 2009
I have just updated my ChronoForms to Version 3.1 RC2.

The form error can be seen here: http://www.wicombatsports.com/index.php?option=com_chronocontact&chronoformname=Rankings

Here is the error I am getting, only when I enable database storage

Parse error: syntax error, unexpected '?', expecting ',' or ';' in /home/wicombat/public_html/components/com_chronocontact/chronocontact.php(41) : eval()'d code on line 19



Here is my form code
<table width="95%" border="0" cellspacing="0" cellpadding="0">
  <tr>

    <td><p>Thank you for your interest in nominating a Mixed Martial Artist or Grappler. Please be as detailed as possible with your nominations.</p>
    <br/></td>
  </tr>
</table>
<table width="95%" border="0" cellspacing="0" cellpadding="2">
 <tr>
    <td>First Name:</td>
    <td><input type="text" name="FName" id="FName" />    </td>
  </tr>
<tr>
    <td>Last Name:</td>
    <td><input type="text" name="LName" id="LName" />    </td>
  </tr>
   <tr>
    <td>E-mail:</td>
    <td><input name="Email" type="text" id="Email" size="35" />    </td>
  </tr>
  <tr>
    <td width="24%">Sport:</td>
    <td width="76%"><select name="Sport" id="Sport">
      <option selected="selected">Select One</option>
      <option>MMA</option>
      <option>BJJ & Sub-grappling</option>
    </select>    </td>
  </tr>

  <tr>
    <td>Nominee:</td>
    <td><input type="text" name="Nominee" id="Nominee" />    </td>
  </tr>
 <tr>
    <td>
Gym/Team name:</td>
    <td><input type="text" name="GymTeamname" id="GymTeamname" />    </td>
  </tr>
 <tr>
    <td>Hometown:</td>
    <td><input type="text" name="Home" id="Home" />    </td>
  </tr>
  <tr>
    <td>Weight Class:</td>
    <td><input type="text" name="Weightclass" id="Weight Class" />
</td>
  </tr>
  <tr>
    <td>Record:</td>
    <td><input type="text" name="Record" id="Record" /></td>
  </tr>
  <tr>
    <td colspan="2"></td>
  </tr>
  <tr>
    <td>Recent Wins:</td>
    <td><textarea name="Recentwins" id="Recent Wins" cols="45" rows="5"></textarea></td>
  </tr>
  <tr>
    <td>Why Nominee should be ranked?</td>
    <td><textarea name="Whynomineeshouldberanked?" id="Why Nominee should be ranked?" cols="45" rows="7"></textarea></td>
  </tr>

    <tr>
    <td colspan="2"> </td>
  </tr>

    <tr>
    <td height="59"><span class="form_element cf_captcha">
      <label class="cf_label">Type Characters you see</label>
    </span></td>



    <td><div class="form_element cf_captcha"><label class="cf_label"></label>
        <span>{imageverification}</span></div>
    </tr>

 <td><input type="submit" name="submit" value="Submit" /></td></tr>
</table>


Here is my database table as created by chronoforms
-- phpMyAdmin SQL Dump
-- version 2.11.9.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 03, 2009 at 12:11 PM
-- Server version: 5.0.67
-- PHP Version: 5.2.6

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- Database: `wicombat_joomla15`
--

-- --------------------------------------------------------

--
-- Table structure for table `jos_chronoforms_Rankings`
--

CREATE TABLE IF NOT EXISTS `jos_chronoforms_Rankings` (
  `cf_id` int(11) NOT NULL auto_increment,
  `uid` varchar(255) NOT NULL,
  `recordtime` text NOT NULL,
  `ipaddress` text NOT NULL,
  `cf_user_id` text NOT NULL,
  `FName` varchar(255) NOT NULL,
  `LName` varchar(255) NOT NULL,
  `Email` varchar(255) NOT NULL,
  `Nominee` varchar(255) NOT NULL,
  `GymTeamname` varchar(255) NOT NULL,
  `Home` varchar(255) NOT NULL,
  `Weightclass` varchar(255) NOT NULL,
  `Record` varchar(255) NOT NULL,
  `Sport` varchar(255) NOT NULL,
  `Recentwins` varchar(255) NOT NULL,
  `Whynomineeshouldberanked?` varchar(255) NOT NULL,
  PRIMARY KEY  (`cf_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `jos_chronoforms_Rankings`
--

GreyHead 03 Mar, 2009
Hiu pjwirth,

You have a ? in an input name name="Whynomineeshouldberanked?" - that's causing this problem.

Bob

There are also a few spaces in your ids - that's technically incorrect and may cause problems with form JavaScript.
pjwirth 03 Mar, 2009
Ahh I missed that one. I caught "-" and "/" but I didn't even notice the question marks. That's the last time I let someone else make a form for me :-P

Thank you for your quick response!

Regards,

Perry
This topic is locked and no more replies can be posted.