hello
I am having form named jos_consumer stored in jos_ folder of mysql in xampplite folder. I need to connect to this form using chronoform. Can someone help me with this. How to connect to this databse using chronoform. What php cosed to write and where to put them in chronoform?
regards
I am having form named jos_consumer stored in jos_ folder of mysql in xampplite folder. I need to connect to this form using chronoform. Can someone help me with this. How to connect to this databse using chronoform. What php cosed to write and where to put them in chronoform?
regards
Hi muskan,
If I understand correctly I think you can do this with the DB Connection tab. Please take a look and check.
Bob
If I understand correctly I think you can do this with the DB Connection tab. Please take a look and check.
Bob
hello Bob
Have created one table using DB connection tab.
But i need to connect 1 more table to be connected to the same form.
I have one form named chronoform_drop_list and table connected with it is jos_chronoform_drop_list created using create table tab
I have second form named chronoform_merchant_form and table connected with it is jos_chronoform_merchant_form created using create table tab
Now i need to use this merchant_form table after submission of drop_list form
I have gone through other similar posts and have come to know that need to do write php codes for database connection in "onsubmit after" area of form code in drop_list form.
But i find php used in joomla is different from normal php....is there any tutorial available for it??
Have pasted this code in "onsubmit after" area of drop_list form
But data in merchant form is not getting updated....
Thanking you in anticipation
Have created one table using DB connection tab.
But i need to connect 1 more table to be connected to the same form.
I have one form named chronoform_drop_list and table connected with it is jos_chronoform_drop_list created using create table tab
I have second form named chronoform_merchant_form and table connected with it is jos_chronoform_merchant_form created using create table tab
Now i need to use this merchant_form table after submission of drop_list form
I have gone through other similar posts and have come to know that need to do write php codes for database connection in "onsubmit after" area of form code in drop_list form.
But i find php used in joomla is different from normal php....is there any tutorial available for it??
Have pasted this code in "onsubmit after" area of drop_list form
<?php
global $row_chronocontact_merchant_form;
$cf_id = $row_chronocontact_merchant_form->cf_id;
$db =& JFactory::getDBO();
$query = "
UPDATE `#__merchant_form`
SET `m_name` = 'khushboo' where `m_name` = 'Mukta' and
`cf_id` = $cf_id;";
$db->setQuery($query);
$db->query();
?>
But data in merchant form is not getting updated....
Thanking you in anticipation
Now i need to use this merchant_form table after submission of drop_list form
how ? tell me how you want to use it ? insert or update some record ? the example you copied the code from had only 1 form for 2 tables, not 2 forms!
Cheers
Max
hello
yes i need to use two tables from 1 form...after submission of drop_list form(which is asking for consumer's details), consumers entries will be inserted into drop_list form(which i have already created using DB connection tab of chronoform and data is also inserted enabling storage) and after drop_list form submission i need to update my merchant table(stored in jos_ folder) -----> so here i need to connect to this second table using php codes.
Your early help will be highly appreciated.
regards
yes i need to use two tables from 1 form...after submission of drop_list form(which is asking for consumer's details), consumers entries will be inserted into drop_list form(which i have already created using DB connection tab of chronoform and data is also inserted enabling storage) and after drop_list form submission i need to update my merchant table(stored in jos_ folder) -----> so here i need to connect to this second table using php codes.
Your early help will be highly appreciated.
regards
Could someone please atleast tell me from where i can get any tutorial for PHP in joomla. PHP used in joomla seems to be quite different from normal PHP... like whats the use of JFACTORY ??
I need to write my own PHP code in the onsubmit area of chronoforms for database connection. Codes written in normal PHP aren't working. Please help 😢
I need to write my own PHP code in the onsubmit area of chronoforms for database connection. Codes written in normal PHP aren't working. Please help 😢
Hi muskan,
Sorry I haven't got to your post yet. It's Sunday evening here now and I may not get there until tomorrow.
Meanwhile Google is your friend - try Joomla +JFactory
Bob
Sorry I haven't got to your post yet. It's Sunday evening here now and I may not get there until tomorrow.
Meanwhile Google is your friend - try Joomla +JFactory
Bob
Hi muskan,
Sorry for the delay in replying.
Your code looks OK to me; with the possible exception of one set of quotes round $cf_id:
Joomla 1.5 has built in some Object Patterns; JFactory is a implementation of the Factory Pattern and is used to provide a range of objects to the code. For example JFactory::getDBO() gives you full access to the DB object instead of having to build it from scratch as you would in plain PHP.
The same route gives you JFactory::getUser(), JFactory::getSession(), etc. There's a full list in the Joomla Wiki here.
Most of the Joomla methods are aimed at making life simpler, or more secure (e.g. JRequest::getVar), or more consistent for Joomla Developers. ChronoForms is pretty unusual in giving you more or less free access to adding code into Joomla through a structured interface so it helps to know some Joomla code when you use it. Plain PHP will also work but may well be risker and certainly ends up with longer code.
There are two main places to look for Joomla docs (a) in the wiki which I linked to above, this was a bit thin but is being added to all the time (I put in a page on db methods a week or so back) and (b) the Joomla API Refernce this is a complete documentation of the core Joomla code but can be a bit daunting until you know your way around.
There are of course also a bunch of tutorials around - of varying quality Joe LeBlanc's are pretty good.
Hope this helps.
Bob
Sorry for the delay in replying.
Your code looks OK to me; with the possible exception of one set of quotes round $cf_id:
<?php
global $row_chronocontact_merchant_form;
$cf_id = $row_chronocontact_merchant_form->cf_id;
$db =& JFactory::getDBO();
$query = "
UPDATE `#__merchant_form`
SET `m_name` = 'khushboo'
WHERE `m_name` = 'Mukta'
AND `cf_id` = '$cf_id';
";
$db->setQuery($query);
$db->query();
?>
There are some other Joomla 1.5 functions that can manage some of this for you. Here's a fuller version of the query:$query = "
UPDATE `#__merchant_form`
SET $db->nameQuote('m_name') = $db->quote('khushboo')
WHERE $db->nameQuote('m_name') = $db->quote('Mukta')
AND $db->nameQuote('cf_id') = $db->quote($cf_id);
";
Joomla 1.5 has built in some Object Patterns; JFactory is a implementation of the Factory Pattern and is used to provide a range of objects to the code. For example JFactory::getDBO() gives you full access to the DB object instead of having to build it from scratch as you would in plain PHP.
The same route gives you JFactory::getUser(), JFactory::getSession(), etc. There's a full list in the Joomla Wiki here.
Most of the Joomla methods are aimed at making life simpler, or more secure (e.g. JRequest::getVar), or more consistent for Joomla Developers. ChronoForms is pretty unusual in giving you more or less free access to adding code into Joomla through a structured interface so it helps to know some Joomla code when you use it. Plain PHP will also work but may well be risker and certainly ends up with longer code.
There are two main places to look for Joomla docs (a) in the wiki which I linked to above, this was a bit thin but is being added to all the time (I put in a page on db methods a week or so back) and (b) the Joomla API Refernce this is a complete documentation of the core Joomla code but can be a bit daunting until you know your way around.
There are of course also a bunch of tutorials around - of varying quality Joe LeBlanc's are pretty good.
Hope this helps.
Bob
hey bob
thanks a lot for your reply..!!!
i have changed the query code as you have mentioned...but still i am getting the following error...😢
these are the entries which i have filled for form drop_list after which i need to update merchant_form
thanks a lot for your reply..!!!
i have changed the query code as you have mentioned...but still i am getting the following error...😢
_POST: Array ( [Name] => mukta [Email] => [email]muktagup@gmail.com[/email] [Phone_Number] => 12344 [City] => New Delhi [Area] => Rohini [Item] => Clothes [Brand] => United Colors Of Benetton [radio0] => 10 [radio3] => 1000 - 5000 [date_11] => )
these are the entries which i have filled for form drop_list after which i need to update merchant_form
Hi muskan,
I don't think that's an error, you probably have debug turned on in the General tab.
Bob
I don't think that's an error, you probably have debug turned on in the General tab.
Bob
hello bob
ya you are right debug is on, but the entries in merchant form is not getting updated.....it is still the same m_name is not getting changed from 'Mukta' to 'Khushboo' :?
regards
ya you are right debug is on, but the entries in merchant form is not getting updated.....it is still the same m_name is not getting changed from 'Mukta' to 'Khushboo' :?
regards
hello
pls can anybody solve my query..!!...i need to submit my project in 2-3 days..!!...and can't change the platform now....
pls someone tell me the php codes used in chronoform to connect to database and write sql queries(pls don't tell me about that DB connection tab, i know about it....i need PHP codes).....
i will be highly grateful if anyone can help me as soon as possible..!!
regards
pls can anybody solve my query..!!...i need to submit my project in 2-3 days..!!...and can't change the platform now....
pls someone tell me the php codes used in chronoform to connect to database and write sql queries(pls don't tell me about that DB connection tab, i know about it....i need PHP codes).....
i will be highly grateful if anyone can help me as soon as possible..!!
regards
Hi muskan,
If you'd checked any of the links I gave you earlier you would easily have found your way here
Bob
If you'd checked any of the links I gave you earlier you would easily have found your way here
Bob
Hi there,
FYI, I'm trying to do query with chronoform. Hope to see the people whose doing the same thing. I still cannot the way to make it work!🙄 🙄 🙄
Rgds,
MrNash
FYI, I'm trying to do query with chronoform. Hope to see the people whose doing the same thing. I still cannot the way to make it work!🙄 🙄 🙄
Rgds,
MrNash
Hi waknash,
Please see the Database tutorial from the Tutorials link above.
Bob
Please see the Database tutorial from the Tutorials link above.
Bob
Thanks Bob,
I will try out this method. I will let you know the progress A.S.A.P.
http://www.chronoengine.com/tutorials/other-tutorials/18-tutorials/40-chronoconnectivity-tutorial-1.html
Regards,
waknash
I will try out this method. I will let you know the progress A.S.A.P.
http://www.chronoengine.com/tutorials/other-tutorials/18-tutorials/40-chronoconnectivity-tutorial-1.html
Regards,
waknash
This topic is locked and no more replies can be posted.