Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Streda, 25. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  How to Pass Session Value for Default?

phpMyEdit General     How to Pass Session Value for Default?
Odoslať novú tému   Odpovedať na tému    
 
PocketFaith     Založený: 31.01.2005   Príspevky: 2  
Príspevok Zaslal: 2005-01-31 00:36
Návrat hore  Odpovedať s citátom     

Here's the deal. I have a hidden field that I want to pass a value to such as $_SESSION[id]. This will ensure that the data the user is entering has the correct key for their account. I've tried everything I can think of but I can't get it to take a variable like $_SESSION[id] or $id or anything else for that matter. Any clue how to do this?

Kód:

<?php
include_once 'functions.php.inc';
session_start();
$_SESSION[id]=$_SESSION['_amember_user']['member_id'];

$opts['fdd']['id'] = array(
  'name'     => 'ID',
  'select'   => 'T',
  'maxlen'   => 20,
  'default'  => $_SESSION[id], <---Doesn't work!!!
  'required' => true,
  'sort'     => true,
  'options'  => H
);


 
michal     Založený: 17.06.2003   Príspevky: 537   Bydlisko: Slovakia
Príspevok Zaslal: 2005-01-31 07:39
Návrat hore  Odpovedať s citátom     

afaik it should be $_SESSION['id'] rather than $_SESSION[id].

also 'options' => H is not quite correct, it rather should be 'options' => 'HAC' (hidden in Add and Change).

but before trigger is a better choice, at least more secure (like <?php $newvals = $_SESSION['id'] ?>)

 
PocketFaith     Založený: 31.01.2005   Príspevky: 2  
Príspevok Zaslal: 2005-02-01 04:03
Návrat hore  Odpovedať s citátom     

Awesome! That worked great. It's doing exactly what I needed.

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov