Request variables 12 Years, 7 Months 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
|
|
|
|
|
Re:Request variables 12 Years, 7 Months ago
|
Karma: 760
|
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
|
|
|
|
|
Re:Request variables 12 Years, 7 Months 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.
|
|
|
|
|
Re:Request variables 12 Years, 7 Months ago
|
Karma: 760
|
It will not work, it is not possible to use PHP code in "Columns Settings -> Format" parameter.
Regards,
ARI Soft
|
|
|
|
|
Re:Request variables 12 Years, 7 Months 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.
|
|
|
|
|
Re:Request variables 12 Years, 7 Months ago
|
Karma: 760
|
PHP can access to request variables through $_REQUEST, $_POST and $_GET global arrays.
Regards,
ARI Soft
|
|
|
|
|
|