Save PageURL ONload

guillome 31 Oct, 2014
Is it possible to save the PageURL onload in another dbsave event?
I would like to save the page url on every single page load and I have put this custom code into onload, after render and before dbsave:

<?php echo 'page_url'=substr(JURI::getInstance()->toString(),-5,5); ?>

but it is not doing anything. I would like to store the value into page_url db field.

thanks
Max_admin 31 Oct, 2014
Answer
Then it should be:
<?php $form->data['page_url'] = substr(JURI::getInstance()->toString(),-5,5); ?>

And that will save the last 5 characters only!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
guillome 01 Nov, 2014
thanks, its working!
This topic is locked and no more replies can be posted.