php-windows Digest 12 Feb 2002 22:58:04 -0000 Issue 998

Topics (messages 12013 through 12041):

Re: im so stupid
        12013 by: George Pitcher
        12014 by: chris
        12016 by: George Pitcher
        12025 by: Nicole Amashta
        12026 by: Nicole Amashta
        12027 by: Afan Pasalic
        12028 by: Nicole Amashta
        12029 by: Nicole Amashta
        12031 by: Mike Flynn
        12032 by: Afan Pasalic

Re: Uploading scripts to web(Another one)
        12015 by: Radovan Radic

fputs() or  fwrite()
        12017 by: Martin.Andrew

Exchange and calendars
        12018 by: David Léonard

Re: [PHP-WINDOWS] i cannot use session functions!!! why??
        12019 by: David Léonard

Re: php-windows Digest 12 Feb 2002 08:39:27 -0000 Issue 997
        12020 by: neil smith

Configuration
        12021 by: chris

Re: PHP and MSDE 2000
        12022 by: Gunnar Peipman

Re: Uploading scripts to web
        12023 by: Nicole Amashta

Re: Searching MS Word Docs
        12024 by: Nicole Amashta
        12040 by: Svensson, B.A.T. (HKG)

Re: Form submit action type.
        12030 by: Mike Flynn

Password Protecting a directory
        12033 by: Todd Williamsen

XML issues
        12034 by: Eric Tonicello

apache+XP+PHP page cannot be displayed
        12035 by: MisterX

Re: Checking email
        12036 by: Todd Williamsen

Re: fsockopen via MS-Proxy authentification
        12037 by: Todd Williamsen

Re: block <ctr><alt><del> and <alt><tab>
        12038 by: Todd Williamsen

Re: IIS equivalent to Apache's .htaccess files
        12039 by: Todd Williamsen

PHP, iPlanet Server and Win200 Server
        12041 by: Stuart Hart

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 ---
Chris,

If you are concerned that your variables aren't being read and then
processed, chek them first and forget the db side for now.

On your response page, just have the following:

<?php
echo 'Fornavn: ' . $fornavn . '<br>';
echo 'Etternavn: ' . $etternavn . '<br>';
?>

If you get your variable data being displayed as you entered it then that
part's fine and you can go on and look at db problems. If not then you have
a problem with your php configuration.

George
"Chris" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Well i tried this and it only tells me that my values are undefined
> variables....
> It seems like the register.php is not receiving the info from
> register.html???
> i have checked 1000 times to make sure that the register.html has the
right
> action and there are no "typo's"  whats going on... ???
>
> "Todd Williamsen" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]...
> > Afan...
> >
> > First off, to make things easier and since you are calling register.php
in
> > your form...
> >
> > Just make a plain HTML page like this and name it whatever the hell you
> want
> >
> > <html>
> >   <head></head>
> >   <body><form method="post" action="registrer.php">
> >   Fornavn: <input type="text" name="fornavn"><br>
> >   Etternavn: <input type="text" name="etternavn"><br>
> >   <input type="Submit" name="submit" value="Registrer"><br> </form>
> > </body>
> > </html>
> >
> > Then make your registrer.php page:
> >
> >
> > $db = MSSQL_CONNECT($hostname,$username,$password);
> > mssql_select_db($dbname);
> > $sql = "insert into studenter(fornavn, etternavn) values
> > ('$fornavn','$etternavn')";
> > $result = mssql_query($sql, $db);
> >
> > <html>
> > <head>
> > <title>Success!</title>
> > <body>
> > <h2>You have successfully entered the following information <? echo
> > "$fornavn<br> $etternavn"; ?></h2>
> > </body>
> > </html>
> >
> >
> >
> > "Afan Pasalic" <[EMAIL PROTECTED]> wrote in message
> > news:005601c1b310$fa19ad80$311f49d1@VAIO...
> > Try this:
> >
> > $db = MSSQL_CONNECT($hostname,$username,$password);
> > mssql_select_db($dbname);
> > $sql = "insert into studenter(fornavn, etternavn) values
> > ('$fornavn','$etternavn')";
> > $result = mssql_query($sql, $db);
> >
> >
> > Afan
> >
> >
> >
> >   ----- Original Message -----
> >   From: chris
> >   To: [EMAIL PROTECTED]
> >   Sent: Monday, February 11, 2002 6:10 AM
> >   Subject: [PHP-WIN] im so stupid
> >
> >
> >   I have made a script and for some reason i dont understand it doesnt
do
> > what
> >   its supposed to. maybe you can  tell me whats wrong. its a form where
im
>
> >   supposed to insert a new record in a mssql table. but when i hit
submit
> it
> >   just refreshes blank.
> >
> >   <html>
> >   <head></head>
> >   <body><form method="post" action="registrer.php">
> >   Fornavn: <input type="text" name="fornavn"><br>
> >   Etternavn: <input type="text" name="etternavn"><br>
> >   <input type="Submit" name="submit" value="Registrer"><br> </form>
> >   <?
> >   IF (isset($submit))
> >   {
> >   $hostname = "dbname";
> >   $username = "chris";
> >   $password = "*****";
> >   $dbname = "chris";
> >   MSSQL_CONNECT($hostname,$username,$password);
> >   mssql_select_db($dbname);
> >   $sql = "insert into studenter(fornavn, etternavn) values
> >   ('$fornavn','$etternavn')";
> >   $result = mssql_query($sql);
> >   $studentnummer = mssql_insert_id();
> >   Print("Studenten er lagt inn!");
> >   }
> >   ?>
> >   </body>
> >   </html>
> >
> >   hope you can help.
> >
> >   -Chris
> >
> >
> >
> >   --
> >   PHP Windows Mailing List (http://www.php.net/)
> >   To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
> >
> >
>
>


--- End Message ---
--- Begin Message ---
Well. this is what shows up...

bruker:
passord:
PHP Warning: Undefined variable: bruker in
c:\inetpub\wwwroot\testsite\registrer.php on line 2 PHP Warning: Undefined
variable: passord in c:\inetpub\wwwroot\testsite\registrer.php on line 3

and this is all i have on the page :

 <?php
 echo 'Fornavn: ' . $fornavn . '<br>';
 echo 'Etternavn: ' . $etternavn . '<br>';
 ?>

So do I have a problem with my PHP configuration???

LOL this thing is gonna drive me crazy before i get it right....

-Chris


"George Pitcher" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Chris,
>
> If you are concerned that your variables aren't being read and then
> processed, chek them first and forget the db side for now.
>
> On your response page, just have the following:
>
> <?php
> echo 'Fornavn: ' . $fornavn . '<br>';
> echo 'Etternavn: ' . $etternavn . '<br>';
> ?>
>
> If you get your variable data being displayed as you entered it then that
> part's fine and you can go on and look at db problems. If not then you
have
> a problem with your php configuration.
>
> George
> "Chris" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Well i tried this and it only tells me that my values are undefined
> > variables....
> > It seems like the register.php is not receiving the info from
> > register.html???
> > i have checked 1000 times to make sure that the register.html has the
> right
> > action and there are no "typo's"  whats going on... ???
> >
> > "Todd Williamsen" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]...
> > > Afan...
> > >
> > > First off, to make things easier and since you are calling
register.php
> in
> > > your form...
> > >
> > > Just make a plain HTML page like this and name it whatever the hell
you
> > want
> > >
> > > <html>
> > >   <head></head>
> > >   <body><form method="post" action="registrer.php">
> > >   Fornavn: <input type="text" name="fornavn"><br>
> > >   Etternavn: <input type="text" name="etternavn"><br>
> > >   <input type="Submit" name="submit" value="Registrer"><br> </form>
> > > </body>
> > > </html>
> > >
> > > Then make your registrer.php page:
> > >
> > >
> > > $db = MSSQL_CONNECT($hostname,$username,$password);
> > > mssql_select_db($dbname);
> > > $sql = "insert into studenter(fornavn, etternavn) values
> > > ('$fornavn','$etternavn')";
> > > $result = mssql_query($sql, $db);
> > >
> > > <html>
> > > <head>
> > > <title>Success!</title>
> > > <body>
> > > <h2>You have successfully entered the following information <? echo
> > > "$fornavn<br> $etternavn"; ?></h2>
> > > </body>
> > > </html>
> > >
> > >
> > >
> > > "Afan Pasalic" <[EMAIL PROTECTED]> wrote in message
> > > news:005601c1b310$fa19ad80$311f49d1@VAIO...
> > > Try this:
> > >
> > > $db = MSSQL_CONNECT($hostname,$username,$password);
> > > mssql_select_db($dbname);
> > > $sql = "insert into studenter(fornavn, etternavn) values
> > > ('$fornavn','$etternavn')";
> > > $result = mssql_query($sql, $db);
> > >
> > >
> > > Afan
> > >
> > >
> > >
> > >   ----- Original Message -----
> > >   From: chris
> > >   To: [EMAIL PROTECTED]
> > >   Sent: Monday, February 11, 2002 6:10 AM
> > >   Subject: [PHP-WIN] im so stupid
> > >
> > >
> > >   I have made a script and for some reason i dont understand it doesnt
> do
> > > what
> > >   its supposed to. maybe you can  tell me whats wrong. its a form
where
> im
> >
> > >   supposed to insert a new record in a mssql table. but when i hit
> submit
> > it
> > >   just refreshes blank.
> > >
> > >   <html>
> > >   <head></head>
> > >   <body><form method="post" action="registrer.php">
> > >   Fornavn: <input type="text" name="fornavn"><br>
> > >   Etternavn: <input type="text" name="etternavn"><br>
> > >   <input type="Submit" name="submit" value="Registrer"><br> </form>
> > >   <?
> > >   IF (isset($submit))
> > >   {
> > >   $hostname = "dbname";
> > >   $username = "chris";
> > >   $password = "*****";
> > >   $dbname = "chris";
> > >   MSSQL_CONNECT($hostname,$username,$password);
> > >   mssql_select_db($dbname);
> > >   $sql = "insert into studenter(fornavn, etternavn) values
> > >   ('$fornavn','$etternavn')";
> > >   $result = mssql_query($sql);
> > >   $studentnummer = mssql_insert_id();
> > >   Print("Studenten er lagt inn!");
> > >   }
> > >   ?>
> > >   </body>
> > >   </html>
> > >
> > >   hope you can help.
> > >
> > >   -Chris
> > >
> > >
> > >
> > >   --
> > >   PHP Windows Mailing List (http://www.php.net/)
> > >   To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> > >
> > >
> > >
> >
> >
>
>


--- End Message ---
--- Begin Message ---
Chris,

You've narrowed down the problem to your php configuration, I guess.

I pasted your form into 'http://146.176.13.99/heronweb/chris.html' and the
response is fine on my server (ie my laptop).

I am using PHP 4.1.1 on Win 2000Pro with Apache and I installed the isapi
rather than the cgi version.

HTH

George

"Chris" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Well. this is what shows up...
>
> bruker:
> passord:
> PHP Warning: Undefined variable: bruker in
> c:\inetpub\wwwroot\testsite\registrer.php on line 2 PHP Warning: Undefined
> variable: passord in c:\inetpub\wwwroot\testsite\registrer.php on line 3
>
> and this is all i have on the page :
>
>  <?php
>  echo 'Fornavn: ' . $fornavn . '<br>';
>  echo 'Etternavn: ' . $etternavn . '<br>';
>  ?>
>
> So do I have a problem with my PHP configuration???
>
> LOL this thing is gonna drive me crazy before i get it right....
>
> -Chris
>
>
> "George Pitcher" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Chris,
> >
> > If you are concerned that your variables aren't being read and then
> > processed, chek them first and forget the db side for now.
> >
> > On your response page, just have the following:
> >
> > <?php
> > echo 'Fornavn: ' . $fornavn . '<br>';
> > echo 'Etternavn: ' . $etternavn . '<br>';
> > ?>
> >
> > If you get your variable data being displayed as you entered it then
that
> > part's fine and you can go on and look at db problems. If not then you
> have
> > a problem with your php configuration.
> >
> > George
> > "Chris" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > Well i tried this and it only tells me that my values are undefined
> > > variables....
> > > It seems like the register.php is not receiving the info from
> > > register.html???
> > > i have checked 1000 times to make sure that the register.html has the
> > right
> > > action and there are no "typo's"  whats going on... ???
> > >
> > > "Todd Williamsen" <[EMAIL PROTECTED]> wrote in message
> > > news:[EMAIL PROTECTED]...
> > > > Afan...
> > > >
> > > > First off, to make things easier and since you are calling
> register.php
> > in
> > > > your form...
> > > >
> > > > Just make a plain HTML page like this and name it whatever the hell
> you
> > > want
> > > >
> > > > <html>
> > > >   <head></head>
> > > >   <body><form method="post" action="registrer.php">
> > > >   Fornavn: <input type="text" name="fornavn"><br>
> > > >   Etternavn: <input type="text" name="etternavn"><br>
> > > >   <input type="Submit" name="submit" value="Registrer"><br> </form>
> > > > </body>
> > > > </html>
> > > >
> > > > Then make your registrer.php page:
> > > >
> > > >
> > > > $db = MSSQL_CONNECT($hostname,$username,$password);
> > > > mssql_select_db($dbname);
> > > > $sql = "insert into studenter(fornavn, etternavn) values
> > > > ('$fornavn','$etternavn')";
> > > > $result = mssql_query($sql, $db);
> > > >
> > > > <html>
> > > > <head>
> > > > <title>Success!</title>
> > > > <body>
> > > > <h2>You have successfully entered the following information <? echo
> > > > "$fornavn<br> $etternavn"; ?></h2>
> > > > </body>
> > > > </html>
> > > >
> > > >
> > > >
> > > > "Afan Pasalic" <[EMAIL PROTECTED]> wrote in message
> > > > news:005601c1b310$fa19ad80$311f49d1@VAIO...
> > > > Try this:
> > > >
> > > > $db = MSSQL_CONNECT($hostname,$username,$password);
> > > > mssql_select_db($dbname);
> > > > $sql = "insert into studenter(fornavn, etternavn) values
> > > > ('$fornavn','$etternavn')";
> > > > $result = mssql_query($sql, $db);
> > > >
> > > >
> > > > Afan
> > > >
> > > >
> > > >
> > > >   ----- Original Message -----
> > > >   From: chris
> > > >   To: [EMAIL PROTECTED]
> > > >   Sent: Monday, February 11, 2002 6:10 AM
> > > >   Subject: [PHP-WIN] im so stupid
> > > >
> > > >
> > > >   I have made a script and for some reason i dont understand it
doesnt
> > do
> > > > what
> > > >   its supposed to. maybe you can  tell me whats wrong. its a form
> where
> > im
> > >
> > > >   supposed to insert a new record in a mssql table. but when i hit
> > submit
> > > it
> > > >   just refreshes blank.
> > > >
> > > >   <html>
> > > >   <head></head>
> > > >   <body><form method="post" action="registrer.php">
> > > >   Fornavn: <input type="text" name="fornavn"><br>
> > > >   Etternavn: <input type="text" name="etternavn"><br>
> > > >   <input type="Submit" name="submit" value="Registrer"><br> </form>
> > > >   <?
> > > >   IF (isset($submit))
> > > >   {
> > > >   $hostname = "dbname";
> > > >   $username = "chris";
> > > >   $password = "*****";
> > > >   $dbname = "chris";
> > > >   MSSQL_CONNECT($hostname,$username,$password);
> > > >   mssql_select_db($dbname);
> > > >   $sql = "insert into studenter(fornavn, etternavn) values
> > > >   ('$fornavn','$etternavn')";
> > > >   $result = mssql_query($sql);
> > > >   $studentnummer = mssql_insert_id();
> > > >   Print("Studenten er lagt inn!");
> > > >   }
> > > >   ?>
> > > >   </body>
> > > >   </html>
> > > >
> > > >   hope you can help.
> > > >
> > > >   -Chris
> > > >
> > > >
> > > >
> > > >   --
> > > >   PHP Windows Mailing List (http://www.php.net/)
> > > >   To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>


--- End Message ---
--- Begin Message ---
Chris,

Did you fix your error_reporting level in your php.ini as I suggested?

Nicole Amashta
www.aeontrek.com



"Chris" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Well. this is what shows up...
>
> bruker:
> passord:
> PHP Warning: Undefined variable: bruker in
> c:\inetpub\wwwroot\testsite\registrer.php on line 2 PHP Warning: Undefined
> variable: passord in c:\inetpub\wwwroot\testsite\registrer.php on line 3
>
> and this is all i have on the page :
>
>  <?php
>  echo 'Fornavn: ' . $fornavn . '<br>';
>  echo 'Etternavn: ' . $etternavn . '<br>';
>  ?>
>
> So do I have a problem with my PHP configuration???
>
> LOL this thing is gonna drive me crazy before i get it right....
>
> -Chris
>
>
> "George Pitcher" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Chris,
> >
> > If you are concerned that your variables aren't being read and then
> > processed, chek them first and forget the db side for now.
> >
> > On your response page, just have the following:
> >
> > <?php
> > echo 'Fornavn: ' . $fornavn . '<br>';
> > echo 'Etternavn: ' . $etternavn . '<br>';
> > ?>
> >
> > If you get your variable data being displayed as you entered it then
that
> > part's fine and you can go on and look at db problems. If not then you
> have
> > a problem with your php configuration.
> >
> > George
> > "Chris" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > Well i tried this and it only tells me that my values are undefined
> > > variables....
> > > It seems like the register.php is not receiving the info from
> > > register.html???
> > > i have checked 1000 times to make sure that the register.html has the
> > right
> > > action and there are no "typo's"  whats going on... ???
> > >
> > > "Todd Williamsen" <[EMAIL PROTECTED]> wrote in message
> > > news:[EMAIL PROTECTED]...
> > > > Afan...
> > > >
> > > > First off, to make things easier and since you are calling
> register.php
> > in
> > > > your form...
> > > >
> > > > Just make a plain HTML page like this and name it whatever the hell
> you
> > > want
> > > >
> > > > <html>
> > > >   <head></head>
> > > >   <body><form method="post" action="registrer.php">
> > > >   Fornavn: <input type="text" name="fornavn"><br>
> > > >   Etternavn: <input type="text" name="etternavn"><br>
> > > >   <input type="Submit" name="submit" value="Registrer"><br> </form>
> > > > </body>
> > > > </html>
> > > >
> > > > Then make your registrer.php page:
> > > >
> > > >
> > > > $db = MSSQL_CONNECT($hostname,$username,$password);
> > > > mssql_select_db($dbname);
> > > > $sql = "insert into studenter(fornavn, etternavn) values
> > > > ('$fornavn','$etternavn')";
> > > > $result = mssql_query($sql, $db);
> > > >
> > > > <html>
> > > > <head>
> > > > <title>Success!</title>
> > > > <body>
> > > > <h2>You have successfully entered the following information <? echo
> > > > "$fornavn<br> $etternavn"; ?></h2>
> > > > </body>
> > > > </html>
> > > >
> > > >
> > > >
> > > > "Afan Pasalic" <[EMAIL PROTECTED]> wrote in message
> > > > news:005601c1b310$fa19ad80$311f49d1@VAIO...
> > > > Try this:
> > > >
> > > > $db = MSSQL_CONNECT($hostname,$username,$password);
> > > > mssql_select_db($dbname);
> > > > $sql = "insert into studenter(fornavn, etternavn) values
> > > > ('$fornavn','$etternavn')";
> > > > $result = mssql_query($sql, $db);
> > > >
> > > >
> > > > Afan
> > > >
> > > >
> > > >
> > > >   ----- Original Message -----
> > > >   From: chris
> > > >   To: [EMAIL PROTECTED]
> > > >   Sent: Monday, February 11, 2002 6:10 AM
> > > >   Subject: [PHP-WIN] im so stupid
> > > >
> > > >
> > > >   I have made a script and for some reason i dont understand it
doesnt
> > do
> > > > what
> > > >   its supposed to. maybe you can  tell me whats wrong. its a form
> where
> > im
> > >
> > > >   supposed to insert a new record in a mssql table. but when i hit
> > submit
> > > it
> > > >   just refreshes blank.
> > > >
> > > >   <html>
> > > >   <head></head>
> > > >   <body><form method="post" action="registrer.php">
> > > >   Fornavn: <input type="text" name="fornavn"><br>
> > > >   Etternavn: <input type="text" name="etternavn"><br>
> > > >   <input type="Submit" name="submit" value="Registrer"><br> </form>
> > > >   <?
> > > >   IF (isset($submit))
> > > >   {
> > > >   $hostname = "dbname";
> > > >   $username = "chris";
> > > >   $password = "*****";
> > > >   $dbname = "chris";
> > > >   MSSQL_CONNECT($hostname,$username,$password);
> > > >   mssql_select_db($dbname);
> > > >   $sql = "insert into studenter(fornavn, etternavn) values
> > > >   ('$fornavn','$etternavn')";
> > > >   $result = mssql_query($sql);
> > > >   $studentnummer = mssql_insert_id();
> > > >   Print("Studenten er lagt inn!");
> > > >   }
> > > >   ?>
> > > >   </body>
> > > >   </html>
> > > >
> > > >   hope you can help.
> > > >
> > > >   -Chris
> > > >
> > > >
> > > >
> > > >   --
> > > >   PHP Windows Mailing List (http://www.php.net/)
> > > >   To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>


--- End Message ---
--- Begin Message ---
AHA! That is it, and I've encountere this before.

OK, actually $submit should be set. But do this instead:

add a hidden tag to the form as such:

=================
<form method="post" action="registrer.php">

 Fornavn: <input type="text" name="fornavn"><br>

 Etternavn: <input type="text" name="etternavn"><br>

 <input type="Submit" name="submit" value="Registrer">

<input type="hidden" name="action" value="submit">

 </form>

=================

Then, in your php script, do this:

if ( $action == "submit" )
{
  ## do the action here ....
}
================


This is how I handle my forms. I use hidden tags with values that will most
certainly be passed to the script. If the submit button is not clicked, that
value doesn't get set, thus not showing up to the calling script. But, if
you actually click the button, it will. If you are just hitting your "enter"
or "spacebar" to submit the form, then the $submit is never set.

-Nicole Amashta
www.aeontrek.com

=============================

"Court Shrock" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> > registrer.html ->
> >
> > <html>
> > <head></head>
> > <body><form method="post" action="registrer.php">
> > Fornavn: <input type="text" name="fornavn"><br>
> > Etternavn: <input type="text" name="etternavn"><br>
> > <input type="Submit" name="submit" value="Registrer"><br> </form>
>
> I do not think that an input of type 'submit' will be submitted in the
post
> to the next page...you could verify this by doing a phpinfo at the top of
> registrer.php....the only name/value pairs submitted in the above form
> should be "fornavn" and "etternavn".
>
> > </body>
> > </html>
> >
> > registrer.php ->
> >
> > <?
> > IF (isset($submit))
>
> ...and therefore, the above statement would fail because the $submit
> variable is not set and therefore the intended code below would not be
> executed....
>
> > {
> > $hostname = "dbname";
> > $username = "chris";
> > $password = "*****";
> > $dbname = "chris";
> > MSSQL_CONNECT($hostname,$username,$password);
> > mssql_select_db($dbname);
> > $sql = "insert into studenter(fornavn, etternavn) values
> > ('$fornavn','$etternavn')";
> > $result = mssql_query($sql);
> > $studentnummer = mssql_insert_id();
> > Print("Studenten er lagt inn!");
> > }
> > ?>


--- End Message ---
--- Begin Message ---
Hm, isn't that the same I said yestreday (you don't need set value for action):

<?php
if($submit) // Or , if you want if($submit == 'Registrer')
{

}
else
{
// Form comes here
}
?>


Afan
  ----- Original Message ----- 
  From: Nicole Amashta 
  To: [EMAIL PROTECTED] 
  Sent: Tuesday, February 12, 2002 10:34 AM
  Subject: Re: [PHP-WIN] im so stupid


  AHA! That is it, and I've encountere this before.

  OK, actually $submit should be set. But do this instead:

  add a hidden tag to the form as such:

  =================
  <form method="post" action="registrer.php">

   Fornavn: <input type="text" name="fornavn"><br>

   Etternavn: <input type="text" name="etternavn"><br>

   <input type="Submit" name="submit" value="Registrer">

  <input type="hidden" name="action" value="submit">

   </form>

  =================

  Then, in your php script, do this:

  if ( $action == "submit" )
  {
    ## do the action here ....
  }
  ================


  This is how I handle my forms. I use hidden tags with values that will most
  certainly be passed to the script. If the submit button is not clicked, that
  value doesn't get set, thus not showing up to the calling script. But, if
  you actually click the button, it will. If you are just hitting your "enter"
  or "spacebar" to submit the form, then the $submit is never set.

  -Nicole Amashta
  www.aeontrek.com

  =============================

  "Court Shrock" <[EMAIL PROTECTED]> wrote in message
  news:[EMAIL PROTECTED]...
  > > registrer.html ->
  > >
  > > <html>
  > > <head></head>
  > > <body><form method="post" action="registrer.php">
  > > Fornavn: <input type="text" name="fornavn"><br>
  > > Etternavn: <input type="text" name="etternavn"><br>
  > > <input type="Submit" name="submit" value="Registrer"><br> </form>
  >
  > I do not think that an input of type 'submit' will be submitted in the
  post
  > to the next page...you could verify this by doing a phpinfo at the top of
  > registrer.php....the only name/value pairs submitted in the above form
  > should be "fornavn" and "etternavn".
  >
  > > </body>
  > > </html>
  > >
  > > registrer.php ->
  > >
  > > <?
  > > IF (isset($submit))
  >
  > ...and therefore, the above statement would fail because the $submit
  > variable is not set and therefore the intended code below would not be
  > executed....
  >
  > > {
  > > $hostname = "dbname";
  > > $username = "chris";
  > > $password = "*****";
  > > $dbname = "chris";
  > > MSSQL_CONNECT($hostname,$username,$password);
  > > mssql_select_db($dbname);
  > > $sql = "insert into studenter(fornavn, etternavn) values
  > > ('$fornavn','$etternavn')";
  > > $result = mssql_query($sql);
  > > $studentnummer = mssql_insert_id();
  > > Print("Studenten er lagt inn!");
  > > }
  > > ?>



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

--- End Message ---
--- Begin Message ---
So, do not rely on BUTTONS as variables in scripts since browsers are FUNKY
and button variables don't always get set as they should. Use hidden
variables. If you have different buttons doing different things, such as
(delete, submit, open, etc.), then make each button call a javascript to set
the value of the hidden variable like so:

<form name="myForm" method="post" action="phpscript.php">

<input type="button" name="edit" onClick="javascript:
this.form.action.value='edit';">
<input type="button" name="delete" onClick="javascript:
this.form.action.value='delete';">
<input type="submit" name="Submit" onClick="javascript:
this.form.action.value='submit';">

<input type="hidden" name="action"> <!-- this value will be set by the
button that gets clicked by user -->
</form>

THis always works for me!

Nicole Amashta
www.aeontrek.com

==============================

"Nicole Amashta" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> AHA! That is it, and I've encountere this before.
>
> OK, actually $submit should be set. But do this instead:
>
> add a hidden tag to the form as such:
>
> =================
> <form method="post" action="registrer.php">
>
>  Fornavn: <input type="text" name="fornavn"><br>
>
>  Etternavn: <input type="text" name="etternavn"><br>
>
>  <input type="Submit" name="submit" value="Registrer">
>
> <input type="hidden" name="action" value="submit">
>
>  </form>
>
> =================
>
> Then, in your php script, do this:
>
> if ( $action == "submit" )
> {
>   ## do the action here ....
> }
> ================
>
>
> This is how I handle my forms. I use hidden tags with values that will
most
> certainly be passed to the script. If the submit button is not clicked,
that
> value doesn't get set, thus not showing up to the calling script. But, if
> you actually click the button, it will. If you are just hitting your
"enter"
> or "spacebar" to submit the form, then the $submit is never set.
>
> -Nicole Amashta
> www.aeontrek.com
>
> =============================
>
> "Court Shrock" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]...
> > > registrer.html ->
> > >
> > > <html>
> > > <head></head>
> > > <body><form method="post" action="registrer.php">
> > > Fornavn: <input type="text" name="fornavn"><br>
> > > Etternavn: <input type="text" name="etternavn"><br>
> > > <input type="Submit" name="submit" value="Registrer"><br> </form>
> >
> > I do not think that an input of type 'submit' will be submitted in the
> post
> > to the next page...you could verify this by doing a phpinfo at the top
of
> > registrer.php....the only name/value pairs submitted in the above form
> > should be "fornavn" and "etternavn".
> >
> > > </body>
> > > </html>
> > >
> > > registrer.php ->
> > >
> > > <?
> > > IF (isset($submit))
> >
> > ...and therefore, the above statement would fail because the $submit
> > variable is not set and therefore the intended code below would not be
> > executed....
> >
> > > {
> > > $hostname = "dbname";
> > > $username = "chris";
> > > $password = "*****";
> > > $dbname = "chris";
> > > MSSQL_CONNECT($hostname,$username,$password);
> > > mssql_select_db($dbname);
> > > $sql = "insert into studenter(fornavn, etternavn) values
> > > ('$fornavn','$etternavn')";
> > > $result = mssql_query($sql);
> > > $studentnummer = mssql_insert_id();
> > > Print("Studenten er lagt inn!");
> > > }
> > > ?>
>
>


--- End Message ---
--- Begin Message ---
Not in the least. That is not the same at all. You are referencing the
<input type="submit" name="submit"> button.

I am referencing a hidden field that is set with that value no matter what.


"Afan Pasalic" <[EMAIL PROTECTED]> wrote in message
002601c1b3dc$7a3f7280$311f49d1@VAIO">news:002601c1b3dc$7a3f7280$311f49d1@VAIO...
Hm, isn't that the same I said yestreday (you don't need set value for
action):

<?php
if($submit) // Or , if you want if($submit == 'Registrer')
{

}
else
{
// Form comes here
}
?>


Afan
  ----- Original Message -----
  From: Nicole Amashta
  To: [EMAIL PROTECTED]
  Sent: Tuesday, February 12, 2002 10:34 AM
  Subject: Re: [PHP-WIN] im so stupid


  AHA! That is it, and I've encountere this before.

  OK, actually $submit should be set. But do this instead:

  add a hidden tag to the form as such:

  =================
  <form method="post" action="registrer.php">

   Fornavn: <input type="text" name="fornavn"><br>

   Etternavn: <input type="text" name="etternavn"><br>

   <input type="Submit" name="submit" value="Registrer">

  <input type="hidden" name="action" value="submit">

   </form>

  =================

  Then, in your php script, do this:

  if ( $action == "submit" )
  {
    ## do the action here ....
  }
  ================


  This is how I handle my forms. I use hidden tags with values that will
most
  certainly be passed to the script. If the submit button is not clicked,
that
  value doesn't get set, thus not showing up to the calling script. But, if
  you actually click the button, it will. If you are just hitting your
"enter"
  or "spacebar" to submit the form, then the $submit is never set.

  -Nicole Amashta
  www.aeontrek.com

  =============================

  "Court Shrock" <[EMAIL PROTECTED]> wrote in message
  news:[EMAIL PROTECTED]...
  > > registrer.html ->
  > >
  > > <html>
  > > <head></head>
  > > <body><form method="post" action="registrer.php">
  > > Fornavn: <input type="text" name="fornavn"><br>
  > > Etternavn: <input type="text" name="etternavn"><br>
  > > <input type="Submit" name="submit" value="Registrer"><br> </form>
  >
  > I do not think that an input of type 'submit' will be submitted in the
  post
  > to the next page...you could verify this by doing a phpinfo at the top
of
  > registrer.php....the only name/value pairs submitted in the above form
  > should be "fornavn" and "etternavn".
  >
  > > </body>
  > > </html>
  > >
  > > registrer.php ->
  > >
  > > <?
  > > IF (isset($submit))
  >
  > ...and therefore, the above statement would fail because the $submit
  > variable is not set and therefore the intended code below would not be
  > executed....
  >
  > > {
  > > $hostname = "dbname";
  > > $username = "chris";
  > > $password = "*****";
  > > $dbname = "chris";
  > > MSSQL_CONNECT($hostname,$username,$password);
  > > mssql_select_db($dbname);
  > > $sql = "insert into studenter(fornavn, etternavn) values
  > > ('$fornavn','$etternavn')";
  > > $result = mssql_query($sql);
  > > $studentnummer = mssql_insert_id();
  > > Print("Studenten er lagt inn!");
  > > }
  > > ?>



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




--- End Message ---
--- Begin Message ---
At 10:43 AM 2/12/2002 -0500, Nicole Amashta wrote:
>Not in the least. That is not the same at all. You are referencing the
><input type="submit" name="submit"> button.
>
>I am referencing a hidden field that is set with that value no matter what.

Exactly.  I learned this the hard way.  Don't rely on the submit button at 
all.  IE has all kinds of quirks where the button's value may not get 
passed if the user submits the form by hitting Enter instead of clicking 
the button.  Hidden values are the way to go.  The only time you could rely 
on buttons is if you have a form with multiple submit buttons.  One button 
is the "default" submit button (i/e the one that gets highlighted when you 
click within the form), the rest must be clicked to be submitted.  For 
these, you could use their name/values.

-Mike

--- End Message ---
--- Begin Message ---
Thanks guys, I didn't know that... One more happy day...


Afan




  ----- Original Message ----- 
  From: Mike Flynn 
  To: Nicole Amashta ; [EMAIL PROTECTED] ; [EMAIL PROTECTED] 
  Sent: Tuesday, February 12, 2002 11:03 AM
  Subject: Re: [PHP-WIN] im so stupid


  At 10:43 AM 2/12/2002 -0500, Nicole Amashta wrote:
  >Not in the least. That is not the same at all. You are referencing the
  ><input type="submit" name="submit"> button.
  >
  >I am referencing a hidden field that is set with that value no matter what.

  Exactly.  I learned this the hard way.  Don't rely on the submit button at 
  all.  IE has all kinds of quirks where the button's value may not get 
  passed if the user submits the form by hitting Enter instead of clicking 
  the button.  Hidden values are the way to go.  The only time you could rely 
  on buttons is if you have a form with multiple submit buttons.  One button 
  is the "default" submit button (i/e the one that gets highlighted when you 
  click within the form), the rest must be clicked to be submitted.  For 
  these, you could use their name/values.

  -Mike


--- End Message ---
--- Begin Message ---
> > use to you.
> >
> > Nicole Amashta
> > www.aeontrek.com
> > ==================
>
> Thanks for the help,
> Another one:
> Usually, i am gonna have tables that i get from clients(dbf or whatever,
> then convert them to mysql), and then i should upload them to the web
> server.
> I could use phpMysqlAdmin to transfer data from my tables to web?
>
> Radovan
>
Another question:
I think i dont have to say i am totally newbie in this, but i wanna know
what happens with php.ini and httpd.conf of apache, and other php
extensions?

Thanks


--- End Message ---
--- Begin Message ---
Is it possible to directly append a file with 

fputs ("string", 'a'); 

and place the string at a certain point in that file, eg. line number?
Now it is always placing the string at the bottim of the file.

Do I have to read to file first?
--- End Message ---
--- Begin Message ---
Hi,
I looking for a method to catch the calendars on an Exchange server.
I can get the mailboxes with the IMAP, but I can't use mcal to catch the
calendar on the server, can you help me please ?

Thank you,
David


--- End Message ---
--- Begin Message ---
Hi,
do you use the
<?php session_start(); ?> before sending the headers? Or what is you error
message??
"Pipee" <[EMAIL PROTECTED]> wrote in message news:8fo0sv$e5e$[EMAIL PROTECTED]...
> i install php4 on w2k professional,and everything's all right, but , i
> cannot use session functions. i've modified session path in php.ini . and
> when using a debug program (php edit),i can use session functions, but in
> browser cannot. please help me!!  thanks.
>
>


--- End Message ---
--- Begin Message ---

Use this :

$comes_from=array(HTTP_VIA
, HTTP_X_COMING_FROM
, HTTP_X_FORWARDED_FOR
, HTTP_X_FORWARDED
, HTTP_COMING_FROM
, HTTP_FORWARDED_FOR
, HTTP_FORWARDED);
// This array *should* hold most of the possible headers identifying the 
remote IP address.
// Credit to [EMAIL PROTECTED] for this list.

foreach ($comes_from as $value) {
if (ereg("^([0-9]{1,3}\.){3,3}[0-9]{1,3}",$$value,$remote_temp)) {
$remote=$remote_temp[0]; // Fish out IP match if ereg returns a value
}}
if (! $remote) {
$remote=$REMOTE_ADDR;
}

Regs,
Neil Smith.


>-----Original Message-----
>From: Tal-ee Roberts [mailto:[EMAIL PROTECTED]]
>Sent: 11 February 2002 15:42
>To: [EMAIL PROTECTED]
>Subject: [PHP-WIN] IP address reference
>
>
>Is there any way to get the user's ip address using PHP?  thanks -Tal-ee

--- End Message ---
--- Begin Message ---
In an earlier thread i asked about why i couldnt send data from a HTML form
to a PHP script. The data just didnt go through... now i was told that this
is a configuration problem... How and where do i configure such a thing?

-Chris


--- End Message ---
--- Begin Message ---
Thanks. That made it work!

With best regards,
G.Peipman

"Christoph Grottolo" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Hi
>
> ntwdblib.dll has to be in the system path (usually it resides in
> %windir%\system32)
>
> Christoph
>
> "Gunnar Peipman" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> news:[EMAIL PROTECTED]...
> | Hi!
> |
> | I have a problem when connecting to my MSDE database. I got the
following
> | error:
> |
> | X-Powered-By: PHP/4.1.1 Content-type: text/html
> | Fatal error: Call to undefined function: mssql_connect() in
> | D:\Inetpub\wwwroot\new_comp\test.php on line 2
> | PHP Warning: Unable to load dynamic library 'C:\Program
> | files\PHP\extensions\php_mssql.dll' - The specified module could not be
> | found. in Unknown on line 0
> |
> | php_mssql.dll is in extensions directory and ntwdblib.dll is in dll-s
> | directory. In php.ini the extension php_mssql.dll is uncommented.
> |
> | The script I'm using is following:
> |
> | <?
> |     $db=mssql_connect("myServer","myUserName","myPassword");
> | ?>
> |
> | System configuration is following Windows XP Pro, MSDE 2000, IIS 5.1.
The
> | script directory is protected using Basic Authentication. MSDE 2000 uses
> NT
> | Integrated Security.
> |
> | How can I fix this problem?
> |
> | With best greetings,
> | G.Peipman
> |
> |
>
>


--- End Message ---
--- Begin Message ---
I am not even familiar with php mysql admin thing. I've just heard of it. I
think I've used it once (not sure if it was that one or some other). But it
lets view the database and tables. You can modify tables, add tables, delete
tables, maybe even view data in the tables.

sorry i can't be of too much help. i usually code and use my own stuff. =P

"Radovan Radic" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> "Nicole Amashta" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]...
> > You need to find out from whoever hosts the server if mysql database
> exists
> > and if active for you. You will need to ask them for the correct host,
> login
> > and password for your database.
> >
> > You will then need to create your tables on that database. If you do
have
> > mysql on the server and need a way to access the database, I've written
a
> > simple database administration panel that lets you run queries. There is
> > also something like phpMysqlAdmin (I forget exact name) which may be of
> more
> > use to you.
> >
> > Nicole Amashta
> > www.aeontrek.com
> > ==================
>
> Thanks for the help,
> Another one:
> Usually, i am gonna have tables that i get from clients(dbf or whatever,
> then convert them to mysql), and then i should upload them to the web
> server.
> I could use phpMysqlAdmin to transfer data from my tables to web?
>
> Radovan
>
>


--- End Message ---
--- Begin Message ---
You know, I think it may be better to do the word document over HTML
document. HTML docs will have all the tags. A search may accidentally go
against the HTML tag as opposed to a word in the actual resume.

If you can get the .docs working as I'd suggested, then you should be on a
roll and everyone will be happy.

I am unfamiliar with linux (i think that's what you said you are working
on), so not sure if this would apply the same as would on windows.

"Todd Williamsen" <[EMAIL PROTECTED]> wrote in message
news:000d01c1b355$a7068920$f6b2d83f@goofy1...
> Ross,
>
> It seems my client can accept the fact that Word docs cannot be
> opened(yet), and they kinda like the html formatted documents, granted
> they aren't really editable.  Oh well.
>
> If I can get it to open and search a Word document, that would be great
> another option to present to them!
>
> I am sure I am not the only one that could/would use this!
>
>
>
> -----Original Message-----
> From: Ross Fleming [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 11, 2002 11:30 AM
> To: Todd Williamsen; 'alain'
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] Re: Searching MS Word Docs
>
>
> Erm... why are you here then?..  [EMAIL PROTECTED]!!   ;) lol
>
> Either way, back to the main point in hand, I've just opened a MS Word
> doc
> and it LOOKS to be ASCII, all be it with a bunch of binary crap before
> and
> after.  I can't see why it wouldn't work the way that Nicole suggested.
> If
> I have time I'll give it a go tonight and see how I get on.
>
> Regards
>
> Ross
>
> -----Original Message-----
> From: Todd Williamsen [mailto:[EMAIL PROTECTED]]
> Sent: 11 February 2002 17:17
> To: 'alain'
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] Re: Searching MS Word Docs
>
>
> That’s great Alain... But as I previously posted its NOT windows, and if
> you read my post I have no idea how to use COM.
>
> So its not so easy
>
> -----Original Message-----
> From: alain [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 11, 2002 11:15 AM
> To: Todd Williamsen
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] Re: Searching MS Word Docs
>
>
> If your server is win, it's pretty easy: Use COM.
> A+
> Alain
>
> On Mon, Feb 11, 2002 at 10:45:22AM -0600, Todd Williamsen wrote:
> > So is there a way to search within the MS Word docs even though they
> are
> > binary, or do I need to look at ASP for this?  I cannot run ASP on my
> > server, host says you can, but it doesn't run..
> > "B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
> > 27E647E5629ED211BF78009027289C6303C1B6C4@mail1">news:27E647E5629ED211BF78009027289C6303C1B6C4@mail1...
> > > MS Word document are binary.
> > >
> > > From: Todd Williamsen
> > >
> > > >I have no idea if its ASCII formatted or not.  I wonder if there is
> a way
> > > to
> > > >find out?
> > > >
> > > >
> > >
> > > >"Nicole Amashta" wrote in message
> > >
> > > >> OK, I am not exactly sure of the format of word docs off hand.
> But if
> > > they
> > > >> are an ascii format, you can just read through the file using PHP
> and
> > use
> > > >> regular expressions to search for the words. Just a suggestion.
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--- End Message ---
--- Begin Message ---
Don't turst that. Word can saw back up information in the (very same)
document to. 

-----Original Message-----
From: Ross Fleming
To: Todd Williamsen; 'alain'
Cc: [EMAIL PROTECTED]
Sent: 11-2-02 18:30
Subject: RE: [PHP-WIN] Re: Searching MS Word Docs

Erm... why are you here then?..  [EMAIL PROTECTED]!!   ;) lol

Either way, back to the main point in hand, I've just opened a MS Word
doc
and it LOOKS to be ASCII, all be it with a bunch of binary crap before
and
after.  I can't see why it wouldn't work the way that Nicole suggested.
If
I have time I'll give it a go tonight and see how I get on.

Regards

Ross

-----Original Message-----
From: Todd Williamsen [mailto:[EMAIL PROTECTED]]
Sent: 11 February 2002 17:17
To: 'alain'
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Re: Searching MS Word Docs


That's great Alain... But as I previously posted its NOT windows, and if
you read my post I have no idea how to use COM.

So its not so easy

-----Original Message-----
From: alain [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 11, 2002 11:15 AM
To: Todd Williamsen
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Re: Searching MS Word Docs


If your server is win, it's pretty easy: Use COM.
A+
Alain

On Mon, Feb 11, 2002 at 10:45:22AM -0600, Todd Williamsen wrote:
> So is there a way to search within the MS Word docs even though they
are
> binary, or do I need to look at ASP for this?  I cannot run ASP on my
> server, host says you can, but it doesn't run..
> "B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
> 27E647E5629ED211BF78009027289C6303C1B6C4@mail1">news:27E647E5629ED211BF78009027289C6303C1B6C4@mail1...
> > MS Word document are binary.
> >
> > From: Todd Williamsen
> >
> > >I have no idea if its ASCII formatted or not.  I wonder if there is
a way
> > to
> > >find out?
> > >
> > >
> >
> > >"Nicole Amashta" wrote in message
> >
> > >> OK, I am not exactly sure of the format of word docs off hand.
But if
> > they
> > >> are an ascii format, you can just read through the file using PHP
and
> use
> > >> regular expressions to search for the words. Just a suggestion.
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



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


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
At 09:45 PM 2/11/2002 -0800, Mike wrote:
>I am creating a page with a form on it. I want it so that when people click
>submit, I want the information from the form to be emailed to me. Is there a
>way I can do this with normal JavaScripting or even plain HTML or would I
>have to use something like PHP.
>
>Thanks

The only way to do this without using a server-side script is to just have 
the form contents e-mailed.  If you make the form 
action="mailto:[EMAIL PROTECTED]"; I believe it will create a formatted e-mail 
message to send to you when the user clicks submit.  However, it is still 
left to the user to have their web browser e-mail configured properly and 
they then have to click send for it to go through.  If, say, the user uses 
Netscape Navigator and the default Netscape mail plug-in is Netscape Mail, 
but the user doesn't use Netscape Mail and hasn't actually configured it to 
send (because they haven't gotten around to it or whatever), then it will 
pop up the form to be e-mailed in Netscape Mail and the user won't be able 
to send it.  And, like I said, even if it goes to the right e-mail program, 
the user has to still click "Send".

These are some things to watch out for.  E-mail forms aren't generally 
used, especially by professional sites, because they're just too reliant on 
the user being hooked up correctly and proficient enough to send it 
through.  What a big assumption to make.  :)

-Mike

--- End Message ---
--- Begin Message ---
I have a variables.php file tha sets the username and password for the
directory, and it seems like its not executing.

the directory is recruiter/Admin and the file is put in there

function error ($error_message) {
 echo $error_message."<BR>";
 exit;
 }
if ( (!isset($PHP_AUTH_USER)) || ! (($PHP_AUTH_USER == $LOGIN) && (
$PHP_AUTH_PW == "$PASSWORD" )) ) {
 header("WWW-Authenticate: Basic entrer=\"Form2txt admin\"");
 header("HTTP/1.0 401 Unauthorized");
 error("Unauthorized access...");
 }




--- End Message ---
--- Begin Message ---
Hi !

I'm writing some code, and I have questions :

#1 : it is possible to use xslt_process($xml, $xsl,$result) with a string
$xml comtaining XML instead of pointing to an .xml file ?

#2 : I have to copy a XML node from a XML file to another (both on server)
and then transform it with XSLT and produce HTML. How make it simply ? I
have a solution using xml2tree, but I'd prefer a DOM-XML solution (it exists
in java with xalan ...)

I use PHP 4.1.1 on windows 2000 and MS IIS 5.0.

Thanks for any help.

Eric Tonicello


--- End Message ---
--- Begin Message ---
I am running the latest versions of apache with php as a module in windows
xp.  The problem I am running into is that when a php generated page gets
above a certain size/certain amount of include, it will return a Page Cannot
Be Displayed error if accessed from a non-local browser.  Locally it will
open fine, on the server computer and on a connected LAN computer.  I do not
have any firewalls installed, and all TCP/IP filtering is turned off.  All I
get in the access logs for people accessing it remotely is a 304 message for
the page being the same as in cache... but when they try to access it it
still gives the "Page Cannot Be Displayed"   Any info??
Thanks,
Chris


--- End Message ---
--- Begin Message ---
Here is a script that actually connects to their mail server to see if its
valid

<?

// Set the form error check to false
$form_errors = array();

//E-Mail address verifications
  // Make Email a required field
  $Email = trim($Email);
    if ($Email == "") {
      $form_errors["required_Email"] = true;
    }
    elseif
(!eregi("^([a-zA-Z0-9._-])+@([a-zA-Z0-9._-])+\.([a-zA-Z0-9._-])([a-zA-Z0-9._
-])+", $Email)) {
      $form_errors["Email_badformat"] = true;
    }
    // Attempt to resolve the MX host
    else {
      list($user, $domain) = split("@", $Email, 2);
      if (! checkdnsrr($domain, "MX")) {
        $form_errors["Email_badhost"] = true;
      }
    }

// Check if there are any errors
if (count($form_errors)) {
  // If the user left the e-mail field blank
  if ($form_errors["required_Email"]) {
    echo("<font color=\"#ff0000\"><b>Your E-mail Address is
required.</b></font>");
  }
  // If the format of the e-mail address is incorrect
  elseif ($form_errors["Email_badformat"]) {
    echo("<font color=\"#ff0000\"><b>Please enter a valid e-mail
address.</b></font>");
  }
  // If the mail server of the address the user provided could not be
contacted
  elseif ($form_errors["Email_badhost"]) {
    echo("<font color=\"#ff0000\"><b>Your E-mail address did not resolve to
a working e-mail server.<br> Please enter a valid e-mail
address.</b></font>");
  }
}
?>


"Marko Mihalec" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> function isEmailInvalid($val)
> {
>  // regex for email validation
>  $pattern =
> "/^([a-zA-Z0-9])+([\.a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+/";
>
>   // match?
>   if(preg_match($pattern, $val))
>   {
>   return 0;
>   }
>   else
>   {
>   return 1;
>   }
> }
>
>
>
>
>
>


--- End Message ---
--- Begin Message ---
You are attempting to access the web port directly, is that the actual port
of the proxy server?

Try using the proxy server port #


"Kriegers Horst" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi all,
>
> I wish to fetch an internet web page.
> Oour internet access is through MS-Proxy server 2.0 with NTLM
> authentification (domain\user:password).
> I experience an access probleme.
>
> Here you are the result:
> proxy_srv_01:80 is available
> HTTP/1.0 407 Proxy Access Denied Server: Microsoft-IIS/3.0 Date: Fri, 08
Feb
> 2002 08:15:35 GMT Proxy-Authenticate: NTLM Proxy-Authenticate: Basic
> realm="proxy_srv_01.stg.swiss"
>
>
> Here you are my code:
>
> <?
> $user="lnt_01\test"; // DomainNT\UserName
> $pass="test"; // UserPassword
>
>
> $proxy_s = "proxy_srv_01"; // Proxy server to Internet
> $proxy_p = "80"; // Proxy port
>
> $myfiles = "http://www.phpscripts-fr.net";; // URL to fetch
>
> $datei = fsockopen($proxy_s, $proxy_p, &$errno,&$errstr, 30);
>
> if( !$datei )
> {
>         echo "<font color=red><b>$proxy_s:$proxy_p isn't available
> !</b></font>";
>       exit();
> } else {
>   echo "<font color=green><b>$proxy_s:$proxy_p is
> available</b></font><br>";
>   fputs($datei,"GET $myfiles/ HTTP/1.0 \r\n\r\n");
>
>   while (!feof($datei))
> {
> echo $zeile = fread($datei,1000);
> }
> }
> ?>
>
> Is something erroneous in my code?
>
> If somebody can help me, I will be really happy
> Thanks
>
> Horst
>


--- End Message ---
--- Begin Message ---
that would be a windows 2000 issue, not php.

You would need to script something in Windows to disable after X amount of
minutes.

There is a policy editor in Windows 2k which may or may not allow you to
time bomb a machine(not literally)
"Baloo :0)" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I have a routine in MySQL with PHP over Win 2K to administrate a
> cybercafe.  I want to  make a routine that request ID and Password and
> records the time utilized surfing.
>
> Does anyone knows how could I make a routine that disables the
> <CTRL><ALT><DEL> , <ALT><TAB> or <SHIFT><F4> so clients don't jump the
> password screen?
>
> Any ideas on where to find information related or which programming
> language to use?
>
> Thanks guys,
>
> Alfredo
>


--- End Message ---
--- Begin Message ---
Well, I don't know why your project team leader states it has to be NTLM..

But, since I am a network Admin, I would check both to use Basic
authentication AND NTLM, for those not using IE.

Just check it when the Prject Leader isn't looking... hehe!!!


"Manuel Lemos" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> Theodore Brinkman wrote:
> >
> > Sorry, I should have been clearer.  Strictly speaking this is an IIS
> > question, not a PHP question, but I don't know where else to ask.
> >
> > We're using IIS, and the team lead has settled on windows domain
> > authentication for 'logging into' the system.  This means that only IE
can
> > be used unless I can figure out a way to get IIS to ask non-IE browsers
to
> > authenticate themselves.  The 'user and password' database is the
windows
> > domain controller.
>
> I never tried but if you are using IIS, I think the solution is simpler.
> All you need to do is to issue the right authentication headers and IIS
> will set the LOGON_USER variable with the user login. This page may help
> you:
>
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iisref/html
/psdk/asp/comp3hf8.asp
>
> Regards,
> Manuel Lemos


--- End Message ---
--- Begin Message ---
Hi,
I have installed the above mentioned config. But I have problem when serving
.phtml pages, but not .php.

.phtml gets a "not found" error. Looking in the error log I get:

[12/Feb/2002:16:23:18] failure ( 2564): for host xxx.xxx.xxx.xxx trying to
GET /hello.phtml, shellcgi-send reports: can't find file association of
d:/inetpub/wwwroot/ngsc/hello.phtml for execution "

The MIME types are defined the same as follows and I have also tried
defining both extensions on the same line:

      type magnus-internal/shellcgi php
      type magnus-internal/shellcgi phtml


And the association is defined in windows for both .php and .phtml, I can
execute both file types from the command line (just by typing the file name
hello.phtml).

Does anybody have any ideas?
Thanks
Stuart/


--- End Message ---

Reply via email to