[PHP] Locale install
The system I am wroking on only has english locales. How do I install the french locales? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Data from DB
On Mon, 17 Feb 2003, Miguel Brás wrote: > Hello gents, > > I have a table with users and passwords with over than 100 rows. > I have 7 specific users that I wanna display on a page, as well their data. > > How can I display this specific users on the page? A little more information is need: 1. What type of database are you using (postgresql, mysql)? 2. What is the database scheme (tables and columns) Assuming you are using postgresql and have a table 'user' with columns user, password, firstname, lastname, email $Result = pg_exec($DBConnection, "SELECT firstname, lastname, email FROM user WHERE user.user = '$User1' OR user.user = '$User2' OR user.user = '$User3' OR user.user = '$User4' OR user.user = '$User5' OR user.user = '$User6' OR user.user = '$User7';"); for ($i = 0; $i < pg_numrows($Result); $i++) { print pg_fetch_result($Result, $i, 0) . " " . pg_fetch_result($Result, $i, 1) . " " ... (for rest of results) } $User1 ... $User7 are variables that contain the user id of the users you are interested in. Check the docs for pg_connect() (needed to connect to DB), pg_exec() (query db) and pg_result() (retrieve results from a -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mktime() Algorithm
I need to create a function in another programming language that takes the same input as the php mktime() function and produces the exact same output as the php mktime() function. Does anybody out there know what the algorithm is? -- David A Dickson [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HTTP authentication logout
I am using HTTP authentication to restrict access to certain pages and I want to add a logout option so that users must reauthenticate before being able to veiw the pages again. Here is the code I'm using to authenticate: This page requires a user name and password to view."); endPage(); } ?> For the logout option I tried just setting $PHP_AUTH_USER="" and $PHP_AUTH_PW="" but that didn't work. Any ideas on how I can do this? --- : David A. Dickson : [EMAIL PROTECTED] Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Security of PHP code
Is it possible for others to view the php code for pages I have written? I thought I heard someone say before that they could write a simple script to accomplish this. If anyone knows of any tacticts people might use to attack my code please post them hee. : David A. Dickson : [EMAIL PROTECTED] Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] split() function
I have a comma separated spreadsheet with one field that contains two dates. the dates are formatted as dd/mm/yy and separated by either '&' or '//' ex:3/12/92&28/1/93 or 3/12/92//28/1/93 Problem: I need to split the field at the '&' or '//' separator but if I do split('[&//]', $field); it splits on the '/' not the '//'. Can I do this in one function call to split() or will I have to do it twice? --- : David A. Dickson : Web Designer for the offices of Principal and Provost : McGill University : Tel 514-398-2624 | Fax 514-389-8983 : [EMAIL PROTECTED] Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] split() function
Thanks for replying ReDucTor but that didn't work either. I tried $line = explode("[(&|//)]", $field); and $line = explode("[(&|)]", $field); and $line = explode("[(&|\/\/)]", $field); with no success. Any other ideas? On Thu, 5 Jul 2001 04:50:29 ReDucTor wrote: >$line = explode("[(&|//)]",$field); should work, or you might have to put > but thats not \ so you shouldn't need to comment out the slash... >- Original Message - >From: David A Dickson <[EMAIL PROTECTED]> >To: php-general <[EMAIL PROTECTED]> >Sent: Thursday, July 05, 2001 4:37 AM >Subject: [PHP] split() function > > >> I have a comma separated spreadsheet with one field that contains two >dates. the dates are formatted as dd/mm/yy and separated by either '&' or >'//' ex:3/12/92&28/1/93 or 3/12/92//28/1/93 >> Problem: I need to split the field at the '&' or '//' separator but if I >do >> split('[&//]', $field); >> it splits on the '/' not the '//'. >> Can I do this in one function call to split() or will I have to do it >twice? Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/ - End Forwarded Message - Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] split() function
Thanks that helped, this is what I used: if (ereg("&", $field)) $line = explode("&", $field); else $line = explode("//", $field); On Thu, 5 Jul 2001 05:29:11 ReDucTor wrote: >$line2 = explode("", $field); >for($i = 0; $i < sizeof($line2); $i++){ > if($line2[$i] == "&") > $useand = 1; > else if($line[$i + 1] == "/"){ > if($line[$i] == "/"){ >$useslash = 1; > } > } >} >if($useand == 1) >$line = explode("&", $field); >if($useslash == 1) >$line = explode("//", $field); >?> Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] where can I find a good documentation on regular expressions?
On Thu, 05 Jul 2001 14:33:55 Mick Foster wrote: >where can I find a good documentatio on regular expressions? >I´m desperate in need of it... Try the manual at www.php.net/manual/en Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]