Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

register_globals php 5.6
(1 viewing) (1) Guest
Go to bottomPage: 123
TOPIC: register_globals php 5.6
#58888
register_globals php 5.6 8 Years ago Karma: 0
I have php 5.6 and register_globals and am not able to turn on register_globals. I have an html form that I am obtaining user input to then use in my SQL query. I attempt to retrieve the input using {$REQUEST:var:empty:''} but $REQUEST is not being set with the user input. Is there a way to handle this?
The administrator has disabled public write access.
 
#58891
Re:register_globals php 5.6 8 Years ago Karma: 760
Hello,

register_global is remove since PHP 5.4. It seems your use an incorrect code. It should look like:

{$REQUEST:var|empty:''}

because "empty" is a filter, it is not a part of variable name.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#58897
Re:register_globals php 5.6 8 Years ago Karma: 0
Since register_global is removed is it expected that the $REQUEST variable will not be populated with the user input into that variable upon a search request? If so, is there another method to use given register_global has been removed?
The administrator has disabled public write access.
 
#58900
Re:register_globals php 5.6 8 Years ago Karma: 760
{$REQUEST} variables are not supported in SQL query when "Server side pagination" is used. The extension sends AJAX request in "Server side pagination" mode, it contains request variable from "Search" input box and information about sorting column, order and page number.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#58901
Re:register_globals php 5.6 8 Years ago Karma: 0
What is the best solution to handle user input for a MYSQL query with PHP 5.6.x?
The administrator has disabled public write access.
 
#58903
Re:register_globals php 5.6 8 Years ago Karma: 760
PHP doesn't matter. Request variables are available in PHP 5.6+ (PHP 7.0+).

For example if you want to use request variable from an URL, disable "Server side pagination" and use it in SQL query like:

{$REQUEST:var|empty:''}

For article_id variable, it will look like:

{$REQUEST:article_id|empty:''}

Regards,
ARI Soft
The administrator has disabled public write access.
 
Go to topPage: 123