RE: [PHP] Searching for text in a file

2001-09-10 Thread Kelly Barrett
Hi Richard, First, I think it should be: $variable = [EMAIL PROTECTED]; instead of: $line_text= [EMAIL PROTECTED]; as you overwrite $line_text with your fgets. Also: if ($variable = trim($line_text)) { Should be: if ($variable == trim($line_text)) { Otherwise you are doing

RE: Re[2]: [PHP] Searching for text in a file

2001-09-10 Thread Kelly Barrett
, September 10, 2001, 12:39:15 AM, you wrote: Kelly Barrett Hi Richard, Kelly Barrett First, I think it should be: Kelly Barrett $variable = [EMAIL PROTECTED]; Kelly Barrett instead of: $line_text= [EMAIL PROTECTED]; Kelly Barrett as you overwrite $line_text with your fgets. Kelly Barrett

Re: Re[4]: [PHP] Searching for text in a file

2001-09-10 Thread Kelly Barrett
just the email address not the stuff after it. [EMAIL PROTECTED] yourns [EMAIL PROTECTED] root [EMAIL PROTECTED] majordomo_site1 [EMAIL PROTECTED] owner-majordomo_site15 [EMAIL PROTECTED] sys Monday, September 10, 2001, 1:26:44 AM, you wrote: Kelly Barrett Richard, Kelly

Re: [PHP] php4 and apache on SuSE Linux

2001-09-13 Thread Kelly Barrett
Hi Sean, What webserver are you using? Is it using the Apache module of PHP or the CGI version? Perhaps the extension of your file doesn't have the PHP processor associated with it (if it is installed as an Apache process)? Maybe you are using the CGI version incorrectly? With the command

Re: [PHP] php4 and apache on SuSE Linux

2001-09-13 Thread Kelly Barrett
It sounds like the PHP isn't getting parsed. Check the webserver is configured correctly for the extension of your file, or that your system requires you to use the CGI version of the PHP interpreter. Rudolf, I have tried adding the double quotes, and when I do, nothing at all is displayed.

Re: [PHP] PHP Security

2001-09-13 Thread Kelly Barrett
Hi Allen, What you should do is check the session variable from within PHP. If it doesn't exist, you redirect to a PHP authentication form. So at the head of each page you need something like: ?php session_start(); if(session_is_registered(logged_in) == false) { header(location: login.php);

RE: [PHP] Getting ip address of client and displaying a number in decimal format.

2001-09-13 Thread Kelly Barrett
Troy, $REMOTE_ADDR gives you the client IP. To convert a number to show 2 decimals use sprintf: $money = 5; $money_string = sprintf(%.2f, $money); // $money_string will be 5.00 Cheers, Kelly. -Original Message- From: Troy Lynch [mailto:[EMAIL PROTECTED]] Sent: Friday, 14 September

RE: [PHP] easy cookie question

2001-09-13 Thread Kelly Barrett
You need to set the expire time. Set it to 10 years in the future or something. $expire_time = time() + (86400 * 365 * 10); setcookie(cookie, value, $expire_time); Cheers, Kelly. -Original Message- From: Jay Paulson [mailto:[EMAIL PROTECTED]] Sent: Friday, 14 September 2001 6:13 AM

Re: [PHP] another easy cookie question

2001-09-14 Thread Kelly Barrett
Hi George, You must output all headers (including cookies) before you output any content. So, you just need to move your header and setcookie calls so they are above the html and head tags. e.g. ?php header(Location:index.php); setcookie(Cookievalue, abcdefghijklmnopqrstuvwxyz0123456789)