Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Pondelok, 23. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Echo on Session Variable not Posting

phpMyEdit Configuration     Echo on Session Variable not Posting
Odoslať novú tému   Odpovedať na tému    
 
twhit67     Založený: 03.02.2010   Príspevky: 16  
Príspevok Zaslal: 2010-03-02 22:25
Návrat hore  Odpovedať s citátom     

Can someone help with my php problem?

My data is called to form via Filter;
$opts['filters'] = "Name = '{$_SESSION['SESS_LOGIN']}'";

I then tried echoing the session login to form via php;
Form field:
$opts['fdd']['NAME']= array(
'name' => 'NAME',
'select' => 'H',
'php' => 'name.php',
'sort' => false
);
--------------
Name.php
<?php
require_once('auth.php');
echo $_SESSION['SESS_LOGIN'];
?>


Although the session does echo it will not post to database; Im uncertain how to proceed from here.

 
doug     Založený: 10.02.2003   Príspevky: 1013   Bydlisko: Denver, Colorado (USA)
Príspevok Zaslal: 2010-03-03 15:33
Návrat hore  Odpovedať s citátom     

If you are concerned about associating new records with the logged-in user adds, then something like this:


Kód:
$opts['fdd']['NAME'] = array(
  'default' => empty($_SESSION['SESS_LOGIN']) ? $_SERVER['REMOTE_ADDR'] : $_SESSION['SESS_LOGIN'],
  'input'      => '',
  'name'       => 'NAME',
  'options'    => 'ACPVDFL',
  'select'     => 'T',
  'sqlw'       => 'TRIM("$val_as")'
);


You can also overwrite the NAME field:
http://opensource.platon.sk/projects/doc.php/phpMyEdit/html/configuration.cgi-variables.html#AEN675

 
twhit67     Založený: 03.02.2010   Príspevky: 16  
Príspevok Zaslal: 2010-03-03 18:12
Návrat hore  Odpovedať s citátom     

Doug, thanks a lot - that did the trick. I'll be reading up on the link you attached.

 
doug     Založený: 10.02.2003   Príspevky: 1013   Bydlisko: Denver, Colorado (USA)
Príspevok Zaslal: 2010-03-03 18:19
Návrat hore  Odpovedať s citátom     

Here's a related example from a script using a numeric $_SESSION['sess_user_level'] to modify settings.

Kód:
switch($_SESSION['sess_user_level'])
{
   Case 9:
      $opts['cgi']['append']['PME_sys_fl'] = 1;
      $opts['filters'] = 'PMEtable0.deleted = "0"';
      $opts['inc'] = 20;
      $opts['options'] = 'ACPVDFL';
      break;
   Case 7:
      $opts['cgi']['append']['PME_sys_fl'] = 1;
      $opts['filters'] = 'PMEtable0.deleted = "0" AND PMEtable0.forum_id < "220"';
      $opts['inc'] = 40;
      $opts['options'] = 'ACPVDFL';
      break;
   Case 0:
   default:
      $opts['filters'] = 'PMEtable0.deleted = "0"';
      $opts['inc'] = 40;
      $opts['options'] = 'VL';
      break;
}


 
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