[SOLVED] Problem Saving Data

pidex 20 Sep, 2008
Hi All

I have installed chronoform and it has issue whenever I submit my form the data doesn't saved in any of the form I have created. It mails the details but it doesn't saves the data.

Please help as soon as possible as the site is live.. I dont know what I am missing


Thanks for allyour help

Thanks
Hemal Jivani
GreyHead 20 Sep, 2008
Hi pidex,

Have you created a table to save the data?

Bob
pidex 20 Sep, 2008
Hi Bob

The forms are there but only data doesn't get inserted.

Thanks
GreyHead 20 Sep, 2008
Hi pidex,

Hard to say without more information. If you've created a table then I guess there's something odd with the way the data is being returned.

Can you take a backup copy of the form from the Form Manager and post it here please.

Bob
pidex 20 Sep, 2008
Hi Bob
Hereby I am attaching all the forms back up. But the issue is that it is not saving even a single form I have created around 4 forms and none of them work.

I think I might not be missing something in configuration.

Thanks
Hemal Jivani
GreyHead 20 Sep, 2008
Hi pidex,

The form you attached works fine and the data is saved OK.

So back to my original question - have you created a table to save the data?

Bob
pidex 20 Sep, 2008
Hi Bob

Find attached scripts for the DB of the Chronoforms

Pelase let me know if somethingis wrong.

Thanks
Hemal
GreyHead 20 Sep, 2008
Hi Hemal,

I dont' see anything wrong there. This suggests that there is a MySQL error, the best way to test is to modify the Autogenerated code to display the sql in debug mode and then put the sql manually into PHPMyAdmin or EasySQL

Bob
pidex 20 Sep, 2008
Hi Bob

Thanks for all your support and efforts but this sounds me weird as it happens with all the forms I have. Anyways I will debug and let you know if found some thing.

Thanks again for all your support.


Thanks
Hemal Jivani
GreyHead 20 Sep, 2008
Hi Hemal,

Which version of MySQL do you have? There is a problem with one version - 3 maybe?? and you can use the MySQL engine in the General tab to switch from ENGINE to TYPE in some MySQL statement. But I think this only affects the CREATE statements and those seem to have worked OK.

Bob
Max_admin 20 Sep, 2008
Hi pidex,

I see you have an old version of Chronoforms, if you don't have alot of forms with this one then you should consider upgrading to V3!

Regards

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

Found the issue

in the loop
for($ixx = 1 ; $ixx <= 3; $ixx++){


there is the code like this


                       /**
			 * Run the SQL query if there is one
			 */
                       if($paramsvalues->autogenerated_order == $ixx){
				if ( !empty($rows[0]->autogenerated) ) {
					if(!eval( "?>".$rows[0]->autogenerated )){
						echo "error ocurred";
					}
					//echo $rows[0]->autogenerated;
				}
			}
	
		       /**
			 * Redirect the page if requested
			*/	 
			if ( !empty($rows[0]->redirecturl) ) {
					$mainframe->redirect($rows[0]->redirecturl);
			}
			


Change this to like this it will work


                        /**
			 * Run the SQL query if there is one
			 */
                       if($paramsvalues->autogenerated_order == $ixx){
				if ( !empty($rows[0]->autogenerated) ) {
					if(!eval( "?>".$rows[0]->autogenerated )){
						echo "error ocurred";
					}
					//echo $rows[0]->autogenerated;
				}
			}
	
		       /**
			 * Redirect the page if requested
			*/
                       if($paramsvalues->autogenerated_order == $ixx){	 
			    if ( !empty($rows[0]->redirecturl) ) {
					$mainframe->redirect($rows[0]->redirecturl);
			    }
                       }


This will work fine. The problem is that the query get executed when $paramsvalues->autogenerated_order && $ixx are equal i.e. generally 3rd pass of the loop. And the Redirections happens in the earlier pass thats the issue. if you put the same condition upone rediredction it will work fine.

Thanks Guys For all your support And help

Regards
Hemal Jivani
Pidex Solutions
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger