php-general Digest 20 Aug 2006 05:35:51 -0000 Issue 4303

2006-08-19 Thread php-general-digest-help

php-general Digest 20 Aug 2006 05:35:51 - Issue 4303

Topics (messages 240898 through 240912):

Re: dynamic variable usage
240898 by: Hiren Parmar
240904 by: Hiren Parmar

Re: OT alternate website authentication methods
240899 by: tedd

Re: Dhtml/javasript layer tips or software (0.T)
240900 by: Robert Cummings
240902 by: tedd
240906 by: Ryan A
240907 by: Ryan A
240908 by: Ryan A

Re: e-Commerce password standards?
240901 by: tedd

Re: dynamic case statements?
240903 by: Richard Lynch

Shopping cart
240905 by: Ryan A
240909 by: Larry Garfield

Re: Session issues
240910 by: Richard Lynch

Re: Creating User Friendly URLS [SOLVED]
240911 by: Dave M G

number list
240912 by: Bigmark

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
php-general@lists.php.net


--
--- Begin Message ---

hi,

I think this will make more clearance about the problem..

actully i want to compare 2 files which has all most same variable's but the
values are diffrant  for e.g.

1 file has username="abc" and other has username = "bcd" ...

my actul code is like ...
my first file contains ... file1.php
php Code:


  1. http://www.php.net/define>('_EZ_USERNAME','Username');
  3. DEFINE ('_EZ_PASSWORD','Password');
  4. ?>

my second file contains ... file2.php
php Code:


  1. http://www.php.net/define>('_EZ_USERNAME','Gebruikersnaam');
  3. DEFINE ('_EZ_PASSWORD','Wachtwoord');
  4. ?>

and third file has code like ...
php Code:


  1. function  comp_file ($Filename){
  2. include( $Filename);
  3.
  4.$fpEng = "/file1.php";
  5. $lines = file ($fpEng);
  6. foreach ($lines as  $line_num => $line) {
  7. $line = str_replace
("http://www.php.net/trim>($line);
  9. if ($line == ""){
  10. next ($lines);
  11. }
  12. elseif($line == "?>"){
  13. next ($lines);
  14. }
  15. else {
  16. $line = str_replace
("DEFINE('","",$line);
  17. $line = str_replace
("','",",",$line);
  18. $line = str_replace
("');","",$line);
  19. list ($fieldNm,
$caption) = explode (",", $line );
  20. /*$$fieldNm = $fieldNm;
  21. $tmp =  $fieldNm ;
  22. //eval($fieldNm)
  23. eval("\$tmp = \"$tmp\";");*/
  24.echo  $caption ;
  25.echo 
'' ;
  26. }
  27. }
  28. }
  29. comp_file(file2.php);



so now when i do read file2 i got $caption = 'UserName' ... and $fieldNm =
'_EZ_USERNAME' by using this $fieldNm ' s value i want to use the variable
of file2 

i think this will help you more in help me out

On 8/19/06, Hiren Parmar <[EMAIL PROTECTED]> wrote:


Hi ,

i have one problem regarding variable's access ...

i hv defined some varibale like

DEFINE('_xx_USERNAME','Username');

in one file ...

and in another file , i got this variable (_xx_USERNAME) as a value of
another variable ... like

$filedValue = '_xx_USERNAME' ;

now , the problem is i want the value of _xx_USERNAME in the second file
...
that is *Username*...  by using variable $filedValue ...

how could i do this ?


--
Hiren Parmar
--
http://www.i3brains.com/





--
Hiren Parmar
--
http://www.i3brains.com/
--- End Message ---
--- Begin Message ---

Hi ,

i have one problem regarding variable's access ...

i hv defined some varibale like

DEFINE('_xx_USERNAME','Username');

in one file ...

and in another file , i got this variable (_xx_USERNAME) as a value of
another variable ... like

$filedValue = '_xx_USERNAME' ;

now , the problem is i want the value of _xx_USERNAME in the second file ...

that is *Username*...  by using variable $filedValue ...

how could i do this ?


--
Hiren Parmar
--
http://www.i3brains.com/
--- End Message ---
--- Begin Message ---

At 2:08 PM -0700 8/18/06, Chris W. Parker wrote:

I'd be interested in hearing your thoughts as well as any links for
further reading.

Chris.


Chris:

I've done a little on this, see:

http://xn--ovg.com/captcha

The main problem in all visual security measures is dealing with the 
disabled. To draw an image or to see the typical CAPTCHA is simply 
not possible. That's one of the reasons I wrote an audio CAPTCHA.


To bad

php-general Digest 19 Aug 2006 17:33:30 -0000 Issue 4302

2006-08-19 Thread php-general-digest-help

php-general Digest 19 Aug 2006 17:33:30 - Issue 4302

Topics (messages 240887 through 240897):

Re: Dhtml/javasript layer tips or software (0.T)
240887 by: Peter Lauri
240888 by: Peter Lauri
240889 by: Larry Garfield
240891 by: Robert Cummings
240893 by: Peter Lauri
240895 by: Ryan A
240896 by: Ryan A

Re: Can a PHP 5 Object Be Persisted Past Script End?
240890 by: Richard Lynch

Re: OT alternate website authentication methods
240892 by: Satyam
240894 by: Peter Lauri

dynamic variable usage
240897 by: Hiren Parmar

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
php-general@lists.php.net


--
--- Begin Message ---
Robert,

Isn't it to easy to cheat if you do like this? Just view the source and you
have the answers. But, this is maybe not for examination, maybe just for
learning. If it is examination, AJAX would be better, so that they can not
find out the solution by just looking at the source.

/Peter


-Original Message-
From: Robert Cummings [mailto:[EMAIL PROTECTED] 
Sent: Saturday, August 19, 2006 12:49 AM
To: Ryan A
Cc: php php
Subject: Re: [PHP] Dhtml/javasript layer tips or software (0.T)

On Fri, 2006-08-18 at 08:30 -0700, Ryan A wrote:
> Hello,
> I am working on a php project that needs a little
> extra JS/DHTML solution. I am sure some of you might
> have come to use something like this before, please
> recommend a solution (commerial solutions are fine /
> willing to pay)
> 
> Basically, I will have a page with around 10 questions
> for students and then two buttons for [HINT] and
> [SOLUTION]
> 
> When either of these buttons/text is clicked the
> resulting text should be displayed in the side/bottom
> cell, the user should also be able to 'close' this
> resulting explanation.
> 
> Note, on each page there will be around 10 questions,
> so each of these questions will have a hint & solution
> button/text.

Will you have two buttons for each question? So that you get the
hint/solution on a question by question basis? The solution is quite
simple:





var hints = new Array();
hints[1] = 'Hint for question 1';
hints[2] = 'Hint for question 2';
hints[3] = 'Hint for question 3';
hints[4] = 'Hint for question 4';
//...

var solutions = new Array();
solutions[1] = 'Solution for question 1';
solutions[2] = 'Solution for question 2';
solutions[3] = 'Solution for question 3';
solutions[4] = 'Solution for question 4';
//...

function showHint( id )
{
hideSolution();

var h = document.getElementById( 'questionHint' );
h.innerHTML = hints[id];
h.style.display = '';
}

function hideHint()
{
var h = document.getElementById( 'questionHint' );
h.style.display = 'none';
}

function showSolution( id )
{
hideHint();

var s = document.getElementById( 'questionSolution' );
s.innerHTML = solutions[id];
s.style.display = '';
}

function hideSolution()
{
var s = document.getElementById( 'questionSolution' );
s.style.display = 'none';
}



blah blah blah blah blah blah


Question 1 ...




Question 2 ...




Question 3 ...




Question 4 ...



...











I'll leave it to you as an exercise to adapt it properly in PHP using
variables and loops instead of harded coded content :) BTW, this is not
PHP, but I'm feeling benevolent today ;)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Now I get interested, what is KISS? :)

-Original Message-
From: Robert Cummings [mailto:[EMAIL PROTECTED] 
Sent: Saturday, August 19, 2006 12:14 PM
To: Peter Lauri
Cc: 'Ryan A'; 'php php'
Subject: RE: [PHP] Dhtml/javasript layer tips or software (0.T)

On Sat, 2006-08-19 at 11:54 +0700, Peter Lauri wrote:
> Robert,
> 
> Isn't it to easy to cheat if you do like this? Just view the source and
you
> have the answers. But, this is maybe not for examination, maybe just for
> learning. If it is examination, AJAX would be better, so that they can not
> find out the solution by j