Re: [PHP] Can't install PHP on Windows/Apache

2004-07-19 Thread Cosmin Chiru
Hello abrea,

Monday, July 19, 2004, 7:58:15 PM, you wrote:

> Dear list,
> I am trying to install PHP 4.3.8 as a module of Apache 2.0.50 on a 
> Windows 98 computer.
> Apache alone runs ok. After I installed PHP with the installer package, I
> added the following line at the end of the Apache httpd.conf together 
> with the AddType statements:
> # LoadModule php4_module c:/php/php4apache.dll

> When I uncomment this line there is an error message saying that a 
> resource is missing (or something like that, the DOS window disappears
> very quickly so I can't copy it).
> This line has worked ok on other computers I have installed with PHP 
> 4.3.4 on Apache 1.3.29 and PHP 4.3.3 on Apache 1.3.27. I tried to install
> these programs but PHP does not run either, although Apache does.
> I have tried with both php4apache.dll and php4apache2.dll, but I still
> get the error message.
> The paths in the c:\windows\php.ini file point to the .dll file correctly.
> Could anybody please tell me what the problem could be?
> Thank you in advance
> Alberto Brea


Hello.
You might wanna check this: http://www.php.net/manual/en/installation.php

-- 
Best regards,
 Cosminmailto:[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Mixing $_POST with text in a variable

2004-07-19 Thread Cosmin Chiru
Hello Markus,

Monday, July 19, 2004, 8:17:24 PM, you wrote:

> I'm changing my HTTP POST variable declarations from $variablename to 
> $_POST['variablename'] to make my code more compliant with current best
> practices.

> However, I find that I cannot mix these new variable declarations into
> big variable strings like I used to. For example, this works:

> $message = "
> Name: $Name
> Division: $Division
> Phone: $Phone
> Email: $Email";

> ...but when I change $Name and the other variables to $_POST['Name'], I
> get this error:

> Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, 
> expecting T_STRING or T_VARIABLE or T_NUM_STRING in 
> /web/scd/vets/Vislab/eventrequest.php on line 94

> Is there any clean way to avoid having to completely reconstruct all my
> form mail messages by constantly closing quotes, using . to connect text
> and variables within the larger variable.

> Markus


$message  = "Name: $_POST['Name']\n";
$message .= "Division: $_POST['Division']\n";
$message .= "Phone: $_POST['Phone']\n";
$message .= "Email: $_POST['Email']\n";

-- 
Best regards,
 Cosminmailto:[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Login Script

2004-07-19 Thread Cosmin Chiru
Hello Brian,

Take a look at setcookie() in the PHP manual. The algorithm is pretty
simple. Once the user submits the form, you compare form data with the
data in the database. If the password matches, then set a cookie with
the username (using setcookie()). Then you'll just have to check if the
cookie is set - if(isset($_COOKIE['username'])) {...} - and if it's set,
proceed to user page; if not, display the login form again.

-- 
Best regards,
 Cosmin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php