OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: php-general-digest-helplists.php.net
Date: Mon Mar 12 2001 - 07:32:45 CST

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    php-general Digest 12 Mar 2001 13:32:45 -0000 Issue 562

    Topics (messages 43423 through 43463):

    ASP vs PHP
            43423 by: Chris Anderson
            43427 by: Michael Kimsal
            43428 by: Rick St Jean
            43434 by: Steve Edberg
            43440 by: Simon Garner
            43447 by: Carsten Gehling
            43452 by: Carsten Gehling

    RegExp help..
            43424 by: John Vanderbeck
            43425 by: David Robley
            43435 by: Fredrik Wahlberg

    Re: Resource for PHP and other technologies
            43426 by: Valter Santos

    Good Free PHP Editor?
            43429 by: Andrew Halliday
            43430 by: David Robley
            43431 by: John LYC
            43439 by: Simon Garner
            43456 by: Aviv Revach
            43457 by: Nick Davies
            43458 by: Lucas Persona

    Re: Best way to pass SQL TEXT field via a link
            43432 by: Jens Nedal

    header
            43433 by: Nick Kostirya
            43444 by: Christian Reiniger

    form code for download - very powerful, object oriented
            43436 by: Jeffrey Greer

    Re: sharing variables
            43437 by: Tiki

    Re: Mailing List
            43438 by: Peter Sabaini
            43461 by: Harshdeep S Jawanda
            43462 by: Harshdeep S Jawanda
            43463 by: Nick Davies

    Grab and print user IP address
            43441 by: Dream
            43451 by: mailing_list.gmx.at
            43454 by: Dream
            43455 by: mailing_list.gmx.at

    Re: Problems with string replacement
            43442 by: Christian Reiniger

    Re: New to navigation functions...
            43443 by: Yasuo Ohgaki

    Re: File Upload Size Limit Problem
            43445 by: Yasuo Ohgaki

    Quotes in inputfields & Reload
            43446 by: Jens Nedal

    Re: newbie array question
            43448 by: Robin Vickery

    Close persistent db-Connection
            43449 by: Carola Meyberg

    Re: fscanf
            43450 by: Yasuo Ohgaki

    Using selected fields
            43453 by: Tristan.Pretty.risk.sungard.com

    Re: printing data using javascript with php
            43459 by: Tim Ward

    (doubt)MCAL installation
            43460 by: Celestino Roberto Alejandro

    Administrivia:

    To subscribe to the digest, e-mail:
            php-general-digest-subscribelists.php.net

    To unsubscribe from the digest, e-mail:
            php-general-digest-unsubscribelists.php.net

    To post to the list, e-mail:
            php-generallists.php.net

    ----------------------------------------------------------------------

    attached mail follows:


    This is going to sound like heresy, but is there any way to use ASP and PHP in the same fle/page? Seperated of course.

    attached mail follows:


    You're comparing a framework to a language.

    ASP is a technology which allows code for different languages to be embedded in a file
    parsed by a webserver (IIS). To accomplish this, different languages need to be written
    as modules for that webserver. MS has VBScript (default language), JScript and PerlScript
    (anyone know of any more?). If someone was to write PHP to be an ASP/IIS module
    that could be executed under the ASP framework, then yes. Until then, no. I also
    don't think it's a likely scenario, but I've been wrong many times before in my life. :)

    Chris Anderson wrote:

    > This is going to sound like heresy, but is there any way to use ASP and PHP in the same fle/page? Seperated of course.

    attached mail follows:


    I was told by someone that it is possible with apache. You can have
    something parse
    the page once then be parsed by something else. I don't know how and I
    have never seen
    it but I have been told that it is possible.

    Rick

    At 11:28 PM 3/11/01 -0500, Michael Kimsal wrote:
    >You're comparing a framework to a language.
    >
    >ASP is a technology which allows code for different languages to be
    >embedded in a file
    >parsed by a webserver (IIS). To accomplish this, different languages need
    >to be written
    >as modules for that webserver. MS has VBScript (default language),
    >JScript and PerlScript
    >(anyone know of any more?). If someone was to write PHP to be an ASP/IIS
    >module
    >that could be executed under the ASP framework, then yes. Until then,
    >no. I also
    >don't think it's a likely scenario, but I've been wrong many times before
    >in my life. :)
    >
    >
    >
    >Chris Anderson wrote:
    >
    > > This is going to sound like heresy, but is there any way to use ASP and
    > PHP in the same fle/page? Seperated of course.
    >
    >
    >--
    >PHP General Mailing List (http://www.php.net/)
    >To unsubscribe, e-mail: php-general-unsubscribelists.php.net
    >For additional commands, e-mail: php-general-helplists.php.net
    >To contact the list administrators, e-mail: php-list-adminlists.php.net

    ##########################################################
    # Rick St Jean,
    # rstjeaninternet.look.ca
    # President of Design Shark,
    # http://www.designshark.com/
    # Quick Contact: http://www.designshark.com/messaging.ihtml
    # Tel: 905-684-2952
    ##########################################################

    attached mail follows:


    At 11:48 PM -0500 3/11/01, Rick St Jean wrote:
    >I was told by someone that it is possible with apache. You can have
    >something parse
    >the page once then be parsed by something else. I don't know how
    >and I have never seen
    >it but I have been told that it is possible.
    >
    >Rick

    That would be 'stacked request handlers'...not possible, AFAIK, with
    any of the 1.x versions, but supposedly Apache 2.0 can do it. Check
    out httpd.apache.org; v2.0 is still alpha.

            - steve

    >
    >At 11:28 PM 3/11/01 -0500, Michael Kimsal wrote:
    >>You're comparing a framework to a language.
    >>
    >>ASP is a technology which allows code for different languages to be
    >>embedded in a file
    >>parsed by a webserver (IIS). To accomplish this, different
    >>languages need to be written
    >>as modules for that webserver. MS has VBScript (default language),
    >>JScript and PerlScript
    >>(anyone know of any more?). If someone was to write PHP to be an
    >>ASP/IIS module
    >>that could be executed under the ASP framework, then yes. Until
    >>then, no. I also
    >>don't think it's a likely scenario, but I've been wrong many times
    >>before in my life. :)
    >>
    >>
    >>
    >>Chris Anderson wrote:
    >>
    >>> This is going to sound like heresy, but is there any way to use
    >>>ASP and PHP in the same fle/page? Seperated of course.
    >>
    >>
    >>--
    >>PHP General Mailing List (http://www.php.net/)
    >>To unsubscribe, e-mail: php-general-unsubscribelists.php.net
    >>For additional commands, e-mail: php-general-helplists.php.net
    >>To contact the list administrators, e-mail: php-list-adminlists.php.net
    >
    >##########################################################
    ># Rick St Jean,
    ># rstjeaninternet.look.ca
    ># President of Design Shark,
    ># http://www.designshark.com/
    ># Quick Contact: http://www.designshark.com/messaging.ihtml
    ># Tel: 905-684-2952
    >##########################################################
    >

    -- 
    +--- "They've got a cherry pie there, that'll kill ya" ------------------+
    | Steve Edberg                           University of California, Davis |
    | sbedbergucdavis.edu                               Computer Consultant |
    | http://aesric.ucdavis.edu/                  http://pgfsun.ucdavis.edu/ |
    +-------------------------------------- FBI Special Agent Dale Cooper ---+
    

    attached mail follows:


    From: "Chris Anderson" <chrisdersonameritech.net>

    > This is going to sound like heresy, but is there any way to > use ASP and PHP in the same fle/page? Seperated of course.

    What if you put:

    <!--#include virtual="path/to/file.php"-->

    in your ASP page?

    attached mail follows:


    From: "Simon Garner" <sgarnerexpio.co.nz> Sent: Monday, March 12, 2001 10:45 AM

    > > This is going to sound like heresy, but is there any way to > > use ASP and PHP in the same fle/page? Seperated of course. > > > What if you put: > > <!--#include virtual="path/to/file.php"--> > > in your ASP page?

    Won't work I'm afraid. ASP expects all included files to use same language as the base file. Doesn't matter if you call them .php, .inc, .asp, .foo ...

    - Carsten

    attached mail follows:


    From: "Simon Garner" <sgarnerexpio.co.nz> Sent: Monday, March 12, 2001 11:37 AM

    > Are you sure? The #include is an SSI directive, not ASP. It should create a > separate internal HTTP request for the included file. I know for sure that > for example you can include a JScript ASP page inside a VBScript ASP page > like this - although I realise that's not the same difference as ASP/PHP.

    You're right about that, but AFAIK ASP will simply not allow two different serverside script languages on the same page (which it becomes once the inclusion is complete). You must state your language=... directive as the first ASP statement after which it cannot be changed.

    Unless of course you use:

    <script runat=server language=vbscript> ... your code here </script>

    <script runat=server language=jscript> ... your code here </script>

    Don't know if that will work though.

    - Carsten

    attached mail follows:


    I really wish I could figure these darn things out :) I have a task I need to do, and i'm certain I could do this easily with a regexp..

    I have a file name in the format MMDDYY-*.txt...I need to parse it to determine if the month and year matches a specified month and year. Day is irrelevant

    Can any of your regexp wizards help me?

    Thanks!

    - John Vanderbeck - Admin, GameDesign

    attached mail follows:


    On Mon, 12 Mar 2001 12:10, John Vanderbeck wrote: > I really wish I could figure these darn things out :) I have a task I > need to do, and i'm certain I could do this easily with a regexp.. > > I have a file name in the format MMDDYY-*.txt...I need to parse it to > determine if the month and year matches a specified month and year. > Day is irrelevant > > Can any of your regexp wizards help me?

    A non-regexp solution that comes to mind is to use substr() to extract the bits you want from the filename, assuming the filenames to be always as your example. So:

    $month = substr($filename,0,2); $year = substr($filename,4,2);

    Then you have the string values for month and year in the respective variables.

    -- 
    David Robley                        | WEBMASTER & Mail List Admin
    RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
    AusEinet                            | http://auseinet.flinders.edu.au/
                Flinders University, ADELAIDE, SOUTH AUSTRALIA
    

    attached mail follows:


    Try this:

    $ ereg("^([0-9]{2})[0-9]{2}([0-9]{2}).*", $var, $hits) if ($hits[1] == themonth && $hits[2] == theyear) { do_the_stuff }

    What it does is that it puts the first two digitst into $hits[1], skips the two nextcoming digits and finally puts the next two numbers into $hits[2]

    /Fredrik

    >>>>>>>>>>>>>>>>>> Ursprungligt meddelande <<<<<<<<<<<<<<<<<<

    John Vanderbeck <agathorncfl.rr.com> skrev 2001-03-12, kl. 02:40:25 angående ämnet [PHP] RegExp help..:

    > I really wish I could figure these darn things out :) I have a task I need > to do, and i'm certain I could do this easily with a regexp..

    > I have a file name in the format MMDDYY-*.txt...I need to parse it to > determine if the month and year matches a specified month and year. Day is > irrelevant

    > Can any of your regexp wizards help me?

    > Thanks!

    > - John Vanderbeck > - Admin, GameDesign

    > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    The site is very cool, narsu!!!

    Congratulations, and keep the good work!

    ............................................ Valter Santos WEB/WAP Consultant

    Email : valter.santoswedo.pt Mobile: +351 93 9650075

    WeDo Consulting - http://www.wedo.pt ............................................

    > -----Original Message----- > From: narsu [mailto:narsugitanjali.com] > Sent: Friday, March 09, 2001 10:35 PM > To: php-generallists.php.net > Subject: [PHP] Resource for PHP and other technologies > > > I developed this site http://www.hytes.com > for techical resource for developers. Please take a look and let me know > your feedback. > > Thanks > Narsu > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    Does anyone know of a good PHP enabled editor that fits the following criteria:?

    (in order of importance) - Is free - Runs under Windows - Has colors (syntax highlighting) - Can edit multiple files (ie multi threaded) - Reports line numbers - Has good search & replace functionality

    ???

    Ive been using editpad up till now but my code is starting to get so large that ill need syntax highlighting soon...

    AndrewH

    attached mail follows:


    On Mon, 12 Mar 2001 17:34, Andrew Halliday wrote: > Does anyone know of a good PHP enabled editor that fits the following > criteria:? > > (in order of importance) > - Is free > - Runs under Windows > - Has colors (syntax highlighting) > - Can edit multiple files (ie multi threaded) > - Reports line numbers > - Has good search & replace functionality > > ??? > > Ive been using editpad up till now but my code is starting to get so > large that ill need syntax highlighting soon... > > AndrewH

    On your local PHP mirror, go to the Links page and scroll down til you find PHP Scripts and Programs - follow the link for editor information by the ton.

    -- 
    David Robley                        | WEBMASTER & Mail List Admin
    RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
    AusEinet                            | http://auseinet.flinders.edu.au/
                Flinders University, ADELAIDE, SOUTH AUSTRALIA
    

    attached mail follows:


    http://www.ultraedit.com

    not free.. but worth the nominal fee

    Andrew Halliday wrote:

    > Does anyone know of a good PHP enabled editor that fits the following > criteria:? > > (in order of importance) > - Is free > - Runs under Windows > - Has colors (syntax highlighting) > - Can edit multiple files (ie multi threaded) > - Reports line numbers > - Has good search & replace functionality > > ??? > > Ive been using editpad up till now but my code is starting to get so large > that ill need syntax highlighting soon... > > AndrewH > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    From: "Andrew Halliday" <andrewrecalldesign.com>

    > Does anyone know of a good PHP enabled editor that fits the following > criteria:? > > (in order of importance) > - Is free > - Runs under Windows > - Has colors (syntax highlighting) > - Can edit multiple files (ie multi threaded) > - Reports line numbers > - Has good search & replace functionality > > ??? > > Ive been using editpad up till now but my code is starting to get so large > that ill need syntax highlighting soon... > > AndrewH >

    HomeSite is great. www.allaire.com

    - not totally free I'm afraid, but there is an eval version. - runs under Windows yes - supports syntax highlighting for lots of languages including HTML, PHP, Perl, SQL, ASP (VB/JS). - can edit multiple files yes - shows line numbers in gutter on left hand side - supports regular-expression based search & replace across multiple files/directories - nice interface.

    Cheers

    Simon Garner

    attached mail follows:


    Hey!

    PHPEd is free:

    * Runs under Windows. * Has syntax highlighting. Supports: Html, Perl, Php, SQL, and regular text files. * Can edit multiple files * I'm quite sure it reports line numbers. * It has a very good search & replace functionality.

    This is obviously what you need!!

    You can get it from: http://soysal.com/PHPEd/

    Best Regards -

    Aviv Revach

    BRILLIANeT Website - http://www.brillianet.com/

    attached mail follows:


    How about linux ones?

    I just tend to use vim or emacs but i'm sure there are some out there.

    On Sun, 11 Mar 2001, Aviv Revach wrote:

    > Hey! > > > PHPEd is free: > > * Runs under Windows. > * Has syntax highlighting. Supports: Html, Perl, Php, SQL, and regular > text files. > * Can edit multiple files > * I'm quite sure it reports line numbers. > * It has a very good search & replace functionality. > > This is obviously what you need!! > > You can get it from: http://soysal.com/PHPEd/ > > > Best Regards - > > Aviv Revach > > BRILLIANeT Website - > http://www.brillianet.com/ > > >

    attached mail follows:


    Andrew Halliday wrote: > > Does anyone know of a good PHP enabled editor that fits the following > criteria:? > > (in order of importance) > - Is free > - Runs under Windows > - Has colors (syntax highlighting) > - Can edit multiple files (ie multi threaded) > - Reports line numbers > - Has good search & replace functionality

    You could try ConTEXT ( http://www.fixedsys.com/context/ ) It has everything you've described above..and yes..its free!

    -- 
    Lucas Persona
    

    attached mail follows:


    Actually the best would be if you would remain in the page so you dont have to pass any variables along the url but just in a submit form to the current page. There you could include your addupdate.php with a trigger like <input type=hidden name=action value=save> and just ask that value of that field in an if-clause. if true just include the addupdate and execute it along.

    Hope that helps, Jens Nedal

    on 11.03.2001 18:12 Uhr, Fates at fateswarninghome.com wrote:

    > I'm trying to update an existing record based on a link that represents > the record to update. > > I have a link and I am passing variables that were assigned from a SQL > database to another php form page which will be used to update the > record. I'm passing variable like so:<a > href='addupdate.php?name=$name&category=$category&description=$etc..... > > This works fine for variables that contain values of only a few lines > but what about passing a couple paragraphs stored in variable > $description assigned via database value as TEXT. > > Would it be better just to pass the database record ID to the > destination page and then query the record in the destination form page > and populate the form with the current values and update the record or > is there another way I don't know about? >

    attached mail follows:


    Hello! Why header under Windows do not work? Nick

    attached mail follows:


    On Monday 12 March 2001 08:33, you wrote: > Hello! > Why header under Windows do not work?

    Because you have some problem.

    That's all that can be said without telepathic skills.

    -- 
    Christian Reiniger
    LGDC Webmaster (http://sunsite.dk/lgdc/)
    

    Error 032: Recursion error - see error 032

    attached mail follows:


    Hello,

    I've created some form code. It is not finished yet, but it is usable and powerful. I've looked at other form code, but none is object oriented. I've put this code up before it is finished so I can get some suggestions for future development.

    With this form class you can create your own inputs which inherit from the base class input. You could also add one more level of inheritance for javascript functionality. This form class also supports style sheets.

    Check it it. I have a working example at: http://www.showmethenet.com/~cleaner/code/code.php

    The source is free.

    --
    Jeff Greer
    - B.S. computer science - Univ. MO - Rolla
    - web developer/software engineer,
    dedicated to the struggle against the fascist
    Microsoft hegemony
    

    attached mail follows:


    Be careful. Only for PHP4. Alternatively, try PHPLIB. Works for me:)

    ""Chris Lee"" <leemediawaveonline.com> wrote in message news:98bfqi$asb$1toye.p.sourceforge.net... sessions

    <?php

    /*

    http://php.net/manual/en/ref.session.php

    sessions with cookies ------------------------ - will transfer across full urls - will transfer acress full form urls - will not set SID - will not transfer across multiple domainnames

    sessions without cookies ------------------------ - will set SID - will transfer across multiple domainnames if the domain name is on the same server and $SID is manualy appended to the url - will transfer across full urls if $SID is appended to the url - will transfer across full form urls if $SID is appended to the form url

    */

    function mtime() { $mtime = microtime(); $mtime = str_replace('.', '', $mtime); $mtime = explode(' ', $mtime); $mtime = $mtime[1] . $mtime[0];

    return($mtime); }

    if ( isset($HTTP_GET_VARS['PHPSESSID']) ) session_id($HTTP_GET_VARS['PHPSESSID']); if ( isset($HTTP_POST_VARS['PHPSESSID']) ) session_id($HTTP_POST_VARS['PHPSESSID']);

    if (!isset($HTTP_SESSION_VARS['SessionID'])) { $SessionID = mtime(); session_register('SessionID'); }

    $PHPSESSID = session_id(); $SID = "PHPSESSID=$PHPSESSID";

    //----

    echo " <a href='http://$SERVER_NAME/$PHP_SELF?$SID'>here </a> ";

    ?>

    there ya go

    --
    

    Chris Lee Mediawaveonline.com

    ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120

    leemediawaveonline.com

    "Leo" <leodebeohotmail.com> wrote in message news:98be7g$qnj$1toye.p.sourceforge.net...

    hi

    i'm currently programming a php web application and i have the following problem: i need a login scheme; programmed a simple one. Whichever page the user reaches, in some i need their userid, for extra validation. so basically, i'm looking for a mechanism to share a variable between multiple pages, but as i don't always use forms, i think i can't use url-encoding with the a-tag to make the userid available for all scripts. maybe there is support for logging users in, i don't know anyone an idea?

    tx

    -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-helplists.php.net To contact the list administrators, e-mail: php-list-adminlists.php.net

    -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-helplists.php.net To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    On Mon, Mar 12, 2001 at 11:59:37AM +1030, David Robley wrote: > On Mon, 12 Mar 2001 11:54, Thomas Anderson wrote: > > Ok, I've tried time and time again to unsubscribe from php.net's > > mailing list unisubscribe instructions but it doesn't work. So how do I > > get off the list? > > > > > The following is at the bottom of each message from the list: > > To contact the list administrators, e-mail: php-list-adminlists.php.net

    which i did. and also emailed php-general-unsubscribelists.php.net.

    to no avail i am afraid.

    i think you should check your setup...

    meanwhile i am just going to set up some procmail rule to redirect this to /dev/null i guess.

    <shrug />

    peter.

    --- snip ---

    Date: Mon, 5 Mar 2001 14:36:09 +0100 From: Peter Sabaini <p.sabaininetconomy.net> To: php-list-adminlists.php.net Subject: unsubscribe wont work User-Agent: Mutt/1.2.5i hi, for some reason i cannot unsubscribe myself from php-general. i dont even get a reply from the help address. can you please unsubscribe me? thanks, peter. --- snip ---

    Date: Tue, 27 Feb 2001 19:35:04 +0100 From: Peter Sabaini <p.sabaininetconomy.net> To: php-general-unsubscribelists.php.net Subject: unsubscribe User-Agent: Mutt/1.2.5i

    -- 
    Peter Sabaini p.sabaininetconomy.net
    NETCONOMY Onlineberatungs- und -management Gmbh & Co KG
    www.netconomy.net - Schoenaugasse 64, 8010 Graz
    Tel. +43-(0)316 875-3081 
    

    --- snip ---

    attached mail follows:


    > On Mon, Mar 12, 2001 at 11:59:37AM +1030, David Robley wrote: > > On Mon, 12 Mar 2001 11:54, Thomas Anderson wrote: > > > Ok, I've tried time and time again to unsubscribe from php.net's > > > mailing list unisubscribe instructions but it doesn't work. So how do I > > > get off the list?

    I suppose you must already have tried sending mail to php-general-unsubscribelists.php.net by now.

    Just one small point: is the email address from which you send off your unsubscription request the one at which you receive mail from this list?

    Another point to consider: it may be that you are subscribed to the list using a redirecting email address. If that is the case, you'll have to send your unsubscription email from that address. Could you check that up?

    --
    Regards,
    Harshdeep Singh Jawanda.
    

    attached mail follows:


    Hi,

    Harshdeep S Jawanda wrote:

    > I suppose you must already have tried sending mail to > php-general-unsubscribelists.php.net by now.

    I tried this address and it worked for me.

    --
    Regards,
    Harshdeep Singh Jawanda.
    

    attached mail follows:


    On Mon, 12 Mar 2001, Harshdeep S Jawanda wrote:

    > Hi, > > Harshdeep S Jawanda wrote: > > > I suppose you must already have tried sending mail to > > php-general-unsubscribelists.php.net by now. > > I tried this address and it worked for me. >

    Obviously ;)

    > -- > Regards, > Harshdeep Singh Jawanda. > > > >

    attached mail follows:


    Hi!

    I need just a little script so I can get and print in browser the currently users IP address and if possible, browser type, etc.

    Thanks a lot!

    marc

    attached mail follows:


    > Hi! > > I need just a little script so I can get and print in browser the > currently > users IP address and if possible, browser type, etc.

    <html> <body> <pre> <? echo "Your IP-Address: $HTTP_SERVER_VARS[REMOTE_ADDR]\n"; echo "Your Browser : $HTTP_SERVER_VARS[HTTP_USER_AGENT]\n"; ?> </pre> </body> </html>

    HTH michi

    -- 
    Sent through GMX FreeMail - http://www.gmx.net
    

    attached mail follows:


    Thanks, michi....

    Just a question, what means the tag <PRE>?

    thanks! marc

    <mailing_listgmx.at> escribió en el mensaje news:13896.984394797www12.gmx.net... > > Hi! > > > > I need just a little script so I can get and print in browser the > > currently > > users IP address and if possible, browser type, etc. > > <html> > <body> > <pre> > <? > echo "Your IP-Address: $HTTP_SERVER_VARS[REMOTE_ADDR]\n"; > echo "Your Browser : $HTTP_SERVER_VARS[HTTP_USER_AGENT]\n"; > ?> > </pre> > </body> > </html> > > HTH > michi > > -- > Sent through GMX FreeMail - http://www.gmx.net > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    > Thanks, michi.... > > Just a question, what means the tag <PRE>? > Commonly used for programing code! All between the tags is written AS IS!! try the below with and without <pre>:

    <html><body> <pre> My program BEGIN If event do something else dont do something fi END ; </pre> </body></html>

    michi

    -- 
    Sent through GMX FreeMail - http://www.gmx.net
    

    attached mail follows:


    On Sunday 11 March 2001 23:44, you wrote: > >> Well, I'm having problems again. This time with string replacement. > >> I'd like people to be able to write notes on one of the site's I'm > >> helping with, and would like them to be able to use Bold, Italic, > >> Underline and <a href> tags. I tried using striptags(); but that > >> would strip anything within double quotes too. So I've gotten > >> around it by > > > > huh? strip_tags works fine for me. > > > > echo strip_tags ('Hello <a href="http://foo/">bar</a> > > "world"<br><em>there</em>', '<a> <br>'); > > > > creates > > > > 'Hello <a href="http://foo/">bar</a> "world"<br>there' > > True, but then it doesn't: > -Open the link in a new window

    ?? You have some tag like <a href="http://foo.bar/" target="_new">link</a> and strip_tags() transforms this to <a href="http://foo.bar/">link</a> ?

    Or what do you mean with that?

    > it does: > -remove all content between "and".

    No. Just plain no. See my example above. The stuff in quotes was kept without any problems.

    > Of course, I could replace quote marks with htmlspecialchars/entities > or using manual string replacement, but then it'd render all tags using > quote marks invalid. > > See the problem? ;)

    No ;) Perhaps if you could provide some example code...

    -- 
    Christian Reiniger
    LGDC Webmaster (http://sunsite.dk/lgdc/)
    

    Error 032: Recursion error - see error 032

    attached mail follows:


    I cannot figure out what is your problem exactly. Could you explain what you want to do with on server side(PHP) and client side(JavaScript) again on the new thread?

    Regards,

    --
    Yasuo Ohgaki
    

    ""Richard"" <oblivionlunamorena.net> wrote in message news:98ev42$r6d$1toye.p.sourceforge.net... > Thanks, I will check it out. > > Anyhow, I was thinking of fixing an Update bug that I have in one of my > scripts. I use the same php file for reading and saving a file, the thing > is, if the user hits update or whatever, the entry or text will be entered > again, because the address is file.php?PARAM1=...&PARAM2=... Can you > help me with this one? What I want to do is to make sure that the location > is purely the website address and the php file name. > > - Richard > > > > ""Yasuo Ohgaki"" <yohgakihotmial.com> wrote in message > news:98epti$n83$1toye.p.sourceforge.net... > > ""Richard"" <oblivionlunamorena.net> wrote in message > > news:98eo58$7fg$1toye.p.sourceforge.net... > > > Greetings. > > > > > > I was wondering if there is any function like the JavaScript > function: > > > location.href = ""......... or perhaps how I can execute a javascript > > > function from PHP. All related help is appriciated. > > > > > > > You cannot execute JavaScript function, but you can use Java. There are > > articles about it on phpbuilder.com or else. > > > > Server side and Client side scripts are nothing to do with each other. You > > can specify parameters for client side script in server side script, > though. > > > > Regards, > > -- > > Yasuo Ohgaki > > PHP and Related resources > > [PHP FAQ] http://www.php.net/FAQ.php > > [PHP Manual] http://www.php.net/manual/en/ > > [PHP Links] http://www.php.net/links.php > > [RFCs] http://www.faqs.org/rfcs/ > > > > > > > - Richard > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > > For additional commands, e-mail: php-general-helplists.php.net > > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    If you have been changed your php.ini to accept larger uploaded files. Then there are many possibilities. If you explain what kind of environment you have and it's settings, someone might be able to help you.

    Regards,

    --
    Yasuo Ohgaki
    

    ""Jeff Oien"" <jeffwebdesigns1.com> wrote in message news:NDBBJKNCILKDCEGAJBAOIEHLDGAA.jeffwebdesigns1.com... > > ""Jeff Oien"" <jeffwebdesigns1.com> wrote in message > > news:NDBBJKNCILKDCEGAJBAOCEHJDGAA.jeffwebdesigns1.com... > > > I've modified a script for uploading multiple files > > > and am trying to get it to produce an error if the > > > size of the file is larger than 2 MB but can't get it > > > to work. Here is the code in question with the > > > who code below. When I try to upload a 3 MB > > > file it doesn't produce an error. Everything else works > > > fine. > > > > You need to edit your php.ini > > Read your php.ini and look for upload_max_filesize. > > > > Regards, > > -- > > Yasuo Ohgaki > > I know my max_file_size 2 MB. > I want to prevent a user from trying to upload a file that > is larger than 3 MB. > Jeff Oien > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    Hy everybody,

    Well here is the deal (Probably an easy one 8)) I have several inputfields and check if the are valid or have content. If an error occurs and the page reloads i simply echo the content of the fields back into the input fields, viola, wonderful.

    BUT if there are " eg. Quotes in those fields they suddenly read \" instead of " as they should 8(

    I guess that the parser is doing something to it there since " is a sensitive char in php. BUT how can i get the content to be reloaded correctly into the fields again.

    Here an example of how those fields look like

    <input type=text name=v_email value="<?php echo($v_email); ?>" size=40>

    tried it like this too, no difference: <input type=text name=v_email value="<?php echo("$v_email"); ?>" size=40>

    thx in advance, Jens Nedal

    attached mail follows:


    >>>>> "S" == "stas" <stasnewdel.net> writes:

    > Thanks, I know that, but I don't want to type out assignments > manually, as my list of my form values will grow. However, I solved > very simply like this:

    > $form_val_list = "firstname,lastname,address,address2,city,state,zip,phone,email,resume"; > $form_arr = explode (",", $form_val_list);

    > while (list ($key, $val) = each ($form_arr)) { > $new_arr[ $val] = "some test value"; > }

    If you're not bothered about the initial values in the hash, you can do it with array_flip() like this:

    <?php $fields = explode( ',', 'firstname,lastname,city,state,phone' ); $form = array_flip( $fields ); ?>

    You'll end up with a hash like this:

    $form = array( 'firstname' => 0, 'lastname' => 1, 'city' => 2, 'state' => 3, 'phone' => 4 );

    -- 
    Robin Vickery...............................................
    Planet-Three,  3A West Point, Warple Way, London, W3 0RG, UK
    Email: robinplanet-three.net     Phone: +44 (0)870 729 5444
    

    attached mail follows:


    I cannot find out how I can manually close a persistent Postgres Database Connection that has been established by pg_pconnect. I believe pg_close only closes non-persistent connections.

    Does anyone know how to do this?

    attached mail follows:


    "Kubol" <kubolkormoran.trzepak.pl> wrote in message news:200103112020.f2BKKbf27786kormoran.trzepak.pl... > hello > > if this is really a silly problem dont blame me, i'm a newbie in php (but i'm experienced in c++ a bit :-) > well, imagine i want to write a content of some text file word by word. example will be more understandable > than my english: > let file.txt consists: > lenin lives > forever > i want my php script to write to the screen: > lenin > lives > forever > I tried to manage this using fscanf function. i expected it works same as in c, but it looks it doesnt. consider > the code: > while (fscanf($file,"%s",$buffer)==1) > { > echo $buffer,"<br>"; > } > the result: > lenin > forever > just like fscanf moved the file pointer to the next line after reading "lenin". i dont know whats up... why "lives" > disappeared??? i know i can try using fgets and then split the string, but i want to know why fscanf doesnt > work... :-) > could anyone explain me this phenomena?

    I think fscanf() is line oriented in C, isn't it? (I haven't used fscanf() for a long time, I'm not 100% sure w/o reference.) "%s" format in fscanf() and sscanf() will macthes sequecne of non-white-space charactors in C and PHP. Your $buffer should only have "lenin".

    So if you write like

    while (fscanf($file,"%s %s",$buf1,buf2))

    You should get "lives" in $buf2.

    Regards, Yasuo Ohgaki

    > > best regards, > jakub zytka > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    Hi there, Firstly a big thanks to those who pointed me in the direction of 'PHP-fast and easy web development'. it was/is a great book, and I have learnt loads on the past week.

    Anyhoo...

    I have a php page and included the line:

    $sql = "SELECT * FROM $table_name WHERE member = \"$member\" AND pw = \"$pw\" ";

    Now I have a third column called 'userlevel'.

    I have a cookie that activates on successfully matching the member and pw fields from a form on the previous page. make sense?

    How can I tell the page to use the userlevel colunm too?

    Here is the relevent section to my code... can anyone point me in teh rigth direction please???

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

    $sql = "SELECT * FROM $table_name WHERE member = \"$member\" AND pw = \"$pw\" ";

    $result = mysql_query($sql) or die ("Can't execute query.");

    $num = mysql_numrows($result);

    if (($num != 0) && ($userlevel == 1)) {

    $cookie_name = "auth"; $cookie_value = "ok"; $cookie_expire = ""; $cookie_domain =""; setcookie($cookie_name, $cookie_value, $cookie_expire, "/", $cookie_domain, 0);

    $display_block ="

    <p><B>Secret area:</B> <UL> <LI><a href=\"secreta.php\">secret page a</A> <LI><a href=\"secretb.php\">secret page b</A> <LI><a href=\"secretc.php\">secret page c</A> <LI><a href=\"secretd.php\">secret page d</A> <LI><a href=\"secreteb.php\">secret page e</A> </UL> ";

    } else {

    header("Location: http://www.mypage.com"); exit; }

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

    Thanks guys... Tris...

    ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager.

    This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses.

    **********************************************************************

    attached mail follows:


    > -----Original Message----- > From: Nicole Lallande [mailto:mipanamipana.com] > Sent: 10 March 2001 00:12 > To: php-generallists.php.net > Subject: printing data using javascript with php > > > Dear Gurus: > > I am trying to use javascript with my php code to output data > onChange. > I have read the archives and know that because javascript is > client side > and php is server side I cannot interact natively on the page > except to > pass the variables through an http request. Here is what I have done > based on what I have read in the archives etc.: > > <script language="javascript"> > <!-- > function setboo() { > > var boo = <?php echo $boo ?>; > var dsc = <?php echo $dsc ?>; > var sz = <?php echo $sz ?>; > var prc = <?php echo $prc ?>; > document.forms[0].boo.value+=1;} > --> > </script> > > $boo is set to 0 within the php code and I am setting it to > one with the > javascript because I thought I could then use an if statement: > > //here is where boo gets set to one > echo "<td width=\"100\" align=\"left\"><select name=\"catalog_id\" > onChange=\"setboo()\">"; > this is the html code for the document.forms <input type="hidden" > name="boo" value="1"> > > so what is supposed to happen here is the user selects a > product by its > id number and presto - the rest of the information will be written to > the fields along side (I wish):

    if you want this to happen in the browser you have to have all the info sent with the page. I would do this with invisible DIV's which you can make visible or invisible in Javascript. I usually do something like obj.style.display = "" to show and obj.style.display = "none" to hide.

    if you want to get from the database every time you have to resubmit, which is slower and looks crap.

    > > //here is the if statement > if ($boo == '1') { > echo "<td width=\"350\" align=\"left\"><input type=\"text\" > name=\"description\" onChange=\"javascript: > document.write(dsc)\"></td>"; }

    if you want $dsc to be available to the javascript you have to send it with the html, either as a hidden field or in the query string. In this case what you may be wanting to do is send the contects of $dsc in which case replace document.write(dsc) with document.write('" . $dsc . "')") or however you like to do this sort of concatenation.

    > > where $dsc is set equal to an array element read in from a database in > the php code. Now I KNOW I have got things MAJORLY confused > here - but > the more I read the more wrapped up I seem to get so if there a way to > pull this off and someone knows - I would appreciate your help > > Thanks, > > Nicole > > -- > ######################## > Nicole Lallande > nicolenmlconsulting.com > 760.753.6766 > ######################## >

    it's hard to tell precisely what you want to do form your snippets, but I hope I've been of some help.

    Tim Ward Senior Systems Engineer

    Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html

    attached mail follows:


    How i can get further information about the installation of MCAL extension in a Solaris 2.7 environment?

    Roberto Celestino Universidad Nacional de la Matanza