Sourcerer and GET or POST variables

Search
Other Pre-Sale questions
Forum

Sourcerer and GET or POST variables

Mauro's Avatar Mauro
Hello, I am designing a new website that needs some additional PHP for the users and I have tested the free version of Sourcerer, seems very good so far.

Before going on with purchasing, I need to know if I can post variables between PHP scripts, for example:

User log into Joomla, see an articles (only for registered users) where there is a PHP script included using Sourcerer. This script get some data taken from an external database using a query (since here all is documented), these data are displayed into an html form that the user can edit freely, then the user push "submit" button, send data to another PHP that elaborates and update the DB, then return a response that is shown to the user.

So shortly: Joomla articles with PHP (Sourcerer) and HTML form > send data to another PHP (GET or POST) > get response.

Maybe it is better to use AJAX in the same article (getting response without changing web page), but is that possible?

Is that too complicated? How do you handle that situation at best?

Thanks in advance.
Peter van Westen's Avatar Peter van Westen ADMIN
Yes, you can do that. Just make the form post to the second article that includes the php to deal with the form data.

Sourcerer just enables you to place the php. What you do inside the php is completely down to you.
Please post a rating at the Joomla! Extensions Directory
Mauro's Avatar Mauro
Thank you very much for your answer. One more question to clarify: I have Joomla with SEF and URL Rewrite activated, so I have the article with PHP that is in the URL (for example):
www.domain.com/category/article-alias-1
I want to send the form with GET method to
www.domain.com/category/article-alias-2
Will the PHP in the second article be able to read the GET data? It will not mess up the SEF and Rewrite?
Thanks.
Peter van Westen's Avatar Peter van Westen ADMIN
How you create your forms and how you place your PHP is up to you. That is all outside the control and responsibility of Sourcerer.

I do not provide support on the Free version.
Please post a rating at the Joomla! Extensions Directory
Mauro's Avatar Mauro
Sorry I did not mean to ask for support, just asking for documentation, because I don't know how the variables could be passed between scripts inside the Joomla environment. Maybe you should add some basic example of HTML forms, that is not very clear from docs4.regularlabs.com/sourcerer/going-further/advanced

Thank you for your answer and for your time, all is clear now.
You can only post on this forum if you log in