php-windows Digest 1 Oct 2006 18:45:26 -0000 Issue 3048

Topics (messages 27199 through 27200):

Re: login stuff
        27199 by: Stut

IIS7, php and extensions
        27200 by: Martin

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:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
bob plano wrote:
i am very new to php and right now i am trying to make a members only
part to my site. the login part of it doesn't work and i have been
trying to diplay a mysql error like this:

$result = mysqli_query($connection,$sql)
               or
                         $message= mysql_error();
                         echo "$message<br>";
                         die( );


and of course it doesn't work. please point out what i'm doing wrong.

The 'or' method can only take a single statement after it. What PHP 'sees' is this...

$result = mysqli_query($connection,$sql) or $message= mysql_error();
echo "$message<br>";
die( );

...meaning that it always does the echo and die. What you want is this...

$result = mysqli_query($connection,$sql) or die(mysql_error().'<br/>');

Also, I think your use of mysqli_query is not quite correct.

another question is how would i do a password check. like most sites
where you login, they have a type password and a retype password box.
where would i put this is the form's processor to check the password?
i'm sorry that i have to send this to you people, but i need someone
more experienced to check this.

I'm not entirely clear what you mean. You generally only have to type the password twice on signup, not at login. Assuming signup is what you meant, you really need to do it twice - once in Javascript on the client when the form is submitted and again in the PHP as soon as possible in the script. There is no point processing the form if that basic requirement has not been met.

Hope that helps.

-Stut

--- End Message ---
--- Begin Message ---
Hi,
I have intalled the RC1 of Windows Vista (x64) and I'm running IIS7.
However, when I try to use extensions with php (e.g. php_mysql.dll) they
are not loaded and displayed when I do phpinfo().
I did the following steps:
1. Install Vista and IIS7
2. extract php (C:\inetpub\php)
3. configure IIS to run 32 Bit applications.
4. add handler to *.php - files (php5isapi.dll)
5. configure ISAPI-restrictions
6. add C:\inetpub\php to path
7. edit php.ini to load extensions in dir ./ext/, uncomment
extension=php_mysql.dll
8. restart IIS

What am I doing wrong?
(I also tried an x64-version of php and had the same problems)
tia,
Martin

--- End Message ---

Reply via email to