hi,
I just wanna know, how do i put the form fields data into the other database 🤨 🤨
please help me..
I just wanna know, how do i put the form fields data into the other database 🤨 🤨
please help me..
Hi sapna,
What form fields? into what other database?
Have you looked at the Database tutorial in the downloads area here?
Bob
What form fields? into what other database?
Have you looked at the Database tutorial in the downloads area here?
Bob
hi bob,
thanks for your reply.
Actually I have created a registration form with the help of chronoforms.
now i want these registration fileds, like name,lastname,age,etc.. to go into the other database. say into the contact table of sugarcrm database.
how do i do that ???
thanks for your reply.
Actually I have created a registration form with the help of chronoforms.
now i want these registration fileds, like name,lastname,age,etc.. to go into the other database. say into the contact table of sugarcrm database.
how do i do that ???
Hi sapna,
In the OnSubmit After box of ChronoForms you can enter the PHP & MySQL to write to another database - assuming that you have the appropriate permissions. I posted the Joomla code to create a connection to another database here about a week ago (not sure where now though).
Bob
In the OnSubmit After box of ChronoForms you can enter the PHP & MySQL to write to another database - assuming that you have the appropriate permissions. I posted the Joomla code to create a connection to another database here about a week ago (not sure where now though).
Bob
hi bob,
i entered the following code in Form Code tab under [On Submit code - before sending email:]
the values dint inserted into the test database. could u please check??? I also add this code in Extra after onsubmit code: dint worked :? :?
i entered the following code in Form Code tab under [On Submit code - before sending email:]
<?php
$host = 'localhost';
$port = '3306';
$dbuser = 'root';
$pass = 'root';
$con = mysql_connect("$host:$port","$dbuser","$pass");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("test", $con);
mysql_query("insert into `info` (`fname`,`lname`) values('text_7','text_8');");
?>
the values dint inserted into the test database. could u please check??? I also add this code in Extra after onsubmit code: dint worked :? :?
Hi sapna,
This looks OK, but it certainly isn't the Joomla database code that I posted. Please look that up.
Bob
This looks OK, but it certainly isn't the Joomla database code that I posted. Please look that up.
Bob
i checked most of the forums.. but could find any..
if u remember please paste it here.
will be very must thankful to you..
if u remember please paste it here.
will be very must thankful to you..
hi all,
is this possible ?? that registration fields data to pass into other database table.
is this possible ?? that registration fields data to pass into other database table.
thanks Bob,
but can u tell me how do I run mi insert query ????
and where should i write this code ??
but can u tell me how do I run mi insert query ????
and where should i write this code ??
I tried this...
dint worked ????
where am i going wrong ??
please help me out.
<?php
<?php
$options = array('host' => 'localhost', 'user' => 'root', 'password' => 'root', 'database' => 'test', 'prefix' = '', 'select' => 'info');
$db2 =& new JDatabaseMySQL($options);
?>
$db2->setQuery("insert into `info` (`fname`,`lname`) values('text_7','text_8');");
?>
dint worked ????
where am i going wrong ??
please help me out.
Hi sapna,
When you say 'didn't work' - exactly what did you test and what happened?
It is close to impossible to make any useful diagnosis from 'didn't work'. You need to add debug code at each step and check exactly what is happening.
Bob
When you say 'didn't work' - exactly what did you test and what happened?
It is close to impossible to make any useful diagnosis from 'didn't work'. You need to add debug code at each step and check exactly what is happening.
Bob
hi,
sorry i should be specific, i mean to say that the value of the id text_7 and text_8 are not getting inserted into the info table of the test database.
I also made the database connection as u said. but no result.
i also set the debug to ON.
_POST: Array ( [text_0] => aa [text_1] => aa [text_2] => [email]aa@gmail.com[/email] [text_3] => sasasa [text_6] => sasasa [text_7] => sa [text_8] => sa [undefined] => Submit [56852eccd7312bfb62310863449fa20b] => 1 ) this is what it shows me in debug.
sorry i should be specific, i mean to say that the value of the id text_7 and text_8 are not getting inserted into the info table of the test database.
I also made the database connection as u said. but no result.
i also set the debug to ON.
_POST: Array ( [text_0] => aa [text_1] => aa [text_2] => [email]aa@gmail.com[/email] [text_3] => sasasa [text_6] => sasasa [text_7] => sa [text_8] => sa [undefined] => Submit [56852eccd7312bfb62310863449fa20b] => 1 ) this is what it shows me in debug.
Hi sapna,
Great, glad it's working. Looks at though the Joomla version didn't work because you have a setQuery but haven't actually executed the query, needs a $db2->query(); as well.
Bob
Great, glad it's working. Looks at though the Joomla version didn't work because you have a setQuery but haven't actually executed the query, needs a $db2->query(); as well.
Bob
which code version worked?
and what steps were taken to ensure the data was written into the appropriate fields?
and what steps were taken to ensure the data was written into the appropriate fields?
I think you should start reading from this post:
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=5&t=12270&st=0&sk=t&sd=a#p21630
Cheers
Max
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=5&t=12270&st=0&sk=t&sd=a#p21630
Cheers
Max
which code is the correct one?
the poster refers to the "previous code", but I don't want to assume which one that is.
the poster refers to the "previous code", but I don't want to assume which one that is.
Hi gocasco,
the code in this post will simple create a new DB connection and DB object to a new different database (probably your CRM one) and then you can use the normal Joomla DB functions to insert the CRM data!
Regards
Max
the code in this post will simple create a new DB connection and DB object to a new different database (probably your CRM one) and then you can use the normal Joomla DB functions to insert the CRM data!
Regards
Max
This topic is locked and no more replies can be posted.