php-windows Digest 12 Feb 2002 08:39:27 -0000 Issue 997

Topics (messages 11993 through 12012):

Re: Searching MS Word Docs
        11993 by: alain
        11994 by: Todd Williamsen
        11995 by: alain
        11997 by: Todd Williamsen
        11998 by: alain
        12001 by: Todd Williamsen
        12007 by: Ross Fleming
        12008 by: Todd Williamsen

query_session fault in PHP4.0.3pl1?
        11996 by: Neil Harrison

GD problems creating Gif?
        11999 by: Tobias Talltorp
        12004 by: \"Crash\" Dummy

Re: Downloading the source code
        12000 by: Shrock, Court
        12002 by: Robin Bolton

Re: im so stupid
        12003 by: Ross Fleming
        12005 by: Shrock, Court
        12012 by: chris

Re: IP address reference
        12006 by: Ross Fleming
        12009 by: \"Crash\" Dummy

Form submit action type.
        12010 by: Mike

Re: Uploading scripts to web
        12011 by: Radovan Radic

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 ---
Well, that's what the manual says.
Once that you have the content of your file in a string, my advice is to
bin2hex it and search words or sentences using the hex representation of it
with ereg, as the word format is not plain binary, you will need to hex edit
your doc file to know what you are looking for.
A+
Alain

On Mon, Feb 11, 2002 at 12:38:59PM -0600, Todd Williamsen wrote:
> Alain,
> 
> I am running the "rb" but its on a Linux box so I think its ignoring it
> 
> -----Original Message-----
> From: alain [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 11, 2002 12:36 PM
> To: Todd Williamsen
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] Re: Searching MS Word Docs
> 
> 
> >From the manual - Last thing to read ;)
> "Note: The mode may contain the letter 'b'. This is useful only on
> systems
> which differentiate between binary and text files (i.e. Windows. It's
> useless on Unix). If not needed, this will be ignored. "
> A+
> Alain
> 
> 
> On Mon, Feb 11, 2002 at 11:52:14AM -0600, Todd Williamsen wrote:
> > Alain,
> >
> > I changed it from "r" to "rb" and it doesn't pick it up
> > "Todd Williamsen" <[EMAIL PROTECTED]> wrote in message
> > news:000a01c1b324$59e10c00$f6b2d83f@goofy1...
> > > Alain..
> > >
> > > That's fine... Hehe!!  :)
> > >
> > > So would I just do a "rb" in the fopen statement then?
> > >
> > > -----Original Message-----
> > > From: alain [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, February 11, 2002 11:48 AM
> > > To: Todd Williamsen
> > > Cc: [EMAIL PROTECTED]
> > > Subject: Re: [PHP-WIN] Re: Searching MS Word Docs
> > >
> > >
> > > Sorry, I didn't read all your posts, just the last one. If your
> platform
> > > is
> > > not windoze, COM won't help you (neither ASP)...
> > > You have to do a binary search in your Word file.
> > > A+
> > > Alain
> > >
> > > On Mon, Feb 11, 2002 at 11:17:29AM -0600, Todd Williamsen wrote:
> > > > 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 ---
Is there a way to automate that?

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


Well, that's what the manual says.
Once that you have the content of your file in a string, my advice is to
bin2hex it and search words or sentences using the hex representation of
it
with ereg, as the word format is not plain binary, you will need to hex
edit
your doc file to know what you are looking for.
A+
Alain

On Mon, Feb 11, 2002 at 12:38:59PM -0600, Todd Williamsen wrote:
> Alain,
>
> I am running the "rb" but its on a Linux box so I think its ignoring
it
>
> -----Original Message-----
> From: alain [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 11, 2002 12:36 PM
> To: Todd Williamsen
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] Re: Searching MS Word Docs
>
>
> >From the manual - Last thing to read ;)
> "Note: The mode may contain the letter 'b'. This is useful only on
> systems
> which differentiate between binary and text files (i.e. Windows. It's
> useless on Unix). If not needed, this will be ignored. "
> A+
> Alain
>
>
> On Mon, Feb 11, 2002 at 11:52:14AM -0600, Todd Williamsen wrote:
> > Alain,
> >
> > I changed it from "r" to "rb" and it doesn't pick it up
> > "Todd Williamsen" <[EMAIL PROTECTED]> wrote in message
> > news:000a01c1b324$59e10c00$f6b2d83f@goofy1...
> > > Alain..
> > >
> > > That's fine... Hehe!!  :)
> > >
> > > So would I just do a "rb" in the fopen statement then?
> > >
> > > -----Original Message-----
> > > From: alain [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, February 11, 2002 11:48 AM
> > > To: Todd Williamsen
> > > Cc: [EMAIL PROTECTED]
> > > Subject: Re: [PHP-WIN] Re: Searching MS Word Docs
> > >
> > >
> > > Sorry, I didn't read all your posts, just the last one. If your
> platform
> > > is
> > > not windoze, COM won't help you (neither ASP)...
> > > You have to do a binary search in your Word file.
> > > A+
> > > Alain
> > >
> > > On Mon, Feb 11, 2002 at 11:17:29AM -0600, Todd Williamsen wrote:
> > > > 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 ---
What do you mean? Create a function?
A+
Alain

On Mon, Feb 11, 2002 at 03:34:50PM -0600, Todd Williamsen wrote:
> Is there a way to automate that?
> 
> -----Original Message-----
> From: alain [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 11, 2002 3:20 PM
> To: Todd Williamsen
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] Re: Searching MS Word Docs
> 
> 
> Well, that's what the manual says.
> Once that you have the content of your file in a string, my advice is to
> bin2hex it and search words or sentences using the hex representation of
> it
> with ereg, as the word format is not plain binary, you will need to hex
> edit
> your doc file to know what you are looking for.
> A+
> Alain
> 
> On Mon, Feb 11, 2002 at 12:38:59PM -0600, Todd Williamsen wrote:
> > Alain,
> >
> > I am running the "rb" but its on a Linux box so I think its ignoring
> it
> >
> > -----Original Message-----
> > From: alain [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, February 11, 2002 12:36 PM
> > To: Todd Williamsen
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [PHP-WIN] Re: Searching MS Word Docs
> >
> >
> > >From the manual - Last thing to read ;)
> > "Note: The mode may contain the letter 'b'. This is useful only on
> > systems
> > which differentiate between binary and text files (i.e. Windows. It's
> > useless on Unix). If not needed, this will be ignored. "
> > A+
> > Alain
> >
> >
> > On Mon, Feb 11, 2002 at 11:52:14AM -0600, Todd Williamsen wrote:
> > > Alain,
> > >
> > > I changed it from "r" to "rb" and it doesn't pick it up
> > > "Todd Williamsen" <[EMAIL PROTECTED]> wrote in message
> > > news:000a01c1b324$59e10c00$f6b2d83f@goofy1...
> > > > Alain..
> > > >
> > > > That's fine... Hehe!!  :)
> > > >
> > > > So would I just do a "rb" in the fopen statement then?
> > > >
> > > > -----Original Message-----
> > > > From: alain [mailto:[EMAIL PROTECTED]]
> > > > Sent: Monday, February 11, 2002 11:48 AM
> > > > To: Todd Williamsen
> > > > Cc: [EMAIL PROTECTED]
> > > > Subject: Re: [PHP-WIN] Re: Searching MS Word Docs
> > > >
> > > >
> > > > Sorry, I didn't read all your posts, just the last one. If your
> > platform
> > > > is
> > > > not windoze, COM won't help you (neither ASP)...
> > > > You have to do a binary search in your Word file.
> > > > A+
> > > > Alain
> > > >
> > > > On Mon, Feb 11, 2002 at 11:17:29AM -0600, Todd Williamsen wrote:
> > > > > 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 ---
Yes, create a function or if there is an existing one, use that.

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


What do you mean? Create a function?
A+
Alain

On Mon, Feb 11, 2002 at 03:34:50PM -0600, Todd Williamsen wrote:
> Is there a way to automate that?
>
> -----Original Message-----
> From: alain [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 11, 2002 3:20 PM
> To: Todd Williamsen
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] Re: Searching MS Word Docs
>
>
> Well, that's what the manual says.
> Once that you have the content of your file in a string, my advice is
to
> bin2hex it and search words or sentences using the hex representation
of
> it
> with ereg, as the word format is not plain binary, you will need to
hex
> edit
> your doc file to know what you are looking for.
> A+
> Alain
>
> On Mon, Feb 11, 2002 at 12:38:59PM -0600, Todd Williamsen wrote:
> > Alain,
> >
> > I am running the "rb" but its on a Linux box so I think its ignoring
> it
> >
> > -----Original Message-----
> > From: alain [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, February 11, 2002 12:36 PM
> > To: Todd Williamsen
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [PHP-WIN] Re: Searching MS Word Docs
> >
> >
> > >From the manual - Last thing to read ;)
> > "Note: The mode may contain the letter 'b'. This is useful only on
> > systems
> > which differentiate between binary and text files (i.e. Windows.
It's
> > useless on Unix). If not needed, this will be ignored. "
> > A+
> > Alain
> >
> >
> > On Mon, Feb 11, 2002 at 11:52:14AM -0600, Todd Williamsen wrote:
> > > Alain,
> > >
> > > I changed it from "r" to "rb" and it doesn't pick it up
> > > "Todd Williamsen" <[EMAIL PROTECTED]> wrote in message
> > > news:000a01c1b324$59e10c00$f6b2d83f@goofy1...
> > > > Alain..
> > > >
> > > > That's fine... Hehe!!  :)
> > > >
> > > > So would I just do a "rb" in the fopen statement then?
> > > >
> > > > -----Original Message-----
> > > > From: alain [mailto:[EMAIL PROTECTED]]
> > > > Sent: Monday, February 11, 2002 11:48 AM
> > > > To: Todd Williamsen
> > > > Cc: [EMAIL PROTECTED]
> > > > Subject: Re: [PHP-WIN] Re: Searching MS Word Docs
> > > >
> > > >
> > > > Sorry, I didn't read all your posts, just the last one. If your
> > platform
> > > > is
> > > > not windoze, COM won't help you (neither ASP)...
> > > > You have to do a binary search in your Word file.
> > > > A+
> > > > Alain
> > > >
> > > > On Mon, Feb 11, 2002 at 11:17:29AM -0600, Todd Williamsen wrote:
> > > > > 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 ---
<?php  
Function SearchMSW($filename,$find)
{
        $fd = fopen( $filename, "rb" );
        $contents = fread( $fd, filesize( $filename ) );
        fclose( $fd );
         
        $contents=bin2hex($contents);

        if (eregi($find, $contents))print "FOUND";
}
        #$find = binary code of what you are looking for, or use the line
below for simple binary search
        #but in that case you do not need the bin2hex
        $find="Your text to find";
        $find=bin2hex($find);
        #SearchMSW($filename,$find);
        SearchMSW("test.doc",$find);

?>
Now, you are on your own... ;)
Alain

On Mon, Feb 11, 2002 at 04:05:08PM -0600, Todd Williamsen wrote:
> Yes, create a function or if there is an existing one, use that.
> 
> -----Original Message-----
> From: alain [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 11, 2002 3:48 PM
> To: Todd Williamsen
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] Re: Searching MS Word Docs
> 
> 
> What do you mean? Create a function?
> A+
> Alain
> 
> On Mon, Feb 11, 2002 at 03:34:50PM -0600, Todd Williamsen wrote:
> > Is there a way to automate that?
> >
> > -----Original Message-----
> > From: alain [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, February 11, 2002 3:20 PM
> > To: Todd Williamsen
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [PHP-WIN] Re: Searching MS Word Docs
> >
> >
> > Well, that's what the manual says.
> > Once that you have the content of your file in a string, my advice is
> to
> > bin2hex it and search words or sentences using the hex representation
> of
> > it
> > with ereg, as the word format is not plain binary, you will need to
> hex
> > edit
> > your doc file to know what you are looking for.
> > A+
> > Alain
> >
> > On Mon, Feb 11, 2002 at 12:38:59PM -0600, Todd Williamsen wrote:
> > > Alain,
> > >
> > > I am running the "rb" but its on a Linux box so I think its ignoring
> > it
> > >
> > > -----Original Message-----
> > > From: alain [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, February 11, 2002 12:36 PM
> > > To: Todd Williamsen
> > > Cc: [EMAIL PROTECTED]
> > > Subject: Re: [PHP-WIN] Re: Searching MS Word Docs
> > >
> > >
> > > >From the manual - Last thing to read ;)
> > > "Note: The mode may contain the letter 'b'. This is useful only on
> > > systems
> > > which differentiate between binary and text files (i.e. Windows.
> It's
> > > useless on Unix). If not needed, this will be ignored. "
> > > A+
> > > Alain
> > >
> > >
> > > On Mon, Feb 11, 2002 at 11:52:14AM -0600, Todd Williamsen wrote:
> > > > Alain,
> > > >
> > > > I changed it from "r" to "rb" and it doesn't pick it up
> > > > "Todd Williamsen" <[EMAIL PROTECTED]> wrote in message
> > > > news:000a01c1b324$59e10c00$f6b2d83f@goofy1...
> > > > > Alain..
> > > > >
> > > > > That's fine... Hehe!!  :)
> > > > >
> > > > > So would I just do a "rb" in the fopen statement then?
> > > > >
> > > > > -----Original Message-----
> > > > > From: alain [mailto:[EMAIL PROTECTED]]
> > > > > Sent: Monday, February 11, 2002 11:48 AM
> > > > > To: Todd Williamsen
> > > > > Cc: [EMAIL PROTECTED]
> > > > > Subject: Re: [PHP-WIN] Re: Searching MS Word Docs
> > > > >
> > > > >
> > > > > Sorry, I didn't read all your posts, just the last one. If your
> > > platform
> > > > > is
> > > > > not windoze, COM won't help you (neither ASP)...
> > > > > You have to do a binary search in your Word file.
> > > > > A+
> > > > > Alain
> > > > >
> > > > > On Mon, Feb 11, 2002 at 11:17:29AM -0600, Todd Williamsen wrote:
> > > > > > 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 ---
Alain,

Thanks!

I will have to try it for shits and giggles.  I talked to my client and
they said html formatted resumes would be fine.  Go figure.  I would
still like to try it out.

Now, I need to figure out how to automate renaming files when they are
uploaded

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


<?php
Function SearchMSW($filename,$find)
{
        $fd = fopen( $filename, "rb" );
        $contents = fread( $fd, filesize( $filename ) );
        fclose( $fd );

        $contents=bin2hex($contents);

        if (eregi($find, $contents))print "FOUND";
}
        #$find = binary code of what you are looking for, or use the
line
below for simple binary search
        #but in that case you do not need the bin2hex
        $find="Your text to find";
        $find=bin2hex($find);
        #SearchMSW($filename,$find);
        SearchMSW("test.doc",$find);

?>
Now, you are on your own... ;)
Alain

On Mon, Feb 11, 2002 at 04:05:08PM -0600, Todd Williamsen wrote:
> Yes, create a function or if there is an existing one, use that.
>
> -----Original Message-----
> From: alain [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 11, 2002 3:48 PM
> To: Todd Williamsen
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] Re: Searching MS Word Docs
>
>
> What do you mean? Create a function?
> A+
> Alain
>
> On Mon, Feb 11, 2002 at 03:34:50PM -0600, Todd Williamsen wrote:
> > Is there a way to automate that?
> >
> > -----Original Message-----
> > From: alain [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, February 11, 2002 3:20 PM
> > To: Todd Williamsen
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [PHP-WIN] Re: Searching MS Word Docs
> >
> >
> > Well, that's what the manual says.
> > Once that you have the content of your file in a string, my advice
is
> to
> > bin2hex it and search words or sentences using the hex
representation
> of
> > it
> > with ereg, as the word format is not plain binary, you will need to
> hex
> > edit
> > your doc file to know what you are looking for.
> > A+
> > Alain
> >
> > On Mon, Feb 11, 2002 at 12:38:59PM -0600, Todd Williamsen wrote:
> > > Alain,
> > >
> > > I am running the "rb" but its on a Linux box so I think its
ignoring
> > it
> > >
> > > -----Original Message-----
> > > From: alain [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, February 11, 2002 12:36 PM
> > > To: Todd Williamsen
> > > Cc: [EMAIL PROTECTED]
> > > Subject: Re: [PHP-WIN] Re: Searching MS Word Docs
> > >
> > >
> > > >From the manual - Last thing to read ;)
> > > "Note: The mode may contain the letter 'b'. This is useful only on
> > > systems
> > > which differentiate between binary and text files (i.e. Windows.
> It's
> > > useless on Unix). If not needed, this will be ignored. "
> > > A+
> > > Alain
> > >
> > >
> > > On Mon, Feb 11, 2002 at 11:52:14AM -0600, Todd Williamsen wrote:
> > > > Alain,
> > > >
> > > > I changed it from "r" to "rb" and it doesn't pick it up
> > > > "Todd Williamsen" <[EMAIL PROTECTED]> wrote in message
> > > > news:000a01c1b324$59e10c00$f6b2d83f@goofy1...
> > > > > Alain..
> > > > >
> > > > > That's fine... Hehe!!  :)
> > > > >
> > > > > So would I just do a "rb" in the fopen statement then?
> > > > >
> > > > > -----Original Message-----
> > > > > From: alain [mailto:[EMAIL PROTECTED]]
> > > > > Sent: Monday, February 11, 2002 11:48 AM
> > > > > To: Todd Williamsen
> > > > > Cc: [EMAIL PROTECTED]
> > > > > Subject: Re: [PHP-WIN] Re: Searching MS Word Docs
> > > > >
> > > > >
> > > > > Sorry, I didn't read all your posts, just the last one. If
your
> > > platform
> > > > > is
> > > > > not windoze, COM won't help you (neither ASP)...
> > > > > You have to do a binary search in your Word file.
> > > > > A+
> > > > > Alain
> > > > >
> > > > > On Mon, Feb 11, 2002 at 11:17:29AM -0600, Todd Williamsen
wrote:
> > > > > > 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 ---
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 ---
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 ---
A big HELLO to php-windows,

I posted this once when I first joined the list but no replies so not sure if it
got through. Anyway, I'll try once more.

I'm experiencing a problem with PHP4.0.3.pl1 and the query_string function.

This only happens using Microsoft IE 4.01.

I have a link which has several query parameters, however this is not being
passed/received correctly.

Example:

Link = http://xxx/xxx.php?db=yha-men-2001&section=Men&season=2001-2002

in xxx.php, getenv("QUERY_STRING") returns

   db=yha-men-2001ion=Men&season=2001-2002

Notice that "&sect" is missing from the middle of the string.

Don't know if this happens all the time or is intermittent - I don't have IE4
and don't know if any visitors are OK as I'm only reporting errors (details
e-mailed to me).

Anybody got any ideas? Not found anything in the bug list.

-- 
Cheers,
Neil


--- End Message ---
--- Begin Message ---
I have just installed the GD-library when I installed PHP 4.1.
This version (1.6.2) seems to have trouble creating GIF-images, no probs
creating PNG.
My friend pointed out to me that for this to work, you need a version <=1.3
of GD.
He also said that there might be some patched versions out there, but I
haven't been able to find any.

Any thoughts?

ERROR MESSAGE:
<b>Warning</b>:  ImageGif: No GIF create support in this PHP build in...

SETUP PRINTED OUT FROM phpinfo():
GD - Support enabled
GD Version - 1.6.2 or higher
FreeType Support - enabled
FreeType Linkage - with TTF library
JPG Support - enabled
PNG Support - enabled
WBMP Support - enabled

// Tobias


--- End Message ---
--- Begin Message ---
I have a patched version (php_gd_gif.dll) which works with PHP 4.1.1
installed in Windows 2000, but I'll be damned if I can remember where I
found it. If you want it, I've put it on my web site
http://www.gpick.com/sbr/archives/php_gd_gif.zip (162 KB).

GD Support enabled
GD Version 1.6.2 or higher
FreeType Support enabled
FreeType Linkage with TTF library
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled

DISCLAIMER! I didn't build this! I haven't had any problems, but use at your
own risk!
--
Dave "Crash" Dummy
Certified Dilettante
[EMAIL PROTECTED]
http://lists.gpick.com


--- End Message ---
--- Begin Message ---
I prefer winrar for all of my windows based compressing because it reads tar
and gz files as well as a plethora of other types.  It only writes rar, but
that is fine for me....it is excellent shareware that isn't too expensive to
register.

-----Original Message-----
I've been trying to download the source code (for the first time) and have
been unable to get it untarred... can someone give me a good ungz/untar
program?  The free stuffit expander can't handle the job...
--- End Message ---
--- Begin Message ---
Another option is PowerArchiver (www.powerarchiver.com). A WinZIP clone
that's only $20 and supports:

ZIP, CAB, LHA (LZH), TAR, TAR.GZ, TAR.BZ2, BH, RAR, ARJ, ARC, ACE, ZOO, GZ,
BZIP2, XXE, and UUE

The previous version (6.1) was freeware, so if you can track down a copy of
it you're set.


-----Original Message-----
From: Shrock, Court [mailto:[EMAIL PROTECTED]]
Sent: 11-Feb-02 16:03
To: 'Asendorf, John'; Php-Windows (E-mail)
Subject: RE: [PHP-WIN] Downloading the source code


I prefer winrar for all of my windows based compressing because it reads tar
and gz files as well as a plethora of other types.  It only writes rar, but
that is fine for me....it is excellent shareware that isn't too expensive to
register.

-----Original Message-----
I've been trying to download the source code (for the first time) and have
been unable to get it untarred... can someone give me a good ungz/untar
program?  The free stuffit expander can't handle the job...

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


--- End Message ---
--- Begin Message ---
I may be being dafter, but are these on different pages?  If not then they
should be in my mind...

The form should be on an html page, posting to a seperate php page, unless
there are some other indentifying shenanigans that you're not showing us
just now.
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>
</body>
</html>

registrer.php ->

<?
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!");
}
?>


-----Original Message-----
From: chris [mailto:[EMAIL PROTECTED]]
Sent: 11 February 2002 11:10
To: [EMAIL PROTECTED]
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 ---
> 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 ---
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 ---
If you're using apache then the apache variable should be $REMOTE_ADDR

I'm not sure if these emails of mine are getting through though...

Ross

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



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

--- End Message ---
--- Begin Message ---
>If you're using apache then the apache variable should be $REMOTE_ADDR

Same for IIS 5 (Windows 2000).
--
Dave "Crash" Dummy
Certified Dilettante
[EMAIL PROTECTED]
http://lists.gpick.com


--- End Message ---
--- Begin Message ---
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



--
-Mike Taekema
Microsoft Certified Professional
www.fvforces.net



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

"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 ---

Reply via email to