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: Tue Sep 04 2001 - 10:55:06 CDT

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

    php-general Digest 4 Sep 2001 15:55:06 -0000 Issue 856

    Topics (messages 65808 through 65881):

    insert into problems.
            65808 by: Martin

    Am I doing this right? (PHP3/Login system)
            65809 by: Joel Ricker

    Re: Am I right or wrong?
            65810 by: Stig-Ørjan Smelror
            65811 by: Cristopher Daniluk
            65813 by: Christopher William Wesley
            65817 by: Seb Frost
            65820 by: Dave Freeman
            65821 by: David Robley

    Re: PHP Authentication on Apache
            65812 by: Alfredo Yong

    Re: probs with exec, pls help (still)
            65814 by: David Robley

    Thankyou, whoever
            65815 by: Seb Frost

    Attaching stuff
            65816 by: Max Mouse
            65818 by: Jason Murray

    Extensions question...
            65819 by: Eric Knudstrup

    password why?
            65822 by: Gary
            65836 by: David Robley
            65858 by: _lallous

    How to index HTML fields for Javascript and PHP at same time?
            65823 by: M
            65824 by: pierre-yves
            65825 by: Christopher William Wesley
            65830 by: Brett

    Newbie Question: Converting PHP3 files to PHP4?
            65826 by: Michelle Marcicki
            65827 by: Christopher William Wesley
            65828 by: Jason Murray
            65829 by: Rasmus Lerdorf
            65831 by: Michelle Marcicki
            65835 by: Jason Murray
            65838 by: Christopher William Wesley
            65840 by: Jason Murray
            65844 by: Jack Sasportas

    How to get the referer value?
            65832 by: Balaji Ankem
            65833 by: jacky
            65834 by: Jason Murray

    Want mysql dump to be mailed to me....
            65837 by: sagar
            65839 by: Christopher William Wesley

    Re: Side Comment (was: Newbie Question: Converting PHP3 files to PHP4?)
            65841 by: Christopher William Wesley
            65842 by: Joel Ricker
            65843 by: Jason Murray
            65845 by: Christopher William Wesley

    Re: If PHP4 existed in 1995 we would of taken over the worldby now
            65846 by: Bob

    PHP_SELF NEW.....?????
            65847 by: Ardani Sarjito
            65849 by: David Robley

    Re: [PHP-INST] PHP4 and Apache 1.3.20 DSO mode not working?
            65848 by: i82much
            65865 by: Peter Clarke
            65867 by: i82much

    How to replicate a table in Mysql?
            65850 by: Balaji Ankem

    Re: PHP_SELF NEW.....?????Continue
            65851 by: Ardani Sarjito
            65852 by: Jason Murray

    Re: PHP_SELF NEW.....?????Continue2
            65853 by: Ardani Sarjito
            65876 by: David Otton

    PHP and Perl
            65854 by: Jaros³aw Jankowski

    refer to the same page AGAIN! Please...
            65855 by: Ardani Sarjito
            65856 by: Lawrence.Sheed.dfait-maeci.gc.ca
            65857 by: David Robley
            65860 by: _lallous

    newby: forms problem
            65859 by: Nikola Veber
            65866 by: Daniel Masur

    Re: ob_start()
            65861 by: _lallous

    Re: hot Image on Image action
            65862 by: _lallous

    tinyweb and PHP4
            65863 by: hue micheal
            65864 by: Rasmus Lerdorf
            65871 by: _lallous

    PHP through search engines
            65868 by: David Portass

    Wierd for thingy, help!
            65869 by: Kyle Smith
            65870 by: _lallous
            65872 by: Kyle Smith
            65874 by: _lallous

    Re: MDB
            65873 by: _lallous

    Text area's width in NS
            65875 by: Niklas Lampén
            65877 by: * R&zE:
            65880 by: Michael Cronström

    iODBC support (--with-iodbc[=DIR])
            65878 by: Kraa de Simon

    calculating the average of arrays
            65879 by: Bart Verbeek
            65881 by: _lallous

    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:


    Can someone tell me whats wrong with this... im getting a " Syntax error in
    INSERT INTO statement "... but i cant find anything wrong with the sql
    code., or have i missed something..?

    <?

    $text = "yadayada";

    $date= "today...";

    $connectionstring = odbc_connect("MYSKODB", "Sa", "");

    odbc_do($connectionstring, "INSERT INTO lappar (text,datum) VALUES
    ('$text','$date')");

    odbc_close($connectionstring);

    ?>

    /martin

    attached mail follows:


    I'm tring to get a login system going using PHP3 and MySQL. I'll have two
    tables -- one containing the username and passwords of each user plus a
    variable called Access which will hold what other parts of the scripts
    they'll have access to and another containing the actual logged in sessions.
    I'm trying to do this without using cookies so I'll be passng $sess_id
    around by get and post.

    These are my notes of what I'm thinking. Does anybody see any major
    problems with this?

    1. If $sess_id doesn't exist, check for a username/password combination.
            a. if username/password exist, check validity
                i. if not valid, display error message/login
            b. if username/password doesn't exist
                i. display login.
            c. if username/password exist and valid (MySQL table check)
                i. create session id
                ii. find REMOTE_ADDR
                iii. fetch user information (Access, etc).
                iv. serialize REMOTE_ADDR, userinformation for table
                v. store session id, serialized information, and timestamp in
    sessions table.
                iv. continue
    2. If $sess_id does exist, check table for session information.
            a. if session exists
                i. pull serialized data
                ii. find REMOTE_ADDR and compare to current.
                    !. if not correct, display login
                iii. update timestamp in session table
                iv. continue
            b. if session doesn't exist
                i. display login.

    Joel

    attached mail follows:


    > My ISP has a limit on my site of 10,000MB of data transfer per month.
    >
    > 4 days into september and I'm already at 2,500MB. It would seem
    > they're including requests by their own PHP server.
    >
    > I have a folder of ~80kb images that are dynamically resized using PHP
    > into ~1.4kb thumbnails. Now for each one the PHP server sends an HTTP
    > request for the 80kb image, and this is being counted against my
    > 10,000MB.
    >
    > Should it? Am I in the right in thinking that it shouldn't?
    >
    > regards,
    >

    Everybody will always try to screw you some way or another...
    Always look at the small print ;)

    And you're right... it's wrong of them... imho.

    -- 
    Stig-Ørjan Smelror
    Systemutvikler
    

    Linux Communications AS Sandakerveien 48b Box 1801 - Vika N-0123 Oslo, Norway

    tel. +47 22 09 28 80 fax. +47 22 09 28 81 http://www.lincom.no/

    attached mail follows:


    It's wrong of them?!?! Not to sound irrational here, but you're DOWNLOADING the file every time, even if you are downloading it every time. Why are you opening it through HTTP? Why not directly via the FS? If you're local to the machine, that seems more intelligent. If you're not local to the machine then you're using not only CPU resource, but network resource, and even more so should be responsible. It is very difficult for an ISP to differentiate between what was an external request and what was you requesting something from yourself. Even if it was simple, I'm not sure they have any obligation or responsibility to do it.

    Regards,

    Cristopher Daniluk President & CEO email: crisdsnet.net direct: 330/530-2373

    Digital Services Network, Inc Unleashing Your Potential voice: 800/845-4822 web: http://www.dsnet.net/

    -----Original Message----- From: Stig-Ørjan Smelror [mailto:soslincom.no] Sent: Monday, September 03, 2001 8:33 PM To: sebraceshoot.com Cc: php-generallists.php.net Subject: Re: [PHP] Am I right or wrong?

    > My ISP has a limit on my site of 10,000MB of data transfer per month. > > 4 days into september and I'm already at 2,500MB. It would seem > they're including requests by their own PHP server. > > I have a folder of ~80kb images that are dynamically resized using PHP > into ~1.4kb thumbnails. Now for each one the PHP server sends an HTTP > request for the 80kb image, and this is being counted against my > 10,000MB. > > Should it? Am I in the right in thinking that it shouldn't? > > regards, >

    Everybody will always try to screw you some way or another... Always look at the small print ;)

    And you're right... it's wrong of them... imho.

    --
    Stig-Ørjan Smelror
    Systemutvikler
    

    Linux Communications AS Sandakerveien 48b Box 1801 - Vika N-0123 Oslo, Norway

    tel. +47 22 09 28 80 fax. +47 22 09 28 81 http://www.lincom.no/

    -- 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 Tue, 4 Sep 2001, Seb Frost wrote:

    > I have a folder of ~80kb images that are dynamically resized using PHP into > ~1.4kb thumbnails. Now for each one the PHP server sends an HTTP request > for the 80kb image, and this is being counted against my 10,000MB. > > Should it? Am I in the right in thinking that it shouldn't? So, your PHP scripts are on one server, and your big images are on a separate server? If so, you are generating traffic between the two servers ... at which point you need to consult your service contract. Your contract should tell you for what traffic (including between which servers, across which networks) you will be billed. It's kind of strict to charge for traffic across a local network ... I wish you luck fighting your ISP if the contract doesn't define for which traffic you'll be billed.

    Aside from the ISP issue ... dynamically resizing 80K images on the fly is frightful thing. Creating thumbnails [once/at regular intervals] would be a wise step to take. It takes the load off the web server and will cut your network traffic. The tradeoff is disk space usage ... but you can store 57 1.4KB thumbnails in the same space as one 80KB image :) Good trade!

    ~Chris /"\ \ / Pine Ribbon Campaign Microsoft Security Specialist X Against Outlook The moron in Oxymoron. / \ http://www.thebackrow.net

    attached mail follows:


    Hmmm, I suppose the files and the php server may be on different machines - hadn't thought of that :-) I guess I need to make a compromise on my script then.

    - seb

    -----Original Message----- From: Chris Wesley [mailto:cwwesleycartman.ee.udel.edu]On Behalf Of Christopher William Wesley Sent: 04 September 2001 01:59 To: Seb Frost Cc: php-generallists.php.net Subject: Re: [PHP] Am I right or wrong?

    On Tue, 4 Sep 2001, Seb Frost wrote:

    > I have a folder of ~80kb images that are dynamically resized using PHP into > ~1.4kb thumbnails. Now for each one the PHP server sends an HTTP request > for the 80kb image, and this is being counted against my 10,000MB. > > Should it? Am I in the right in thinking that it shouldn't? So, your PHP scripts are on one server, and your big images are on a separate server? If so, you are generating traffic between the two servers ... at which point you need to consult your service contract. Your contract should tell you for what traffic (including between which servers, across which networks) you will be billed. It's kind of strict to charge for traffic across a local network ... I wish you luck fighting your ISP if the contract doesn't define for which traffic you'll be billed.

    Aside from the ISP issue ... dynamically resizing 80K images on the fly is frightful thing. Creating thumbnails [once/at regular intervals] would be a wise step to take. It takes the load off the web server and will cut your network traffic. The tradeoff is disk space usage ... but you can store 57 1.4KB thumbnails in the same space as one 80KB image :) Good trade!

    ~Chris /"\ \ / Pine Ribbon Campaign Microsoft Security Specialist X Against Outlook The moron in Oxymoron. / \ http://www.thebackrow.net

    ---
    Incoming mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.274 / Virus Database: 144 - Release Date: 23/08/2001
    

    --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.274 / Virus Database: 144 - Release Date: 23/08/2001

    attached mail follows:


    On 4 Sep 01, at 1:14, Seb Frost wrote:

    > My ISP has a limit on my site of 10,000MB of data transfer per month. > > 4 days into september and I'm already at 2,500MB. It would seem they're > including requests by their own PHP server. > > I have a folder of ~80kb images that are dynamically resized using PHP into > ~1.4kb thumbnails. Now for each one the PHP server sends an HTTP request for > the 80kb image, and this is being counted against my 10,000MB. > > Should it? Am I in the right in thinking that it shouldn't?

    I would think that, basically, it's their server and they can do pretty much whatever they like with it. If you don't like it you can attempt to change their policy or vote with your feed and move elsewhere.

    Just my opinion though.

    CYA, Dave

    ----------------------------------------------------------------------- Outback Queensland Internet - Longreach, Outback Queensland - Australia http://www.outbackqld.net.au mailto:dfreemanoutbackqld.net.au -----------------------------------------------------------------------

    attached mail follows:


    On Tue, 4 Sep 2001 10:50, Dave Freeman wrote:

    > to change their policy or vote with your feed and move elsewhere.

    Somehow I think they'd be less than pleased if he were to tip his feed all over their server :-)

    -- 
    David Robley      Techno-JoaT, Web Maintainer, Mail List Admin, etc
    CENTRE FOR INJURY STUDIES      Flinders University, SOUTH AUSTRALIA  
    

    "The PH is too low," Tom said acidly.

    attached mail follows:


    Yes. It works. It is great.

    if(!isset($PHP_AUTH_USER) or $PHP_AUTH_USER != "myuser" or $PHP_AUTH_PW != "mypassword") { Header("WWW-Authenticate: Basic realm=\"Only authorizeds web\""); Header("HTTP/1.0 401 Unauthorized"); echo "ha!\n"; exit; }

    Lynn Holt wrote:

    > Hi all, > Trying PHP for the first time. Snached the > authentication code from the docs and put it in phpauth.php. > When I surf to it, it just asks for my > user and password again and again If I hit Cancel, it prints the > little message just fine. Here's the code in case I'm the > only one to RTFM: > > ------- > Example 17-1. HTTP Authentication example > > <?php > if(!isset($PHP_AUTH_USER)) { > header("WWW-Authenticate: Basic realm=\"My Realm\""); > header("HTTP/1.0 401 Unauthorized"); > echo "Text to send if user hits Cancel button\n"; > exit; > } else { > echo "<p>Hello $PHP_AUTH_USER.</p>"; > echo "<p>You entered $PHP_AUTH_PW as your password.</p>"; > } > ?> > --------------------- > I have php 4.0.6 installed as a module(DSO) in apache 1.3.20 and > everything else I've tried seems to work. > > Any Ideas? Anybody know if this is supposed to work? > Should I stick with AuthPG and forget PHP authentication? > BTW I don't have AuthType set in .htaccess or httpd.conf. > > Lynn > Getting old isn't hard, > all you got to do is live long enough......or fast enough. >

    attached mail follows:


    On Mon, 3 Sep 2001 19:36, taz wrote: > Hi > > I've put the full path in for mysql, i've included -h -u -p and > included the paths of the txt & table files > > Still don't work. > > I'm logged in as root, working on my own box (linux) . > I'm really struggling with this one. > Has anyone out there done this ?? > > Many TIA > Terry > ----- Original Message ----- > From: "_lallous" <elias_bachaalanyyahoo.com> > To: <php-generallists.php.net> > Sent: Monday, September 03, 2001 9:24 AM > Subject: [PHP] Re: probs with exec, pls help > > > should'nt I guess.... > > I should at least specify full path of mysqlimport as in: > > exec("/usr/local/mysql/bin/mysqlimport -u -p dada dasda") > > > > "Taz" <terrytazwebservices.co.uk> wrote in message > > news:002801c133f3$1e2204e0$0feafea9reynolds... > > Should this work, if not, why not > > > > <?php exec("mysqlimport -u root -ppasword test one.txt") ?> > > > > the import works fine from the command line

    Have you checked that mysqlimport and the directory in which it resides has execute permissions for everyone?

    Also, check the contents of the array returned by exec, and also the return status of the command.

    -- 
    David Robley      Techno-JoaT, Web Maintainer, Mail List Admin, etc
    CENTRE FOR INJURY STUDIES      Flinders University, SOUTH AUSTRALIA  
    

    IBM: It may be slow, but at least it's expensive.

    attached mail follows:


    Someone on this list yesterday exposed a large hole on one of my php scripts. Dunno who you are but thankyou. I could have lost sales in that loophole :-)

    I know it was off of this list because that's the only place I made that link public. Some lucky guy on BT openworld - wish I could get that here!

    - seb

    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.274 / Virus Database: 144 - Release Date: 23/08/2001
    

    attached mail follows:


    I want to be able to include a graphic or something of that sort in a form mail (using mail() from <form>). Is this possible?

    Max

    attached mail follows:


    Yep,

    But you need to use a MIME email with file attachments.

    Simple way to produce a MIME email:

    http://planetkiller.shadow.net.au/mime-php.txt

    Jason

    -- 
    Jason Murray
    jasonmmelbourneit.com.au
    Web Developer, Melbourne IT
    "Work now, freak later!"
    

    > -----Original Message----- > From: Max Mouse [mailto:max_mousesympatico.ca] > Sent: Tuesday, September 04, 2001 2:09 PM > To: php-generallists.php.net > Subject: [PHP] Attaching stuff > > > I want to be able to include a graphic or something of that > sort in a form > mail (using mail() from <form>). Is this possible? > > Max > > > > -- > 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 been searching for this in the Zend docs and examples, but I don't see it anywhere. In a PHP extension how do I access the elements of an array that has been passed in?

    Thanks,

    Eric

    "My mother's maiden name is not a password; my social security number is not a PIN" - Kevin Mitnick

    attached mail follows:


    Hello Everybody, I have a script that checks if the password and password confirm are the same on a sign up page. It seems that if the password is already in the db it prints out passwords do not match like the password and confirm do not match. Why?

    //check if passwords match

    if ($password != $pass_check) { echo "<center><h3>Password's don't match!<br>Please use your back button and fix the error</h3></center>";

    } else {

    // Connect To The Database

    $db = mysql_connect("localhost","user","password") or die ("couldn't connect to server");

    mysql_select_db("dbname",$db) or die ("couldn't select database");

    //Find Out If They Are Already In The System

    $sql = "SELECT name,email FROM tablename WHERE name='$name' OR email='$email'"; $result=mysql_query($sql); $num=mysql_numrows($result); if ($num > 0) echo "<center><h3>Your Username is already taken.<br>Please use your back button and choose another</h3></center>"; else {

    more code

    TIA Gary

    attached mail follows:


    On Tue, 4 Sep 2001 12:06, Gary wrote: > Hello Everybody, > I have a script that checks if the password and password confirm are > the same on a sign up page. It seems that if the password is already in > the db it prints out passwords do not match like the password and > confirm do not match. Why? > > > //check if passwords match > > if ($password != $pass_check) { > echo "<center><h3>Password's don't match!<br>Please use your back > button and fix the error</h3></center>"; > > } else { > > // Connect To The Database > > $db = mysql_connect("localhost","user","password") or die ("couldn't > connect to server"); > > mysql_select_db("dbname",$db) or die ("couldn't select database"); > > //Find Out If They Are Already In The System > > $sql = "SELECT name,email FROM tablename WHERE > name='$name' OR email='$email'"; > $result=mysql_query($sql); > $num=mysql_numrows($result); > if ($num > 0) > echo "<center><h3>Your Username is already > taken.<br>Please use your back button and choose > another</h3></center>"; > else { > > more code > > TIA > Gary

    Is the password stored as an encrypted string in the DB (one would hope so!) If so, you'll need to compare an encrypted version of the string you are testing.

    -- 
    David Robley      Techno-JoaT, Web Maintainer, Mail List Admin, etc
    CENTRE FOR INJURY STUDIES      Flinders University, SOUTH AUSTRALIA  
    

    "This tuna is excellent," said Tom superficially.

    attached mail follows:


    I didn't look very well at your script, but it seems that you're calling mysql_numrows() instead of mysql_num_rows()

    "Gary" <gblandworldnet.att.net> wrote in message news:3B943E3B.9080506worldnet.att.net... > Hello Everybody, > I have a script that checks if the password and password confirm are the > same on a sign up page. It seems that if the password is already in the > db it prints out passwords do not match like the password and confirm do > not match. Why? > > > //check if passwords match > > if ($password != $pass_check) { > echo "<center><h3>Password's don't match!<br>Please use your back > button and fix the error</h3></center>"; > > } else { > > // Connect To The Database > > $db = mysql_connect("localhost","user","password") or die ("couldn't > connect to server"); > > mysql_select_db("dbname",$db) or die ("couldn't select database"); > > //Find Out If They Are Already In The System > > $sql = "SELECT name,email FROM tablename WHERE > name='$name' OR email='$email'"; > $result=mysql_query($sql); > $num=mysql_numrows($result); > if ($num > 0) > echo "<center><h3>Your Username is already taken.<br>Please > use your back button and choose another</h3></center>"; > else { > > more code > > TIA > Gary >

    attached mail follows:


    Hello, I have table with lot of <input type = text name=myfield ...> fields. I need to refer these fields like vector in PHP and Javascript mode. When I write <input type=text name=myfield[]... > then I can see values in PHP sccript, BUT can't see values in javascript mode, thats to say document.form.myfield[index].value doesnt work. On the other side, when I make <input type=text name=myfield....> I can see indexed values in Javascript BUT not in PHP script.

    Thanks in advance

    Miguel

    attached mail follows:


    Hello, maybe you could have a hidden field named myfield[], this one will be for the index in php that you will build with a javascript function when you submit the form. py

    ----- Original Message ----- From: "M" <mavemusyahoo.com.br> To: <php-generallists.php.net> Sent: Monday, September 03, 2001 10:12 PM Subject: [PHP] How to index HTML fields for Javascript and PHP at same time?

    > Hello, I have table with lot of <input type = text name=myfield ...> > fields. > I need to refer these fields like vector in PHP and Javascript mode. > When I write <input type=text name=myfield[]... > then I can see values > in PHP sccript, BUT can't see values in javascript mode, thats to say > document.form.myfield[index].value doesnt work. > On the other side, when I make <input type=text name=myfield....> I can > see indexed values in Javascript BUT not in PHP script. > > Thanks in advance > > Miguel > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net > >

    attached mail follows:


    On Mon, 3 Sep 2001, Miguel wrote:

    > I need to refer these fields like vector in PHP and Javascript mode. > When I write <input type=text name=myfield[]... > then I can see values > in PHP sccript, BUT can't see values in javascript mode, thats to say > document.form.myfield[index].value doesnt work. > On the other side, when I make <input type=text name=myfield....> I can > see indexed values in Javascript BUT not in PHP script.

    Try giving the input fields id's that you can use from JavaScript.

    i.e.- <input type="text" id="field1" name="myfield[]">

    then from your JavaScript, you can refer to that field by referencing document.myForm.field1.value (for Netscape and IE) And you can still use $myField[] in PHP.

    Check out this small test ...

    // HTML FORM

    <html> <head> <title>Test</title> <script language="JavaScript"> function setField( ){ document.testForm.field1.value = "Woot!"; document.testForm.field2.value = "I Really Hope"; document.testForm.field3.value = "This Works For You!"; } </script> </head> <body> <form name="testForm" action="test.php" method="POST"> <input type="text" id="field1" name="myfield[]" value=""> <input type="text" id="field2" name="myfield[]" value=""> <input type="text" id="field3" name="myfield[]" value=""> <input type="button" onClick="setField()" value="Click!"> </form> </body> </html>

    // PHP Form Handler (test.php) for( $i = 0; $i < sizeof( $myfield ); $i++ ){ print( $myfield[$i] ); }

    (Step through the array any way you please :)

    ~Chris /"\ \ / Pine Ribbon Campaign Microsoft Security Specialist X Against Outlook The moron in Oxymoron. / \ http://www.thebackrow.net

    attached mail follows:


    <snip> >When I write <input type=text name=myfield[]... > then I can see values >in PHP sccript, BUT can't see values in javascript mode, thats to say >document.form.myfield[index].value doesnt work. >On the other side, when I make <input type=text name=myfield....> I can >see indexed values in Javascript BUT not in PHP script. </snip>

    I use the following in my javascript to work with the field[] values:

    this.form.elements['addzone[]']

    HTH, Brett

    attached mail follows:


    Hi there,

    I have recently taken over the webmaster responsibility for an educational website. It is using PHP3 and MySQL. We had to move it to a new server, that as it turns out only supports PHP4. I have been looking through all the FAQs, resource sites, manuals and documentation, but all I can find as a solution is to change all my current file extensions .php3 to just .php ! Can anyone tell me if this will work before I start converting probably close to several hundred files?? I am going to change and test some files, but would like some advice on this!

    The type of errors that I get with the current file setup are when clicking on any of the links that lead to files in PHP3 are: You have started to download a file of type "application/x-httpd-php3", etc.

    Any other tips or info would be appreciated. This is a bit urgent, as I have just found out that the site "director/owner" wants it as functional as possible for the start of school this week... so no pressure really... lol.

    Thanks in advance.

    Michelle

    attached mail follows:


    On Mon, 3 Sep 2001, Michelle Marcicki wrote:

    > website. It is using PHP3 and MySQL. We had to move it to a new server, that > as it turns out only supports PHP4. I have been looking through all the FAQs,

    Are you running an Apache web server? If so, add this line to your httpd.conf file and restart Apache:

    AddType application/x-httpd-php .php3

    (You'll find similar lines in your httpd.conf file ... add this line in the same part of the file so you can find it easily next time.)

    ~Chris /"\ \ / Pine Ribbon Campaign Microsoft Security Specialist X Against Outlook The moron in Oxymoron. / \ http://www.thebackrow.net

    attached mail follows:


    Just fiddle the configuration of the server so that it recognises .php3 files as if they were .php.

    In Apache, this means you find this line in the config:

    AddType application/x-httpd-php .php

    And add one just like it nearby:

    AddType application/x-httpd-php .php3

    Also, fiddle the DirectoryIndex line:

    DirectoryIndex index.php3

    To look like:

    DirectoryIndex index.php index.php3

    (this means a .php file which will be newer obviously will take precedence over a .php3 file)

    You should be right from there.

    Jason

    -- 
    Jason Murray
    jasonmmelbourneit.com.au
    Web Developer, Melbourne IT
    "Work now, freak later!"
    

    > -----Original Message----- > From: Michelle Marcicki [mailto:michelletsiworks.com] > Sent: Tuesday, September 04, 2001 1:18 PM > To: php-generallists.php.net > Subject: [PHP] Newbie Question: Converting PHP3 files to PHP4? > > > Hi there, > > I have recently taken over the webmaster responsibility for > an educational > website. It is using PHP3 and MySQL. We had to move it to a > new server, that > as it turns out only supports PHP4. I have been looking > through all the FAQs, > resource sites, manuals and documentation, but all I can find > as a solution is > to change all my current file extensions .php3 to just .php ! > Can anyone tell > me if this will work before I start converting probably close > to several hundred > files?? I am going to change and test some files, but would > like some advice on > this! > > The type of errors that I get with the current file setup are > when clicking on > any of the links that lead to files in PHP3 are: You have > started to download a > file of type "application/x-httpd-php3", etc. > > Any other tips or info would be appreciated. This is a bit > urgent, as I have > just found out that the site "director/owner" wants it as > functional as possible > for the start of school this week... so no pressure really... lol. > > Thanks in advance. > > Michelle > > > -- > 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:


    Just configure your server to serve up .php3 files as PHP 4. ie. add this line to your httpd.conf file:

    AddType application/x-httpd-php .php .php3

    And get rid of your other AddType line.

    -Rasmus

    On Mon, 3 Sep 2001, Michelle Marcicki wrote:

    > Hi there, > > I have recently taken over the webmaster responsibility for an educational > website. It is using PHP3 and MySQL. We had to move it to a new server, that > as it turns out only supports PHP4. I have been looking through all the FAQs, > resource sites, manuals and documentation, but all I can find as a solution is > to change all my current file extensions .php3 to just .php ! Can anyone tell > me if this will work before I start converting probably close to several hundred > files?? I am going to change and test some files, but would like some advice on > this! > > The type of errors that I get with the current file setup are when clicking on > any of the links that lead to files in PHP3 are: You have started to download a > file of type "application/x-httpd-php3", etc. > > Any other tips or info would be appreciated. This is a bit urgent, as I have > just found out that the site "director/owner" wants it as functional as possible > for the start of school this week... so no pressure really... lol. > > Thanks in advance. > > Michelle > > >

    attached mail follows:


    Sorry to all who responded already.. I guess some further clarification is needed... opps :)

    I am NOT running the server. I am using a local ISP (excellent guy but not really accessible on this long weekend), so I have no control over what the server's configuration is (at least until tomorrow). I can certainly pass these notes along to my ISP to get him to do these changes you've suggested, but do I need to change my file extensions.. ie. professionaldevelopment.php3 to professionaldevelopment.php instead.. or am I missing something here.

    OR is there only a server fix and nothing that I can do at my end as far as code or file name changes?

    Michelle

    -----Original Message----- From: Rasmus Lerdorf <rasmusphp.net> To: Michelle Marcicki <michelletsiworks.com> Date: Mon, 3 Sep 2001 20:15:30 -0700 (PDT) Subject: Re: [PHP] Newbie Question: Converting PHP3 files to PHP4?

    > Just configure your server to serve up .php3 files as PHP 4. ie. add this > line to your httpd.conf file: > > AddType application/x-httpd-php .php .php3 > > And get rid of your other AddType line. > > -Rasmus > > On Mon, 3 Sep 2001, Michelle Marcicki wrote: > > > Hi there, > > > > I have recently taken over the webmaster responsibility for an educational > > website. It is using PHP3 and MySQL. We had to move it to a new server, > that > > as it turns out only supports PHP4. I have been looking through all the > FAQs, > > resource sites, manuals and documentation, but all I can find as a solution > is > > to change all my current file extensions .php3 to just .php ! Can anyone > tell > > me if this will work before I start converting probably close to several > hundred > > files?? I am going to change and test some files, but would like some > advice on > > this! > > > > The type of errors that I get with the current file setup are when clicking > on > > any of the links that lead to files in PHP3 are: You have started to > download a > > file of type "application/x-httpd-php3", etc. > > > > Any other tips or info would be appreciated. This is a bit urgent, as I > have > > just found out that the site "director/owner" wants it as functional as > possible > > for the start of school this week... so no pressure really... lol. > > > > Thanks in advance. > > > > Michelle > > > > > > >

    attached mail follows:


    > OR is there only a server fix and nothing that I can do at my > end as far as code or file name changes?

    Changing all your file names and links in the files is very time-consuming and not really necessary. If you can wait until tomorrow morning, the change that the guy who runs the server can make for you will mean you won't have to do it. It'll take him a few minutes at best.

    Changing file names will also break people's bookmarks, which is another reason to get the server configuration changed.

    Jason

    -- 
    Jason Murray
    jasonmmelbourneit.com.au
    Web Developer, Melbourne IT
    "Work now, freak later!"
    

    attached mail follows:


    On Mon, 3 Sep 2001, Michelle Marcicki wrote: > I am NOT running the server. I am using a local ISP (excellent guy but not > really accessible on this long weekend), so I have no control over what the

    OOOH ... Nasty! If the admin can't add the .php3 extension for you, then you'll be stuck renaming files, and correcting references within them.

    If it's a unix host, it's not that painful ... just a small shell script, and a sed script. (In Illegal Monopoly OS, it may be lots more painful.)

    Good luck, ~Chris /"\ \ / Pine Ribbon Campaign Microsoft Security Specialist X Against Outlook The moron in Oxymoron. / \ http://www.thebackrow.net

    attached mail follows:


    > OOOH ... Nasty! If the admin can't add the .php3 extension > for you, then you'll be stuck renaming files, and correcting > references within them.

    Shouldn't be hard to add either way :)

    > If it's a unix host, it's not that painful ... just a small > shell script, and a sed script. (In Illegal Monopoly OS, it > may be lots more painful.)

    Nah, in Illegal Monopoly OS, its just as easy as Apache.

    J

    attached mail follows:


    One thing I noticed when I did some updates to a few of our programs, is that certain comment lines caused strange errors, and really nothing else. I basically made a backup copy removed comments, and then added them back in which made everything work...not sure if somehow the older box ( using pico ) caused some strange errors that the new version of php spotted, but just in case you are getting things you are not expecting.

    Good Luck!

    Michelle Marcicki wrote:

    > Hi there, > > I have recently taken over the webmaster responsibility for an educational > website. It is using PHP3 and MySQL. We had to move it to a new server, that > as it turns out only supports PHP4. I have been looking through all the FAQs, > resource sites, manuals and documentation, but all I can find as a solution is > to change all my current file extensions .php3 to just .php ! Can anyone tell > me if this will work before I start converting probably close to several hundred > files?? I am going to change and test some files, but would like some advice on > this! > > The type of errors that I get with the current file setup are when clicking on > any of the links that lead to files in PHP3 are: You have started to download a > file of type "application/x-httpd-php3", etc. > > Any other tips or info would be appreciated. This is a bit urgent, as I have > just found out that the site "director/owner" wants it as functional as possible > for the start of school this week... so no pressure really... lol. > > Thanks in advance. > > Michelle > > -- > 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

    --
    ___________________________________________________________
    Jack Sasportas
    Innovative Internet Solutions
    Phone 305.665.2500
    Fax 305.665.2551
    www.innovativeinternet.com
    www.web56.net
    

    attached mail follows:


    Hi! friend, How to get the referer value in the PHP.(getHeader(Referer))

    Thanks in advance. -Balaji


    attached mail follows:


    use http_referer(); ----- Original Message ----- From: Balaji Ankem To: php-generallists.php.net Cc: Renze Munnik Sent: Monday, September 03, 2001 10:40 PM Subject: [PHP] How to get the referer value?

    Hi! friend, How to get the referer value in the PHP.(getHeader(Referer))

    Thanks in advance. -Balaji

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

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


    Message-ID: <1595534C9032D411AECE00508BC766FB01A4C543mercury.mit> From: Jason Murray <Jason.Murraymelbourneit.com.au> To: "'Balaji Ankem'" <balaji.ankemwipro.com>, php-generallists.php.net Cc: Renze Munnik <renzedatalink.nl> Date: Tue, 4 Sep 2001 13:39:12 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Subject: RE: [PHP] How to get the referer value?

    > How to get the referer value in the PHP.(getHeader(Referer))

    That'll be in $HTTP_REFERER, then.

    (Hint: try phpInfo() and see if it's in there)

    Jason

    attached mail follows:


    Hi friends,

    I have a remote server running my website. I've to make the backup of the mysql db i'm using. i can use mysqldump for this. but i'm not sure where the file will be created on the server and also i want to make that file to .zip and then download it to my pc. how can i do this. Please help.

    thanq, /sagar

    _________________________________________________________ Do You Yahoo!? Get your free yahoo.com address at http://mail.yahoo.com

    attached mail follows:


    Date: Tue, 4 Sep 2001 00:30:19 -0400 (EDT) From: Christopher William Wesley <cwwesleyudlug.org> To: sagar <sagarphpyahoo.com> cc: php <php-generallists.php.net> Message-ID: <Pine.BSF.4.33.0109040026130.97314-100000cartman.ee.udel.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP] Want mysql dump to be mailed to me....

    On Tue, 4 Sep 2001, sagar wrote:

    > I have a remote server running my website. I've to make the backup of the mysql db > i'm using. i can use mysqldump for this. but i'm not sure where the file will be created > on the server and also i want to make that file to .zip and then download it to my pc. > how can i do this. Please help.

    Create a shell script to run mysqldump then compress it (I like bzip), and schedule it to run nightly.

    For future reference, check in the MySQL documentation and mail lists:

    http://www.mysql.com/documentation/index.html http://www.mysql.com/documentation/lists.html

    There's not much MySQL/system maintenance support offered in this list by comparison.

    ~Chris /"\ \ / Pine Ribbon Campaign Microsoft Security Specialist X Against Outlook The moron in Oxymoron. / \ http://www.thebackrow.net

    attached mail follows:


    On Tue, 4 Sep 2001, Jason Murray wrote:

    > Nah, in Illegal Monopoly OS, its just as easy as Apache.

    Rather than the web server config, I was referring to renaming all the .php3 files to have .php extensions, and combing through all the files, finding all references to .php3 files, and changing them to refer to .php files. I know exactly how to do it ... I do similar tasks routinely ... on my Linux servers. I don't know how to make that task easy in Illegal Monopoly OS.

    ~Chris /"\ \ / Pine Ribbon Campaign Microsoft Security Specialist X Against Outlook The moron in Oxymoron. / \ http://www.thebackrow.net

    attached mail follows:


    : On Tue, 4 Sep 2001, Jason Murray wrote: : : > Nah, in Illegal Monopoly OS, its just as easy as Apache. : : Rather than the web server config, I was referring to renaming all the : .php3 files to have .php extensions, and combing through all the files, : finding all references to .php3 files, and changing them to refer to .php : files. I know exactly how to do it ... I do similar tasks routinely ... : on my Linux servers. I don't know how to make that task easy in Illegal : Monopoly OS.

    I do. I have to do it all the time (actually sometimes its to regress from php back to php3).

    from the command line: rename *.php3 *.php

    Then I use my text editor which has global file find and replace to make the changes.

    Joel

    attached mail follows:


    > Rather than the web server config, I was referring to renaming > all the .php3 files to have .php extensions, and combing through > all the files, finding all references to .php3 files, and changing > them to refer to .php files. I know exactly how to do it ... I > do similar tasks routinely ... on my Linux servers. I don't know > how to make that task easy in Illegal Monopoly OS.

    Whoops, my mistake ... got into my server config mindset and I was off and racing. :)

    Incidentally, what you ARE talking about is very easy in IMOS, with the right tool.

    Homesite.

    Open all the files, replace ".php3" with ".php" in "All Open Documents"... save 'em all and change the filenames in the file list and you're done.

    But then, the right tools make the job easy regardless of platform.

    J

    attached mail follows:


    On Tue, 4 Sep 2001, Jason Murray wrote: > But then, the right tools make the job easy regardless of > platform.

    For sure! I don't bother with all that clicking ... now you [Unix folk] don't have to either :)

    #!/bin/sh for PHP3FILE in `find . -type f -name "*.php3" -print` do PHP4FILE=`echo ${PHP3FILE} | sed 's/\.php3/\.php/g'` sed 's/\.php3/\.php/g' ${PHP3FILE} > ${PHP4FILE} done #END OF SCRIPT

    That recursively finds all files starting in whatever directory you like, and creates the newly-named files with all the references corrected as desired (with a small addition, the old files can be archived or removed).

    I just had some fun with that script and a copy of an old doc root ... 17 directories, deepest directory was at 3 levels, and 216 .php3 files (from 1998 :) ... took a few seconds to make all the modifications.

    ~Chris /"\ \ / Pine Ribbon Campaign Microsoft Security Specialist X Against Outlook The moron in Oxymoron. / \ http://www.thebackrow.net

    attached mail follows:


    Do we have spies on the ASP list? What are they doing on their end? Now don't get me wrong, I've been coding with PHP and have read every tutorial and article I can get my hands on in regards to PHP so I don't want to see my time invested go to waste. Maybe I should be asking on the developers list but I just want to hear some strategic direction or preview for PHP5.

    _________________________________________________________ Do You Yahoo!? Get your free yahoo.com address at http://mail.yahoo.com

    attached mail follows:


    hi!

    I have tried to undersatand the usage of PHP_SELF but I still don't get it. Could anybody please explain it in simple palin English to this poor slow guy who has just learn PHP?

    Thank you so much for reviewing this email.

    I'm just tring to make a game which require this function but luck is not on my side at the moment.

    Ardani

    attached mail follows:


    On Tue, 4 Sep 2001 08:58, Ardani Sarjito wrote: > hi! > > I have tried to undersatand the usage of PHP_SELF but I still don't get > it. Could anybody please explain it in simple palin English to this > poor slow guy who has just learn PHP? > > Thank you so much for reviewing this email. > > I'm just tring to make a game which require this function but luck is > not on my side at the moment. > > Ardani

    From the docs:

    PHP_SELF The filename of the currently executing script, relative to the document root. If PHP is running as a command-line processor, this variable is not available.

    So it returns the name of the current script. For the simplest example, try the following:

    <?php echo 'This is ' . $PHP_SELF ?>

    -- 
    David Robley      Techno-JoaT, Web Maintainer, Mail List Admin, etc
    CENTRE FOR INJURY STUDIES      Flinders University, SOUTH AUSTRALIA  
    

    Any closet is a walk-in closet if you try hard enough.

    attached mail follows:


    "Bill Carter" <nospamaustin.rr.com> wrote in message news:3B93BBC2.9ECE9B98austin.rr.com... > Thanks for the info. Did you install Apache and PHP binaries derived from > the rpm's on the distribution disk or did you download sources from the > websites and configure/compile/install from sources? > > Peter Clarke wrote: > > I've recently installed: > > Red Hat Linux release 7.1 (Seawolf), PHP 4.0.6 Apache, 1.3.20 DSO from > > scratch with no problems. > > also: > > Red Hat Linux release 6.1 (Cartman), PHP 4.0.6 Apache, 1.3.20 DSO from > > scratch with no problems. > > > > Just so you know it can work. > > > > Peter

    I'm running rh7 2.2.19 and installed 4.0.6 dso /1.3.19 from source - from web not srpms - successfully with no probs. I've rebuilt php several times since to change extensions and every time it works fine. Here is my configure command:

    ./configure --with-mysql=/usr/local/mysql --with-apxs=/usr/local/apache/bin/ apxs \ --enable-bcmath --enable-calendar --with-gd --with-xml --with-oci8 \ --enable-dbg=shared --with--dbg-profiler

    I'll upgrade my apache to 1.3.20 to see what happens and keep you posted.

    Dan

    attached mail follows:


    "Bill Carter" <nospamaustin.rr.com> wrote in message news:3B93BBC2.9ECE9B98austin.rr.com... > Thanks for the info. Did you install Apache and PHP binaries derived from > the rpm's on the distribution disk or did you download sources from the > websites and configure/compile/install from sources? > > Peter Clarke wrote: > > I've recently installed: > > Red Hat Linux release 7.1 (Seawolf), PHP 4.0.6 Apache, 1.3.20 DSO from > > scratch with no problems. > > also: > > Red Hat Linux release 6.1 (Cartman), PHP 4.0.6 Apache, 1.3.20 DSO from > > scratch with no problems. > > > > Just so you know it can work. > > > > Peter

    I installed from sources:

    Apache (modSSL source directory) ./configure --with-apache=/home/peter/apache_1.3.20 --with-ssl=/usr/local/ss l --prefix=/usr/local/apache --enable-module=so

    PHP: ./configure --with-apxs=/usr/local/apache/bin/apxs --with-db --with-pgsql=/u sr/local/pgsql --with-imap=/usr/local/imap-2000c --with-gettext --with-opens sl=/usr/local/ssl --with-curl=/usr/local/curl --enable-dbase --with-sablot=/ usr/local/sablot --with-expat-dir=/usr/local/expat --with-xslt-sablot

    attached mail follows:


    "I82much" <medglewis.com.antispammer> wrote in message news:20010904101440.7001.qmailpb1.pair.com... > > "Bill Carter" <nospamaustin.rr.com> wrote in message > news:3B93BBC2.9ECE9B98austin.rr.com... > > Thanks for the info. Did you install Apache and PHP binaries derived from > > the rpm's on the distribution disk or did you download sources from the > > websites and configure/compile/install from sources? > > > > Peter Clarke wrote: > > > I've recently installed: > > > Red Hat Linux release 7.1 (Seawolf), PHP 4.0.6 Apache, 1.3.20 DSO from > > > scratch with no problems. > > > also: > > > Red Hat Linux release 6.1 (Cartman), PHP 4.0.6 Apache, 1.3.20 DSO from > > > scratch with no problems. > > > > > > Just so you know it can work. > > > > > > Peter > > I'm running rh7 2.2.19 and installed 4.0.6 dso /1.3.19 from source - from > web not srpms - successfully with no probs. I've rebuilt php several times > since to change extensions and every time it works fine. Here is my > configure command: > > ./configure --with-mysql=/usr/local/mysql --with-apxs=/usr/local/apache/bin/ > apxs \ > --enable-bcmath --enable-calendar --with-gd --with-xml --with-oci8 \ > --enable-dbg=shared --with--dbg-profiler > > I'll upgrade my apache to 1.3.20 to see what happens and keep you posted. > > Dan

    Okay, it worked fine on 1.3.20 as well. This is what I did to run the new server next to the old one:

    download 1.3.20 from apache.org tar -xvzf apache_1.3.20.tar.gz mv apache_1.3.20 /usr/local/src cd /usr/local/src/apache_1.3.20 ./configure --prefix=/usr/local/apache1.3.20 --enable-module=so make; make install cp /usr/local/src/php-4.0.6/libs/libphp4.so /usr/local/apache1.3.20/libexec/ vi /usr/local/apache1.3.20/conf/httpd.conf # edit file for following:

    LoadModule php4_module libexec/libphp4.so Port 81 AddType application/x-httpd-php .php

    cp /usr/local/apache/htdocs/info.php /usr/local/apache1.3.20/htdocs/ /usr/local/apache1.3.20/bin/apachectl start

    Dan

    attached mail follows:


    Hi friend, I want to replicate the table which is existed in database of Mysql.

    Thanks in advance.

    Regards -Balaji


    attached mail follows:


    Thanks for your quick reply.

    my next question is: how does it work when I use PHP_SELF to send a value of a variable to the same page?

    Thanks!

    Ardani

    attached mail follows:


    > my next question is: how does it work when I use PHP_SELF to > send a value of a variable to the same page?

    You use it to point your <FORM> there.

    <FORM ACTION='<?echo $PHP_SELF?>'> <INPUT TYPE=HIDDEN NAME='name' VALUE='<?echo $value?>'> <INPUT TYPE=SUBMIT VALUE='Go'> </FORM>

    Now, if the file this form is in gets renamed from foo.php to bar.php, the form won't break.

    Jason

    -- 
    Jason Murray
    jasonmmelbourneit.com.au
    Web Developer, Melbourne IT
    "Work now, freak later!"
    

    attached mail follows:


    Hi again!

    Thank you for those who have reply my email.

    Actually I'm trying to make a hangman game for my students.

    I have seen one game written using PHP_SELF but I can't understand who it works.

    So, with the PHP_self (in my hangman game) I probably can send the value of my variable to the same page. now my next question is:

    How do i maintain the content of the page which is build based on the value passed from the previous submision? Do I confuse you know?

    attached mail follows:


    On Mon, 3 Sep 2001 17:15:25 -0700, you wrote:

    >So, with the PHP_self (in my hangman game) I probably can send the value of >my variable to the same page. now my next question is: > >How do i maintain the content of the page which is build based on the value >passed from the previous submision? Do I confuse you know?

    I think this is what you are asking for :

    <?

    if (isset($page)) { /* variable page exists, so we are on the second page */ echo "<p>The string entered was : $input</p>"; } else { /* page does not exist, so we should display the form */ ?>

    <form method="post" action="<?=$PHP_SELF?>"> <input type="hidden" name="page" value="1"> Input : <input type="text" name="input"> <input type="submit" name="go" value="Go!"> </form>

    <? }

    ?>

    (Caution - I haven't tested this... could be typos)

    If you want multiple pages, you can do this:

    if (!isset($page)) { /* do page 1 */ } else { switch($page) { case '1' : /* do page 2 */ break; case '2' : /* do page 3 */ break; default : /* someone's messing with the URL string */ break; } }

    attached mail follows:


    Hi, I have something like this in the script : <? header("Content-Type: application/force-download"); header("Content-Disposition:filename=$clientname.xls"); set_time_limit(180); passthru("d:\\perl\\bin\\perl.exe test2.pl $var \"$query\" \"$query1\""); exit; ?> Perl script is generating Excel file. My question is : How to do it in PHP (maybe javascript) that after sending data to this script first I will have window with something like " Wait, generating file" and when perl script is done another window with link to generated file? Any suggestions ? Thx in advance. jarek

    attached mail follows:


    Hi! I still have the same problem.

    How Do I write a string on the a page using input from the same page without deleting the previous written string. I'd like to use PHP_SELF. Is it possible?

    Thank you!

    Ardani

    attached mail follows:


    Create a file with the following.

    test.php

    <?phpinfo();?>

    open a browser and point at test.php Look at the http variables section.

    Now try adding some variables to it eg :

    open the browser, and open a url like the following: http://localhost/test.php?x=y&foo=bar

    Now look at the PHP Variables section.

    you should see that php_self == test.php, have a look and see what variable holds ?x=y&foo=bar yup, its query_string

    Got it?

    Now use something like

    print "<a href='$PHP_SELF$?$QUERY_STRING'>url link</a>";

    okayla!

    A better way might be to use sessions. Have a look at php.net or phpbuilder.com for details.

    Lawrence.

    -----Original Message----- From: Ardani Sarjito [mailto:sarjitoiprimus.com.au] Sent: September 4, 2001 9:04 AM To: php_list Subject: [PHP] refer to the same page AGAIN! Please...

    Hi! I still have the same problem.

    How Do I write a string on the a page using input from the same page without deleting the previous written string. I'd like to use PHP_SELF. Is it possible?

    Thank you!

    Ardani

    -- 
    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 Tue, 4 Sep 2001 10:33, Ardani Sarjito wrote: > Hi! > I still have the same problem. > > How Do I write a string on the a page using input from the same page > without deleting the previous written string. I'd like to use PHP_SELF. > Is it possible? > > > Thank you! > > Ardani

    I think you have the wrong end of the stick here. PHP_SELF has precious little to do with sending values from one form to another, except that it can cause a script to point ot itself.

    Any values you send between the scripts will be contained in whatever variables you send via the script. These might be INPUT, SELECT or whatever and will have the sme name as the form element from which they come.

    If this is greek to you, perhaps you should be reading the part of the manual on Variables, particularly the section on Variables from Outside PHP.

    -- 
    David Robley      Techno-JoaT, Web Maintainer, Mail List Admin, etc
    CENTRE FOR INJURY STUDIES      Flinders University, SOUTH AUSTRALIA  
    

    Why doesn't the Bat Computer ever crash?

    attached mail follows:


    use hidden fields,

    // <html> <head> <title>New Document </title> </head>

    <body> <? if (isset($msg)) $messages[] = $msg;?>

    <? if (isset($messages)) { ?> <hr> <? for ($i=0;$i<count($messages);$i++) echo "<b>{$messages[$i]}</b><br>"; <hr> <? } ?> <form action="<?=$PHP_SELF?>" method="post"> your text? <input type="text" name="msg"> <? if (isset($messages) { for ($i=0;$i<count($messages);$i++) { ?><input type="hidden" name="messages[]" value="<?=$messages[$i]?>"><? } } ?> <br> <input type="submit" value="post message" name="submit"> </form> </body> </html>

    // elias

    "Ardani Sarjito" <sarjitoiprimus.com.au> wrote in message news:MBBBICANNKAGDMHEPCGNAEIMCDAA.sarjitoiprimus.com.au... > Hi! > I still have the same problem. > > How Do I write a string on the a page using input from the same page without > deleting the previous written string. I'd like to use PHP_SELF. Is it > possible? > > > Thank you! > > Ardani >

    attached mail follows:


    hi

    In order to process a form, do I need a cgi script and if not, how am I suposed to do that (how to pass a field value into a $variable, or there is another method)?

    attached mail follows:


    just post your form to a ph site, and the name describt in your <input> tag will be the variable.

    <input type="pass" name="wtf"> is $wtf on the php page

    "Nikola Veber" <veberptt.yu> schrieb im Newsbeitrag news:200109040853.f848rIp13852pop33.ptt.yu... > hi > > In order to process a form, do I need a cgi script and if not, how am I suposed to do that (how to pass a field value into a > $variable, or there is another method)? > >

    attached mail follows:


    Not really!

    There was a column on PHPBuilder.com, check it out.

    "Jeroen Olthof" <j.olthofmillipede.nl> wrote in message news:20010903225247.83637.qmailpb1.pair.com... > Can I increase speed by using this to buffer output ? > > kind regards > Jeroen Olthof > >

    attached mail follows:


    you have to use image manipulation functions,

    first you have to create your final image with ImageCreate(,..,...finalwidth, finalheight) then open each small image independently and then use the ImageCopy() to copy and place from the small image to the bigger image...

    hope this helps,

    "Mike Heald" <mikeaswmc.co.uk> wrote in message news:01090315264701.01009local... > Hi, > > I am creating an image made up of other images. > How can i read in a gif and put it onto the image I > am creating through php? > > Thanks, > > Mike

    attached mail follows:


    Has anyone tried this combination ? Does it work ?

    REgards Huem

    attached mail follows:


    Since TinyWeb support CGI execution and provides a semi-standard set of cgi environment variables the CGI version of PHP should work just fine with it. You probably just need to associate .php with the php.exe executable and stick your PHP scripts in the /cgi-bin directory. It also supports ISAPI, but the chances of the PHP ISAPI module working with it are probably slim.

    Why you would want to run a web server written in Delphi is beyond me though...

    -Rasmus

    On Tue, 4 Sep 2001, hue micheal wrote:

    > Has anyone tried this combination ? Does it work ? > > REgards > Huem > > >

    attached mail follows:


    Hmm....isn't tinyweb the program that is written by same makers of The Bat (email client) ?

    Rasmus, I assume that Hue is trying to find the smallest web server that doesn't need installation process and stuff so maybe he can distribute his scripts on a CD!

    And that is just a nice idea that he gave me now :)

    "Rasmus Lerdorf" <rasmusphp.net> wrote in message news:Pine.LNX.4.33.0109040206430.1243-100000rasmus.php.net... > Since TinyWeb support CGI execution and provides a semi-standard set of > cgi environment variables the CGI version of PHP should work just fine > with it. You probably just need to associate .php with the php.exe > executable and stick your PHP scripts in the /cgi-bin directory. It also > supports ISAPI, but the chances of the PHP ISAPI module working with it > are probably slim. > > Why you would want to run a web server written in Delphi is beyond me > though... > > -Rasmus > > On Tue, 4 Sep 2001, hue micheal wrote: > > > Has anyone tried this combination ? Does it work ? > > > > REgards > > Huem > > > > > > >

    attached mail follows:


    I have a website mainpage in HTML, the rest of it is sort of dynamic from Actinic Catalog.

    I want to convert the main page to a PHP page for some functions but I am concerned that it might affect the way search engine spiders will see it.

    What I want to know is if i do change my page to a php page, will it become completely different to how search engines see it when it was a HTML page.

    Any help would be greatly appreciated.

    David Portass Velo Systems Limited d.portassvelosystems.ltd.uk

    attached mail follows:


    Ok sorry for not looking into this one but is it possible for 1 page to have a variable (not input) and then post it to another page and in an input variable (text box) it will have the variable from the first page as its value..... not im confused!

    -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!

    ICQ: 115852509 MSN: dbzno1fanhotmail.com AIM: legokiller666

    attached mail follows:


    Message-ID: <20010904142955.24914.qmailpb1.pair.com> To: php-generallists.php.net From: "_lallous" <elias_bachaalanyyahoo.com> Date: Tue, 4 Sep 2001 13:43:56 +0200 Subject: Re: Wierd for thingy, help!

    page1.htm

    <html> <body onload="document.forms[0].submit();"> <form action="page2.php" method="post"> <input type="hidden" value="kyle" name="who"> </form> </body> </html>

    page2.php <? echo "Hello $who!\n"; ?>

    "Kyle Smith" <dbzno1fanhotmail.com> wrote in message news:OE12QanWtMmL7z0X5TI00002678hotmail.com... Ok sorry for not looking into this one but is it possible for 1 page to have a variable (not input) and then post it to another page and in an input variable (text box) it will have the variable from the first page as its value..... not im confused!

    -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!

    ICQ: 115852509 MSN: dbzno1fanhotmail.com AIM: legokiller666

    attached mail follows:


    would that work without a submit button?

    -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!

    ICQ: 115852509 MSN: dbzno1fanhotmail.com AIM: legokiller666

    ----- Original Message ----- From: "_lallous" <elias_bachaalanyyahoo.com> To: <php-generallists.php.net> Sent: Tuesday, September 04, 2001 4:43 AM Subject: [PHP] Re: Wierd for thingy, help!

    > page1.htm > > <html> > <body onload="document.forms[0].submit();"> > <form action="page2.php" method="post"> > <input type="hidden" value="kyle" name="who"> > </form> > </body> > </html> > > page2.php > <? > echo "Hello $who!\n"; > ?> > > "Kyle Smith" <dbzno1fanhotmail.com> wrote in message > news:OE12QanWtMmL7z0X5TI00002678hotmail.com... > Ok sorry for not looking into this one but is it possible for 1 page to have > a variable (not input) and then post it to another page and in an input > variable (text box) it will have the variable from the first page as its > value..... not im confused! > > > -lk6- > http://www.StupeedStudios.f2s.com > Home of the burning lego man! > > ICQ: 115852509 > MSN: dbzno1fanhotmail.com > AIM: legokiller666 > > > > > > > -- > 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:


    Yes, actually the example I posted doesn't have a submit button,

    "Kyle Smith" <dbzno1fanhotmail.com> wrote in message news:OE17PPfRnJzxJmAJuGI00002631hotmail.com... > would that work without a submit button? > > > -lk6- > http://www.StupeedStudios.f2s.com > Home of the burning lego man! > > ICQ: 115852509 > MSN: dbzno1fanhotmail.com > AIM: legokiller666 > > > ----- Original Message ----- > From: "_lallous" <elias_bachaalanyyahoo.com> > To: <php-generallists.php.net> > Sent: Tuesday, September 04, 2001 4:43 AM > Subject: [PHP] Re: Wierd for thingy, help! > > > > page1.htm > > > > <html> > > <body onload="document.forms[0].submit();"> > > <form action="page2.php" method="post"> > > <input type="hidden" value="kyle" name="who"> > > </form> > > </body> > > </html> > > > > page2.php > > <? > > echo "Hello $who!\n"; > > ?> > > > > "Kyle Smith" <dbzno1fanhotmail.com> wrote in message > > news:OE12QanWtMmL7z0X5TI00002678hotmail.com... > > Ok sorry for not looking into this one but is it possible for 1 page to > have > > a variable (not input) and then post it to another page and in an input > > variable (text box) it will have the variable from the first page as its > > value..... not im confused! > > > > > > -lk6- > > http://www.StupeedStudios.f2s.com > > Home of the burning lego man! > > > > ICQ: 115852509 > > MSN: dbzno1fanhotmail.com > > AIM: legokiller666 > > > > > > > > > > > > > > -- > > 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:


    Sure you can!

    throught ODBC,

    check PHP Builder or try posting in php.windows

    "Rogerio Coelho - Equipeweb - Compuland Isp" <rogeriocompuland.com.br> wrote in message news:3B9365E0.14551.4D1141localhost...

    Hi, Folks!

    Can I read from an mdb database direct from PHP like DBF, for example?

    []´s Rogerio Coelho. Equipeweb - CompuLand Design http://www.equipeweb.com.br Tel/Fax:(xx) 24 237-2088

    attached mail follows:


    This helped me out (at least made my site look nicer :), but is there a way set text area's width like this? Doesn't seem to work with same code. IE however works great.

    Why the hell there can not be just ONE standard?!?

    Niklas

    -----Original Message----- From: * R&zE: [mailto:renzedatalink.nl] Sent: 3. syyskuuta 2001 10:42 To: Balaji Ankem Cc: php-generallists.php.net Subject: Re: [PHP] hi

    <Reply>

    Hey there,

    This is the solution for setting the width of your select-box (which I think you want to do):

    <SELECT width="200" style="width: 200px;"> ---options here--- </SELECT>

    The width-attribute sets the width in NS, while the style-attribute sets the width in IE. Don't you just love this kind of compatibility?!?! Anyway... using both attributes makes sure the select-box is shown with the same width in both browsers.

    </Reply>

    --
    

    * R&zE:

    -- »»»»»»»»»»»»»»»»»»»»»»»» -- Renze Munnik -- DataLink BV -- -- E: renzedatalink.nl -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- Netherlands -- -- 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:


    <Original message> From: Niklas Lampén <niklas.lampenpublico.fi> Date: Tue, Sep 04, 2001 at 02:39:03PM +0300 Message-ID: <NPEFKEPHNLKEPEOLHPKNKEFCCEAA.niklas.lampenpublico.fi> Subject: [PHP] Text area's width in NS

    > This helped me out (at least made my site look nicer :), but is there a way > set text area's width like this? Doesn't seem to work with same code. IE > however works great. > > Why the hell there can not be just ONE standard?!? > > Niklas

    </Original message>

    <Reply>

    Sorry. Can't do. Netscape doesn't seem to support this feature. It does work in IE, though. Just add a style="" to it. There you can set the width and height. Eg:

    <TEXTAREA style="width: 400px; height: 200px;"></TEXTAREA>

    And for Netscape... well... you'll have to live with only using cols="" and rows="".

    </Reply>

    -- 
    

    * R&zE:

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

    attached mail follows:


    > >From: Niklas Lampén <niklas.lampenpublico.fi> > >Doesn't seem to work with same code. IE >however works great. > >Why the hell there can not be just ONE standard?!?

    There is at: www.w3c.org but everyone (read big enterprises) is not following the recommendations |:-(

    If everyone tried to remember the following, things would have been easier:

    "The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect." -- Tim Berners-Lee, W3C Director and inventor of the World Wide Web

    Michael Cronström mczoon.se

    attached mail follows:


    Hi,

    I'd like to configure the iODBC support (--with-iodbc[=DIR])

    On http://www.iodbc.org I can choose between 'iODBC Driver Manager' and 'OpenLink iODBC SDK binaries'.

    When I choose 'iODBC Driver Manager' I see the following options:

    - iODBC Driver Manager & Administrator SOURCE Release V3.0.5 - iODBC RPM Packaging Source Files - iODBC Driver Manager Runtime Package (For Linux glibc21) - iODBC RPM Developers Kit (Linux glibc21) - iODBC Administrator (Linux glibc21)

    And when I choose 'OpenLink iODBC SDK binaries':

    - Linux libc5 (Intel) - Linux glibc2 (Intel) - Linux glibc2.1.1 (Intel)

    Can anyone please give me a hint what I need to download?

    I'm running on Red Hat Linux 7.1 / PHP 4.0.5.

    [/root] uname -a Linux nt-cpu04 2.4.2-2 #1 Sun Apr 8 19:37:14 EDT 2001 i586 unknown [/root] rpm -q --all | grep glib glibc-common-2.2.2-10 glibc-2.2.2-10 glib-1.2.9-1 glib-devel-1.2.9-1 glibc-devel-2.2.2-10

    Thanks!!!

    Simon.

    attached mail follows:


    Hello,

    I want to calculate an average from the following variables/arrays

    a - $f[$index][f_d1_perc] with $f[$index][f_d1_weight] b - $f[$index][f_d2_perc] with $f[$index][f_d2_weight] c - $f[$index][f_d3_perc] with $f[$index][f_d3_weight] d - $f[$index][f_d4_perc] with $f[$index][f_d4_weight] e - $f[$index][f_d5_perc] with $f[$index][f_d5_weight]

    All varables are integers: - $f[$index][f_d _perc] = 0 - 100 - $f[$index][f_d1_weight] = 0 - 10

    I want the folowing:

    total score = (a * weight) + (b * weight) + (c * weight) + (d * weight) + (e * weight). total vars = weight a + weight b + weight c + weight d + weight e. Average = total score / total average. The calulated average has to be stored in "$f[$index][f_perc]".

    The problem is that not always all the variables are set. How do I check these arrays and leave them out of the calculation when they don't contain a value.

    Hope anyone can help me...

    attached mail follows:


    you can use this:

    if (isset($f[$index][f_d1_weight]) && !empty($f[$index][f_d1_weight])) { // process item here }

    "Bart Verbeek" <b.verbeekcreative-edge.nl> wrote in message news:KDEGLILLMKMDKJGAMGHIAEOICAAA.b.verbeekcreative-edge.nl... > Hello, > > I want to calculate an average from the following variables/arrays > > a - $f[$index][f_d1_perc] with $f[$index][f_d1_weight] > b - $f[$index][f_d2_perc] with $f[$index][f_d2_weight] > c - $f[$index][f_d3_perc] with $f[$index][f_d3_weight] > d - $f[$index][f_d4_perc] with $f[$index][f_d4_weight] > e - $f[$index][f_d5_perc] with $f[$index][f_d5_weight] > > All varables are integers: > - $f[$index][f_d _perc] = 0 - 100 > - $f[$index][f_d1_weight] = 0 - 10 > > I want the folowing: > > total score = (a * weight) + (b * weight) + (c * weight) + (d * weight) > + (e * weight). > total vars = weight a + weight b + weight c + weight d + weight e. > Average = total score / total average. > The calulated average has to be stored in "$f[$index][f_perc]". > > The problem is that not always all the variables are set. How do I check > these arrays and leave them out of the calculation when they don't contain a > value. > > Hope anyone can help me... > > > >