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: Wed Aug 15 2001 - 19:48:21 CDT

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

    php-general Digest 16 Aug 2001 00:48:21 -0000 Issue 818

    Topics (messages 62815 through 62923):

    Re: a bit off the list but should be easy
            62815 by: Hugh Bothwell
            62916 by: Ryan Fischer

    MySQL Multi-Table Select Query Problem
            62816 by: Charles Williams
            62817 by: Hugh Bothwell

    apache,php,mysql,flash
            62818 by: AJDIN BRANDIC
            62827 by: Tim
            62829 by: AJDIN BRANDIC
            62833 by: Annand, Nigel
            62835 by: Tim

    Re: Looking for link system
            62819 by: WendyIR.aol.com
            62822 by: Thomas Deliduka

    Re: Regular Expression Problem and PHP 4 (urgent)
            62820 by: Ross Nielsen

    Re: could i get a clue?
            62821 by: Robert V. Zwink
            62824 by: Renze Munnik
            62831 by: Robert V. Zwink
            62832 by: Renze Munnik
            62838 by: Robert V. Zwink
            62868 by: Andrew Chase
            62905 by: marilyn manson

    Re: Need people's advice on a web registration system.
            62823 by: Robert V. Zwink

    different PHP platforms
            62825 by: Joe Sheble \(Wizaerd\)
            62849 by: Chris Hayes

    Running PHP as CGI under apache
            62826 by: Bob Jones

    Re: apache processes & memory use
            62828 by: WendyIR.aol.com

    Re: something like SSI ?
            62830 by: cyco_sid.pop.phreaker.net

    Mail method?
            62834 by: Tamas Bucsu
            62836 by: Tyler Longren
            62858 by: Hugh Bothwell

    Re: `pwd` - what does this mean?
            62837 by: Kurth Bemis

    libphp_java.so and APC
            62839 by: Rip

    Re: insertion question
            62840 by: Alfredeen, Johan

    Execute a PHP script from unix (crontab)
            62841 by: Augusto Cesar Castoldi
            62843 by: ReDucTor
            62857 by: Hugh Bothwell
            62860 by: Tom Henry
            62861 by: Kunal Jhunjhunwala
            62876 by: Michael Geier, CDM Systems Admin

    Date function
            62842 by: Mike Mike
            62845 by: ReDucTor
            62846 by: Brian C. Doyle

    need real expert (geting outer files) *english/german*
            62844 by: Tribun
            62850 by: ReDucTor
            62853 by: Chris Hayes
            62854 by: scott [gts]

    security with email data entries
            62847 by: Chris Hayes
            62852 by: ReDucTor

    Re: a bottle in the sea...
            62848 by: Chris Hayes

    weird array behaviour
            62851 by: Nick Davies
            62855 by: Alfredeen, Johan

    Apache virtual hosts & php
            62856 by: Jay Paulson
            62859 by: Kunal Jhunjhunwala
            62866 by: Jay Paulson
            62867 by: Kunal Jhunjhunwala

    HTTP Authentication
            62862 by: Jon Farmer

    Creating a javascript array from database data
            62863 by: Neil Freeman
            62865 by: Jon Farmer
            62869 by: Sheridan Saint-Michel
            62874 by: Neil Freeman

    Re: select problem
            62864 by: Gyozo Papp

    Question about PHP and images
            62870 by: Schrotty
            62879 by: Schrotty
            62880 by: Schrotty
            62883 by: Kunal Jhunjhunwala

    Re: javascript reference (slightly ot)
            62871 by: Al
            62896 by: Matthew Loff

    Help, I'm so close!!!
            62872 by: Brandon Orther
            62910 by: Marc Hanlon

    Looking for the cookies a site sends.
            62873 by: Brandon Orther

    Is this a bug?
            62875 by: Stig Nørgaard Jepsen

    php_value in htaccess, internal server error
            62877 by: Egan

    How to find out which function caused an error
            62878 by: Justin Finkelstein
            62882 by: Tyler Longren

    Security in PHP+MYSQL
            62881 by: CB

    Feedback welcome!
            62884 by: David Jansen

    Re: Creating a javascript array from database data (Off-List)
            62885 by: Sheridan Saint-Michel

    Eval error
            62886 by: Felipe Coury
            62899 by: Mark Maggelet

    PHP on client-side
            62887 by: Tom Malone

    bold current menu item
            62888 by: Jason Dulberg

    Engine help
            62889 by: PHP List

    getting extra output with cURL
            62890 by: Nigel_Soon.advanis.ca

    build button with php
            62891 by: nafiseh saberi
            62892 by: scott [gts]
            62894 by: Hugh Bothwell
            62895 by: Hugh Bothwell

    Problem with updating
            62893 by: Martin Kampherbeek
            62915 by: Chris Hayes

    Re: PUT method support
            62897 by: icom.yifan.net

    Re: comments about the Free Gallery Management System
            62898 by: miguel valero

    auto-input data into form boxes
            62900 by: Hugh Danaher
            62901 by: Kunal Jhunjhunwala
            62902 by: Data Driven Design
            62918 by: Hugh Danaher

    Need open source community help!
            62903 by: Jay Paulson
            62904 by: PHP List
            62909 by: Michael Kimsal
            62912 by: Jay Paulson

    Connecting to Sybase on Linux
            62906 by: Kansas Territory
            62907 by: Tyler Longren

    Snoopy class: Getting the auth cookie back?
            62908 by: Brandon Orther

    MYSQL_SOCKET
            62911 by: Jay Paulson
            62919 by: Jonathan Hilgeman

    Re: "location bar"
            62913 by: Wolfgang Schneider

    Problem with a socket in non-blockant state
            62914 by: Cerel

    Re: Instalation
            62917 by: Juan Pablo Rivera

    Templates???
            62920 by: Georgie

    Object members dynamic access?
            62921 by: Sean C. McCarthy
            62922 by: Cerel
            62923 by: Sean C. McCarthy

    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:


    "Jack" <jackyactivelifestyle.com> wrote in message
    news:039301c125c7$d4c6c300$6400a8c0activelifestyle.com...
    > Hi people
    > It is about html, that when I go to some sites that
    > ask me to download their font like Japanese or
    > chinese font, in order to read their language,
    > what do they put in the page for that kind of detection?

    That's not the page - that's the browser (based on the
    charset the page defines).

    attached mail follows:


    You wrote:
    > Note that the download font thing is Internet Exploder Specific.
    Internet
    > Exploder also has a few issues with different charsets.
    > Also note that *all* html documents should have a specified charset -
    even
    > the plain english ones. Most of the html on the internet is coded
    wrongly,
    > this does not make it correct.
    >
    > I do a lot of simplified chinese development, being located in
    Shanghai,
    > China.

    That's not entirely true. The most basic valid HTML document looks like
    this:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
    <title>Some Random Title</title>
    <p>Text.</p>

        -or-

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <title>Some Random Title</title>
    Text.

    That's it. Three lines. No HTML tag, no HEAD tag, no BODY or FRAMESET
    tag. They're all optional. Of course, if you want to get really picky,
    only one character is required to be in the TITLE; same goes for the
    BODY, which is implied by the end of the HEAD, which is also implied,
    and so on and so forth. ;)

    META tags are optional, which means charset specifications are optional,
    as well. I assume a default charset is sent by the server, anyway,
    because my phpinfo() settings for my own server return "en-us" for
    HTTP_ACCEPT_LANGUAGE, but I could be mistaken, because I never cared
    about it because it was optional after all. ;)

    /digression

    --
     -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/
    

    attached mail follows:


    Hey folks,

    if you go to http://www.acnsnet.com/czc/show.php?state=Bayern You can see my problem with this query. This thing is killin me so if you have any ideas just shout.

    thanks, chuck

    Chuck's Top 10 Things to Remember and Think about! ======================================================= 10. Please return stewardess to original upright position. 9. Fighting for peace is like fucking for virginity. 8. Never date someone because you're too lazy to commit suicide. 7. It is not the fall that kills you. it's the sudden stop at the end. 6. You can't have everything. Where would you put it all? 5. " Real Windows Performance", on the next "In Search Of". 4. 2 rules to success in life. 1. Don't tell people everything you know. 3. 24 hours in a day, 24 beers in a case. Coincidence? 2. 9 out of 10 men who try Camels prefer women. 1. Always borrow money from a pesimist. They never expect it back anyway.

    That's it! NO MORE! JEEZ! GET BACK TO WORK!

    attached mail follows:


    "Charles Williams" <hosting.mailing.list.accountacnshosting.com> wrote in message news:008801c12588$80bc7960$fe0aa8c0chucks... > Hey folks, > > if you go to http://www.acnsnet.com/czc/show.php?state=Bayern You can see > my problem with this query. This thing is killin me so if you have any > ideas just shout.

    This looks like a case of poor database design...

    If you had a 'cities' table and referred to it from your 'restaurants', 'hotels', and 'clubs' tables, the query would be obvious. (It would slightly complicate the logic for adding restaurants, hotels, and clubs - but how often do you do that, compared to querying the database?)

    While you're doing that, I would consider having a 'states' table too - reduce the number of text comparisons...

    Luckily, a stop-gap is available... create and populate a temporary cities table, and get your data from that.

    CREATE TEMPORARY TABLE cities SELECT city FROM restaurant WHERE state='Bayern';

    INSERT INTO cities SELECT city FROM hotels WHERE state='Bayern';

    INSERT INTO cities SELECT city FROM clubs WHERE state='Bayern';

    SELECT DISTINCT city FROM cities ORDER BY city;

    ... how's that?

    attached mail follows:


    Hi,

    I have RH6.2, php4, MySQL and want to generate graphs with flash. I have done a graph with Flash5 and Micromedia Generator. This creates a .swt file which takes info from a text file and, i guess, generates a .swf with the graph. I want to allow users to type graph details through an admin area and then generate the text file with PHP. Problem is my server doesn't recognise .swt file and it doesn't generate .swf. I have checked Red Hat site and couldn't find a solution. It has to be that I haven't installed something but eaven after checking the Micromedia site I didn't find a solution. Has anyone got it to work?

    Regards

    Ajdin

    attached mail follows:


    Do you have Macromedia Generator installed on your server? It's responsible for taking the .swt and generating the .swf output.

    - Tim

    On 15 Aug 2001 14:28:24 +0100, AJDIN BRANDIC wrote: > Hi, > > I have RH6.2, php4, MySQL and want to generate graphs with flash. I have > done a graph with Flash5 and Micromedia Generator. This creates a .swt > file which takes info from a text file and, i guess, generates a .swf > with the graph. I want to allow users to type graph details through an > admin area and then generate the text file with PHP. Problem is my server > doesn't recognise .swt file and it doesn't generate .swf. I have checked > Red Hat site and couldn't find a solution. It has to be that I haven't > installed something but eaven after checking the Micromedia site I didn't > find a solution. Has anyone got it to work? > > Regards > > Ajdin > > -- > 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, NO this is what i am trying to find out. where can i download it from (for RD6.2 and Aache 1.3.12). I have tried RH site but no joy.

    regards

    Ajdin

    On 15 Aug 2001, Tim wrote:

    > Do you have Macromedia Generator installed on your server? It's > responsible for taking the .swt and generating the .swf output. > > - Tim > > On 15 Aug 2001 14:28:24 +0100, AJDIN BRANDIC wrote: > > Hi, > > > > I have RH6.2, php4, MySQL and want to generate graphs with flash. I have > > done a graph with Flash5 and Micromedia Generator. This creates a .swt > > file which takes info from a text file and, i guess, generates a .swf > > with the graph. I want to allow users to type graph details through an > > admin area and then generate the text file with PHP. Problem is my server > > doesn't recognise .swt file and it doesn't generate .swf. I have checked > > Red Hat site and couldn't find a solution. It has to be that I haven't > > installed something but eaven after checking the Micromedia site I didn't > > find a solution. Has anyone got it to work? > > > > Regards > > > > Ajdin > > > > -- > > 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:


    There are open source flash software around try here http://www.openswf.org/

    There is at least one alternative to MM's Generator I believe

    Best regards

    Nigel

    -----Original Message----- From: AJDIN BRANDIC [mailto:abrandiccoventry.ac.uk] Sent: 15 August 2001 15:15 To: Tim Cc: php-generallists.php.net Subject: Re: [PHP] apache,php,mysql,flash

    Hi, NO this is what i am trying to find out. where can i download it from (for RD6.2 and Aache 1.3.12). I have tried RH site but no joy.

    regards

    Ajdin

    On 15 Aug 2001, Tim wrote:

    > Do you have Macromedia Generator installed on your server? It's > responsible for taking the .swt and generating the .swf output. > > - Tim > > On 15 Aug 2001 14:28:24 +0100, AJDIN BRANDIC wrote: > > Hi, > > > > I have RH6.2, php4, MySQL and want to generate graphs with flash. I have > > done a graph with Flash5 and Micromedia Generator. This creates a .swt > > file which takes info from a text file and, i guess, generates a .swf > > with the graph. I want to allow users to type graph details through an > > admin area and then generate the text file with PHP. Problem is my server > > doesn't recognise .swt file and it doesn't generate .swf. I have checked > > Red Hat site and couldn't find a solution. It has to be that I haven't > > installed something but eaven after checking the Micromedia site I didn't > > find a solution. Has anyone got it to work? > > > > Regards > > > > Ajdin > > > > -- > > 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:


    You have to buy Generator from Macromedia. It's not free. (in fact, it's pretty expensive :)

    There are some open/free alternatives out there, but there weren't direct replacements last time I evaluated them.

    There's also the ming extension for PHP which lets you generate a whole SWF movie at runtime.

    - Tim

    On 15 Aug 2001 15:15:20 +0100, AJDIN BRANDIC wrote: > Hi, NO this is what i am trying to find out. where can i download it > from (for RD6.2 and Aache 1.3.12). I have tried RH site but no joy.

    attached mail follows:


    what kind of a link system do you mean? Like the categories search, or something else?

    attached mail follows:


    On 8/15/2001 9:36 AM this was written:

    > what kind of a link system do you mean? Like the categories search, or > something else?

    Yeah, I found one: http://www.in-link.net/

    -- 
    

    Thomas Deliduka IT Manager ------------------------- New Eve Media The Solution To Your Internet Angst http://www.neweve.com/

    attached mail follows:


    Actually I didn't pose my question correctly. I also needed to grep out the "Link" for use in JS during the process. I wrapped this in a class file and here is the entry that I ended up with. Thanks for the assist though... ====================================================== function getPL($plric) { //variable set to add at the end of the RIC if it's a stock not a page $temp = "B2"; //find out if it's a stock by query for the period in the RIC if (eregi("\.", $plric)) { //add B2 if it's a stock $plric = $plric + $temp; } //the data comes out of the server pipe delimited $pages = split("\|",`/mdsweb/cgi-bin/Snap_Pages -s 000.000.000.00 -p 34927 -r $plric`);

    $a=0; while ($pages[$a] != "") { $pages[$a] = htmlentities($pages[$a]); //replace spaces with &nbsp; $pages[$a] = str_replace(" ", "&nbsp;", $pages[$a]); //find the left angle brackets $a1 = spliti("&lt;", $pages[$a]); $b=0; while ($a1[$b] != "") { //if the resulting data has a right angle bracket.... if (eregi("&gt", $a1[$b])) { $a2 = spliti("&gt;", $a1[$b]); if (eregi("\.", $a2[0])) { echo "<a class='small' href='http://server/php/QST/PageTest.php?plric="; //this would be the raw RIC echo $a2[0],$tag; //put back the left angle bracket in the link echo "'>&lt;"; echo $a2[0]; //put back the right angle bracket in the link echo "&gt;</a>"; $c=1; //echo the link itself while ($a2[$c]) { echo $a2[$c]; $c++; } } else { echo "<a class='small' href='http://server/php/QST/PageTest.php?plric="; //this would be a Page request not a RIC echo $a2[0]; echo "'>"; echo $a2[0]; echo "</a>"; $c=1; while ($a2[$c]) { echo $a2[$c]; $c++; } } } else { echo $a1[$b]; } $b++; } echo "<br>"; $a++; } }

    "Richard Lynch" <ceol-i-e.com> wrote in message news:00a001c1253f$53fad780$6401a8c0Lynchux100... > > blah blah blah blah blah <Link> blah blah blah blah <Link> > > > > I think I need to use eregi_replace to make the line look like this: > > blah blah blah blah blah <a href='#'><Link></a> blah blah blah blah <a > > href='#'><Link></a> > > Depending on how accurately you have stated the problem, this may work: > > $text = 'blah blah blah blah blah <Link> blah blah blah blah <Link>'; > $text = str_replace('<', "<a href='#'XXXXXX<", $text); > $text = str_replace('>', "></a>", $text); > $text = str_replace('XXXXXX', '>', $text); > > -- > WARNING richardzend.com address is an endangered species -- Use > ceol-i-e.com > Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm > Volunteer a little time: http://chatmusic.com/volunteer.htm > >

    attached mail follows:


    I don't think this is the "only possible way". I have used an html IMG tag, then created something like a rollover effect that called a php file for the image. It was kind of like a stop light, the light was off until focus came off of a particular form element, javascript then updated the image href with a few extra arguments, then the light turned green or red.

    You can also use a javascript popup window to call a php script. I'm sure there are a few ways to do this too.

    Here's the javascript

    <input type="text" size="45" name="1_1_email" value="" tabindex=1 onChange='validate_email()'><IMG SRC="./trans.gif" NAME=animation width=10 height=10 align=middle> <SCRIPT> function validate_email(){ document.animation.src = "./image.phtml?email=" + document.forms[0].elements[1].value ; return true; } </SCRIPT>

    here's the php

    <?php include("get_connected.func");

    // This script checks for the existence of an image file, and outputs it, // if the image is not found than it will output a generic image

    $yes_image = "./green.gif"; $no_image = "./red.gif";

    header("Content-type: image/gif");

    $mysqlconn = new MySQL_class; $mysqlconn->Create($db);

    $select = "SELECT COUNT(item_id) FROM mkt_question_response WHERE item_id = '".$HTTP_GET_VARS["email"]."' GROUP BY item_id";

    $mysqlconn->Query($select);

    if($mysqlconn->rows > 0){ readfile($no_image); }else{ readfile($yes_image); } ?>

    Robert Zwink http://www.zwink.net/daid.php

    -----Original Message----- From: Renze Munnik [mailto:renzedatalink.nl] Sent: Tuesday, August 14, 2001 11:30 AM To: marilyn manson; php-generallists.php.net Subject: Re: [PHP] could i get a clue?

    On Tue, Aug 14, 2001 at 10:18:18AM -0500, marilyn manson wrote: > ok a basic question. perhaps I dont know enough about javascript but > anyway.. > > I want to call a php script from javascript. Anybody have any hints for me? > A link to a useful website would work as well. thanks mates > > -student of computer science

    FAIK the only possibility is to redirect to the PHP script. Then you'll get something like:

    window.location.href="myscript.php";

    --
    

    * R&zE:

    -- »»»»»»»»»»»»»»»»»»»»»»»» -- Renze Munnik -- DataLink BV -- -- E: renzedatalink.nl -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- ««««««««««««««««««««««««

    -- 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 Wed, Aug 15, 2001 at 09:44:58AM -0400, Robert V. Zwink wrote: > I don't think this is the "only possible way". I have used an html IMG tag, > then created something like a rollover effect that called a php file for the > image. It was kind of like a stop light, the light was off until focus came > off of a particular form element, javascript then updated the image href > with a few extra arguments, then the light turned green or red. > > You can also use a javascript popup window to call a php script. I'm sure > there are a few ways to do this too.

    Hmmm, yeah... Way-2-go!

    The popup is the same thing as I said. You just redirect to a different (PHP-)page. So... nothing new!

    And for your other solution. Very usefull. Especialy when you don't have images on your page! What are you gonna do then? Create an image from 1x1 that's transparent or something? Can't get any worse. That's the SiteStat/Nedstat style. Awful! Besides that... what if I want to do some _serious_ processing instead of 'drawing' an image? Then, if I use your solution, I always have to create (or redirect to) an image. Not to way to do it!

    -- 
    

    * R&zE:

    -- »»»»»»»»»»»»»»»»»»»»»»»» -- Renze Munnik -- DataLink BV -- -- E: renzedatalink.nl -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- ««««««««««««««««««««««««

    attached mail follows:


    // Besides that... what if I want to do some _serious_ processing // instead of 'drawing' an image?

    Actually you just readfile an existing image, how much processing does that involve? Not too much.

    // The popup is the same thing as I said. You just redirect to a // different (PHP-)page. So... nothing new!

    For future reference:

    window.location.href="myscript.php"

    !=

    window.open('./myscript.php','mywindow','width=400,height=400,scrollbars=yes ')

    No offense intended, just wanted to show some alternatives. I'm sure there are more.

    Robert V. Zwink http://www.zwink.net/daid.php

    -----Original Message----- From: Renze Munnik [mailto:renzedatalink.nl] Sent: Wednesday, August 15, 2001 9:54 AM To: Robert V. Zwink; marilyn manson; php-generallists.php.net Subject: Re: [PHP] could i get a clue?

    On Wed, Aug 15, 2001 at 09:44:58AM -0400, Robert V. Zwink wrote: > I don't think this is the "only possible way". I have used an html IMG tag, > then created something like a rollover effect that called a php file for the > image. It was kind of like a stop light, the light was off until focus came > off of a particular form element, javascript then updated the image href > with a few extra arguments, then the light turned green or red. > > You can also use a javascript popup window to call a php script. I'm sure > there are a few ways to do this too.

    Hmmm, yeah... Way-2-go!

    The popup is the same thing as I said. You just redirect to a different (PHP-)page. So... nothing new!

    And for your other solution. Very usefull. Especialy when you don't have images on your page! What are you gonna do then? Create an image from 1x1 that's transparent or something? Can't get any worse. That's the SiteStat/Nedstat style. Awful! Besides that... what if I want to do some _serious_ processing instead of 'drawing' an image? Then, if I use your solution, I always have to create (or redirect to) an image. Not to way to do it!

    --
    

    * R&zE:

    -- »»»»»»»»»»»»»»»»»»»»»»»» -- Renze Munnik -- DataLink BV -- -- E: renzedatalink.nl -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- ««««««««««««««««««««««««

    -- 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 Wed, Aug 15, 2001 at 10:20:39AM -0400, Robert V. Zwink wrote: > > // Besides that... what if I want to do some _serious_ processing > // instead of 'drawing' an image? > > Actually you just readfile an existing image, how much processing does that > involve? Not too much.

    I didn't say that your construction doesn't work, but it's not the way to develop your sites. By using horrible constructions you can make 'good-working' site, but that doesn't make it a good site. You should always avoid using such terrible constructions. I mean... why creating an image if you never intended to do anything with images? Just because you want to have some weird construction on your site and you can't think of anything else, soon enough?

    > > // The popup is the same thing as I said. You just redirect to a > // different (PHP-)page. So... nothing new! > > For future reference: > > window.location.href="myscript.php" > > != > > window.open('./myscript.php','mywindow','width=400,height=400,scrollbars=yes > ')

    It's the same kind of construction. You redirect the user to a completely different page.

    > > No offense intended,

    None taken... and none intended...

    -- 
    

    * R&zE:

    -- »»»»»»»»»»»»»»»»»»»»»»»» -- Renze Munnik -- DataLink BV -- -- E: renzedatalink.nl -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- ««««««««««««««««««««««««

    attached mail follows:


    This particular application is designed to assist someone working on data entry, and is currently in production. She inputs 100's of mail-in reply cards into a database using a php webpage. The first field of the form is for the email address listed on the reply card. If the email address is already in the database, the person doing data entry will see an image of a red light, if the email address is not in the database the person doing data entry will see an image of a green light. Kind of weird, true, but exactly what she wanted. Why should the person doing data entry have to type in email address, mailing address, first name, last name, etc. just to get an error saying duplicate entry found? This way she can choose to replace the record or just skip it depending on the results (red or green). The changing image increases her productivty by decreasing time spent inputing duplicate data.

    And also is one possible answer to the question, "How do I access php from JavaScript".

    I fail to see how this is a "horrible construction". Solves a problem with minimal input from user, quickly, and completely. How is this horrible? Its a functional tool, that is used ever day with 0 complaints.

    Horrible? Inigo: "You keep using that word. I do not think it means what you think it means."

    Robert Zwink http://www.zwink.net/daid.php

    -----Original Message----- From: Renze Munnik [mailto:renzedatalink.nl] Sent: Wednesday, August 15, 2001 10:30 AM To: Robert V. Zwink Cc: marilyn manson; php-generallists.php.net Subject: Re: [PHP] could i get a clue?

    On Wed, Aug 15, 2001 at 10:20:39AM -0400, Robert V. Zwink wrote: > > // Besides that... what if I want to do some _serious_ processing > // instead of 'drawing' an image? > > Actually you just readfile an existing image, how much processing does that > involve? Not too much.

    I didn't say that your construction doesn't work, but it's not the way to develop your sites. By using horrible constructions you can make 'good-working' site, but that doesn't make it a good site. You should always avoid using such terrible constructions. I mean... why creating an image if you never intended to do anything with images? Just because you want to have some weird construction on your site and you can't think of anything else, soon enough?

    > > // The popup is the same thing as I said. You just redirect to a > // different (PHP-)page. So... nothing new! > > For future reference: > > window.location.href="myscript.php" > > != > > window.open('./myscript.php','mywindow','width=400,height=400,scrollbars=yes > ')

    It's the same kind of construction. You redirect the user to a completely different page.

    > > No offense intended,

    None taken... and none intended...

    --
    

    * R&zE:

    -- »»»»»»»»»»»»»»»»»»»»»»»» -- Renze Munnik -- DataLink BV -- -- E: renzedatalink.nl -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- ««««««««««««««««««««««««

    attached mail follows:


    No sure how you mean 'calling' the script... but in addition to using something like

    document.location='myscript.php'

    It would theoretically be possible to pass javascript variables to a PHP script in the same way by using something like

    var foo = "Some Text"; var bar = "Some other text"; document.location = 'myscript.php?foo=' + foo + '&bar=' + bar;

    And although it's not exactly 'calling' a script from Javascript, you can use PHP to generate your script on the fly... handy if you need to do something with data from a database within a Javascript. (Not sure what that would be, but it might come in handy.)

    -Andy

    > -----Original Message----- > From: Richard Lynch [mailto:ceol-i-e.com] > Sent: Tuesday, August 14, 2001 8:19 PM > To: php-generallists.php.net > Subject: Re: could i get a clue? > > > > ok a basic question. perhaps I dont know enough about javascript but > > anyway.. > > > > I want to call a php script from javascript. Anybody have any hints for > me? > > A link to a useful website would work as well. thanks mates >

    attached mail follows:


    Sorry I wasn't very clear on what I needed to be done by javascript and php.

    basically i have a flash movie that calls a javascript function and I was wondering if I could do something in javascript like:

    var x = "bleh.php";

    and get some variables back but I soon learned that I could do this from within flash itself.

    thanks for all the help though. I find the other stuff useful for perhaps another project. ciao -student of computer science "Marilyn Manson" <mattwireswt.edu> wrote in message news:20010814151502.31560.qmailpb1.pair.com... > ok a basic question. perhaps I dont know enough about javascript but > anyway.. > > I want to call a php script from javascript. Anybody have any hints for me? > A link to a useful website would work as well. thanks mates > > -student of computer science > >

    attached mail follows:


    There is a real nice article about authorization at www.phpbuilder.com

    They claim its the same authorization library Sourceforge uses. Here's the direct link. http://www.phpbuilder.com/columns/tim20000505.php3

    Robert Zwink http://www.zwink.net/daid.php

    -----Original Message----- From: Jean-Arthur Silve [mailto:jeanarthureurovox.fr] Sent: Tuesday, August 14, 2001 9:53 AM To: sunny AT wde; php Subject: Re: [PHP] Need people's advice on a web registration system.

    I think, when they register or log in the first time, ask to the user if they want you to remember them by placing a cookie..

    Don't do it automaticaly ! Most people doesn't like that, and if they are not on their computer (web bar, or at the office...), they could not like this...

    At 11:43 14/08/01 +0100, sunny AT wde wrote: >Hi all! > >I'm trying to build a registration system for a community site that >I'm building, and was wondering if people could give me advice or >tell me about problems they've been having?? > >I'm planning to let people register with a username and password >(encrypted), and then make them login with that, and thus putting a >cookie on their machine. > >If the cookie is detected the next time, they don't have to login, >but if it is, then they do. > >Sounds pretty simple?? > >Any advice? > >TIA! > >sunny > >____________________________________________________________ >Do You Yahoo!? >Get your free yahoo.co.uk address at http://mail.yahoo.co.uk >or your free yahoo.ie address at http://mail.yahoo.ie > >-- >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

    ---------------------------------------------------------------- EuroVox 4, place Félix Eboue 75583 Paris Cedex 12 Tel : 01 44 67 05 05 Fax : 01 44 67 05 19 Web : http://www.eurovox.fr ----------------------------------------------------------------

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


    I've been using PHP on Linux for about 2 years now, and have absolutely loved it. However, I've recently accepted a full time position developing icky ASP pages, and still use PHP on my own sites. I was wondering about using PHP on WIndows and IIS 5.0. Could somebody using the Windows version of PHP on IIS (preferably the ISAPI version) drop me a line and let me know how you like it? How is it different from the Linux vesion? How is it's COM support? Anything I should look out for?

    Thanx

    attached mail follows:


    > I was wondering about > using PHP on WIndows and IIS 5.0. Could somebody using the Windows version > of PHP on IIS (preferably the ISAPI version) drop me a line and let me know > how you like it? How is it different from the Linux vesion? How is it's > COM support? Anything I should look out for?

    I use win98, php4, Apache, MySQL. Tried to set up php and mysq and apache under Suse but failed miserably.

    * file security is different * in your code you may be calling some non-php unix function. * i have to be online to use the mail function (i then use the SMTP of my ISP, specified in php.ini). * i don't know IIS, i know PWS is not very nice and Apache is better. Until now the combination i use is remarkably stable.

    No idea on COM.

    Chris

    -------------------------------------------------------------------- -- C.Hayes Droevendaal 35 6708 PB Wageningen the Netherlands -- --------------------------------------------------------------------

    attached mail follows:


    I'm trying to run a script as CGI under apache, instead of using the apache module, because the module is safe-mode enabled and I need to bypass that for one script.

    If you put this script into a file (.cgi) and give it executable permissions, you can run it from the command line

    ------------PHP CODE START------------ #!/usr/bin/php <?php print "Hello"; ?> ------------PHP CODE END------------

    and the Content-Type header is added by PHP. But when I put it in my cgi-bin directory it would not execute from a browser - I got internal server error.

    The error log said "Premature end of script headers."

    Has anybody been able to find a way round this problem? Running PHP NOT as a module?

    Thanks a lot.

    attached mail follows:


    Well, Thank you for the info. When I'm on the server by myself, there's no problem, the processes hanging around really don't matter & the program runs fine. When I put over into public use on a (I assume) heavily utilized server I get emalloc errors. The 2 systems were made the same. I seem to have got it working for now. Unfortunately when I can use a database isn't up to me, so I guess I'll just keep tweaking things until I get the "go ahead". Thank you, again

    >watching apache processes (top), trying to track memory usage. It seems to vary size between >14M & 16M & vary RES from 12M to 14M. Is this varying normal? Is this size normal? (2400

    Those numbers are normal and are inclusive of SHARED memory segments, so will add up way higher than actual memory usage. IE, they have virtually no real-world meaning.

    >line program reading a 1400 row/29 col. spreadsheet into an array...yes, it is necessary to >have the whole thing in the array at one time, at least, I can't figure out a way not to.) I

    For sure you could read one row at a time, put it into a database, and do virtually any sort of operation on it you could possibly need...

    Way more efficient.

    >would think the same program ran repeatedly should require approx. the same memory each

    Give or take, but are there other pages being loaded/visited that use other resources, or are you the only surfer on this site?...

    >time. Also, I seem to have apache processes hanging around for days. So that even running a >little 4 line echo/sleep/echo program will pick up one of these rogue process id's & then it >appears that the 4 line program is running at 14M/12M now, that's just not possible. Is it >normal for the process id's to hang around in sleep mode interminally like that? If I

    They aren't really actively using all that RAM. It's shared. You can set max_requests and other fun things in httpd.conf to kill off the older httpd processes if you really think they're no good anymore. And if they're sleeping, they aren't really using much of anything anyway. They won't wake up until you have multiple hits at the same time asking them to do something. "Let the awake guy handle it" is their motto, until there's a request where nobody's awake and not busy.

    > restart apache, the processes of course die, but I can't do that constantly. Is there a way >to free up the memory that I'm just not aware of? Or something I should be looking at that >I'm not? I'm at a loss, I'm more likely to blame my code (only my 2nd php program) than a >php/apache bug or something of the like. But I haven't a clue where to look. (changing the >way I handled the array slightly & using unset I did manage to save approx. 4M, but I'll need >to save more than that as the spreadsheet grows). Eventually it may all go into a database, >but not any time soon.

    Change your mind about that last sentence. Throw it into a database one row at a time, and you'll save yourself a lot of headache. The database stuff in PHP really is that easy, that you don't want to do anything remotely like database work without it.

    attached mail follows:


    include("/path/to/the/include/file.inc");

    Original Message: ----------------- From: Martin martin.sandinplus.idg.se Date: Wed, 15 Aug 2001 03:21:42 +0200 To: php-generallists.php.net Subject: [PHP] something like SSI ?

    Ok, this may seem like a dumb newbie question...

    Is there an function like ASP's Server Side Include in PHP ? Or what is best to use instead, fread ?

    /marco

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

    -------------------------------------------------------------------- Mail2Web - Check your email from the web at http://www.mail2web.com/ .

    attached mail follows:


    Hi guys,

    Is there anything I should configure or set up on the server to make the "mail" method work? There is nothing about it in the manual (or I just haven't found it?).

    Thanks

    Tamas "Bucsesz" Bucsu

    attached mail follows:


    Is it not working for you? Do you have an smtp server of some sort set up? If you're using Win98/NT/2000, you can specify an smtp server to use (usually your ISP's). If you're using *nix, install sendmail.

    Good luck, Tyler Longren Captain Jack Communications tylercaptainjack.com www.captainjack.com

    On Wed, 15 Aug 2001 16:38:49 +0200 "Tamas Bucsu" <ta.bucsuorion-infotech.com> wrote:

    > Hi guys, > > Is there anything I should configure or set up on the server to make the > "mail" method work? There is nothing about it in the manual (or I just > haven't found it?). > > Thanks > > Tamas "Bucsesz" Bucsu >

    attached mail follows:


    "Tamas Bucsu" <ta.bucsuorion-infotech.com> wrote in message news:006d01c12597$ff50f670$9200020adomain1... > Is there anything I should configure or set up on the server > to make the "mail" method work? There is nothing about it > in the manual (or I just haven't found it?).

    In php.ini, you have to set 'SMTP' and 'sendmail_from' (Win) or 'sendmail_path' (*nix).

    attached mail follows:


    At 02:37 AM 8/15/2001, Scott Mebberson wrote:

    man pwd

    learn linux/unix.....

    ~kurth

    >Hi Guys, > >I actually know what it means. Well, I think it means the current directory? >Anyway... what exactly is it and where can I find some more information >about it? I couldn't find much on php.net - also, is there any other >ones(whatever it is) like this? > >Thanks. > >Scott. > > > >-- >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 where I can get a copy of liphp_java.so that is not dependent upon zend?

    attached mail follows:


    My experience, at least from Oracle and SQLServer, is that very large tables (many millions of records) is not really a problem as long as you design and index well. Where you'll run into problems is when you try to join 2 very large tables together on the fly. This is where you'll need to do prejoins or look into the whole db wharehouse/OLAP design methodology.

    So I recommend you use one large table with 3 columns (or 4 if you need the source file info or some surrogate key). This will be a much sleeker and flexible db design, and it sounds like you will not be doing any joins between 2 or more large tables any way.

    Johan Alfredeen PongWorld.com

    -----Original Message----- From: Pétur Björn Thorsteinsson [mailto:petur.bjorn.thorsteinssonislandssimi.is] Sent: Tuesday, August 14, 2001 11:49 AM To: php-generallists.php.net Subject: [PHP] insertion question

    I have to store a whole lot of text files into a database, each one containing 3 columns containing numbers and about 2500 lines. I was wondering if anyone knew which would be the best way to store these files, having one big table with each row containing the contents of the files, or making one table for each file and inserting each line of the file into its respective row in the database. The database will probably become pretty big and I'm looking for the option that won't slow it down too much.

    -petur

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

    How can I execute a php script from the unix?

    like pearl it's (pearl "file"), but in unix we don't have a "executable" of php, it's a module ,right?

    I should compile the script first?

    I want this to add to crontab to make backup of my mysql automaticly.

    thanks.

    Augusto

    attached mail follows:


    do you mean perl?!? ----- Original Message ----- From: "Augusto Cesar Castoldi" <Augusto.Castoldiuol.com.br> To: <php-generallists.php.net> Sent: Thursday, August 16, 2001 1:04 AM Subject: [PHP] Execute a PHP script from unix (crontab)

    > Hi. > > How can I execute a php script from the unix? > > like pearl it's (pearl "file"), but in unix we don't have a "executable" of > php, it's a module ,right? > > I should compile the script first? > > I want this to add to crontab to make backup of my mysql automaticly. > > thanks. > > Augusto > > > -- > 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: "Augusto Cesar Castoldi" <Augusto.Castoldiuol.com.br> > To: <php-generallists.php.net> > Sent: Thursday, August 16, 2001 1:04 AM > Subject: [PHP] Execute a PHP script from unix (crontab) > > How can I execute a php script from the unix? > > like perl it's (perl "file"), but in unix we don't have > > a "executable" of php, it's a module ,right?

    Same idea as Perl, start with a shebang line to tell it where to find the interpreter:

    #!/usr/local/bin/php <?php // your script here... ?>

    > > I should compile the script first?

    Nope, no need...

    attached mail follows:


    Hi

    First get your PHP script working correctly...;-)

    The use crontab to run lynx (as a browser that runs the PHP script for you).

    Here's an example crontab line (works for me) that even gets lynx to handle an .htaccess protected_dir ;-):

    5 5 * * * /usr/local/bin/lynx -dump -nolog -auth=userid:passwd httpd://mydomain.com/protected_dir//myphpscript.php > /dev/null

    Hope that helps, Tom Henry

    Reductor wrote: > do you mean perl?!? > ----- Original Message ----- > From: "Augusto Cesar Castoldi" <Augusto.Castoldiuol.com.br> > To: <php-generallists.php.net> > Sent: Thursday, August 16, 2001 1:04 AM > Subject: [PHP] Execute a PHP script from unix (crontab) > > > >>Hi. >> >>How can I execute a php script from the unix? >> >>like pearl it's (pearl "file"), but in unix we don't have a "executable" >> > of > >>php, it's a module ,right? >> >>I should compile the script first? >> >>I want this to add to crontab to make backup of my mysql automaticly. >> >>thanks. >> >>Augusto >> >> >>-- >>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 are basically two ways of doing this.

    Use lynx : lynx --dump http_address_to_file

    or

    Compile php as a cgi binary.

    You should select them based on your need.

    Kunal

    ----- Original Message ----- From: "Hugh Bothwell" <hugh_bothwellhotmail.com> To: <php-generallists.php.net> Sent: Wednesday, August 15, 2001 9:30 PM Subject: Re: [PHP] Execute a PHP script from unix (crontab)

    > > From: "Augusto Cesar Castoldi" <Augusto.Castoldiuol.com.br> > > To: <php-generallists.php.net> > > Sent: Thursday, August 16, 2001 1:04 AM > > Subject: [PHP] Execute a PHP script from unix (crontab) > > > How can I execute a php script from the unix? > > > like perl it's (perl "file"), but in unix we don't have > > > a "executable" of php, it's a module ,right? > > Same idea as Perl, start with a shebang line to tell > it where to find the interpreter: > > #!/usr/local/bin/php > <?php > // your script here... > ?> > > > > I should compile the script first? > > Nope, no need... > > > > -- > 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:


    Why not use the tool built for the job?

    mysqldump will allow saving both data and structure.

    http://www.mysql.com/doc/m/y/mysqldump.html

    -----Original Message----- From: Kunal Jhunjhunwala [mailto:kunalgetmonked.net] Sent: Wednesday, August 15, 2001 11:05 AM To: php-generallists.php.net Subject: Re: [PHP] Execute a PHP script from unix (crontab)

    Hi, There are basically two ways of doing this.

    Use lynx : lynx --dump http_address_to_file

    or

    Compile php as a cgi binary.

    You should select them based on your need.

    Kunal

    ----- Original Message ----- From: "Hugh Bothwell" <hugh_bothwellhotmail.com> To: <php-generallists.php.net> Sent: Wednesday, August 15, 2001 9:30 PM Subject: Re: [PHP] Execute a PHP script from unix (crontab)

    > > From: "Augusto Cesar Castoldi" <Augusto.Castoldiuol.com.br> > > To: <php-generallists.php.net> > > Sent: Thursday, August 16, 2001 1:04 AM > > Subject: [PHP] Execute a PHP script from unix (crontab) > > > How can I execute a php script from the unix? > > > like perl it's (perl "file"), but in unix we don't have > > > a "executable" of php, it's a module ,right? > > Same idea as Perl, start with a shebang line to tell > it where to find the interpreter: > > #!/usr/local/bin/php > <?php > // your script here... > ?> > > > > I should compile the script first? > > Nope, no need... > > > > -- > 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:


    Hello, I'm pulling a date out of MySQL as 2001-10-18. How do I make it print October 18 in php? Thanks much --Mike

    __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/

    attached mail follows:


    <?php $date = "2001-10-18"; $montharray = array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"); $datedata = explode("-", $date); echo $montharray[$datedata[1]+1]." ".$datedata[2]." ".$datedata[0]; ?>

    ----- Original Message ----- From: "Mike Mike" <hatchman2000yahoo.com> To: <php-generallists.php.net> Sent: Thursday, August 16, 2001 1:08 AM Subject: [PHP] Date function

    > Hello, > I'm pulling a date out of MySQL as 2001-10-18. > How do I make it print October 18 in php? > Thanks much > --Mike > > __________________________________________________ > Do You Yahoo!? > Make international calls for as low as $.04/minute with Yahoo! Messenger > http://phonecard.yahoo.com/ > > -- > 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:


    I use

    $date = explode("-", $msql_date); $date = date("d F",mktime(0,0,0,$date[1],$date[2],$date[0]));

    At 08:08 AM 8/15/01 -0700, Mike Mike wrote: >Hello, >I'm pulling a date out of MySQL as 2001-10-18. >How do I make it print October 18 in php? >Thanks much > --Mike > >__________________________________________________ >Do You Yahoo!? >Make international calls for as low as $.04/minute with Yahoo! Messenger >http://phonecard.yahoo.com/ > >-- >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 all.

    I habe a strange problem!

    I try to get a URL like: www.server.com?var=xyz

    the problem is, that this is very good restricted by serverside.

    But now I already get the file, and no more the error-message, but the problem is, that the file will not completly load.

    this means, I receive the file, but only the first 4188 bytes from 11988 bytes.

    If I call the site with a BROWSER, I'll get the full file, but it is nessessary to have this page into a string, to read out a specific position.

    what could that be..? where is the problem?

    does anybody know such a problem???

    please help me.

    If someone believes to have an answer, feel free to mail me any detailer questions.

    thanks for all help.

    Tribun (Patrick Lehnen)

    ---
    mp3o.net
    

    attached mail follows:


    server.com?var=xyz

    would put in the get var and set it to xyz

    and it would give you $var = xyz you don't need the slash..

    - James "ReDucTor" Mitchell ----- Original Message ----- From: "Tribun" <mailtribun.de> To: <php-generallists.php.net> Sent: Thursday, August 16, 2001 1:11 AM Subject: [PHP] need real expert (geting outer files) *english/german*

    > Hi all. > > I habe a strange problem! > > I try to get a URL like: www.server.com?var=xyz > > the problem is, that this is very good restricted by serverside. > > But now I already get the file, and no more the error-message, > but the problem is, that the file will not completly load. > > this means, I receive the file, but only the first 4188 bytes from > 11988 bytes. > > If I call the site with a BROWSER, I'll get the full file, but it > is nessessary to have this page into a string, to read out a specific > position. > > what could that be..? > where is the problem? > > does anybody know such a problem??? > > please help me. > > If someone believes to have an answer, feel free to > mail me any detailer questions. > > thanks for all help. > > Tribun (Patrick Lehnen) > --- > mp3o.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:


    hi Patrick, your question is not entirely clear. > I try to get a URL like: www.server.com?var=xyz

    i would recommend www.server.com/x.php?var=xyz as with a link as www.server.com you are relying on the server (by the way, which server do you use and is the error only at home or only online or...?) to find a standard file in the root directory of www.server.com. And i'm not sure the ?var=xyz is being passed on to that file then.

    > the problem is, that this is very good restricted by serverside. > > But now I already get the file, and no more the error-message, > but the problem is, that the file will not completly load. > > this means, I receive the file, but only the first 4188 bytes from > 11988 bytes.

    please tell us the error message and what do you mean by getting the file: do you mean you get any php output? where does it stop?

    > If I call the site with a BROWSER, I'll get the full file, but it > is nessessary to have this page into a string, to read out a specific > position.

    so, how do you 'call the site' else than with a browser? do you mean ftp?

    > what could that be..? > where is the problem? > > does anybody know such a problem??? > > please help me. > > If someone believes to have an answer, feel free to > mail me any detailer questions. > > thanks for all help. > > Tribun (Patrick Lehnen) > --- > mp3o.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 >

    -------------------------------------------------------------------- -- C.Hayes Droevendaal 35 6708 PB Wageningen the Netherlands -- --------------------------------------------------------------------

    attached mail follows:


    > -----Original Message----- > From: Chris Hayes [mailto:chayesantenna.nl] > Subject: Re: [PHP] need real expert (geting outer files) > > hi Patrick, > your question is not entirely clear. > > > I try to get a URL like: www.server.com?var=xyz > > i would recommend www.server.com/x.php?var=xyz as with a link as > www.server.com you are relying on the server (by the way, which server do > you use and is the error only at home or only online or...?) to find a > standard file in the root directory of www.server.com. And i'm not sure the > ?var=xyz is being passed on to that file then.

    AFAIK, apache (at least) will honor this syntax and give the arguments to the "index" file for the directory -- look in httpd.conf to find out what files are "index" files.

    perhaps the problem with your script is that "index.php" is not being loaded properly by apache (or does not exist) etc. etc... (or perhaps you're not fread()ing enough of the return data back into your script).

    there could be a million things going on... but, as a first step, take chris's suggestion and fully specify the filename like so http://www.server.com/index.php?var=xyz

    attached mail follows:


    Hi group! i have this script to read data in POP emails and put them in a database.

    I would like to know if anybody knows how people would try to get around the tests I've build in.

    - normal registration by web form (password scrambled), with confirmation through email response - the first header starting with 'From:' in the mail is scanned for a the email addtess and then i check whether the email address is in the database - the mail contains the non-scrambled username and password, which are also checked - there must be a magic word in the email subject (to prevent SPAM mail confusing my script)

    Oh and I intend only to disclose the email address to people i know.

    thanks, Chris

    -------------------------------------------------------------------- -- C.Hayes Droevendaal 35 6708 PB Wageningen the Netherlands -- --------------------------------------------------------------------

    attached mail follows:


    well you add to your .forward file or .qmail-default file if you use qmail to exec it(sends the email)

    then you do something like this..

    <?php $fp = fopen("php://stdin", "r"); while(!feof($fp)) { $buffer = fgets($fp); if(eregi("From:", $buffer)) $from = chop($buffer); if(eregi("To:", $buffer)) $to = chop($buffer); if(eregi("Subject:", $buffer)) $subject = chop($buffer); if(eregi("Reply-to", $buffer)) $replyto = chop($buffer); if(empty(chop($buffer))) $getmessage = 1; if($getmessage == 1) $message .= $buffer; } fclose($fp);

    //write $from to d/b //write $message to d/b if needed ?> ----- Original Message ----- From: "Chris Hayes" <chayesantenna.nl> To: <php-generallists.php.net> Sent: Thursday, August 16, 2001 1:20 AM Subject: [PHP] security with email data entries

    > Hi group! > i have this script to read data in POP emails and put them in a database. > > I would like to know if anybody knows how people would try to get around the > tests I've build in. > > - normal registration by web form (password scrambled), with confirmation > through email response > - the first header starting with 'From:' in the mail is scanned for a the > email addtess and then i check whether the email address is in the database > - the mail contains the non-scrambled username and password, which are also > checked > - there must be a magic word in the email subject (to prevent SPAM mail > confusing my script) > > Oh and I intend only to disclose the email address to people i know. > > thanks, > Chris > > > > > > > > -------------------------------------------------------------------- > -- C.Hayes Droevendaal 35 6708 PB Wageningen the Netherlands -- > -------------------------------------------------------------------- > > > > -- > 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:


    > and i have this message : > "Warning: MySQL Connection Failed: Access denied for user: > 'totolocalhost' (Using password: NO)"

    Hmmm i have the same problem every time i install mysql and php and somehow it disappears after a while. I dunno what i did to deserve that.

    $sql_host = 'localhost'; $sql_user = 'root'; $sql_pass = '12345';

    So maybe the user toto is not known to MySQL? Read the mysql security section on adding users and giving them rights.

    Chris

    PS dear list, please don't flame me for using root as username, it's just for a windows system at home.

    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- ...for the future I see it as important that biologists show economists that economy has to adapt to ecology. Ecologists are too timid because they understand there are multiple causes everywhere. That makes them modest. Economists don't have that problem - they always think about single cause-single result. It is very important that economists also learn to understand the concept of multiple causes. Toos van Noordwijk-van Veen

    Chris Hayes - Droef 99 - 6708 PS Wageningen - NL- chayesantenna.nl

    attached mail follows:


    I have a function which returns a mulit-dimensional array, but the array which is returned doesn't "work" for some reason :/

    If i print the array within the function using

    while (list($key) = each($myArray)) { while (list($key2, $value2) = each($myArray[$key])) { print $key . " : " . $key . " : " . $value; } }

    it works fine but doing the same thing after the array has been returned jus yields -- Warning: Variable passed to each() is not an array or object in ... refering to $myArray[$key];

    even though if i print $myArray[$key] it tells me that it's an Array :/

    Thanks.

    Nick.

    attached mail follows:


    Nick, I also have noticed "weird" behavior with multi (or 2D) arrays. Read more on the manual board about arrays. However, I have finally figured out something that works. Be careful of you you define the subarray, assign values, and read the array. Here's what works for me:

    Creating: (you could also use array_push(), but I don't think that is supported by PHP3)

    $myarray = array(); $myarray[] = array();

    Assigning:

    $myarray[$i][$j] = "some value"; (j can be blank or i and j can be hardcoded integers).

    Reading (this was the most tricky for me): returning $myarray[$i][$j] didn't seem to work (although the manual says it should). It seems to work when $i and $j are hardcoded integers, ie $myarray[0][1]

    When $i and $j must be variables like your $key and $value, I finally went with nested for loops (this works):

    function print_array2D($array) { if(gettype($array)=="array") { $maxi = count($array) - 1; reset($array);

    for ($i=0; $i<=$maxi; $i++) { echo "<li><b>$i:</b> "; $subarray = $array[$i];

    for ($j=0; $j<2; $j++) { echo "$subarray[$j] "; }

    echo "</li>"; } } else { echo $array; } }

    Johan

    -----Original Message----- From: Nick Davies [mailto:nicksensei.co.uk] Sent: Wednesday, August 15, 2001 9:33 AM To: php-generallists.php.net Subject: [PHP] weird array behaviour

    I have a function which returns a mulit-dimensional array, but the array which is returned doesn't "work" for some reason :/

    If i print the array within the function using

    while (list($key) = each($myArray)) { while (list($key2, $value2) = each($myArray[$key])) { print $key . " : " . $key . " : " . $value; } }

    it works fine but doing the same thing after the array has been returned jus yields -- Warning: Variable passed to each() is not an array or object in ... refering to $myArray[$key];

    even though if i print $myArray[$key] it tells me that it's an Array :/

    Thanks.

    Nick.

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


    anyone know the permissions that need to be set on sub-directories of apache when you are using virtual hosts? The reason I ask is I keep getting a 403 forbidden "you do not have permission to access / on this server" and i'd really like to check to see if my install of PHP is working correctly.

    Thanks...

    attached mail follows:


    755 :) Kunal ----- Original Message ----- From: "Jay Paulson" <jpaulsonlbjs.com> To: <php-generallists.php.net> Sent: Wednesday, August 15, 2001 9:26 PM Subject: [PHP] Apache virtual hosts & php

    > anyone know the permissions that need to be set on sub-directories of apache > when you are using virtual hosts? The reason I ask is I keep getting a 403 > forbidden "you do not have permission to access / on this server" and i'd > really like to check to see if my install of PHP is working correctly. > > Thanks... > > > -- > 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:


    cool.. now i have the permissions set correctly (which is a great thing! thanks).. but i still get the 403 error... hmm.. you think it has to do with the fact that i'm having to type in the ip address of the server? the dns hasn't been set up yet to point to the server so i'm having to use the ip address to reach it.. but it seems to me that the default virtual host should at least show up when i put in the ip address right?

    thanks...

    ----- Original Message ----- From: "Kunal Jhunjhunwala" <kunalgetmonked.net> To: <php-generallists.php.net> Sent: Wednesday, August 15, 2001 10:59 AM Subject: Re: [PHP] Apache virtual hosts & php

    > 755 :) > Kunal > ----- Original Message ----- > From: "Jay Paulson" <jpaulsonlbjs.com> > To: <php-generallists.php.net> > Sent: Wednesday, August 15, 2001 9:26 PM > Subject: [PHP] Apache virtual hosts & php > > > > anyone know the permissions that need to be set on sub-directories of > apache > > when you are using virtual hosts? The reason I ask is I keep getting a > 403 > > forbidden "you do not have permission to access / on this server" and i'd > > really like to check to see if my install of PHP is working correctly. > > > > Thanks... > > > > > > -- > > 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:


    Which dir have you chmoded to 755? Is it the public dir or the main user dir? you have to chmod the main user dir. Kunal ----- Original Message ----- From: "Jay Paulson" <jpaulsonlbjs.com> To: "Kunal Jhunjhunwala" <kunalgetmonked.net>; <php-generallists.php.net> Sent: Wednesday, August 15, 2001 9:55 PM Subject: Re: [PHP] Apache virtual hosts & php

    > cool.. now i have the permissions set correctly (which is a great thing! > thanks).. but i still get the 403 error... hmm.. you think it has to do with > the fact that i'm having to type in the ip address of the server? the dns > hasn't been set up yet to point to the server so i'm having to use the ip > address to reach it.. but it seems to me that the default virtual host > should at least show up when i put in the ip address right? > > thanks... > > ----- Original Message ----- > From: "Kunal Jhunjhunwala" <kunalgetmonked.net> > To: <php-generallists.php.net> > Sent: Wednesday, August 15, 2001 10:59 AM > Subject: Re: [PHP] Apache virtual hosts & php > > > > 755 :) > > Kunal > > ----- Original Message ----- > > From: "Jay Paulson" <jpaulsonlbjs.com> > > To: <php-generallists.php.net> > > Sent: Wednesday, August 15, 2001 9:26 PM > > Subject: [PHP] Apache virtual hosts & php > > > > > > > anyone know the permissions that need to be set on sub-directories of > > apache > > > when you are using virtual hosts? The reason I ask is I keep getting a > > 403 > > > forbidden "you do not have permission to access / on this server" and > i'd > > > really like to check to see if my install of PHP is working correctly. > > > > > > Thanks... > > > > > > > > > -- > > > 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:


    Hi,

    I am using PHP to send a header to the browser requestiing authentication. On a successful login i am tracking inactivity by the client and want to expire the login once a timeout period is reached. Problem is if the session expires and the user just refreshes then the orignal login details are passed to the script. How do I get the client to forget the previous login details?

    Regards

    Jon

    --
    Jon Farmer
    Systems Programmer, Entanet www.enta.net
    Tel 01952 428969 Mob 07968 524175
    PGP Key available, send blank email to pgpkeybctech.co.uk
    

    attached mail follows:


    Hi there,

    Well after a few hours roaming around various websites I am at a loss. Here is what I am trying to do:

    1) Access a MySQL database which contains 1 table 2) Read the records from this table 3) Store the values returned from this table into javascript array elements, ie, if I get the values "dog", "cat" and "cow" back I want these stored in an array as such: myArray[0] = valueReturned1 myArray[1] = valueReturned2 myArray[2] = valueReturned3

    You get the idea.

    Problem being that I cannot work out how to implement the javascript section of this. At the moment my php script writes the values returned from the database to screen but I require these to be stored in a javascript array. Please can someone help me before I go mad :)

    Here is my current .php script:

    ---------------------------------------------- <html> <head> <title>Menus test</title> </head> <body bgcolor="white">

    <?php $dbhost = 'localhost'; $dbuser = 'guest'; $dbpass = 'guest'; $dbname = 'IFE'; $dbtable = 'menus';

    //------ DATABASE CONNECTION --------// mysql_connect($dbhost,$dbuser,$dbpass) or die ("Unable to connect to database");

    mysql_select_db($dbname) or die ("Unable to select database");

    $sql = "SELECT * FROM $dbtable"; $result = mysql_query($sql);

    $number = mysql_numrows($result);

    $i = 0;

    if ($number == 0) print "Error - No records found"; elseif ($number > 0) { while ($i < $number) { $text = mysql_result($result, $i, "name"); print "$text";

    $i++; } }

    mysql_free_result($result); mysql_close(); ?>

    </body> </html> ----------------------------------------------

    Thanks, Neil

    -------------------------------- Email: neil.freemanasa.co.uk neil_freemanyahoo.com --------------------------------

    attached mail follows:


    --
    while you are looping through the date jump in and out of php like this to
    populate the javascript array
    

    <script language="Javascript">

    function DataArray() { a = new Array()

    <? while ($i < $number) { $text = mysql_result($result, $i, "name"); ?> a[<?=$i?>] = <?=$text?> <?

    $i++; } ?> }

    HTH Jon

    Jon Farmer Systems Programmer, Entanet www.enta.net Tel 01952 428969 Mob 07968 524175 PGP Key available, send blank email to pgpkeybctech.co.uk

    -----Original Message----- From: Neil Freeman [mailto:neil.freemanasa.co.uk] Sent: 15 August 2001 17:16 To: PHP General Subject: [PHP] Creating a javascript array from database data

    Hi there,

    Well after a few hours roaming around various websites I am at a loss. Here is what I am trying to do:

    1) Access a MySQL database which contains 1 table 2) Read the records from this table 3) Store the values returned from this table into javascript array elements, ie, if I get the values "dog", "cat" and "cow" back I want these stored in an array as such: myArray[0] = valueReturned1 myArray[1] = valueReturned2 myArray[2] = valueReturned3

    You get the idea.

    Problem being that I cannot work out how to implement the javascript section of this. At the moment my php script writes the values returned from the database to screen but I require these to be stored in a javascript array. Please can someone help me before I go mad :)

    Here is my current .php script:

    ---------------------------------------------- <html> <head> <title>Menus test</title> </head> <body bgcolor="white">

    <?php $dbhost = 'localhost'; $dbuser = 'guest'; $dbpass = 'guest'; $dbname = 'IFE'; $dbtable = 'menus';

    //------ DATABASE CONNECTION --------// mysql_connect($dbhost,$dbuser,$dbpass) or die ("Unable to connect to database");

    mysql_select_db($dbname) or die ("Unable to select database");

    $sql = "SELECT * FROM $dbtable"; $result = mysql_query($sql);

    $number = mysql_numrows($result);

    $i = 0;

    if ($number == 0) print "Error - No records found"; elseif ($number > 0) { while ($i < $number) { $text = mysql_result($result, $i, "name"); print "$text";

    $i++; } }

    mysql_free_result($result); mysql_close(); ?>

    </body> </html> ----------------------------------------------

    Thanks, Neil

    -------------------------------- Email: neil.freemanasa.co.uk neil_freemanyahoo.com --------------------------------

    -- 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 thing to ALWAYS remember when working with both PHP and JavaScript is that PHP is Server-Side and JavaScript is Client-Side.

    What this mean is practical terms is that when going from JavaScript to PHP you have to submit or redirect back to the server... and when going from PHP to JavaScript (Like you are trying to do here) you have to make sure your PHP outputs JavaScript.

    So instead of printing $text you need to actually print the JavaScript...

    So in your case change the middle of your script to something like:

    $number = mysql_numrows($result); $i = 0; if ($number == 0) print "Error - No records found"; else { echo "<Script Language=\"JavaScript\">\n"; echo "text = new Array("; while ($i < $number) { $text = mysql_result($result, $i, "name"); print "\"$text\""; $i++; if ($i < $number) print ","; else print ")\n"; } echo "</Script>\n"; }

    }

    Note: This is my quick *untested* fix done by modifying your code as little as possible. I would suggest you use mysql_fetch_row and use your loop to parse it rather than making several calls to mysql_result (especially if you are ever going to have more than a few entries in the DB).

    Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com

    ----- Original Message ----- From: Neil Freeman <neil.freemanasa.co.uk> To: PHP General <php-generallists.php.net> Sent: Wednesday, August 15, 2001 11:16 AM Subject: [PHP] Creating a javascript array from database data

    > Hi there, > > Well after a few hours roaming around various websites I am at a loss. > Here is what I am trying to do: > > 1) Access a MySQL database which contains 1 table > 2) Read the records from this table > 3) Store the values returned from this table into javascript array > elements, ie, if I get the values "dog", "cat" and "cow" back I want > these stored in an array as such: > myArray[0] = valueReturned1 > myArray[1] = valueReturned2 > myArray[2] = valueReturned3 > > You get the idea. > > Problem being that I cannot work out how to implement the javascript > section of this. At the moment my php script writes the values returned > from the database to screen but I require these to be stored in a > javascript array. Please can someone help me before I go mad :) > > Here is my current .php script: > > ---------------------------------------------- > <html> > <head> > <title>Menus test</title> > </head> > <body bgcolor="white"> > > <?php > $dbhost = 'localhost'; > $dbuser = 'guest'; > $dbpass = 'guest'; > $dbname = 'IFE'; > $dbtable = 'menus'; > > file://------ DATABASE CONNECTION --------// > mysql_connect($dbhost,$dbuser,$dbpass) > or die ("Unable to connect to database"); > > mysql_select_db($dbname) > or die ("Unable to select database"); > > > $sql = "SELECT * FROM $dbtable"; > $result = mysql_query($sql); > > $number = mysql_numrows($result); > > $i = 0; > > if ($number == 0) > print "Error - No records found"; > elseif ($number > 0) > { > while ($i < $number) > { > $text = mysql_result($result, $i, "name"); > print "$text"; > > $i++; > } > } > > mysql_free_result($result); > mysql_close(); > ?> > > </body> > </html> > ---------------------------------------------- > > Thanks, Neil

    attached mail follows:


    Thanks a lot for your help Sheridan,

    This now appears to work ok :) but if I remove the:

    print "\"$text\"";

    line (as it is not required), I receive errors complaining about a syntax error (related to what?) and that 'text' is undefined. As this line simply outputs the value to screen why should this cause a problem if it is removed? Or could it be some other problem?

    Neil

    PS: Here is my updated code:

    -------------------------- <html> <head> <title>Menus test</title>

    </head> <body bgcolor="white">

    <?php $dbhost = 'localhost'; $dbuser = 'guest'; $dbpass = 'guest'; $dbname = 'IFE'; $dbtable = 'menus';

    //------ DATABASE CONNECTION --------// mysql_connect($dbhost,$dbuser,$dbpass) or die ("Unable to connect to database");

    mysql_select_db($dbname) or die ("Unable to select database");

    $sql = "SELECT * FROM $dbtable"; $result = mysql_query($sql);

    $number = mysql_numrows($result);

    $i = 0;

    if ($number == 0) print "Error - No records found"; elseif ($number > 0) { echo "<Script Language=\"JavaScript\">\n"; echo "text = new Array("; while ($i < $number) { $text = mysql_result($result, $i, "name");

    $i++;

    if ($i < $number) print ","; else print ")\n"; } echo "</Script>\n"; }

    mysql_free_result($result); mysql_close(); ?>

    </body> </html> --------------------------

    Sheridan Saint-Michel wrote:

    > *************************************************************** > This message was virus checked with: SAVI 3.48 > last updated 14th August 2001 > *************************************************************** > > The thing to ALWAYS remember when working with both PHP and > JavaScript is that PHP is Server-Side and JavaScript is Client-Side. > > What this mean is practical terms is that when going from JavaScript > to PHP you have to submit or redirect back to the server... and when > going from PHP to JavaScript (Like you are trying to do here) you > have to make sure your PHP outputs JavaScript. > > So instead of printing $text you need to actually print the JavaScript... > > So in your case change the middle of your script to something like: > > $number = mysql_numrows($result); > > $i = 0; > > if ($number == 0) > print "Error - No records found"; > else > { > echo "<Script Language=\"JavaScript\">\n"; > echo "text = new Array("; > while ($i < $number) > { > $text = mysql_result($result, $i, "name"); > print "\"$text\""; > $i++; > if ($i < $number) > print ","; > else > print ")\n"; > } > echo "</Script>\n"; > } > > } > > Note: This is my quick *untested* fix done by modifying > your code as little as possible. I would suggest you use > mysql_fetch_row and use your loop to parse it rather than > making several calls to mysql_result (especially if you are > ever going to have more than a few entries in the DB). > > Sheridan Saint-Michel > Website Administrator > FoxJet, an ITW Company > www.foxjet.com > > ----- Original Message ----- > From: Neil Freeman <neil.freemanasa.co.uk> > To: PHP General <php-generallists.php.net> > Sent: Wednesday, August 15, 2001 11:16 AM > Subject: [PHP] Creating a javascript array from database data > > > Hi there, > > > > Well after a few hours roaming around various websites I am at a loss. > > Here is what I am trying to do: > > > > 1) Access a MySQL database which contains 1 table > > 2) Read the records from this table > > 3) Store the values returned from this table into javascript array > > elements, ie, if I get the values "dog", "cat" and "cow" back I want > > these stored in an array as such: > > myArray[0] = valueReturned1 > > myArray[1] = valueReturned2 > > myArray[2] = valueReturned3 > > > > You get the idea. > > > > Problem being that I cannot work out how to implement the javascript > > section of this. At the moment my php script writes the values returned > > from the database to screen but I require these to be stored in a > > javascript array. Please can someone help me before I go mad :) > > > > Here is my current .php script: > > > > ---------------------------------------------- > > <html> > > <head> > > <title>Menus test</title> > > </head> > > <body bgcolor="white"> > > > > <?php > > $dbhost = 'localhost'; > > $dbuser = 'guest'; > > $dbpass = 'guest'; > > $dbname = 'IFE'; > > $dbtable = 'menus'; > > > > file://------ DATABASE CONNECTION --------// > > mysql_connect($dbhost,$dbuser,$dbpass) > > or die ("Unable to connect to database"); > > > > mysql_select_db($dbname) > > or die ("Unable to select database"); > > > > > > $sql = "SELECT * FROM $dbtable"; > > $result = mysql_query($sql); > > > > $number = mysql_numrows($result); > > > > $i = 0; > > > > if ($number == 0) > > print "Error - No records found"; > > elseif ($number > 0) > > { > > while ($i < $number) > > { > > $text = mysql_result($result, $i, "name"); > > print "$text"; > > > > $i++; > > } > > } > > > > mysql_free_result($result); > > mysql_close(); > > ?> > > > > </body> > > </html> > > ---------------------------------------------- > > > > Thanks, Neil

    --
    --------------------------------
     Email:  neil.freemanasa.co.uk
             neil_freemanyahoo.com
    --------------------------------
    

    attached mail follows:


    Hi,

    if your script makes errors on mysql_query() try to printthe errormessages sent back by MySql: mysql_query(...) or die(mysql_error());

    see: http://www.php.net/manual/en/function.mysql-error.php

    ----- Original Message ----- From: "Roman" <rduriancikindprop.gov.sk> To: "Php-General" <php-generallists.php.net> Sent: 2001. augusztus 15. 11:28 Subject: [PHP] select problem

    > I have mysql in redhat linux and apache 1.3.20 with module php 4.0.6 > but I have error in my select, connect to the database is ok. In apache and > mysql uder windows > working this script OK but no in linux. > What's wrong ? > > $spojenie = mysql_connect("localhost","user","password"); > if (!$spojenie) : > echo "Chyba pri konektne na databazu !!!"; > exit; > endif; > mysql_select_db("Patenty",$spojenie); > > > > $podmienka = "Cislo_dokumentu BETWEEN 238000 AND 238023"; > $tried = "Cislo_dokumentu"; > > if ($podmienka !="") $vysledok = mysql_query("SELECT * FROM patent WHERE > $podmienka ORDER BY $tried",$spojenie); > else $vysledok = mysql_query("SELECT * FROM patent ORDER BY > $tried",$spojenie); > > if (!$vysledok): > echo "Error.<BR>\n"; > exit; > endif; > > > -- > 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:


    I wanted to call a PHP-Skript through a img-Tag and PHP sends a image back. How can I do that?

    Schrotty.*

    I'm German, so please be patient with my English.

    attached mail follows:


    Let's i.e. a Bannerexchange, the users just put an img-tag on there site and the image appears. I wnat to know how this is possible. I tried already something like this: $im = imagecreatefromgif(news.jpg); imagegif = ();

    "Schrotty" <niels.pardongmx.de> schrieb im Newsbeitrag news:20010815164850.98845.qmailpb1.pair.com... > I wanted to call a PHP-Skript through a img-Tag and PHP sends a image back. > How can I do that? > > Schrotty.* > > I'm German, so please be patient with my English. > >

    attached mail follows:


    My problem is solved!!!

    "Schrotty" <niels.pardongmx.de> schrieb im Newsbeitrag news:20010815164850.98845.qmailpb1.pair.com... > I wanted to call a PHP-Skript through a img-Tag and PHP sends a image back. > How can I do that? > > Schrotty.* > > I'm German, so please be patient with my English. > >

    attached mail follows:


    How did you solve it? Kunal ----- Original Message ----- From: "Schrotty" <niels.pardongmx.de> To: <php-generallists.php.net> Sent: Wednesday, August 15, 2001 11:18 PM Subject: [PHP] Re: Question about PHP and images

    > My problem is solved!!! > > "Schrotty" <niels.pardongmx.de> schrieb im Newsbeitrag > news:20010815164850.98845.qmailpb1.pair.com... > > I wanted to call a PHP-Skript through a img-Tag and PHP sends a image > back. > > How can I do that? > > > > Schrotty.* > > > > I'm German, so please be patient with my English. > > > > > > > > -- > 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:


    Try searching for "javascript" and "reference" on Google for online references. If you want a decent book, get something like "JavaScript: The Definitive Guide" by David Flanagan, published by O'Reilly.

    Regardless, pay attention to flags stating IE or Netscape only! :)

    -Al (used to use your handle "lemming" *way* back when)

    On Tue, 14 Aug 2001 22:58:44 -0300, cdecherybrfree.com.br (Christian Dechery) wrote:

    >Sorry for the OT but, but I'm struggling to get my forms to have a good >validation in JavaScript. > >Does anyone know a complete reference to JavaScript, like, with all >objects, it's functions, parameters and etc... > >that would help a lot.. > >Thanks... >____________________________ > Christian Dechery (lemming) > http://www.tanamesa.com.br > Gaita-L Owner / Web Developer >

    attached mail follows:


    JavaScript Reference Guide-- http://rts.ncst.ernet.in/resources/javascript/reference/

    I remember having trouble finding a complete object/method reference too, this document really helped me.

    -----Original Message----- From: Al [mailto:alxZty321.com] Sent: Wednesday, August 15, 2001 12:58 PM To: php-generallists.php.net Subject: [PHP] Re: javascript reference (slightly ot)

    Try searching for "javascript" and "reference" on Google for online references. If you want a decent book, get something like "JavaScript: The Definitive Guide" by David Flanagan, published by O'Reilly.

    Regardless, pay attention to flags stating IE or Netscape only! :)

    -Al (used to use your handle "lemming" *way* back when)

    On Tue, 14 Aug 2001 22:58:44 -0300, cdecherybrfree.com.br (Christian Dechery) wrote:

    >Sorry for the OT but, but I'm struggling to get my forms to have a good >validation in JavaScript. > >Does anyone know a complete reference to JavaScript, like, with all >objects, it's functions, parameters and etc... > >that would help a lot.. > >Thanks... >____________________________ > Christian Dechery (lemming) > http://www.tanamesa.com.br > Gaita-L Owner / Web Developer >

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


    Hello, Using cURL: I have been working for some time to get my PHP program to login to an https site and now that it logs in I can’t figure out how to do a post to the site while I am logged in. After I use curl to login I do another curl session to try and emulate a form post. But when I get the results it is just the login page. Does anyone know how after my script logs in to a site I can run another curl post while I am logged in? Thank you,

    -------------------------------------------- Brandon Orther WebIntellects Design/Development Manager brandonwebintellects.com 800-994-6364 www.webintellects.com --------------------------------------------

    attached mail follows:


    Brandon,

    I was told of a better way of sending POSTs without using cURL and it allows usernames and passwords to be used...

    // Format of $authorization is username:password (for password protected directories) // Code can be easily modified to add input parameters for User-Agent, Referer, Cookie, Accept-Encoding or other required headers

    function HTTPPost($host, $path, $dataToSend, $port = 80, $authorization "") { if(!($fp = fsockopen($host, $port))) { return "<b>From HTTPPost()</b><br>\n<b>Error:</b> Error opening network socket.<br>\n"; }

    socket_set_blocking($fp, TRUE); fwrite($fp, "POST $path HTTP/1.0\r\n"); if($authorization != "") fwrite($fp, "Authorization: Basic " . base64_encode($authorization) . "\r\n"); fwrite($fp, "Host: $host\r\n"); fwrite($fp, "Content-type: application/x-www-form-urlencoded\r\n"); fwrite($fp, "Content-length: " . strlen($dataToSend) . "\r\n\r\n"); fwrite($fp, $dataToSend);

    for($result = ""; !feof($fp); $result .= fread($fp, 1000000)); fclose($fp);

    return $result; }

    Many thanks to Brad Jackson who provided this code to me.

    Marc.

    "Brandon Orther" <ortherwebintellects.com> wrote in message news:008901c125ab$f0242320$5a52a040webintel... Hello,

    Using cURL: I have been working for some time to get my PHP program to login to an https site and now that it logs in I can't figure out how to do a post to the site while I am logged in. After I use curl to login I do another curl session to try and emulate a form post. But when I get the results it is just the login page. Does anyone know how after my script logs in to a site I can run another curl post while I am logged in?

    Thank you,

    -------------------------------------------- Brandon Orther WebIntellects Design/Development Manager brandonwebintellects.com 800-994-6364 www.webintellects.com --------------------------------------------

    attached mail follows:


    Does anyone know of a tool that lets me see the cookies a site sends my browser?

    attached mail follows:


    Hello,

    I have this code, which is a cooked down code of something bigger. So don't ask what it's for. The problem is that I can't get this script working the way I like it at all. Maybe it's a bug. Maybe you have another suggestion? Somewhere in the middle section i have wrote test1 and test2 as a comment. If you activate test2 instead of test1, then you will have some output(not the expected output), else I just see a page saying:"The page cannot be displayed".

    I think it's very strange, any ideas? Try inserting this into a file and try yourself.

    /Stig

    <? $side = 1;

    function grabkeys ($felt, $key, $side) { global $newarray; $stopkey = array ("A","Z");//De key-navne som den ikke skal gemme. If (!in_array($key , $stopkey)) { if ($felt == $side) { $newarray[] = $key;}; }; };

    function showkeys ($felt, $key) { global $newarray; //echo count($newarray) . "-count newarray<br>"; // //echo "<pre>" . $newarray[0] . "</pre>-newarray<br>"; //test2 echo $newarray[0] . "-newarray<br>"; //test1 };

    $row = array ("A"=>"1","B"=>"1","C"=>"1","D"=>"1","E"=>"1","F"=>"1","Z"=>"1"); array_walk ($row, 'grabkeys', $side); array_walk ($row, 'showkeys'); ?>

    attached mail follows:


    I need to set some PHP values like:

    php_value session.save_path /a_more_secure_dir

    in my .htaccess file. But the main Apache httpd.conf file has:

    AllowOverride AuthConfig FileInfo Indexes

    and php_value in .htaccess causes Apache internal server error!

    Now if I change httpd.conf to say:

    AllowOverride All

    then php_value works in .htaccess, with no error!

    But as you know, using "AllowOverride All" in httpd.conf is BAD! How do I allow php_value in .htaccess, without it? I tried:

    AllowOverride php_value

    but Apache rejects it as a configuration error. :-(

    Help, please!

    Egan

    attached mail follows:


    Hi kids

    I have a function in one of my includes: db.inc.php::getQuery which does most of my mySQL calling for me.

    However, when the mySQL call fails, I get a nice error which is useful except one thing. It doesn't tell me which function called it.

    Does anyone know how to find to do the equivalent of:

    function myFunc() { echo "myFunc was called by the function $calling_function"; }

    Any ideas?

    j.

    attached mail follows:


    Can you post the error so we can have a look at it? If it didn't provide a function, it's probably a parse error (missing semi-colon, missing quote).

    Tyler Longren Captain Jack Communications tylercaptainjack.com www.captainjack.com

    On Wed, 15 Aug 2001 18:43:49 +0100 "Justin Finkelstein" <justinkeytwo.net> wrote:

    > Hi kids > > I have a function in one of my includes: db.inc.php::getQuery which does > most of my mySQL calling for me. > > However, when the mySQL call fails, I get a nice error which is useful > except one thing. It doesn't tell me which function called it. > > Does anyone know how to find to do the equivalent of: > > function myFunc() > { > echo "myFunc was called by the function $calling_function"; > } > > Any ideas? > > j. > > > > > -- > 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:


    I have a security-question that I hope someone can answer, my question is: Will the DROP+TABLE+TBL_TEST-part in http://www.foo.bar/page.php?id=1;DROP+TABLE+TBL_TEST; be executed?

    /Örjan

    attached mail follows:


    Everyone,

    *I checked to make sure it would be OK to post the following here so please don't mistake it for spam. I was told it would be more than OK!*

    I help develop a text editor called EmEditor and we are about to focus development on supporting the needs/wants of a select number of communities. Our editor currently supports the development of over a dozen languages with syntax highlighting, auto complete, plugins, high configurability, etc. We get a lot of positive feedback but very little from open source-positive communities like the PHP community.

    The head developer and owner of our company responds to user feedback so naturally the loudest communties get what they want while the rest don't. I've been a fan of PHP and I am very much interested in developing an editor with PHP and PHP developers in mind but I can't convince my boss to include PHP in our future plans if he doesn't hear from the community itself. Even the Ruby community in Japan makes itself heard!

    To cut this short, I think this is a great chance for interested parties in the PHP community to have a say in the development of another editor that actively tries to make itself useful to PHP developers. Our editor is shareware so of course it costs nothing to try it out and start speaking up for the changes and features you would like to see. There are a lot of nice environments in which to write PHP but it sure doesn't hurt to have another choice.

    Thanks, David Jansen www.emurasoft.com

    attached mail follows:


    Think in terms of output... The JavaScript is literally going to try and run the output of the PHP (It doesn't even know PHP exists). PHP is outputting the source code for the HTML and JavaScript. So what you are trying to do is get PHP to take dog,cat,cow from MySQL and output:

    <Script Language="JavaScript"> text = new Array("dog","cat","cow") </Script>

    This block of code does exactly that, with the print"\"$text\""; filling in dog cat and cow. I've added comments so you can see how each line produces the above (I am using C-Style comments as the // gets mucked up in e-mail)

    The parts in [] are comments within comments to show flow control and are not output.

    else { /* <Script Language="JavaScript"> */ echo "<Script Language=\"JavaScript\">\n"; /* text=new Array( */ echo "text = new Array("; while ($i < $number)

    $text = mysql_result($result, $i, "name"); /* "dog" [first time] */ /* "cat" [second time] */ /* "cow" [third time] */ print "\"$text\""; $i++; if ($i < $number) /* , [first time] */ /* , [second time] */ print ","; else /* ) [third time] */ print ")\n"; } /* </Script> */ echo "</Script>\n"; }

    So if you can follow that (just walk all the way through the loop for each of the three passes) you can see that no part of the code (including the print "\"$text\"";) is unnecessary

    Hope this helps

    Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com

    ----- Original Message ----- From: Neil Freeman <neil.freemanasa.co.uk> To: Sheridan Saint-Michel <webmasterfoxjet.com> Cc: php-general <php-generallists.php.net> Sent: Wednesday, August 15, 2001 12:09 PM Subject: Re: [PHP] Creating a javascript array from database data

    > Thanks a lot for your help Sheridan, > > This now appears to work ok :) but if I remove the: > > print "\"$text\""; > > line (as it is not required), I receive errors complaining about a syntax > error (related to what?) and that 'text' is undefined. As this line simply > outputs the value to screen why should this cause a problem if it is removed? > Or could it be some other problem? > > Neil > > PS: Here is my updated code: <Snip>

    attached mail follows:


    Hi,

    I am a beginner in PHP and I am trying to do the following: I have a form in a page that has 3 fields: email_1, email_2 and email_3. I am trying to send e-mail to those people, if the fields are filled. Relevant part of code:

    <?php for ($i = 1; $i <= 6; $i++) { $eval = '\$email = \$email_' + $i + ';'; eval( $eval ); echo $email; } ?>

    The code complains about an error in line eval( $eval );:

    Parse error: parse error in /home/httpd/htdocs/hthcombr/cgi-local/envia.php(19) : eval()'d code on line 1

    Can anyone please help me?

    Regards,

    Felipe Coury

    attached mail follows:


    lots of things:

    1) variables in single-quoted strings aren't evaluated so you don't need to escape the $ in $email

    2) php uses . not + for concatenation.

    3) try it like this: eval('$email = $email_'.$i.';'); or eval("\$email = \$email_$i;");

    4) you can save yourself the trouble by using arrays as field names: <input name="email[1]">

    5) RTFM! that's what its there for.

    On Wed, 15 Aug 2001 15:15:09 -0300, Felipe Coury (fcourycreation.com.br) wrote: >Hi, > >I am a beginner in PHP and I am trying to do the following: I have a >form in >a page that has 3 fields: email_1, email_2 and email_3. I am trying >to send >e-mail to those people, if the fields are filled. Relevant part of >code: ><?php >for ($i = 1; $i <= 6; $i++) { > $eval = '\$email = \$email_' + $i + ';'; > eval( $eval ); > echo $email; >} >?> > >The code complains about an error in line eval( $eval );: > >Parse error: parse error in >/home/httpd/htdocs/hthcombr/cgi-local/envia.php(19) : eval()'d code >on line >1 > >Can anyone please help me? > >Regards, > >Felipe Coury > > >-- >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:


    Wouldn't it be nice if there was a way develop client-side (browser-based) applications for PHP? I see so many posts about using PHP to interact with JavaScript - wouldn't it be cool if you could just tell your PHP code where to run - server or client (similar to what ASP does with VBScript)? I know I can't be the first person to think about this, but I've searched and can't find anything about it. Any ideas/suggestions/resources?

    Tom Malone Web Designer http://www.tom-malone.com

    attached mail follows:


    I am dynamically creating a menu based on a "title" field from a database.

    ie item1 item2 etc.

    Is it possible that when I'm on the "item1" page to bold the title in the menu?

    Any suggestions are appreciated.

    __________________ Jason Dulberg Extreme MTB http://extreme.nas.net

    attached mail follows:


    Hi, I am trying to upgrade from php3 to php4, I recompiled apache_1.3.20 and php4.0.6 as per instructions(http://www.php.net/manual/en/install.apache.php).

    Everything seemed ok, but LoadModule in the httpd.conf was no longer recognized so I # all the LoadModule and AddModule lines. httpd -l shows mod_php4.c in the list.

    However, I was using this before: <Directory "/dir/to/enable/php"> php3_engine on </Directory>

    What do I use now? I tried just engine on, but httpd complains: Invalid command 'engine', perhaps mis-spelled or defined by a module not included in the server configuration

    Thanks for any help.

    attached mail follows:


    Hi,

    I'm using curl to do a post and when I run the curl_exec($ch) it does the post and the result is displayed, however after the </HTML> it is printing a 0. It seems to be in the return of the post because if I echo something after the curl_exec statement it come after the 0.

    Has anybody had any experience with this?

    Thanks,

    Nigel

    attached mail follows:


    hi. I want to build buttons with php and when click eavh of them , one special work ,do for me.

    how can I do it???

    best regards. nafiseh

    attached mail follows:


    -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

    just output the proper HTML codes.

    <INPUT TYPE=SUBMIT>

    > -----Original Message----- > From: nafiseh saberi [mailto:nsaberiiraninfocenter.net] > Sent: Wednesday, August 15, 2001 3:12 PM > To: php-generallists.php.net > Subject: [PHP] build button with php > > > > hi. > I want to build buttons with php > and when click eavh of them , > one special work ,do for me. > > how can I do it??? > > > best regards. > nafiseh > > -- > 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

    -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

    iQA/AwUBO3rIJsaXTGgZdrSUEQIF7ACfau9m2CdHGcS53cQSWFPPT8eQENkAoOr5 MK3JVnUD5bSfDvxlnYrcFF2m =xcnL -----END PGP SIGNATURE-----

    attached mail follows:


    "Nafiseh Saberi" <nsaberiiraninfocenter.net> wrote in message news:200108151912.f7FJCDS17109persia.iraninfocenter.net... > I want to build buttons with php > and when click eavh of them , > one special work ,do for me.

    <html><body> <?php function action1() { echo "<br>Do action 1"; }

    function action2() { echo "<br>Do action 2"; }

    function action3() { echo "<br>Do action 3"; }

    $action_list = array( "Action 1" => "action1", "Action 2" => "action2", "Action 3" => "action3" );

    function writeForm() { global $action_list;

    echo "\nChoose an action!"; echo "\n<form action='$PHP_SELF'>";

    foreach($action_list as $key => $fn) echo "\n\t<input type='submit' name='action' value='$key'><br>";

    echo "\n</form>"; }

    if (isset($action) and isset($action_list[$action])) { $t = $actions[$action](); $t(); } else writeForm(); ?> </body></html>

    attached mail follows:


    "Hugh Bothwell" <hugh_bothwellhotmail.com> wrote in message news:20010815194239.40564.qmailpb1.pair.com...

    > if (isset($action) and isset($action_list[$action])) { > $t = $actions[$action](); Typo alert!! This line should be '$t = $action_list[$action];'

    attached mail follows:


    Hello,

    I have created a predictionscompetition and some code counts te total score of a match of a person. On the screen it workes, but in de database it goes wrong. Each person gets the total of the last person. There must be something wrong with the update statement. I hope someone can help me.

    Cheers, Martin.

    $number = MYSQL_NUMROWS($result); $i = 0; WHILE ($i < $number): $naam = mysql_result($result,$i,"naam"); $uit_gr = mysql_result($result,$i,"uit_gr"); $uit_te = mysql_result($result,$i,"uit_te"); $ru_gr = mysql_result($result,$i,"ru_gr"); $ru_te = mysql_result($result,$i,"ru_te"); $minuut = mysql_result($result,$i,"minuut"); $toto = mysql_result($result,$i,"toto");

    /* Count everything*/

    $t01 = $u1+$r1+$b1+$m1+$t1; $sqlb = "UPDATE voorspelling1 SET totaal='$t01' WHERE id_voorspelling = '$id_voorspelling'"; $resultb = mysql_query($sqlb); PRINT "$naam $uit_gr $uit_te $u1 $r1 $b1 $m1 $t1 $t01<BR>"; PRINT "$t1<BR>"; $i++; ENDWHILE;

    attached mail follows:


    hi martin, Could you send the code again and now include - the part where you get the $id_voorspelling from - the part where you make the $t1 - which variable goes wrong? $t1 or $t01? Can you check the table in mysql to see whether the error is in the update or in the print?

    Chris

    Van: "Martin Kampherbeek" <m.kampherbeekhome.nl> Aan: <php-generallists.php.net> Datum verz. Wed, 15 Aug 2001 21:28:15 +0200 Onderwerp: [PHP] Problem with updating

    > Hello, > > I have created a predictionscompetition and some code counts te total score of a match of a person. > On the screen it workes, but in de database it goes wrong. Each person gets the total of the last person. There must be something wrong with the update statement. > I hope someone can help me. > > Cheers, > Martin. > > $number = MYSQL_NUMROWS($result); > $i = 0; > WHILE ($i < $number): > $naam = mysql_result($result,$i,"naam"); > $uit_gr = mysql_result($result,$i,"uit_gr"); > $uit_te = mysql_result($result,$i,"uit_te"); > $ru_gr = mysql_result($result,$i,"ru_gr"); > $ru_te = mysql_result($result,$i,"ru_te"); > $minuut = mysql_result($result,$i,"minuut"); > $toto = mysql_result($result,$i,"toto"); > > /* Count everything*/ > > $t01 = $u1+$r1+$b1+$m1+$t1; > $sqlb = "UPDATE voorspelling1 SET totaal='$t01' WHERE id_voorspelling = '$id_voorspelling'"; > $resultb = mysql_query($sqlb); > PRINT "$naam $uit_gr $uit_te $u1 $r1 $b1 $m1 $t1 $t01<BR>"; > PRINT "$t1<BR>"; > $i++; > ENDWHILE; >

    -------------------------------------------------------------------- -- C.Hayes Droevendaal 35 6708 PB Wageningen the Netherlands -- --------------------------------------------------------------------

    attached mail follows:


    David Robley wrote:

    > On Tue, 14 Aug 2001 18:43, Rukhiya wrote: > >>Hi! >> >>How do I use a PUT method support to upload files from the client to >>the WEB server? Can anyone pls. help me out to find a solution to these >>problems. It's very urgent!!!! >> >> >>regards >>Rukhiya >> > > http://au2.php.net/manual/en/features.file-upload.php >

    The procedure described in the manual will work on PHP3 only. It seems the "PUT" method is broken since the birth of PHP4. And I don't see the PHP devlpement team has assigned any resource to fix it. You must consider the alternative method to upload file to web server, such as the "POST" method, or other server-side script language.

    For more details of this bug, you can find it under the bug #4763, #4986, #6672, #10307, #10383 and #12754 in the bug database.

    attached mail follows:


    Chris,

    The prototype is a single user, 16 bits application, developed in Borland C++ 4.x in a Windows 3.x environment. You should be able to run it on the following operating systems: DOS 5.0 or later, Windows 3.1 and Windows 95/98. To get familiar with the way the system works, you could download the installation executable for the prototype and try it out. It will help you understand the system requirements better.

    I was supposed to start working in this idea way back in Oct 2000, when I first posted the information about the project on the CU web site (10/02/00). Because of my full time job at the Admen. Office of the US Courts in Washington DC and other personal commitments (I will be getting married on Set 29th 2001), I haven't had a opportunity to spend as much time as I would like on this project . I will be donating as much of my free time as I can on the project after Oct 2001.

    So far I am the only one working in this project (designing, implementation and development). My brother is not a programmer but he has a MA on art management so he has been able the help me in the areas of gallery and museum management. I would like the have other people involved in this endeavor, specially accounts and php programmers, but I think that there is enough work for anybody that is willing to help in any way, shape or form.

    The reason I asked Tina to take a look at the information about my project, was because she help me with a problem that I was having running a php script in Win 95/98. I haven’t asked for help for the project on the php mailing list, because I thought that my first priority was to get familiar with php and html. Anyway I am very happy that you would like to participate in this challenging work.

    I would like the code the released under the GNU- General Public Licences (GPL) as published by the Free Software Foundation, but nothing is written in stone. I hope to get ideas and suggestion from all the participants on the project in what will be the best way to precede in the design, implementation and development of this application.

    Please, let me know what are your thoughts regarding the information you have seen so far.

    Adios, miguel

    >From: World Wide Web User >Reply-To: leemediawaveonline.com >To: mrv169hotmail.com >CC: leemediawaveonline.com >Subject: comments about the Free Gallery Management System >Date: Tue, 14 Aug 2001 16:33:42 -0400 (EDT) > >this app is dos based currently and is going to be ported to the web, is this correct? when are you going to start this project? how many people do you have on board? Ive worked on quite a few e-commerce projects, I would like to try something new, I think this would be challenging. > >www.miningsurplus.com >www.cooldragons.com >www.sexypjs-lingerie-inc.ca >www.e-tankless.com > >what will the code be released under? closed, gpl, bsd? > > Chris Lee > leemediawaveonline.com >

    __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/

    attached mail follows:


    I need professional help!

    I need to make a form that will display old data in the form boxes, wait for user input (if they want to change something), and then go on to another page. This is what I have now, and it doesn't work:

    datafile.php <?php $alpha="Alpha"; $numb="46"; ?>

    inputpg.php <?php include("datafile.php"); print "<form action=test2.php method=get>"; print "<center><input type=text name=".$alpha." size=5></center><br>"; print "<center><input type=text name=".$numb." size=5></center><br>"; print "<center><input type=submit value=Do_It!></center>"; print "</form>"; ?>

    test2.php <html> <body> <?php print "This is alpha".$alpha; print "<br>this is numb".$numb; ?> </body> </html>

    attached mail follows:


    Hi, Try this,

    <?php include("datafile.php"); print "<form action=test2.php method=get>"; print "<center><input type=text name="alpha" value="$alpha" size=5></center><br>"; print "<center><input type=text name="numb" valus ="$numb" size=5></center><br>"; print "<center><input type=submit value=Do_It!></center>"; print "</form>"; ?>

    Kunal ----- Original Message ----- From: "Hugh Danaher" <hdanaherearthlink.net> To: "Php-General" <php-generallists.php.net> Sent: Thursday, August 16, 2001 1:53 AM Subject: [PHP] auto-input data into form boxes

    I need professional help!

    I need to make a form that will display old data in the form boxes, wait for user input (if they want to change something), and then go on to another page. This is what I have now, and it doesn't work:

    datafile.php <?php $alpha="Alpha"; $numb="46"; ?>

    inputpg.php <?php include("datafile.php"); print "<form action=test2.php method=get>"; print "<center><input type=text name=".$alpha." size=5></center><br>"; print "<center><input type=text name=".$numb." size=5></center><br>"; print "<center><input type=submit value=Do_It!></center>"; print "</form>"; ?>

    test2.php <html> <body> <?php print "This is alpha".$alpha; print "<br>this is numb".$numb; ?> </body> </html>

    attached mail follows:


    The problem is with your input page. You're putting the variable values where the names go

    inputpg.php <?php include("datafile.php"); print "<form action=test2.php method=get>"; print "<center><input type=text name=".$alpha." size=5></center><br>"; print "<center><input type=text name=".$numb." size=5></center><br>"; print "<center><input type=submit value=Do_It!></center>"; print "</form>"; ?>

    Try this

    inputpg.php <?php include("datafile.php"); print "<form action=test2.php method=get>"; print "<center><input type=text name=\"alpha\" value=\"$alpha\" size=5></center><br>"; print "<center><input type=text name=\"numb\" value=\"$numb\" size=5></center><br>"; print "<center><input type=submit value=\"Do_It!\"></center>"; print "</form>"; ?>

    Data Driven Design 1506 Tuscaloosa Ave Holly Hill, Florida 32117

    http://www.datadrivendesign.com Phone: (386) 226-8979

    Websites That WORK For You ----- Original Message ----- From: "Hugh Danaher" <hdanaherearthlink.net> To: "Php-General" <php-generallists.php.net> Sent: Wednesday, August 15, 2001 4:23 PM Subject: [PHP] auto-input data into form boxes

    I need professional help!

    I need to make a form that will display old data in the form boxes, wait for user input (if they want to change something), and then go on to another page. This is what I have now, and it doesn't work:

    datafile.php <?php $alpha="Alpha"; $numb="46"; ?>

    inputpg.php <?php include("datafile.php"); print "<form action=test2.php method=get>"; print "<center><input type=text name=".$alpha." size=5></center><br>"; print "<center><input type=text name=".$numb." size=5></center><br>"; print "<center><input type=submit value=Do_It!></center>"; print "</form>"; ?>

    test2.php <html> <body> <?php print "This is alpha".$alpha; print "<br>this is numb".$numb; ?> </body> </html>

    attached mail follows:


    Thank you. Thank you. Thank you. ----- Original Message ----- From: Kunal Jhunjhunwala <kunalgetmonked.net> To: <php-generallists.php.net> Sent: Wednesday, August 15, 2001 1:26 PM Subject: Re: [PHP] auto-input data into form boxes

    > Hi, > Try this, > > <?php > include("datafile.php"); > print "<form action=test2.php method=get>"; > print "<center><input type=text name="alpha" value="$alpha" > size=5></center><br>"; > print "<center><input type=text name="numb" valus ="$numb" > size=5></center><br>"; > print "<center><input type=submit value=Do_It!></center>"; > print "</form>"; > ?> > > Kunal > ----- Original Message ----- > From: "Hugh Danaher" <hdanaherearthlink.net> > To: "Php-General" <php-generallists.php.net> > Sent: Thursday, August 16, 2001 1:53 AM > Subject: [PHP] auto-input data into form boxes > > > > I need professional help! > > I need to make a form that will display old data in the form boxes, wait for > user input (if they want to change something), and then go on to another > page. This is what I have now, and it doesn't work: > > datafile.php > <?php > $alpha="Alpha"; > $numb="46"; > ?> > > inputpg.php > <?php > include("datafile.php"); > print "<form action=test2.php method=get>"; > print "<center><input type=text name=".$alpha." size=5></center><br>"; > print "<center><input type=text name=".$numb." size=5></center><br>"; > print "<center><input type=submit value=Do_It!></center>"; > print "</form>"; > ?> > > test2.php > <html> > <body> > <?php > print "This is alpha".$alpha; > print "<br>this is numb".$numb; > ?> > </body> > </html> > > > > -- > 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:


    Hello everyone-

    (skip to the *****'s to see the questions if you don't want to read all of this thanks)

    This might be a little off topic here but I really need some help and a great opionion on this matter. Here's the situation, I have created this software in php and mysql. What it is is it has user authetification, event calendar for several web sites, a personal calendar for each user of the calendar, and a company calendar. I'm hoping that I can get to a point soon to release this under the gpl and have the open source community help develope the software, if they wish.

    What I'm using this software for... The company I work for only has one developer (me :) ) and they have 6 web sites they want done. So what I have done is created this software so that I can enter all the employee's of the company and then give them access to the sections they need. For example, human resources has access to add new employee's, delete employee's, and update employee's information. The average user has access to a personal calendar in which they can add events give the event a time, a name, and a description. Also, the average user has the ablity to chance certain things about their own profile.. i.e. address, phone #s etc.

    Now people who I give access can have access to the event calendars for each website and they will be able to add events, delete events, and update events. The options when adding an event is the event name, the category of the event (i.e. concert, on location promo etc), where the event is being held, the person to contact for the event, time of the event, price of the event, the description of the event, and an option to either show the event on the web or not.

    Also, the admin has the ability to add new "modules" to the software and then give access to whomever he/she see needs access to it. Lastly, there is a huge help file that is generated dynamically when you add these new "modules."

    (sorry about the lenght of this but it's necessary)

    Now here's the evil twist of fate...

    There's a company who has some calendar software that has a TON of features that I don't have in my software (as of yet). However, they are a total Microsoft shop running all their code in VB, ASP, and their DB is MSSQL 7. I really don't like the fact that they use Microsoft because I am going to be the one to administer the box this is going to be running on (would much rather run unix set it up once and leave it alone, unlike Microsoft where you have to babysit the damn thing).

    Now I've been talking with these people and they pretty much refuse to move any of their code to php, mysql, or any varient of unix because it wouldn't be cost effective to them right now (they said that they might do it later when they can hire a team to convert all the code over to it).

    Here's the thing.. I've been working on this software for about 4 months now so I really want to use it, but the big guns here in the company want to use this other ASP Microsoft stuff that has a ton more features. If we go with ASP crap, I'm going to have to learn ASP and VB (I'm assuming most DB's are the same so learning MSSQL 7 wouldn't be too hard) and I'm going to have to babysit the Win2k server, which is something else I don't want to do.

    ***** So with all this said I'm wondering just how welcome you think this software would be in the open source community? Is there a need for something like I have and am still developing? Do you all think that I could get some more developers to work on this software to make it even more powerful than it is now?

    The reason why I ask these qestions is I don't want to go with Micro$oft, throw away 4 months of work, and have to learn entirely new stuff.

    Any suggestions or help would be great! Thanks SO much! Jay Paulson Internet Program Director LBJS jpaulsonlbjs.com

    attached mail follows:


    IMO I would have to say it depends on the Timeline of your Boss. Releasing the app to the open source community would be great, the more there is, the more reason for people to stop using MS, but you can't demand a schedule of when new features will be added. You may have to go with the MS for now, and wait for your app to be developed with the new features, then convince your boss on moving to your software. You should be able to move all the data from one to the other without to much trouble.

    Chris

    ----- Original Message ----- From: "Jay Paulson" <jpaulsonlbjs.com> To: <php-generallists.php.net> Sent: Wednesday, August 15, 2001 1:39 PM Subject: [PHP] Need open source community help!

    > Hello everyone- > > (skip to the *****'s to see the questions if you don't want to read all of > this thanks) > > This might be a little off topic here but I really need some help and a > great opionion on this matter. Here's the situation, I have created this > software in php and mysql. What it is is it has user authetification, event > calendar for several web sites, a personal calendar for each user of the > calendar, and a company calendar. I'm hoping that I can get to a point soon > to release this under the gpl and have the open source community help > develope the software, if they wish. > > What I'm using this software for... The company I work for only has one > developer (me :) ) and they have 6 web sites they want done. So what I have > done is created this software so that I can enter all the employee's of the > company and then give them access to the sections they need. For example, > human resources has access to add new employee's, delete employee's, and > update employee's information. The average user has access to a personal > calendar in which they can add events give the event a time, a name, and a > description. Also, the average user has the ablity to chance certain things > about their own profile.. i.e. address, phone #s etc. > > Now people who I give access can have access to the event calendars for each > website and they will be able to add events, delete events, and update > events. The options when adding an event is the event name, the category of > the event (i.e. concert, on location promo etc), where the event is being > held, the person to contact for the event, time of the event, price of the > event, the description of the event, and an option to either show the event > on the web or not. > > Also, the admin has the ability to add new "modules" to the software and > then give access to whomever he/she see needs access to it. Lastly, there > is a huge help file that is generated dynamically when you add these new > "modules." > > (sorry about the lenght of this but it's necessary) > > Now here's the evil twist of fate... > > There's a company who has some calendar software that has a TON of features > that I don't have in my software (as of yet). However, they are a total > Microsoft shop running all their code in VB, ASP, and their DB is MSSQL 7. > I really don't like the fact that they use Microsoft because I am going to > be the one to administer the box this is going to be running on (would much > rather run unix set it up once and leave it alone, unlike Microsoft where > you have to babysit the damn thing). > > Now I've been talking with these people and they pretty much refuse to move > any of their code to php, mysql, or any varient of unix because it wouldn't > be cost effective to them right now (they said that they might do it later > when they can hire a team to convert all the code over to it). > > Here's the thing.. I've been working on this software for about 4 months now > so I really want to use it, but the big guns here in the company want to use > this other ASP Microsoft stuff that has a ton more features. If we go with > ASP crap, I'm going to have to learn ASP and VB (I'm assuming most DB's are > the same so learning MSSQL 7 wouldn't be too hard) and I'm going to have to > babysit the Win2k server, which is something else I don't want to do. > > ***** > So with all this said I'm wondering just how welcome you think this software > would be in the open source community? Is there a need for something like I > have and am still developing? Do you all think that I could get some more > developers to work on this software to make it even more powerful than it is > now? > > The reason why I ask these qestions is I don't want to go with Micro$oft, > throw away 4 months of work, and have to learn entirely new stuff. > > Any suggestions or help would be great! > Thanks SO much! > Jay Paulson > Internet Program Director > LBJS > jpaulsonlbjs.com > > > -- > 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:


    Why would people move away from a package they paid for already? Especially if it's backed up by another company - I'm guessing there's probably some maintenance contracts they will be signing.

    I'd suggest you (Jay) look at some other OS projects which may be more full-featured already, and show those. Chris is right - it depends somewhat on a timeline. But there's going to have to be some custom work to get things "just right", OR they will need to adapt the business to the software, instead of the software to the business. (which costs more in the long run?)

    re: Windows - I think you're being a bit hard on it. As much as I support Linux, etc., after a few weeks of teething a Windows setup, we've had it up and running without any major incidents in over a year. (SQL7)

    re: featureset - what kind of features do you not have that this other package has?

    Do you already have SQL7 in house? If not, you'll need to purchase SQL2000, which "seems" to be $5k. If you do named licensing, it may be a bit cheaper - depends on your company size. Plus the cost of the Win machine, if you don't already have that. Figure an extra $6k on top of the cost of the software. Is it worth $6k to have something next week, or can they wait another month while you feverishly add the missing features - "exactly to spec" - for a custom fit?

    --------------------------------------- Michael Kimsal http://www.tapinternet.com/php/ PHP Training Courses 734-480-9961

    PHP List wrote:

    >IMO >I would have to say it depends on the Timeline of your Boss. >Releasing the app to the open source community would be great, the more >there is, the more reason for people to stop using MS, but you can't demand >a schedule of when new features will be added. >You may have to go with the MS for now, and wait for your app to be >developed with the new features, then convince your boss on moving to your >software. You should be able to move all the data from one to the other >without to much trouble. > >Chris > >

    attached mail follows:


    Well I know they aren't going to want to spend $11k on all that new stuff.. when what I have cost them nothing at all.. :) however, the company I'm talking to is willing to deal and since I work for 6 radio stations they would probably be willing to trade some advertisement on the air for their software and SQL 7 etc.. however, I don't know if my bosses would be willing to do that since mine doesn't have as many features (but will in the future).. the big thing here is how much is it going to cost.. that's the bottom line.. I'll just have to talk to them but I did want to get the input of the open source community first so I could have something to back up why we could use what I have developed instead of the other company's software.

    Thanks for all your help! Jay Paulson Internet Program Director LBJS jpaulsonlbjs.com

    ----- Original Message ----- From: "Michael Kimsal" <michaeltapinternet.com> To: "Jay Paulson" <jpaulsonlbjs.com> Cc: "php" <php-generallists.php.net> Sent: Wednesday, August 15, 2001 4:54 PM Subject: Re: [PHP] Need open source community help!

    > Why would people move away from a package they paid for already? > Especially > if it's backed up by another company - I'm guessing there's probably > some maintenance > contracts they will be signing. > > I'd suggest you (Jay) look at some other OS projects which may be more > full-featured > already, and show those. Chris is right - it depends somewhat on a > timeline. But there's > going to have to be some custom work to get things "just right", OR they > will need to > adapt the business to the software, instead of the software to the > business. > (which costs more in the long run?) > > re: Windows - I think you're being a bit hard on it. As much as I > support Linux, etc., after > a few weeks of teething a Windows setup, we've had it up and running > without > any major incidents in over a year. (SQL7) > > re: featureset - what kind of features do you not have that this other > package has? > > Do you already have SQL7 in house? If not, you'll need to purchase > SQL2000, which > "seems" to be $5k. If you do named licensing, it may be a bit cheaper - > depends on your > company size. Plus the cost of the Win machine, if you don't already > have that. Figure > an extra $6k on top of the cost of the software. Is it worth $6k to > have something > next week, or can they wait another month while you feverishly add the > missing features - > "exactly to spec" - for a custom fit? > > > --------------------------------------- > Michael Kimsal > http://www.tapinternet.com/php/ > PHP Training Courses > 734-480-9961 > > > > PHP List wrote: > > >IMO > >I would have to say it depends on the Timeline of your Boss. > >Releasing the app to the open source community would be great, the more > >there is, the more reason for people to stop using MS, but you can't demand > >a schedule of when new features will be added. > >You may have to go with the MS for now, and wait for your app to be > >developed with the new features, then convince your boss on moving to your > >software. You should be able to move all the data from one to the other > >without to much trouble. > > > >Chris > > > > > > > > -- > 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:


    Could someone point me to any information regarding connecting PHP on linux to connecting to a separate server running Sybase on linux. To be more specific, it's the Sybase that ships with Intershop 4.2

    Currently, our php installation can connect to postgres, and mssql(using some "free tds" drivers)

    Kansas

    attached mail follows:


    Here ya go: http://www.php.net/manual/en/ref.sybase.php

    Tyler Longren Captain Jack Communications tylercaptainjack.com www.captainjack.com

    On Wed, 15 Aug 2001 16:30:16 -0500 Kansas Territory <kansastmac.com> wrote:

    > Could someone point me to any information regarding connecting PHP on > linux to connecting to a separate server running Sybase on linux. > To be more specific, it's the Sybase that ships with Intershop 4.2 > > Currently, our php installation can connect to postgres, and mssql(using > some "free tds" drivers) > > > Kansas > > -- > 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:


    Hello, For my script to login to a SSL site I need to have the snoopy class receive a cookie and store it as a variable. Is that possible with Snoopy0.94? Thank you,

    -------------------------------------------- Brandon Orther WebIntellects Design/Development Manager brandonwebintellects.com 800-994-6364 www.webintellects.com --------------------------------------------

    attached mail follows:


    the variable MYSQL_SOCKET is set to /tmp/mysql.sock and i need it to be /var/lib/mysql/mysql.sock is there anyway i can set this variable in php?

    thanks...

    attached mail follows:


    Edit your /etc/my.cnf file and search for the word socket.

    - Jonathan

    "Jay Paulson" <jpaulsonlbjs.com> wrote in message news:020f01c125d6$ce5b17f0$6e00a8c0webdesign... the variable MYSQL_SOCKET is set to /tmp/mysql.sock and i need it to be /var/lib/mysql/mysql.sock is there anyway i can set this variable in php?

    thanks...

    attached mail follows:


    On Tue, 14 Aug 2001 11:39:55 -0400, Kurth Bemis wrote:

    >just stick this in a function as I did and you'll be sailing.....its easy >to update, and Extremely flexible. > >look at my code.. (rest snipped)

    Hi Kurth, and others

    I adjusted your code for the purpose of my site (replacing he values in the array and the homepage address, etc) ... but when I plugged it into a page for testing; i got the following results:

    Location : Home / Warning: Undefined variable: link in visitheadnav-1.inc on line 70 Besucher / Warning: Undefined index: support.php3 in visitheadnav-1.inc on line 68 Warning: Undefined variable: title in visitheadnav-1.inc on line 73

    The code is part of an include file named "visitheadnav-1.inc" ... and apparently there is some "link" there in the code which is "an undefined variable" ... but I have no idea what this error message is about :-( The results "Home/" and "Besucher/" are actually correct ... it's just the "undefined link" problem I need to get figured out ... Here's the code I inserted into my visitheadnav-1.inc:

    <p class="fn8">Location : <a href="http://www.bibelcenter.de.">Home</a> / <?php $patharray = explode ("/",$SCRIPT_NAME); $scriptname = basename($SCRIPT_NAME); for ($dirsi = 1; $dirsi < count($patharray); $dirsi++) { $dirs = array( 'visitor' => 'Besucher', 'info' => 'Information', 'bibel' => 'Bibelarbeit', 'bibliothek' => 'Bibliothek', 'gebet' => 'Gebetsraum', 'links' => 'Internet Links', 'kids' => 'Kinderecke', 'shop' => 'Bookshop' );

    $linkdes = $dirs[$patharray[$dirsi]]; $link = $link . "/$patharray[$dirsi]"; if ($patharray[$dirsi] == $scriptname){ $linkdes = $title; $slash = ""; $linkhtml = "<a href=\"$link\">$linkdes</a>$slash"; if ($patharray[$dirsi] == "index.php"){ $link = ""; $linkdes = ""; $slash = ""; $linkhtml = ""; } }else{ $slash = " / "; $linkhtml = "<a href=\"$link\">$linkdes</a>$slash"; } echo $linkhtml; } ?></p>

    Any ideas, what may be wrong and causing these error messages?

    God bless you with His grace and peace Wolfgang

    Looking for Biblical information? COME AND SEE! -- ONLINE Courses: http://classes.bibelcenter.de ... NEW! -- BibelCenter: http://www.bibelcenter.de -- Bookstore: http://www.worthy.net/BibelCenter/

    attached mail follows:


    Ok here is the story : I got a php script that comunicates with a game server (Half-life). This script uses socket_set_timeout. But the build of php i downloaded doesn't support socket_set_timeout(). So i started to modify the script to do without. Here is the prob : the script use the socket as blockant. But without socket_set_timeout it could be a problem.So i try with a non-blockant socket but i don't get any response from the game server. Here is a portion of the code :

    if (!$cssocket=fsockopen("udp://".$serveraddress,$portnumber,$errnr)) { $this->errmsg="No connection"; return ""; }

    socket_set_blocking($cssocket,false); fwrite($cssocket,$command,strlen($command));

    // sleep(1); do { $data=fread($cssocket,1024); $serverdata.=$data; $serverdatalen=strlen($serverdata); $socketstatus=socket_get_status($cssocket); // } while ($socketstatus["unread_bytes"] ); } while (time()-$starttime<5 );

    The main prob is that : in blockant mode it works fine. In non-blockant mode i don't receive anything. But if i do a sleep(1) before the first read (the commented line) then it works..

    Another way of the problem : loop { readdata from socket; append to data akready read; } while moredata or not_timed_out

    In blockant mode it works. In non-blockant mode i never receive something !! WHY ??

    I understand why it works in blockant mode : the read function waits untill the has arrived. But in non-blockant the read function should return the data already arrived then return. And the second time i launch it, it should give me the data that arrived since the last time.

    I think i missed something, but i cannot see what.

    Please help me.

    Sorry about my English, it's not my main language... :)

    See you later

    attached mail follows:


    first you have to unzip your sources: gzip -vd apache*.tar.gz | tar -vxf apache*.tar gzip -vd php*.tar.gz | tar -vxf php*.tar gzip -vd mysql*.tar.gz | tar -vxf mysql*.tar

    then cd apache.. ./configure --prefix=/your/path/www cd .. cd mysql... ./configure --prefix=/usr/local/mysql make | make install ./mysql_install_db cd .. cd php.. ./configure --with-apache=.../apache... --with-mysql=/usr/local/mysql --with-imap=/...imap --enable-track-vars make | make install cd .. cd apache.. ./configure --activate-module=src/modules/php4/libphp4.a make | make install

    and thats all... now have fun...

    On Tue, 14 Aug 2001, Roman wrote:

    > Help me. I have RED HAT Linux 7.0 and I want install Apache web server with > php and mysql support. How ? > > I have : apache_1.3.20.tar.gz > php-4.0.6.tar.gz > mysql-3.23.38.tar.gz > > thanx > > > roman > > > > > -- > 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:


    Can anyone direct me to some sample PHP code that extracts HTML from a template file and replaces the, say, "%field%" tags in the HTML with variables from the PHP file.

    Just like what Gossamer Threads Links program does with Perl. So, any 1 have any links??

    attached mail follows:


    Hi All,

    I was wondering if it is possible to access dinamically to the members of a class. I mean to access like:

    ---------------------- class foo { var $bar; var $barbar; }

    ... ...

    $foo_instance = new foo; $somevar = $foo->$anothervar; -----------------------------

    I now this doesn't work, and have searched the manual and haven't found anything on it. I doubt it since this is more or less the work of the Arrays and not the way a class should behave. Anyway any ideas? thanks in advance.

    Sean C. McCarthy SCI, S.L. (www.sci-spain.com)

    attached mail follows:


    Try this :

    class foo { var $var1="hello"; var $var2="world"; } ... ... $fooinstance = new foo; $vartest=$fooinstance->var1; echo ($vartest); // should be 'hello'

    This should work, but i had no time to test this code.

    See you later

    Sean C. McCarthy <smccarthysci-spain.com> a écrit dans le message : 3B7B1195.3BA38850sci-spain.com... > Hi All, > > I was wondering if it is possible to access dinamically to the members > of a class. I mean to access like: > > ---------------------- > class foo { > var $bar; > var $barbar; > } > > .. > .. > > $foo_instance = new foo; > $somevar = $foo->$anothervar; > ----------------------------- > > I now this doesn't work, and have searched the manual and haven't found > anything on it. I doubt it since this is more or less the work of the > Arrays and not the way a class should behave. Anyway any ideas? thanks > in advance. > > Sean C. McCarthy > SCI, S.L. (www.sci-spain.com)

    attached mail follows:


    Hi,

    The code below is actually code to access an object's member. That's fine as long as you give the name of the member at the time you write the code. What I am interested is to know if the members name might be a variable, I mean not hardcoded but a variable useful for loops, etc.

    Thanks.

    Sean C. McCarthy SCI, S.L. (www.sci-spain.com)

    Cerel wrote: > > Try this : > > class foo { > var $var1="hello"; > var $var2="world"; > } > ... > ... > $fooinstance = new foo; > $vartest=$fooinstance->var1; > echo ($vartest); // should be 'hello' > > This should work, but i had no time to test this code. > > See you later > > Sean C. McCarthy <smccarthysci-spain.com> a écrit dans le message : > 3B7B1195.3BA38850sci-spain.com... > > Hi All, > > > > I was wondering if it is possible to access dinamically to the members > > of a class. I mean to access like: > > > > ---------------------- > > class foo { > > var $bar; > > var $barbar; > > } > > > > .. > > .. > > > > $foo_instance = new foo; > > $somevar = $foo->$anothervar; > > ----------------------------- > > > > I now this doesn't work, and have searched the manual and haven't found > > anything on it. I doubt it since this is more or less the work of the > > Arrays and not the way a class should behave. Anyway any ideas? thanks > > in advance. > > > > Sean C. McCarthy > > SCI, S.L. (www.sci-spain.com) > > -- > 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