No data is added to the table

ilanziv 10 Sep, 2008
Hi there,
In my websiteshttp://www.nazareth-israel.com and http://www.israelchristiantours.com
I am using your wonderful component that i bought from you.

The form works well, i am receiving emails for everyone who is filling one, the only problem is that after I create a table, and forms are being submitted no new record are being added to the table associate with the form.
Any Idea?
Ilan.
Max_admin 10 Sep, 2008
which chronoforms version ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
ilanziv 10 Sep, 2008
I am using:
Component version 2.5 J1.5 RC3.1
Plugin 0.5
Joomla 1.5.3

Thanks,
Ilan
Max_admin 11 Sep, 2008
Hi, show me your HTML code and the auto generated code!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
ilanziv 11 Sep, 2008
Below is my HTML code, and then the auto generated code:
<div style="width:400px;dispay:table;">
     <div style="dispay:table-row;">
         <div style="dispay:table-cell;">
             <div style="width:300px;height:20px;">
                 <div style="width:100px;height:20px;float:left;font-size:10pt;font-family:Arial;">Name*:</div>
                <div style="width:200px;height:20px;float:left;"><input type="text" name="E_Name" value=""  style="width:200px;height:20px;border:1px solid silver;" /></div>
             </div>
 <div style="margin-top:18px;width:300px;height:20px;">
                <div style="width:100px;height:20px;float:left;font-size:10pt;font-family:Arial;">E-mail*:</div>
                 <div style="width:200px;height:20px;float:left;"><input type="text" name="E_mail" value=""  style="width:200px;height:20px;border:1px solid silver;" /></div>
             </div>
             <div style="margin-top:18px;width:300px;height:20px;">
                 <div style="width:100px;height:20px;float:left;font-size:10pt;font-family:Arial;">Phone:</div>
                 <div style="width:200px;height:20px;float:left;"><input type="text" name="E_Phone" value=""  style="width:200px;height:20px;border:1px solid silver;" /></div>
             </div>
              <div style="margin-top:18px;width:400px;height:25px;">
                <div style="width:100px;height:20px;float:left;font-size:10pt;font-family:Arial;">I want to book:</div>
                 <div style="width:300px;height:20px;float:left;">
                     <select name="bookwanted" id="Language" style="width:200px;">
                      <option value="8 days tour">8 Days Christian Tours</option>
                      <option value="11 days tour">11 Days Christian Tour</option>
                      <option value="Custom group tour">Custom Group Tour</option>
                      <option value="Private Tour">Private Christian Tours</option>
                     <option value="Day Tour">Day Tour</option>
                     <option value="Other">Other</option>
                     </select>
                 </div>
            </div>
             <div style="margin-top:18px;width:400px;height:25px;">
                 <div style="width:100px;height:20px;float:left;font-size:10pt;font-family:Arial;">Approx Date:</div>
                 <div style="width:300px;height:24px;float:left;">
                    <input type="text" name="month" size="2" value=""  style="width:30px;height:20px;border:1px solid silver;float:left;" />
                    <input type="text" name="day" size="2" value=""  style="width:30px;height:20px;border:1px solid silver;float:left;margin-left:6px;" />
                    <input type="text" name="year" size="4" value=""  style="width:30px;height:20px;border:1px solid silver;float:left;margin-left:6px;" />
                    <div style="width:120px;height:20px;float:left;margin-left:10px;"><span style="color:#ccc;font-size:8pt;font-family:Arial;">(mm/dd/yyyy)</span></div>
                </div>
            </div>
             <div style="margin-top:18px;width:400px;height:25px;">
                 <div style="width:160px;height:20px;float:left;font-size:10pt;font-family:Arial;">Number of Adults:</div>
                 <div style="width:300px;height:24px;float:left;">
                     <select name="adults" id="Select1" style="width:150px;">
                     <option value="1">1</option>
                     <option value="2">2</option>
                     <option value="3">3</option>
                     <option value="4">4</option>
                     <option value="5">5</option>
                     <option value="6">6</option>
                     <option value="7">7</option>
                     <option value="8">8</option>
                     <option value="9">9</option>
                     <option value="10">10</option>
                     <option value="11">11</option>
                     <option value="12">12</option>
                     <option value="13">13</option>
                     <option value="14">14</option>
                     <option value="15">15</option>
                     <option value="16">16</option>
                     <option value="17">17</option>
                     <option value="18">18</option>
                     <option value="19">19</option>
                     <option value="20">20</option>
                     <option value="21">21</option>
                     <option value="22">22</option>
                     <option value="23">23</option>
                     <option value="24">24</option>
                     <option value="25">25</option>
                     <option value="26">26</option>
                     <option value="27">27</option>
                     <option value="28">28</option>
                     <option value="29">29</option>
                     <option value="30">30</option>
                     <option value="31">31</option>
                     <option value="32">32</option>
                     <option value="33">33</option>
                     <option value="34">34</option>
                     <option value="35">35</option>
                     <option value="36">36</option>
                     <option value="37">37</option>
                     <option value="38">38</option>
                     <option value="39">39</option>
                     <option value="40">40</option>
                     <option value="41">41</option>
                     <option value="42">42</option>
                     <option value="43">43</option>
                     <option value="44">44</option>
                     <option value="45">45</option>
                     <option value="46">46</option>
                     <option value="47">47</option>
                     <option value="48">48</option>
                     <option value="49">49</option>
                     <option value="50">50</option>
                     <option value="51">50+</option>
                     </select>
                 </div>
            </div>
<div style="margin-top:18px;width:400px;height:44px;">
                <div style="width:160px;height:20px;float:left;font-size:10pt;font-family:Arial;">Number of Children:</div>
                 <div style="width:300px;height:24px;float:left;">
                     <select name="children" id="Select2" style="width:150px;">
 <option value="0">0</option>
                     <option value="1">1</option>
                     <option value="2">2</option>
                     <option value="3">3</option>
                     <option value="4">4</option>
                     <option value="5">5</option>
                     <option value="6">6</option>
                     <option value="7">7</option>
                     <option value="8">8</option>
                     <option value="9">9</option>
                     <option value="10">10</option>
                     <option value="11">11</option>
                     <option value="12">12</option>
                     <option value="13">13</option>
                     <option value="14">14</option>
                     <option value="15">15</option>
                     <option value="16">16</option>
                     <option value="17">17</option>
                     <option value="18">18</option>
                     <option value="19">19</option>
                     <option value="20">20</option>
                     <option value="21">21</option>
                     <option value="22">22</option>
                     <option value="23">23</option>
                     <option value="24">24</option>
                     <option value="25">25</option>
                     <option value="26">26</option>
                     <option value="27">27</option>
                     <option value="28">28</option>
                     <option value="29">29</option>
                     <option value="30">30</option>
                     <option value="31">31</option>
                     <option value="32">32</option>
                     <option value="33">33</option>
                     <option value="34">34</option>
                     <option value="35">35</option>
                     <option value="36">36</option>
                     <option value="37">37</option>
                     <option value="38">38</option>
                     <option value="39">39</option>
                     <option value="40">40</option>
                     <option value="41">41</option>
                     <option value="42">42</option>
                     <option value="43">43</option>
                     <option value="44">44</option>
                     <option value="45">45</option>
                     <option value="46">46</option>
                     <option value="47">47</option>
                     <option value="48">48</option>
                     <option value="49">49</option>
                     <option value="50">50</option>
                     <option value="51">50+</option>
                     </select>
                 </div>
             </div>            
            <div style="margin-top:18px;width:400px;height:100px;">
                 <div style="width:300px;height:20px;float:left;font-size:10pt;font-family:Arial;">Additional information and special requests:</div>
                 <div style="width:400px;height:80px;float:left;"><textarea name="E_content" cols="1" rows="6" style="width:300px;height:80px;"></textarea></div>
             </div>
             <div style="width:300px;height:80px;">
                 <div style="width:100px;height:80px;float:right;font-size:10pt;font-family:Arial;">
                     <input type="submit" style="margin-top:18px;float:right;width:80px;background-color:#306EFF;border:1px solid #999999;font-family:Arial;font-size:10pt;" value="Submit" />
                 </div>
             </div>
        </div>
     </div>
 </div>

<?php 
	$database =& JFactory::getDBO();
	srand((double)microtime()*10000);
	$inum	=	"I" . substr(base64_encode(md5(rand())), 0, 16);
	
$database->setQuery( "INSERT INTO #__chronoforms_7 VALUES  (
'' , '".$inum."','". date('Y-m-d')." - ".date("H:i:s")."', '".$_SERVER['REMOTE_ADDR']."' , '".JRequest::getVar('E_Name','', 'post', 'string', '' )."' , '".JRequest::getVar('E_mail','', 'post', 'string', '' )."' , '".JRequest::getVar('E_Phone','', 'post', 'string', '' )."' , '".JRequest::getVar('bookwanted','', 'post', 'string', '' )."' , '".JRequest::getVar('month','', 'post', 'string', '' )."' , '".JRequest::getVar('day','', 'post', 'string', '' )."' , '".JRequest::getVar('year','', 'post', 'string', '' )."' , '".JRequest::getVar('adults','', 'post', 'string', '' )."' , '".JRequest::getVar('children','', 'post', 'string', '' )."' , '".JRequest::getVar('E_content','', 'post', 'string', '' )."');" );
if (!$database->query()) {
echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>
";
}
?>

[[>> Blank lines removed : GreyHead <<]]
Max_admin 11 Sep, 2008
replace :

if (!$database->query()) {
echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>
";
}


with :


echo $database->getErrorMsg();


in the autogenerated and let me know if you get any errors ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
ilanziv 14 Sep, 2008
didnt receive any error,
i replaced the code and submit a test form, i received the email but the data wasnt added to the table,
Ilan
Max_admin 14 Sep, 2008
Do you have a redirect setup ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
ilanziv 15 Sep, 2008
Not sure what you mean...
If you mean a thank you page that the visitor is redirected after submitting a form, then the answer is yes.
Ilan
Max_admin 15 Sep, 2008
Hi ilan, clean the redirect url from any data, does it work now ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
ilanziv 17 Sep, 2008
OK, after I took down the redirect URL I get this error after submitting a form:

Parse error: syntax error, unexpected '}' in /home/content/i/l/a/ilanziv20/html/components/com_chronocontact/chronocontact.php(571) : eval()'d code on line 9

What to do?
Ilan
Max_admin 17 Sep, 2008
Hi ilan,

I can't see anything, try to create a new form and a new table, make the new form with 1 field only to test, if its fine then continue adding fields, I think there is some problem with your fields names.

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
ilanziv 22 Sep, 2008
I spend quite a lot of time on this problem, and this is what i know:

if i am taking out the redirect URL then the data is being added to the table, if i bring back the redirect url (the thank you page) off it go again.

Please help me it is very important to me to be able working with the tables,
thanks,
Ilan
Max_admin 22 Sep, 2008
Hi Ilan,

so you have V2.5 RC3.1 of Chronoforms ? and adding the redirect url preventing you from saving the data ?

if so then go to our downloads, get the V2.3 RC3.1 package there, unpack it, get chronocontact.php file and overwrite yours with this one and it will fix it!

Regards

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 22 Sep, 2008
Hi Max,

Silly question but have you checked the download file - I got very lost about which versions were correct and which had the error in them.

Bob
Max_admin 23 Sep, 2008
Hi Bob, I have updated the RC3.1 download file in the downloads area about 6 days ago, its marked updated since then!🙂

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
ilanziv 23 Sep, 2008
OK, finally, Thanks!
GreyHead 23 Sep, 2008
Excellent!! :-D Bob
This topic is locked and no more replies can be posted.