How to received a value from url variable
How to received a value from url variable
impex09
Posts: 45Questions: 20Answers: 0
Hi, I have a button to open a new page but I send the variable
<a href=mynewpage.php?id=X>details</a>
so. the mynewpage.php I had a php query like this
<?php
include( "lib/DataTables.php" );
// Alias Editor classes so they are easy to use
use
DataTables\Editor,
DataTables\Editor\Field,
DataTables\Editor\Format,
DataTables\Editor\Mjoin,
DataTables\Editor\Options,
DataTables\Editor\Upload,
DataTables\Editor\Validate,
DataTables\Editor\ValidateOptions;
$id_user = $_POST['id'];
// Build our Editor instance and process the data coming from _POST
Editor::inst( $db, 'impx_ccps_assigned_products_by_users', 'id')
->where( 'id', $id, '=')
->fields(
Field::inst( 'id' ),
Field::inst( 'id_user' ),
Field::inst( 'user' ),
Field::inst( 'user_name' ),
)
->process( $_POST )
->json();
Im using
->where (id, $id, '=') to filter the query.
I dont know how to receive the variable.
thaanks.
Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.
This discussion has been closed.
Answers
Hi @impex09 ,
This thread should help, it's asking the same thing.
Cheers,
Colin