In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > hi all, > > I'm tring to make a script to prompt for a username & then a password = > for that user onto the actual machine rather than just a web site... > > now i've come across this this line in some documentation > > if ( $File =3D popen( "$useradd_prog $useradd_name", "r" ) ) > { > . > . > . > now to my actual question .. > > does that "r" just mean read? and if so should that "r" be a "w" for = > write in order for it to work? > > > > Cheers=20 > > Peter=20 > "the only dumb question is the one that wasn't asked"=20 > =20
If you are just checking the name/password against an existing list, then you only need read. If you want to add something, then you need a different mode. However, I think you may be better off uing fopen, instead of popen, if you are trying to do what I think you are. The documentation for fopen has a comprehensive description of the modes available; note that w is kindof destructive in the wrong context :-) Cheers -- David Robley Temporary Kiwi! Quod subigo farinam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php