ChronoEngine Forums
Welcome, Guest
Please Login or Register.    Lost Password?
No Insert made when the character ' is present (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: No Insert made when the character ' is present
#7971
GreyHead (Admin)
Support
Admin
Posts: 2902
graph
User Offline Click here to see the profile of this user
Gender: Male bobjanes Location: Brittany
Re:Data not included in DB when character ' used 2 Months, 2 Weeks ago Karma: 62  
Hi shoeshut,

Please see my post #7627 above - you said it didn't help but did you test?

Bob
 
Report to moderator   Logged Logged  
 
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
  The administrator has disabled public write access.
#8005
shoeshut (User)
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
Re:No Insert made when the character ' is present 2 Months, 2 Weeks ago Karma: 0  
Hello,
Code:

HTML_admin_misc::get_php_setting('magic_quotes_gpc',1,1);
is no longer in ./administrator/components/com_admin/admin.admin.html.php in Joomla v1.5.3. I have looked for magic_quotes_gpc in other files but didn't find a place where I could add the addslashes function. I will take any suggestion. Thank you
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#8010
admin (Admin)
Admin
Posts: 1631
graphgraph
User Online Now Click here to see the profile of this user
Re:No Insert made when the character ' is present 2 Months, 2 Weeks ago Karma: 23  
Hi shoeshut,

ok, around the variable name JRequest::get part in the autogenerated code add the addslashes PHP function, if you cant do this then paste a piece of your autogenerated code here and I will show you an example!

Cheers

Max
 
Report to moderator   Logged Logged  
 
ChronoForms Developer Thanks for using ChronoForms.
If you have any problems with ChronoForms please tell us.
If you like ChronoForms please post a review at Joomla.org
  The administrator has disabled public write access.
#8842
ddmvisual (User)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Re:No Insert made when the character ' is present 1 Month, 3 Weeks ago Karma: 0  
Hi,
i've the same problem with addslashes. I follow your inscructions posted on #4722 as:

QUOTE:
I changed the Autogenerated code to read "'".addslashes($_POST['textarea_1'])."' ," and the form now works well.


but in my autogenerated code doesn't seems equal as your solution, i haven't any $_POST['variable'] string in it, i've got '".JRequest::getVar('variable','', 'post', 'string', '' )."' instead of it.

How can I put the addslashes php function in it? I tried to make the equivalent with javascript, but doesn't work as expected.

Here is the auto-generated code:
Code:

<?php $database =& JFactory::getDBO(); srand((double)microtime()*10000); $inum = "I" . substr(base64_encode(md5(rand())), 0, 16); $database->setQuery( "INSERT INTO #__chronoforms_2 VALUES ( '' , '".$inum."','". date('Y-m-d')." - ".date("H:i:s")."', '".$_SERVER['REMOTE_ADDR']."' , '".JRequest::getVar('nom','', 'post', 'string', '' )."' , '".JRequest::getVar('cognoms','', 'post', 'string', '' )."' , '".JRequest::getVar('organitzacio','', 'post', 'string', '' )."' , '".JRequest::getVar('direccio','', 'post', 'string', '' )."' , '".JRequest::getVar('poblacio','', 'post', 'string', '' )."' , '".JRequest::getVar('provincia','', 'post', 'string', '' )."' , '".JRequest::getVar('codipostal','', 'post', 'string', '' )."' , '".JRequest::getVar('pais','', 'post', 'string', '' )."' , '".JRequest::getVar('correu_e','', 'post', 'string', '' )."' , '".JRequest::getVar('telefon','', 'post', 'string', '' )."' , '".JRequest::getVar('idioma','', 'post', 'string', '' )."' , '".JRequest::getVar('perfil','', 'post', 'string', '' )."' , '".JRequest::getVar('obra_titol','', 'post', 'string', '' )."' , '".JRequest::getVar('obra_categoria','', 'post', 'string', '' )."' , '".JRequest::getVar('obra_corpus','', 'post', 'string', '' )."' , '".JRequest::getVar('obra_any','', 'post', 'string', '' )."' , '".JRequest::getVar('obra_pais','', 'post', 'string', '' )."' , '".JRequest::getVar('obra_durada','', 'post', 'string', '' )."' , '".JRequest::getVar('obra_subtitols','', 'post', 'string', '' )."' , '".JRequest::getVar('obra_requeriments','', 'post', 'string', '' )."' , '".JRequest::getVar('obra_sinopsis','', 'post', 'string', '' )."');" ); if (!$database->query()) { echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script> "; } ?>
Thanks and sorry by my poor english.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#8845
GreyHead (Admin)
Support
Admin
Posts: 2902
graph
User Offline Click here to see the profile of this user
Gender: Male bobjanes Location: Brittany
Re:No Insert made when the character ' is present 1 Month, 3 Weeks ago Karma: 62  
Hi ddmvisual,

The $_POST['field_name'] code was for Joomla 1.0.x (though it should still work in Joomla 1.5).

Each entry is like this
Code:

'".JRequest::getVar('nom','', 'post', 'string', '' )."'
you can replace this with
Code:

'".addslashes(JRequest::getVar('nom','', 'post', 'string', '' ))."'
Notice the )) near the end. Bob
 
Report to moderator   Logged Logged  
 
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop


equalheight If you have any questions you can post to our forums and we will be glad to help ASAP

Members Login






Lost Password?
No account yet? Register

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for
goods and services provided by ChronoEngine.com

ChronoForms License

equalheightTo be able to continue working at this component we decided to get a small profit out of it but at the same time don't force everybody to pay in order to use this great component.

 

 From version 1.5 and up a link at the bottom of everyform created will be placed, saying "joomla professional work", the link will be to us here htttp://www.chronoengine.com, its illegal to remove this link from the source code unless you have a license,

so the license is very simply for the same ChronoForms component without a link, thats all!

This License is for 5 different websites ONLY. 

 

 However, in order to allow everybody to still use the component and even get out of this, the link is inside a div with class : chronoform , use this to hide the link by using different colors or whatever if you really can't pay, but of course the link is still exists at your page source.

 

The license is ONLY 25$ can be bought here :

 

Thank you!

 

ChronoEngine.com Team 

Joomla Templates and Joomla Tutorials