db lookup fails with space in password

  • bulgin23
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 21
  • Thank you received: 0

bulgin23 created the topic: db lookup fails with space in password

Hello. I have a couple of questions.

1) As I'm a pro purchaser is this the place to ask questions if I have purchased a pro license?

2) Please view the code below. It works fine when the lookup is a varchar field with no spaces in the field, but some of the values require spaces and therefore the lookup redirects to the $urlNotFound value, not the corresponding correct url field.

For example some token fields contain string characters like "abcdefg" and others contain string characters like "abcd & efgh" (note the spaces there which must be used in some cases).

$db = JFactory::getDBO();
$submittedtoken = ff_getSubmit('bfQuickMode7126007');
$urlNotFound = (' www.notfoundpage.com ');
$db->setQuery("Select url From gexsy_token WHERE token ='$submittedtoken' " );
$urlToRedirect = $db->loadResult();
if ($urlToRedirect !== null)
{ JFactory::getApplication()->redirect($urlToRedirect); }
else { JFactory::getApplication()->redirect($urlNotFound); }
  • mihaela
  • Away
  • Administrator
  • Administrator
  • Posts: 2360
  • Karma: 85
  • Thank you received: 316

mihaela replied the topic: db lookup fails with space in password


Here are the answers to your questions.

1) As a pro purchaser you can submit a ticket through our ticketing system, since forum is for free users also. To submit a ticket, go to Crosstec > My Account > Raise a ticket .

2) I have tried to recreate the issue, but didn't manage to do so. I will explain what I did.
First, I have added a row in database table with token "abcd & efgh" and url of some site.
Next I have tried to submit the form with value abcd & efgh entered in the token field in the form.
When I submitted the form I was successfully redirected to the url from the database table.

Did I understand the issue correctly, that you do the same, but in your case it isn't working?

Please check whether the token you enter in the form and token in the database table are exactly the same.


Moderators: ForumSupporttomeperica
Time to create page: 0.080 seconds

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans & templates!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here