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?

Request variables
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Request variables
#27439
Request variables 12 Years ago Karma: 0
Hello,

I have a problem with small PHP script, can not get $REQUEST to work in the following script:

<form name="form" method="post">
<input type="submit" name="{$columns:SubmissionValueId}" value="Gelezen" />
<input type="hidden" name="SubmissionId" value="{$columns:SubmissionId}"/>
<input type="hidden" name="UserId" value="<?php $user =& JFactory::getUser(); if (!$user->guest) { echo ''. $user->id .''; } ?>" />
<input type="hidden" name="Username" value="<?php $user =& JFactory::getUser(); if (!$user->guest) { echo ''. $user->name .''; } ?>"/> </form>

<?php if(isset($_POST[{$REQUEST:SubmissionValueId}])) <------------- This $REQUEST doesn't work, all others do!
{
$data =new stdClass();
$data->id = null;
$data->SubmissionId = {$REQUEST:SubmissionId};
$data->UserId = {$REQUEST:UserId};
$data->Username = {$REQUEST:Username};
$db = JFactory::getDBO();
$db->insertObject( 'sec2_logboek', $data, Id ); }
?>

Thank you very much,

ankki
The administrator has disabled public write access.
 
#27441
Re:Request variables 12 Years ago Karma: 748
Hello,

Try to use $_POST['SubmissionValueId'] instead of $_POST[{$REQUEST:SubmissionValueId}]

PS: How this code is related to "ARI Data Tables" extension?

Regards,
ARI Soft
The administrator has disabled public write access.
 
#27442
Re:Request variables 12 Years ago Karma: 0
I use Datatables to retrieve information stored by RsForms.
The script I posted is a little button that I put in Format Field in Column Settings in Datatables. With this button users can mark entry as read.

I have tried your suggestion but it is not working.

Any other ideas?

{$REQUEST:SubmissionValueId} I use to retrieve data from Datatables, it is Ari command.
The administrator has disabled public write access.
 
#27443
Re:Request variables 12 Years ago Karma: 748
It will not work, it is not possible to use PHP code in "Columns Settings -> Format" parameter.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#27444
Re:Request variables 12 Years ago Karma: 0
It is working, I can put Form and PHP script and it enters the data in to database.
Only problem I have is to dynamically fill in the $_POST part. It must be something simple, with semicolons or similar.
The administrator has disabled public write access.
 
#27445
Re:Request variables 12 Years ago Karma: 748
PHP can access to request variables through $_REQUEST, $_POST and $_GET global arrays.

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