OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
php-general-digest-help_at_lists.php.net
Date: Fri Sep 06 2002 - 05:54:52 CDT

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

    php-general Digest 6 Sep 2002 10:54:52 -0000 Issue 1569

    Topics (messages 115363 through 115434):

    Re: Hardware Address
            115363 by: nicos.php.net
            115369 by: Tyler Longren
            115416 by: Marek Kilimajer

    Problem with inserting values into database through php
            115364 by: Olli Sinerma
            115365 by: Brad Bonkoski
            115366 by: Olli Sinerma

    Anyone use DB_DataObject
            115367 by: Peter J. Schoenster

    Re: ending a session
            115368 by: victor
            115400 by: Erwin
            115401 by: Erwin

    largest value of 2nd parameter in fgets functions
            115370 by: Terence Lee

    Re: Safe_Mode problem....
            115371 by: Richard Lynch

    Re: regex help
            115372 by: Richard Lynch

    Re: Escape characters won't go away
            115373 by: Richard Lynch

    Re: SNMP Support Problem
            115374 by: Richard Lynch

    Re: empty php.ini
            115375 by: Richard Lynch

    Re: mailing a cookiecontent
            115376 by: Richard Lynch

    Re: Printing ASCII on Linux Server
            115377 by: Richard Lynch

    Re: problems with cookies
            115378 by: Richard Lynch

    Re: help, array values echoed as Array on loop!
            115379 by: Richard Lynch

    Re: limit in a loop function to prevent server load
            115380 by: Richard Lynch

    Re: threads in Apache 1.3
            115381 by: Richard Lynch

    Re: progress bar for a server side process
            115382 by: Richard Lynch
            115394 by: electroteque

    Re: greeting based on time
            115383 by: Richard Lynch

    Re: Info into Class
            115384 by: Richard Lynch

    Re: Any netscape users out there?
            115385 by: Richard Lynch

    Re: Help with inserting Flash into MySQL database
            115386 by: Richard Lynch

    Re: FORUM CODE
            115387 by: Richard Lynch

    Re: ftp_put
            115388 by: Richard Lynch
            115393 by: victor

    Re: Please, help with Sourceforge's PHP command-line not working at all
            115389 by: Richard Lynch

    Re: mod_php4 / apache config question
            115390 by: Richard Lynch

    Re: creating mail on submitting a form.
            115391 by: Richard Lynch

    Re: PHP 4.2.2 install problem
            115392 by: Richard Lynch

    defining vars within functions as global
            115395 by: Justin French
            115396 by: Joe Conway
            115397 by: Gurhan Ozen

    Re: [PHP-DEV] problem in starting apache in win2k with mcrypt and mhash module
            115398 by: Markus Fischer
            115399 by: Terence Lee

    Re: Domxml: coping with UTF-16
            115402 by: Alexandru COSTIN

    Undefined index, Undefined variable, Undefined constant....
            115403 by: Jens Winberg
            115406 by: Erwin

    question
            115404 by: Meltem Demirkus
            115405 by: Justin French

    noooob! => php logging into apache format?
            115407 by: :B nerdy

    fsockopen proxy?
            115408 by: :B nerdy

    register_globals = Off
            115409 by: Holzner Roland

    cant find the wrong?
            115410 by: Meltem Demirkus
            115411 by: Dave at Sinewaves.net
            115412 by: Meltem Demirkus

    Re: Array Javascript
            115413 by: lallous

    question about Location
            115414 by: Meltem Demirkus
            115418 by: Brad Bonkoski
            115420 by: Meltem Demirkus
            115421 by: Marek Kilimajer
            115425 by: Meltem Demirkus
            115429 by: liljim
            115430 by: Naintara Jain
            115431 by: Marek Kilimajer
            115432 by: adrian murphy
            115433 by: Meltem Demirkus

    Including files and functions
            115415 by: Bård Tommy Nilsen

    Re: precision using pow()
            115417 by: Marek Kilimajer

    Re: How do I keep a page from caching in I.E
            115419 by: Krzysztof Dziekiewicz

    HTTP_SERVER_VARS not working. Please help
            115422 by: Cirstoiu Aurel Sorin
            115423 by: Erwin
            115424 by: Cirstoiu Aurel Sorin
            115426 by: Brad Bonkoski
            115427 by: Cirstoiu Aurel Sorin
            115428 by: Cirstoiu Aurel Sorin

    Source code
            115434 by: Roman Duriancik

    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:


    Hi,

    The best way I think is to use exec() or system() to ask that to the system.
    May be someone knows something better too.

    --
    

    Nicos - CHAILLAN Nicolas nicosphp.net www.WorldAKT.com - Hébergement de sites Internet

    "Chris Cook" <cjc1800hotmail.com> a écrit dans le message de news: F101B4IuyobgN9K5GoM000165c1hotmail.com... > Hello all, > > I am working on a LAN application and am interested in obtaining the user's > network card address to limit usage of the program. Is there a way to do > this in PHP? > > I am on a network that uses DHCP so using the IP address probably wont work > and I am also worried about IP spoofing. > > Thanks for any help you can provide, > Chris > > > _________________________________________________________________ > Send and receive Hotmail on your mobile device: http://mobile.msn.com >

    attached mail follows:


    using exec() or system() will only be able to execute commands on the machine php is installed on. I sometimes wonder how universities and broadband isp's do this. I'd be interested in seeing how it works.

    Sorry, I'm not much help anymore.

    tyler

    On Fri, 6 Sep 2002 01:24:07 +0200 <nicosphp.net> wrote:

    > Hi, > > The best way I think is to use exec() or system() to ask that to the > system. May be someone knows something better too. > > -- > > Nicos - CHAILLAN Nicolas > nicosphp.net > www.WorldAKT.com - Hébergement de sites Internet > > "Chris Cook" <cjc1800hotmail.com> a écrit dans le message de news: > F101B4IuyobgN9K5GoM000165c1hotmail.com... > > Hello all, > > > > I am working on a LAN application and am interested in obtaining the > user's > > network card address to limit usage of the program. Is there a way > > to do this in PHP? > > > > I am on a network that uses DHCP so using the IP address probably > > wont > work > > and I am also worried about IP spoofing. > > > > Thanks for any help you can provide, > > Chris > > > > > > _________________________________________________________________ > > Send and receive Hotmail on your mobile device: > > http://mobile.msn.com > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    exec("arp $_SERVER[REMOTE_ADDR]", $output);

    $output[0] should be something like ? (192.168.1.37) at 00:E0:4C:00:30:2D [ether] on eth0

    Chris Cook wrote:

    > Hello all, > > I am working on a LAN application and am interested in obtaining the > user's network card address to limit usage of the program. Is there a > way to do this in PHP? > > I am on a network that uses DHCP so using the IP address probably wont > work and I am also worried about IP spoofing. > > Thanks for any help you can provide, > Chris > > > _________________________________________________________________ > Send and receive Hotmail on your mobile device: http://mobile.msn.com > >

    attached mail follows:


    Hi, I´m having a weird problem with getting my forms work within php. I have a running MySQL server, php installed on a apache server and I can make SQL queries through php, but I´m unable to insert any data into it through forms.

    This is an example file that I´m using (it´s from http://hotwired.lycos.com/webmonkey/99/21/index3a_page4.html?tw=programming )

    ______________________________

    <html>

    <body>

    <?php

    if ($submit) {

    // process form

    $db = mysql_connect("localhost", "root", "mypassword");

    mysql_select_db("mydb",$db);

    $sql = "INSERT INTO employees (first,last,address,position) VALUES ('$first','$last','$address','$position')";

    $result = mysql_query($sql);

    echo "Thank you! Information entered.\n";

    } else{

    // display form

    ?>

    <form method="post" action="<?php echo $PHP_SELF?>">

    First name:<input type="Text" name="first"><br>

    Last name:<input type="Text" name="last"><br>

    Address:<input type="Text" name="address"><br>

    Position:<input type="Text" name="position"><br>

    <input type="Submit" name="submit" value="Enter information">

    </form>

    <?php

    } // end if

    ?>

    </body> </html> ____________________________________

    I have set the database in working order according to the manual, but after I enter some writing into the text fields and press submit: It refreshes the page and doesn't add any information into the db.

    I recon that the problem might be within the $php_self command, for I got all the previous php/mySQL tutorials working, but when this command appeared...problems started...or more accurate word would be: nothing happened.

    I have phpMyAdmin 2.3.0 running on my apache server and it can send/receive data from the db normally, so the problem shouldn't be in the db server or in the php, so it´s in me or in the code :) I have read through all the FAQ:s and manuals that I have found and I still can´t understand what is the problem in this one!

    -Olli

    attached mail follows:


    The best way IMHO, to debug problems like this is to echo out your insert query to the screen and not actually run the query, or run it and make sure you use: $sql = "INSERT INTO employees (first,last,address,position) VALUES ('$first','$last','$address','$position')"; $result = mysql_query($sql) or die("Invalid query: $sql");

    (This is always good practice anyways, especially if the page depends upon that query's execution)

    Anyhow, echo out the query: $sql to the screen and then run it against your actual MySQL database and see how it responds? Chances are there is some error there, and you'll get more meaningful feedback from the database backend.

    HTH -Brad

    Olli Sinerma wrote: > Hi, > I´m having a weird problem with getting my forms work within > php. I have a running MySQL server, php installed on a apache server > and I can make SQL queries through php, but I´m unable to insert > any data into it through forms. > > This is an example file that I´m using > (it´s from > http://hotwired.lycos.com/webmonkey/99/21/index3a_page4.html?tw=programming > ) > > ______________________________ > > <html> > > <body> > > > > <?php > > > > if ($submit) { > > // process form > > $db = mysql_connect("localhost", "root", "mypassword"); > > mysql_select_db("mydb",$db); > > $sql = "INSERT INTO employees (first,last,address,position) VALUES > ('$first','$last','$address','$position')"; > > $result = mysql_query($sql); > > echo "Thank you! Information entered.\n"; > > } else{ > > > > // display form > > > > ?> > > > > <form method="post" action="<?php echo $PHP_SELF?>"> > > First name:<input type="Text" name="first"><br> > > Last name:<input type="Text" name="last"><br> > > Address:<input type="Text" name="address"><br> > > Position:<input type="Text" name="position"><br> > > <input type="Submit" name="submit" value="Enter information"> > > </form> > > > > <?php > > > > } // end if > > > > ?> > > > > </body> > </html> > ____________________________________ > > I have set the database in working order according to the manual, but after > I enter some writing into the > text fields and press submit: It refreshes the page and doesn't add any > information into the db. > > I recon that the problem might be within the $php_self command, for I got > all the previous php/mySQL tutorials > working, but when this command appeared...problems started...or more > accurate word would be: nothing > happened. > > I have phpMyAdmin 2.3.0 running on my apache server and it can send/receive > data from the db normally, so the problem shouldn't > be in the db server or in the php, so it´s in me or in the code :) I have > read through all the FAQ:s and manuals that I have found and I still > can´t understand what is the problem in this one! > > -Olli > > > > >

    attached mail follows:


    I´m quite a newbie in making php, but I managed to run the test you suggested, but nothin happened. This time it was propably the code I did: first I added the "or die("Invalid query: $sql");" part and ran the form, but everything happened just like when refreshing a page.

    Then I did this: $result = mysql_query($sql) or die("Invalid query: $sql");

    echo $sql;

    but the database was silent....it just refreshed the page and cleared out the form.

    -Olli

    "Brad Bonkoski" <bbonkosktampabay.rr.com> wrote in message news:3D77F091.4020400tampabay.rr.com... > The best way IMHO, to debug problems like this is to echo out your > insert query to the screen and not actually run the query, or run it and > make sure you use: > $sql = "INSERT INTO employees (first,last,address,position) VALUES > ('$first','$last','$address','$position')"; > $result = mysql_query($sql) > or die("Invalid query: $sql"); > > (This is always good practice anyways, especially if the page depends > upon that query's execution) > > Anyhow, echo out the query: $sql to the screen and then run it against > your actual MySQL database and see how it responds? Chances are there > is some error there, and you'll get more meaningful feedback from the > database backend. > > HTH > -Brad > > Olli Sinerma wrote: > > Hi, > > I´m having a weird problem with getting my forms work within > > php. I have a running MySQL server, php installed on a apache server > > and I can make SQL queries through php, but I´m unable to insert > > any data into it through forms. > > > > This is an example file that I´m using > > (it´s from > > http://hotwired.lycos.com/webmonkey/99/21/index3a_page4.html?tw=programming > > ) > > > > ______________________________ > > > > <html> > > > > <body> > > > > > > > > <?php > > > > > > > > if ($submit) { > > > > // process form > > > > $db = mysql_connect("localhost", "root", "mypassword"); > > > > mysql_select_db("mydb",$db); > > > > $sql = "INSERT INTO employees (first,last,address,position) VALUES > > ('$first','$last','$address','$position')"; > > > > $result = mysql_query($sql); > > > > echo "Thank you! Information entered.\n"; > > > > } else{ > > > > > > > > // display form > > > > > > > > ?> > > > > > > > > <form method="post" action="<?php echo $PHP_SELF?>"> > > > > First name:<input type="Text" name="first"><br> > > > > Last name:<input type="Text" name="last"><br> > > > > Address:<input type="Text" name="address"><br> > > > > Position:<input type="Text" name="position"><br> > > > > <input type="Submit" name="submit" value="Enter information"> > > > > </form> > > > > > > > > <?php > > > > > > > > } // end if > > > > > > > > ?> > > > > > > > > </body> > > </html> > > ____________________________________ > > > > I have set the database in working order according to the manual, but after > > I enter some writing into the > > text fields and press submit: It refreshes the page and doesn't add any > > information into the db. > > > > I recon that the problem might be within the $php_self command, for I got > > all the previous php/mySQL tutorials > > working, but when this command appeared...problems started...or more > > accurate word would be: nothing > > happened. > > > > I have phpMyAdmin 2.3.0 running on my apache server and it can send/receive > > data from the db normally, so the problem shouldn't > > be in the db server or in the php, so it´s in me or in the code :) I have > > read through all the FAQ:s and manuals that I have found and I still > > can´t understand what is the problem in this one! > > > > -Olli > > > > > > > > > > > >

    attached mail follows:


    Hi,

    I'm trying to use Pear stuff but don't know if I should post to that list as just a user.

    I'm lost when it comes to "Auto Building". It has an example of that and I tried to do it on a local linux box where I'm root but it failed

    > all to undefined function: getstaticproperty

    and I found something via Google that did not help at all.

    It *SEEMS* I have to create a config file for each table. Personally, I admit it, I generate that stuff automatically in other languages, I did do the config file to represent a database schema but change happens so much that I just did not want to bother updating the config file all the time so I just generated it dynamically from then on.

    Anyhow, I think I know where to put those config files, where I put the path for:

    schema_location

    but now do I put one file with all the tables defined by the example given in the docs?

    Or do I create a file for each table?

    What do I name these files? I'm lost. I got as far as this:

    dataobjects_users Object ( [__table] => user_config [_DB_DataObject_version] => 1.0 [N] => 0 [_database_dsn] => [_database_dsn_md5] => [_database] => [_condition] => [_group_by] => [_order_by] => [_limit] => [_data_select] => * [_link_loaded] => [_lastError] => )

    Peter

    attached mail follows:


    Why not unregistered the session variables first, destroy the session second and redirect the user with a header location to a plain html page that includes a one line JavaScript in the body tag like onload+thiswindow cloase or something like that, and a message that "please closes this window for complete logout. That's what I do and it works, in mozilla the script closes the window, in i.e. it asks that the user verify if they want to close the window, if they say no, then the user sees the message that "please close this window to logout" and that would pretty much take care of everything as far as I know.

    - Victor > www.argilent.com

    -----Original Message----- From: Raphael Hamzagic [mailto:raphaeltabuleiro.com] Sent: Thursday, September 05, 2002 5:32 PM To: php-generallists.php.net Subject: Re: [PHP] ending a session

    Of course Gurhan,

    I have read all the php manual. How can I send a message when the user closes the browser to destroy the session?

    Thanks in advance

    Raphael

    "Gurhan Ozen" <ergenekonstarpower.net> wrote in message news:1031261344.5091.266.camelLOCALHOST... > You can end the session by using function session_destroy(). > See: > > http://www.php.net/manual/en/function.session-destroy.php > > For general information on how PHP handles sessions see: > > http://www.php.net/manual/en/ref.session.php > > Hope this helps. > Gurhan > > On Thu, 2002-09-05 at 17:17, Raphael Hamzagic wrote: > > Hi, > > > > I'm just wanna know why the session doesn't end when the user closes the > > browser window and how can i make it. > > > > Thanks > > > > Raphael > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > >

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

    ______________________________________________________________________ Post your free ad now! http://personals.yahoo.ca

    attached mail follows:


    Raphael Hamzagic wrote: > Thanks, > > But, if the client don't accept cookies? > And if the user open a new browser window with the same url, the new > window will use the same opened session.

    If the user opens a new window, without closing the old one first, then it will use the same session.

    If the client don't accept cookies, you'll have to turn transparant_session on. The problem with that is, that the user will not(probably, I'm not sure about this) get a new session, because the server doesn't know that the browser window is actually closed, like Rasmus told you.

    One reasen the user don't accept cookies, can be the following: http://www.w3.org/P3P/ Some users/browsers/company only accept cookies from websites which have a P3P statement. Other users just don't accept cookies. You'll have to live with that, use transparant_sessions and accept the negative sides of that (if it has any).

    HTH Erwin

    attached mail follows:


    Victor wrote: > Why not unregistered the session variables first, destroy the session > second and redirect the user with a header location to a plain html > page that includes a one line JavaScript in the body tag like > onload+thiswindow cloase or something like that, and a message that > "please closes this window for complete logout. That's what I do and > it works, in mozilla the script closes the window, in i.e. it asks > that the user verify if they want to close the window, if they say > no, then the user sees the message that "please close this window to > logout" and that would pretty much take care of everything as far as > I know.

    So, you first destroy the session, and then open a popup window? Why? If you destroyed the session, the user is already logged-out. Or do you destroy the session also in a popup window? In that case you have another two usergroups which can be a pain-in-the-ass: a) users that don't have JavaScript activated b) users (like me) that have a Popup killer

    Maybe, with all these solutions together, we can create the perfect logout script ;-))

    Grtz Erwin

    attached mail follows:


    hello

    i've tried to read a line from a text file by fgets($fp,8192). it work fine. however, there is a line over 8192 char and i tried to increase the 2nd parameter (e.g. 8193, 16384, 88192) still only 8192 char are read to my string variables.

    is it a limit of fgets or length of a string? any way to achieve getting more than 8192 char from a line in a text file?

    pls advice.

    terence

    attached mail follows:


    >PHP will not allow me to do this because safe_mode is on. I've been trying for >the past two weeks to turn it off. Nothing I do changes it. I've changed,

    You'll have to re-compile without safe mode in the ./configure

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    ><?php > >$str = 'hi <b>my friend</b>! <br /> this message uses html entities <a >href="http://www.trini0.org">test</a>!'; >$str = preg_replace('/(<a href="http:\/\/.*">.*<\/a>)/', >htmlspecialchars("$1"), $str);

    Maybe I'm missing something here, but can't you just do:

    $str = htmlspecialchars($str);

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    >I'm getting multiple backslashes in data I get out of a mysql database.

    That's crazy...

    You'd have to be adding an awful lot of backslashes *before* you put it in there.

    MySQL "eats" up one (1) set of \s when it "reads" data.

    >1. $string = stripslashes($string); - Doesn't do anything

    Sure it does!

    $string = "insert into names(name) values('Conan O\\'Brien')"; print("Before: $string<BR>\n"); $string = stripslashes($string); print("After: $string<BR>\n");

    >2. $string = ereg_replace("\\\\\\", "", $string); - Doesn't do anything

    Try it with \\\\ maybe.

    >3. $string = ereg_replace("\\", "", $string); - Gives the following error >message: >Warning: REG_EESCAPE in script.php on line 1684

    Here's why:

    PHP turns "\\" into "\" Regex sees "\" and is looking for the *next* character after that to 'escape' it. There ain't no next character, and that's just wrong.

    "\\\\" would work like this:

    PHP turns that into: "\\" (Each "pair" of \ in "\\\\" turns into one \) Regex then sees "\\" and turns that into: "\\"

    Or, let's assume that the '.' character is "special" in Regex.

    You'd need "\\." in PHP to get a non-special '.' in Regex.

    Here's why:

    PHP turns "\\." into "\." Regex sees "\." and knows that you want an actual '.', not the special character '.' that is a wild-card.

    >None of these have worked. Any thoughts on how to get rid of them? I'm >going batty.

    My first guess is you have Magic Quotes "on" in php.ini *AND* you are using addslashes() before you insert the data.

    Another possibility is that your FORMs are passing the strings along as you go...

    Here's the deal:

    The whole point of MagicQuotes and addslashes is to *prepare* data to be inserted into a database.

    If you choose *not* to insert that data, and spew it out to the browser either in a TEXTBOX or in an INPUT TYPE=HIDDEN, then you need to use stripslashes() at that point.

    Otherwise, you've failed to remove the 'extra' slashes that were added in anticipation of you using that data in a database query.

    Use "View Source" in your browser as you work on this.

    HTML *also* uses \ in some situations as an escape character, and you can confuse yourself very easily by looking at browser output, instead of what's really there.

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    >" Fatal error: Call to undefined function: snmpwalk() ..." ... and this >for all snmp functions.

    This means that the --with-snmp part of ./configure didn't really work.

    Go back and do the ./configure again, only like this:

    ./configure --with-snmp ... 2>&1 > configure.output &

    You can use:

    tail -f configure.output

    to watch the messages go by (control-c to exit)

    But you'll have a permanent record of what happened, and you can use vi or joe or pico to look at it and search for 'snmp' and/or 'SNMP' to see what happened.

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    >Hi, > > >I am new to PHP. I am running the module version 4.2.2 from Marc >Lyanage (entropy.ch) on OS X 10.1 and noticed that my >/usr/local/lib/php.ini is empty!? > >Is there a way

    Just copy the php.ini-dist from the PHP source tarball or wherever you can find it into there.

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    >if ($REQUEST_METHOD=='POST') { > $name = escapeshellcmd($name); > $group = escapeshellcmd($group); > $to = "memyhost.se"; > $from = "FROM: $name, $group"; > $subject = "The subject of this mail\n\n"; > $body = "Name: $name\t"; > $body .= "Group: $group\n"; > $body .= "\n\n$comments\n\n"; > > mail($to,$subject,$body,$from); > exit; >} > >Well, I recieve a mail, but the mailcontent is empty. >The cookie string is written to a hidden field like this: > > document.write('<FORM><INPUT TYPE=HIDDEN NAME=\"comments\" >VALUE=\"'+cookiestr+'\"></FORM>');

    Get rid of the JavaScript, and just do something like this:

    $body .= implode("\r\n", $_COOKIE);

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    >Printing works fine, however 2 problems: > >1. linefeed ("\n") doesn't work > >2. escape sequences to print BOLD, ITALIC, UNDERLINE, >NARROW don't work

    Probably the same problem, really.

    > $lp = popen("lpr -Plp1", "w");

    I'm guessing that popen uses the shell or something, and it's "eating" your control characters.

    Try things like:

    $print_string = "\"$print_string\""; > $bytes_written = fwrite($lp, $print_string);

    $print_string = str_replace("\n", "\\n", $print_string); > $bytes_written = fwrite($lp, $print_string);

    I suspect that something along those lines of convincing the shell to leave your data alone will fix your problems.

    It may also be a Good Idea to add:

    if ($bytes_written != ($strlen = strlen($print_string)){ die("Only wrote $bytes_written of $strlen characters"); }

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    ><? >setcookie("cookiename1","$domin","timeset()+1800");

    You're being "quote" "happy" and using "way" too "many" "quotes" "" "" :-)

    $domin is a variable. You don't need to use "$domin" It won't "hurt" anything, since you're just forcing PHP to build *another* string with the same exact content in it. But it's "silly"

    "timeset()+1800", however, is a big problem. You're *supposed* to be giving the setcookie() function a NUMBER that represents the time that has passed. You're giving it a string. That's wrong.

    Also, some stupid broken IE browsers won't let you provide a time without a path. It's wrong, but it's Microsoft. So add '/' as your path argument:

    setcookie("cookiename1", $domin, time()+1800, '/');

    >$cookiename1=$domin; >echo $cookiename1; // here it works

    Yes and no. You're not really seeing a Cookie "work" You're just seeing the same value you just assigned.

    >?> >--- HTML code --- ><? >function one(){ >?> >--- HTML code --- ><input name="domin" type="text" size="40" maxlength="63"> >--- HTML code --- ><? >} > >function two(){ >$othervar=$_COOKIE['cookiename1']; >echo $othervar; // here it doesn't work

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    >$ID_arr[] = explode(',', $pictures); # make db data into array > >This is the string: > >15,16,17,18,19 > >why does it echo as Array?

    Because you have a "two-dimensional" array:

    ID_arr = array( array(15, 16, 17, 18, 19) );

    The reason you have a 2-D array is that you have [] in the assignment:

    $ID_arr[] = <<<< function that builds an array >>>>>>>;

    So the right-hand-side of = turns into an Array, and *then* you use [] to force ID_arr to be an Array, and you stuff the one Array into the first open position in the ID_arr Array.

    Get rid of the [] and everything will be beautiful.

    Any time you try to print something and get Array, it's because whatever you have done has caused that thing to be an Array itself. If you didn't want it to be an Array, figure out where/how you got an "extra" layer of Array-ness in your code.

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    >hi there i was wondering if there was a way to limit the ammount of items in >a loop to execute sleep then execute the rest of the items to prevent server >load ?

    http://php.net/sleep

    Note that "sleep" time doesn't count, but that if your program uses up *TOO* much time, it will be killed by PHP.

    The default setting is 30 seconds.

    You can alter it in php.ini or using http://php.net/set_time_limit

    If you want to sleep 10 seconds every 50 items it would be like this:

    $count = 0; while (...){ $count++; if (($count % 50) == 0){ sleep(10); } }

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    >I would like to know how many PHP page apache generates in one thread at the >same time. > >For example, two clients share the same thread of the apache web server. >they request at the same time a php page. Does apache process them one by >one?

    As I understand it:

    Each child processes one (1) HTTP request at a time and then goes back in the "pool" ready to do another.

    If you count a "page" strictly as the HTML, then it's just one thread, one page.

    If you are counting all the images and stuff, you never know which thread gets which HTTP request (each image is another request) for a "page including images".

    >I use persistant database connections and I wonder, if one connection is >always in use by one page or by more?

    Each thread will end up having a connection.

    Actually, it will have a connection for *each* username/password combination used to connect, if you have multiple MySQL users in mysql_pconnect(...)

    You want to be sure my.cnf has a few "extra" connections available over the number of Apache children. Otherwise you can find yourself "locked out" of using 'mysql' in the command line to do administration duties.

    Imagine you have a shared host, with web-sites, both very busy, both using a different (one each) MySQL username/password.

    If your httpd.conf limits the maximum number of children to 50, you'd need:

    2 X 50 + ~4 ===> ~104 connections as the limit in my.cnf

    More Apache children ==> More connections More MySQL username/passwords ==> More connections

    I assume a very large ISP with hundreds of customers has to:

    A) Give them all a common/shared username/password, *OR* B) Throw in a *LOT* of RAM to handle all the connections

    I don't know this for a fact, though.

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    >hi there i have created a script to regenerate thumbnails for a photo >gallery , i have changed my code to use gd true color although it takes >forever now , i have it generating 20 at a time then doing the rest but >still takes forever , i know its impossible to generate a true progress bar >for image uploads via a browser but how about server side processes ?

    You can do something like this:

    <?php for ($i = 0; $i < 20; $i++){ # Generate next TrueColor image: echo "."; flush(); } ?>

    And the user *should* see a single '.' appear as each image is completed.

    NOTES: You need the flush() because Apache/HTTP buffers output until enough content is there to make it worth sending. flush() forces the data out the door.

    You'd probably really be better off just telling them that the thumbnails will be finished in about 5 minutes (or however long it takes) and letting them get on with life. Who wants to sit there watching the dots go by? You can set up a scheduled task to re-generate the thumbnails requested, and use a database table to track requests.

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    i've soughted out a solution with flash :)

    http://electroteque.dyndns.org:1023/demo/uploader/

    except it adds the html output above the html do most browsers support this ?

    "Richard Lynch" <richphpbootcamp.com> wrote in message news:php.general-115382news.php.net... > >hi there i have created a script to regenerate thumbnails for a photo > >gallery , i have changed my code to use gd true color although it takes > >forever now , i have it generating 20 at a time then doing the rest but > >still takes forever , i know its impossible to generate a true progress bar > >for image uploads via a browser but how about server side processes ? > > You can do something like this: > > <?php > for ($i = 0; $i < 20; $i++){ > # Generate next TrueColor image: > echo "."; > flush(); > } > ?> > > And the user *should* see a single '.' appear as each image is completed. > > NOTES: > You need the flush() because Apache/HTTP buffers output until enough content > is there to make it worth sending. flush() forces the data out the door. > > You'd probably really be better off just telling them that the thumbnails > will be finished in about 5 minutes (or however long it takes) and letting > them get on with life. Who wants to sit there watching the dots go by? You > can set up a scheduled task to re-generate the thumbnails requested, and use > a database table to track requests. > > -- > Like Music? http://l-i-e.com/artists.htm >

    attached mail follows:


    >really simple one - > >does someone have a bit of code that will variously display 'good morning', >'good afternoon', 'good evening' based on the current time? > >good morning from london,

    My time or your time?

    If you want it to be "server" time, use this:

    <?php $hour = date('H'); if ($hour < 12){ $greet = 'morning'; } elseif ($hour < 17){ $greet = 'afternoon'; } else{ $greet = 'evening'; } echo "good $greet from london<BR>\n"; ?>

    If you want it based on *THEIR* time, you have to use JavaScript to send yourself the time set on their computer's clock on the previous page, and then greet them... Which means they'll have already seen some kind of page, or at least a "flash" as the first page reloaded...

    Something like this:

    <?php if (!isset($client_time)){ ?> <HTML> <HEAD><META TYPE=HTTP-EQUIV CONTENT="0;URL=<?=$_ENV['PHP_SELF']?>?client_time=<SCRIPT LANGUAGE=JavaScript> document.write(date('H')); </SCRIPT>"></HEAD> </HTML> <?php } else{ $hour = $_GET['client_time']; # Same as above } ?>

    There are a zillion things that can go wrong with this second choice: 1. User didn't set their clock properly 2. User has JavaScript "off" or broken 3. My JavaScript is almost for sure wrong (sorry) . . .

    You could also have "User Profiles" and one of the endless questions you ask them to fill in could be time zone, and then you could calculate their local time when they come back to visit, based on the server time and their time zone.

    Of course, if they travel, you're just going to confuse them, since they'll know it's not 'evening' where your server is, nor where they are now...

    Bottom Line: Since it's the WORLD wide web, maybe trying to be 'smart' and say the right thing to them based on time of day isn't such a Good Idea in the first place.

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    >Are there any rules as to how information from outside a class can be >moved into it. >What Ive been doing so far is >1. Through the constructor >2. defining a constant >3. Create a method whose sole purpose is to move data from the outside >into the class. > i.e. ><?php >class foo () >{ >......

    You could also do:

    > function outside_data($bar) > {

    global $foo;

    But that kinda defeats the whole purpose of having Class objects in the first place...

    But there are probably times when an experienced programmer will do that, if the variable in question should have been a constant in the first place, or...

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    >Post data makes Netscape REFUSE to show the underlying source code! It's >virtually impossible to design form handling stuff when I can't see the >code that's generated when i send post data. Is this a bug and how do you fix it??

    That's just Netscape being stupid.

    You can't fix it.

    PHP isn't even involved in this issue.

    Use another browser to debug FORM data.

    Actually, you *MIGHT* be able to convince Netscape to *CACHE* the FORM for awhile...

    http://php.net/header

    Of course, then you'll need to figure out how to get the browser to go get the *new* FORM once you have debugged it...

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    >I'm using this script to insert picture into database: > $data = addslashes( fread( fopen( $arrayUploadedSomething['tmp_name'], >"r"), filesize($arrayUploadedSomething['tmp_name'] ) ) ); > >And then i use ordinary mysql_query to insert it into database (BLOB field). >When i print image on screen, I use this code: > > header("Content-type: " . $arraySomething['something_type']); > header("Content-Disposition: inline; filename=" . >$arraySomething['something_name'] ); > print $arraySomething['something_data']; > >And it works very well...:D > >BUT, if i insert Flash animation (or something else made in Flash) it goes >into database well, but when I print it out .... :D >It wants to download (ignoring the contex-dispositon header) , and if i >click open or save, it show error ....

    Did you also store the type and file name in the database, or are you trying to use the variables $arraySomething which are no longer valid?

    >I know that I must use HTML like this: >---------------------------------------------------------------------- ><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" >codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.ca >b#version=6,0,29,0" align="middle"> > <param name="movie" value="something/show.php?bid=<?php echo >$arraySomething['bid'];?>" /> > <param name="quality" value="high" /> > <embed src="something/show.php?bid=<?php echo >$arraySomething['bid'];?>" quality="high" >pluginspage="http://www.macromedia.com/go/getflashplayer" align="middle" >type="application/x-shockwave-flash"></embed> > </object> >----------------------------------------------------------------------

    But here you have:

    arraySomething['bid'] which does not provide either arraySomething['something_name'] nor _type nor _data...

    Oh.

    No.

    You can't do that.

    Your URL is looking like this:

    something/show.php?bid=Array

    Look at "View Source" in your browser.

    You'll need to provide each variable separately:

    ...value="something/show.php?<?php while (list($key, $value) = each($arraySomething['bid'])){ echo "&$key=", urlencode($value); } ?>" quality=high

    >It prints out Flash but the size is not correct, and it si blank (white)... >Anyone knows where the problem could be ?

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    >Hi, im wondering how in popular forum software, those 'BB codes' are done in >PHP, like, [B] and stuff. I just cant figure it out.

    http://php.net/str_replace http://php.net/ereg_replace

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    >I am having problems getting the ftp_put command to upload a file to an >apache server >i get this error >Warning: error opening C:\\WINDOWS\\Desktop\\Jason\\jjmckay\\testaudio.mp3 >in /home/virtual/site31/fst/var/www/html/clientadmin/mp3upload.php on line >32 > >here is the code > >$dest = "/var/www/html/public/$user/"; >$upload = ftp_put($FTP, $dest, $source_file, FTP_BINARY); > >if ($upload) echo "it worked"; >else echo "it didnt work"; > > >the $source_file is pulled from a form on the previous page

    Need more source code to tell you exactly where, but it looks like you're trying to have PHP suck in the original file name rather than the uploaded file.

    You can't do that.

    If you could, PHP could be used to steal *ANY* arbitrary file off of *ANY* computer. Major security problem.

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    Ok, I'm having the same problem, see I use a form to upload but I guess that it puts the file in temporary file, so with copy or something it figures automatically where to take th file from how do I get the $ source and ft_put to figure out where to take this file from, or can I get it to take it directly from the users computer through form?

    - Victor > www.argilent.com

    -----Original Message----- From: Richard Lynch [mailto:richphpbootcamp.com] Sent: Thursday, September 05, 2002 9:34 PM To: Jason Romero Cc: php-generallists.php.net Subject: [PHP] Re: ftp_put

    >I am having problems getting the ftp_put command to upload a file to an >apache server >i get this error >Warning: error opening C:\\WINDOWS\\Desktop\\Jason\\jjmckay\\testaudio.mp3 >in /home/virtual/site31/fst/var/www/html/clientadmin/mp3upload.php on line >32 > >here is the code > >$dest = "/var/www/html/public/$user/"; >$upload = ftp_put($FTP, $dest, $source_file, FTP_BINARY); > >if ($upload) echo "it worked"; >else echo "it didnt work"; > > >the $source_file is pulled from a form on the previous page

    Need more source code to tell you exactly where, but it looks like you're trying to have PHP suck in the original file name rather than the uploaded file.

    You can't do that.

    If you could, PHP could be used to steal *ANY* arbitrary file off of *ANY* computer. Major security problem.

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

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

    ______________________________________________________________________ Post your free ad now! http://personals.yahoo.ca

    attached mail follows:


    >I think that it has started recently, when SF upgraded all their system. >There is an error code that says that it cannot load module 'mm' at line >0, or something like that.

    'mm' is a memory-mapping library that needs to be compiled into a module for the OS and/or PHP to use...

    I'm not smart enough to tell you if it's a Un*x module missing or a PHP module missing, though.

    If it was a Un*x module, you would need to have SourceForge: Download mm source. Compile and install it. Do 'ldconfig' to make the OS re-load its modules (or whatever their OS uses) Re-start Apache (I think.)

    If it's a PHP Module, they'd need to: Do all of the above, *and*: Re-do the ./configure for PHP, using --with-mm or whatever the --with/--enable bit is as well as all the other stuff they used last time (see config.nice). Re-install PHP Re-start Apache (for sure.)

    *OR* if they are smarter than I am (okay, it's SourceForge, so we *know* they are smarter than I am...) they *might* be able to:

    Do a ./configure of PHP using *just*: ./configure --with-mm=shared Take the resulting mm.so from the PHP /lib directory and put it in the extensions directory set in php.ini and then add mm.so in the extensions section and re-start Apache without re-compiling all of PHP.

    If you get the idea that I only vaguely understand all this crap, you are correct :-)

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    >I have tried things like this: > php_value WSERVER red2.office.com

    I think this is only going to "work" for stuff that's pre-defined in php.ini...

    But I could be very very wrong...

    >and this: > SetEnv WSERVER red2.office.com

    I think this is supposed to work. Are you sure you are doing it *inside* the various <Whatever ...> parts of httpd.conf that affect your server? Or in the "global" scope outside of any <Whatever ...> directives?

    >with and without quotes. mod_env is loaded. I can't find the >variable WSERVER n $GLOBALS or $_ENV of $_GET.

    Instead of looking in those varibles, look at the output from:

    <?php phpinfo();?>

    It might be there, but not where you expected...

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    >hi, > >In a form i have several text area.....when i submit the form, I need to >send a email at a particular id which contains the text entered in the text >area..... >Can someone gimme a script which gives me and idea about how to do that...or >some link where i can find that.

    http://php.net/mail

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    >I am new to Linux and is trying to install PHP/MySQL/SSL. > >I used the instruction found on this link: >http://www.brtnet.org/linux/lampssl.htm > >Everything seemed to install OK; on the last step, open httpd.conf and >uncomment the lines: > >AddType application/x-httdp-php .php >AddType application/x-httdp-php-source .phps > >I couldn't find the lines in the file. If these lines are not there did I >do something wrong, or can I just add them. If I can just add them, where >to I add them.

    Just add them.

    Ideally, you'd add them right after all the other AddType lines in the file.

    Be sure they are not enclosed by some sort of <Whatever ...> directive that only applies in a situation that doesn't affect your server, though...

    If all else fails, try adding them at the very bottom of the file or right before the VirtualHost sections.

    -- 
    Like Music?  http://l-i-e.com/artists.htm
    

    attached mail follows:


    Hi,

    I'd like to be able to define multiple variables within a function, and have it available outside the function from the point the function is called... eg:

    <? function foo() { $foo = "aaa"; $bar = "bbb"; }

    foo();

    echo $foo; echo $bar;

    ?>

    How to I specify that $foo and $bar (defined in the func) are to be set globally (ie, outside the function)?

    I'm aware I could return as array of values, but I'm interested to see if there's another option????

    Justin

    attached mail follows:


    Justin French wrote: > <? > function foo() > { > $foo = "aaa"; > $bar = "bbb"; > } > > foo(); > > echo $foo; > echo $bar; > > ?> > > How to I specify that $foo and $bar (defined in the func) are to be set > globally (ie, outside the function)?

    Why not use an include instead of a function?

    Joe

    attached mail follows:


    You can either use global keyword or put the variable into $GLOBALS[] array.. See: http://www.php.net/manual/en/language.variables.scope.php

    Gurhan

    On Thu, 2002-09-05 at 23:52, Justin French wrote: > Hi, > > I'd like to be able to define multiple variables within a function, and have > it available outside the function from the point the function is called... > eg: > > <? > function foo() > { > $foo = "aaa"; > $bar = "bbb"; > } > > foo(); > > echo $foo; > echo $bar; > > ?> > > How to I specify that $foo and $bar (defined in the func) are to be set > globally (ie, outside the function)? > > I'm aware I could return as array of values, but I'm interested to see if > there's another option???? > > > Justin > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    You're mixing an older library with a newer php version (or the other way around). Please clean up your system first.

    Please ask on php-generallists.php.net next time. (Reply-To set).

    - Markus

    On Fri, Sep 06, 2002 at 09:56:59AM +0800, Terence Lee wrote : > Hello > > i've uncommended the mcrypt and mhash line in c:\winnt\php.ini. then i > try to start the apache but encounter the following error msg > > "The procedure entry point _ecalloc could not be located in the dynamic > link library php4ts.dll" > > "Unable to load dynamic library 'c:\php\extensions\php_mcrypt.dll" - The > specified procedure could not be found." > > "mhash: Unable to initialize module > Module compiled with module API=20010901, debug=0, thread-safety=1 > PHP compiled with module API=20020429, debug=0, thread-safety=1 > There options need to match" > > i m sure that the "php_mcrypt.dll" is already in that location. i've > also tried to change the "extension_dir" in c:\winnt\php.ini to > c:\php > c:\php\extensions\ > c:\winnt > c:\winnt\system32 > > and copied all the required dll to corresponding directories. same error > was encountered when i start the apache. can you advice how can i solve > it? i would like to use the mhash and mcrypt functions. > > Terence > > > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, visit: http://www.php.net/unsub.php

    -- 
    GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
    "In short, the window belongs to me.
     The document belongs to the web site designer."
    - Poster on opera.wishlist
    

    attached mail follows:


    hi Markus

    thanks for your reply. what is the compatible version of mcrypt lib and php in win32? also for linux?

    terence

    Markus Fischer wrote:

    > You're mixing an older library with a newer php version (or > the other way around). Please clean up your system first. > > Please ask on php-generallists.php.net next time. > (Reply-To set). > > - Markus > > On Fri, Sep 06, 2002 at 09:56:59AM +0800, Terence Lee wrote : > > Hello > > > > i've uncommended the mcrypt and mhash line in c:\winnt\php.ini. then i > > try to start the apache but encounter the following error msg > > > > "The procedure entry point _ecalloc could not be located in the dynamic > > link library php4ts.dll" > > > > "Unable to load dynamic library 'c:\php\extensions\php_mcrypt.dll" - The > > specified procedure could not be found." > > > > "mhash: Unable to initialize module > > Module compiled with module API=20010901, debug=0, thread-safety=1 > > PHP compiled with module API=20020429, debug=0, thread-safety=1 > > There options need to match" > > > > i m sure that the "php_mcrypt.dll" is already in that location. i've > > also tried to change the "extension_dir" in c:\winnt\php.ini to > > c:\php > > c:\php\extensions\ > > c:\winnt > > c:\winnt\system32 > > > > and copied all the required dll to corresponding directories. same error > > was encountered when i start the apache. can you advice how can i solve > > it? i would like to use the mhash and mcrypt functions. > > > > Terence > > > > > > > > > > -- > > PHP Development Mailing List <http://www.php.net/> > > To unsubscribe, visit: http://www.php.net/unsub.php > > -- > GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc > "In short, the window belongs to me. > The document belongs to the web site designer." > - Poster on opera.wishlist

    attached mail follows:


    Hello, You can try Krysalis to solve your problems.

    We have fully implemented UTF-8 support in both XML generation and XSL transformation, using a CDATA passthrough technique.

    http://www.interakt.ro/products/Krysalis/

    As we have developed the site of the Romanian Ministry of IT&C using Krysalis, we were stuck in a similar problem (both pasting from word and non ISO characters). The problems were fully resolved only after we have used the MB extension with a full UTF-8 XML/XSL pipeline.

    Unfortunately, I don't know if the current released version 1.1.2 has all the internationalization features activated, but the 2.0 Lite version (due for release at the beginning of November) will surelly support it.

    Alexandru

    > Hi - > > I've built a web-based XML editor using PHP, so that clients can edit > the sites themselves. The site HTML is generated dynamically via > Sablotron. The problem is the users are copying-and-pasting from MS > Word, and putting things like smart quotes and greek characters (one > site is about maths) into the input boxes. This causes PHP to freak when > it's trying to store the new content into the XML, and even if PHP > survives, Sablotron breaks. > > I gather I need to set the XML document, XSL file, and stylesheet output > to be UTF-16, instead of UTF-8. I can't see anything in the domxml > functions to set encoding, though. Anyone got any ideas? > > Thanks, > > Gwyn.

    attached mail follows:


    I'm having trouble with the newest version of PHP (4.2.2). For example in a page I'm using the following code: if ($_GET['action'] == "logout") { //do something }

    But I'm getting an error message that says: ...log_message reports: PHP Notice: Undefined index: action in....

    Ealier (other versions of PHP) I have succesfully used the above code, but do I now have to rewrite the code like this: if (isset($_GET['action']) AND $_GET['action'] == "logout") { //do something }

    Or am I totally wrong? This was just one example when I'm getting the message "Undefined index" or " Undefined variable" etc. A lot of code which has previously worked is now giving me loads of headache since I have to rewrite everything.

    Please, I need some help.

    my email: jwinbergabo.fi

    attached mail follows:


    Jens Winberg wrote: > I'm having trouble with the newest version of PHP (4.2.2). > For example in a page I'm using the following code: > if ($_GET['action'] == "logout") { > //do something > } > > But I'm getting an error message that says: > ...log_message reports: PHP Notice: Undefined index: action in.... > > Ealier (other versions of PHP) I have succesfully used the above > code, but do I now have to rewrite the code like this: > if (isset($_GET['action']) AND $_GET['action'] == "logout") { > //do something > } > > Or am I totally wrong? > This was just one example when I'm getting the message "Undefined > index" or " Undefined variable" etc. A lot of code which has > previously worked is now giving me loads of headache since I have to > rewrite everything.

    Heh, that can be solved by setting the error_reporting in the php.ini to "E_ALL & ~E_NOTICE" They can also be disabled by putting the line error_reporting( E_ALL & ~E_NOTICE ) at the first (second, after the <?php) line in your code.

    HTH Erwin

    attached mail follows:


    Hi, Can you help me? I want to send the button name to the another page when that button is pushed...Is it possible by using type="hidden" or I need to use another way ...??

    thanks alot

    meltem demirkus

    attached mail follows:


    a form with two buttons:

    ---
    <form action="script.php" method="post">
    <input type="submit" name="button" value="option 1" />
    <input type="submit" name="button" value="option 2" />
    </form>
    ---
    

    script.php --- if($_POST['button'] == "option 1") { echo "option 1 was clicked"; } elseif($_POST['button'] == "option 2") { echo "option 2 was clicked"; } ---

    I think there's an issue with what happens if they hit enter (which value get submitted? option1 or option2? But you should be able to do some testing pretty quick on that, and choose the order of the buttons.

    Everything above is not tested of course.

    HTH

    Justin

    on 06/09/02 5:30 PM, Meltem Demirkus (mdemirkusmomentum-dmt.com) wrote:

    > Hi, > Can you help me? > I want to send the button name to the another page when that button is > pushed...Is it possible by using type="hidden" or I need to use another way > ...?? > > thanks alot > > meltem demirkus >

    attached mail follows:


    im looking for a program which will take what is avaliable in the ENV variables and create a log file in the apache log file format. does anyone know of any existing scripts?

    what im trying to do is, run a log file analysis program for a website, but i have no logs from the apache server - i have to create my own.

    please help =D

    attached mail follows:


    im unable to access the web without first authenticating with the proxy. how can i still use fsockopen and authenticate myself with php?

    cheers

    attached mail follows:


    Hi there In my shop a had this code to add a product to the shoppingcart: session_start(); session_register("cart"); if($action == "addtocart") { $cart[] = "$id,$amount"; } To view the cart i had to explode the session_variable $cart and get more data from the database. session_start(); foreach($cart as $value) { $value = list($id, $amount) = explode(",", $value); echo "$id : $amount\n"; } This workt perfect bevor i hat to reinstall my Computer. Now i have php 4.2.2 and every time i want to add a product to the cart it overwrites my session_variable. So now i have only the newest variable in the session_variable. I've tried it with $_REQUEST, $_SESSION, import_request_variables() but none of them gives me my array back. Can you help me ?

    attached mail follows:


    > Hi, > I am using this on a page to move 'new_id' to another page: > > <input type="hidden" name "id" value="<? echo $new_id ?>"> > > and onthe other page I qm tring to get the data like this: > > $id= $_POST['id'] ; > > even I tried

    echo $new_id; (directly use the data) > but it is not working..WHY? > > > thanks > meltem demirkus >

    attached mail follows:


    you're missing an equals sign.

    try this: <input type="hidden" name="id" value="<? echo $new_id ?>">

    dave

    -----Original Message----- From: Meltem Demirkus [mailto:mdemirkusmomentum-dmt.com] Sent: Friday, September 06, 2002 1:42 AM To: php-generallists.php.net Subject: [PHP] cant find the wrong?

    > Hi, > I am using this on a page to move 'new_id' to another page: > > <input type="hidden" name "id" value="<? echo $new_id ?>"> > > and onthe other page I qm tring to get the data like this: > > $id= $_POST['id'] ; > > even I tried

    echo $new_id; (directly use the data) > but it is not working..WHY? > > > thanks > meltem demirkus >

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

    attached mail follows:


    I am correcting I used echo $id;

    but did not work

    thanks. meltem ----- Original Message ----- From: "Meltem Demirkus" <mdemirkusmomentum-dmt.com> To: <php-generallists.php.net> Sent: Friday, September 06, 2002 11:42 AM Subject: [PHP] cant find the wrong?

    > > > > Hi, > > I am using this on a page to move 'new_id' to another page: > > > > <input type="hidden" name "id" value="<? echo $new_id ?>"> > > > > and onthe other page I qm tring to get the data like this: > > > > $id= $_POST['id'] ; > > > > even I tried > > echo $new_id; (directly use the data) > > but it is not working..WHY? > > > > > > thanks > > meltem demirkus > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    if you have an array in javascript:

    array1 = [1,2,3,4,5,6,7,8,'test']; etc...

    you can join it in JavaScript to make it a one string as: array1 = array1.join('|');

    then split in PHP to make it back an array: <? $array1 = explode('|', $array1); ?>

    good luck,

    "Kale" <kaleonardohome.ro> wrote in message news:002c01c254cc$fe8eace0$7800a8c0leonard... > Hy, > I have an array make with a javascript. > How can I read values with PHP from it? > Kale. >

    attached mail follows:


    Is there anyway to direct my page to another after the php and output process work on the page?

    thanks meltem demirkus

    attached mail follows:


    Not quite sure what you are getting at here? A hyper link would direct the user to another page :-) If you mean after a timeout/auto-magically perhaps you can try meta refresh:

    http://www.htmlhelp.com/reference/html40/head/meta.html

    HTH -Brad

    Meltem Demirkus wrote: > Is there anyway to direct my page to another after the php and output > process work on the page? > > thanks > meltem demirkus > > >

    attached mail follows:


    > I mean I made a page with php and other stuff..And there is form .When I > click on okbutton php is dpoing what it should . But after want the page to > come to another link.I asked that before and they told me that .. there must > be no uotput but I am using <?...?> which means output.. > > so I dont know what to do.. > meltem > > > ----- Original Message ----- > From: "Brad Bonkoski" <bbonkosktampabay.rr.com> > To: "Meltem Demirkus" <mdemirkusmomentum-dmt.com> > Cc: <php-generallists.php.net> > Sent: Friday, September 06, 2002 12:36 PM > Subject: Re: [PHP] question about Location > > > > Not quite sure what you are getting at here? A hyper link would direct > > the user to another page :-) > > If you mean after a timeout/auto-magically perhaps you can try meta > refresh: > > > > http://www.htmlhelp.com/reference/html40/head/meta.html > > > > HTH > > -Brad > > > > Meltem Demirkus wrote: > > > Is there anyway to direct my page to another after the php and output > > > process work on the page? > > > > > > thanks > > > meltem demirkus > > > > > > > > > > > > > > > >

    attached mail follows:


    <? ?> doesn't mean output unless you use echo or print or whatever to output from there anything. Just use header("Location: yournewpage.php"); at the end.

    Meltem Demirkus wrote:

    >>I mean I made a page with php and other stuff..And there is form .When I >>click on okbutton php is dpoing what it should . But after want the page >> >> >to > > >>come to another link.I asked that before and they told me that .. there >> >> >must > > >>be no uotput but I am using <?...?> which means output.. >> >>so I dont know what to do.. >>meltem >> >> >>----- Original Message ----- >>From: "Brad Bonkoski" <bbonkosktampabay.rr.com> >>To: "Meltem Demirkus" <mdemirkusmomentum-dmt.com> >>Cc: <php-generallists.php.net> >>Sent: Friday, September 06, 2002 12:36 PM >>Subject: Re: [PHP] question about Location >> >> >> >> >>>Not quite sure what you are getting at here? A hyper link would direct >>>the user to another page :-) >>>If you mean after a timeout/auto-magically perhaps you can try meta >>> >>> >>refresh: >> >> >>>http://www.htmlhelp.com/reference/html40/head/meta.html >>> >>>HTH >>>-Brad >>> >>>Meltem Demirkus wrote: >>> >>> >>>>Is there anyway to direct my page to another after the php and output >>>>process work on the page? >>>> >>>>thanks >>>>meltem demirkus >>>> >>>> >>>> >>>> >>>> >>> >>> >>> > > > >

    attached mail follows:


    I tried , but it is giving this error:

    Warning: Cannot add header information - headers already sent by (output started at C:\FoxServ\www\debugger\project_module\project_update_.php:2) in C:\FoxServ\www\debugger\project_module\project_update_.php on line 37

    the line 2 is <? include "start_html.php" ?>

    and start_html.php includes:

    <? include("defaults.php") ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <HTML> <HEAD> <TITLE> <? echo $page_title ?></TITLE> <META http-equiv="Content-Type" content="text/html; charset=windows-1254"> </HEAD> <BODY>

    and line 37 is the header I wrote <? header("Location: yournewpage.php"); ?>

    ----- Original Message ----- From: "Marek Kilimajer" <kilimajerwebglobe.sk> To: "PHP" <php-generallists.php.net> Sent: Friday, September 06, 2002 12:55 PM Subject: Re: [PHP] question about Location

    > <? ?> doesn't mean output unless you use echo or print or whatever to > output from there anything. > Just use header("Location: yournewpage.php"); at the end. > > Meltem Demirkus wrote: > > >>I mean I made a page with php and other stuff..And there is form .When I > >>click on okbutton php is dpoing what it should . But after want the page > >> > >> > >to > > > > > >>come to another link.I asked that before and they told me that .. there > >> > >> > >must > > > > > >>be no uotput but I am using <?...?> which means output.. > >> > >>so I dont know what to do.. > >>meltem > >> > >> > >>----- Original Message ----- > >>From: "Brad Bonkoski" <bbonkosktampabay.rr.com> > >>To: "Meltem Demirkus" <mdemirkusmomentum-dmt.com> > >>Cc: <php-generallists.php.net> > >>Sent: Friday, September 06, 2002 12:36 PM > >>Subject: Re: [PHP] question about Location > >> > >> > >> > >> > >>>Not quite sure what you are getting at here? A hyper link would direct > >>>the user to another page :-) > >>>If you mean after a timeout/auto-magically perhaps you can try meta > >>> > >>> > >>refresh: > >> > >> > >>>http://www.htmlhelp.com/reference/html40/head/meta.html > >>> > >>>HTH > >>>-Brad > >>> > >>>Meltem Demirkus wrote: > >>> > >>> > >>>>Is there anyway to direct my page to another after the php and output > >>>>process work on the page? > >>>> > >>>>thanks > >>>>meltem demirkus > >>>> > >>>> > >>>> > >>>> > >>>> > >>> > >>> > >>> > > > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    Are you needing to output anything to your users before the page is sent to this new page? If not, then simple answer, don't send output before redirecting.

    Brief example (coming from a submitted form)

    <?php

    extract($_POST);

    if ($action) { // something's been submitted.

    // Process all of the information. If there are no errors, then get outta here. header("location: /formcomplete.php"); exit;

    }

    ?> <html> <!-- All of your form and other HTML here. --> </html>

    -James

    "Meltem Demirkus" <mdemirkusmomentum-dmt.com> wrote in message news:03ef01c2558e$923180f0$55000083hiborya... > I tried , but it is giving this error: > > Warning: Cannot add header information - headers already sent by (output > started at C:\FoxServ\www\debugger\project_module\project_update_.php:2) in > C:\FoxServ\www\debugger\project_module\project_update_.php on line 37 > > the line 2 is <? include "start_html.php" ?> > > and start_html.php includes: > > <? include("defaults.php") ?> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> > <HTML> > <HEAD> > <TITLE> <? echo $page_title ?></TITLE> > <META http-equiv="Content-Type" content="text/html; charset=windows-1254"> > </HEAD> > <BODY> > > > and line 37 is the header I wrote <? header("Location: yournewpage.php"); > ?> > > > ----- Original Message ----- > From: "Marek Kilimajer" <kilimajerwebglobe.sk> > To: "PHP" <php-generallists.php.net> > Sent: Friday, September 06, 2002 12:55 PM > Subject: Re: [PHP] question about Location > > > > <? ?> doesn't mean output unless you use echo or print or whatever to > > output from there anything. > > Just use header("Location: yournewpage.php"); at the end. > > > > Meltem Demirkus wrote: > > > > >>I mean I made a page with php and other stuff..And there is form .When > I > > >>click on okbutton php is dpoing what it should . But after want the > page > > >> > > >> > > >to > > > > > > > > >>come to another link.I asked that before and they told me that .. there > > >> > > >> > > >must > > > > > > > > >>be no uotput but I am using <?...?> which means output.. > > >> > > >>so I dont know what to do.. > > >>meltem > > >> > > >> > > >>----- Original Message ----- > > >>From: "Brad Bonkoski" <bbonkosktampabay.rr.com> > > >>To: "Meltem Demirkus" <mdemirkusmomentum-dmt.com> > > >>Cc: <php-generallists.php.net> > > >>Sent: Friday, September 06, 2002 12:36 PM > > >>Subject: Re: [PHP] question about Location > > >> > > >> > > >> > > >> > > >>>Not quite sure what you are getting at here? A hyper link would direct > > >>>the user to another page :-) > > >>>If you mean after a timeout/auto-magically perhaps you can try meta > > >>> > > >>> > > >>refresh: > > >> > > >> > > >>>http://www.htmlhelp.com/reference/html40/head/meta.html > > >>> > > >>>HTH > > >>>-Brad > > >>> > > >>>Meltem Demirkus wrote: > > >>> > > >>> > > >>>>Is there anyway to direct my page to another after the php and output > > >>>>process work on the page? > > >>>> > > >>>>thanks > > >>>>meltem demirkus > > >>>> > > >>>> > > >>>> > > >>>> > > >>>> > > >>> > > >>> > > >>> > > > > > > > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > >

    attached mail follows:


    see, if you output anything for the user, then you cannot use a header if your include files have echo/print statements or errors that are displayed then it is considered output.

    use JavaScript to redirect the page look up window.location=<url> in JavaScript reference embed that script in php.

    or else turn output buffering on. look up

    * http://www.zend.com/zend/art/buffering.php * http://www.phpbuilder.com/columns/argerich20010125.php3 (taken from php manual)

    -Naintara

    -----Original Message----- From: php-general-return-115425-naintara=del6.vsnl.net.inlists.php.net [mailto:php-general-return-115425-naintara=del6.vsnl.net.inlists.php.ne t]On Behalf Of Meltem Demirkus Sent: Friday, September 06, 2002 3:47 PM To: php-generallists.php.net Subject: Fw: [PHP] question about Location

    I tried , but it is giving this error:

    Warning: Cannot add header information - headers already sent by (output started at C:\FoxServ\www\debugger\project_module\project_update_.php:2) in C:\FoxServ\www\debugger\project_module\project_update_.php on line 37

    the line 2 is <? include "start_html.php" ?>

    and start_html.php includes:

    <? include("defaults.php") ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <HTML> <HEAD> <TITLE> <? echo $page_title ?></TITLE> <META http-equiv="Content-Type" content="text/html; charset=windows-1254"> </HEAD> <BODY>

    and line 37 is the header I wrote <? header("Location: yournewpage.php"); ?>

    ----- Original Message ----- From: "Marek Kilimajer" <kilimajerwebglobe.sk> To: "PHP" <php-generallists.php.net> Sent: Friday, September 06, 2002 12:55 PM Subject: Re: [PHP] question about Location

    > <? ?> doesn't mean output unless you use echo or print or whatever to > output from there anything. > Just use header("Location: yournewpage.php"); at the end. > > Meltem Demirkus wrote: > > >>I mean I made a page with php and other stuff..And there is form .When I > >>click on okbutton php is dpoing what it should . But after want the page > >> > >> > >to > > > > > >>come to another link.I asked that before and they told me that .. there > >> > >> > >must > > > > > >>be no uotput but I am using <?...?> which means output.. > >> > >>so I dont know what to do.. > >>meltem > >> > >> > >>----- Original Message ----- > >>From: "Brad Bonkoski" <bbonkosktampabay.rr.com> > >>To: "Meltem Demirkus" <mdemirkusmomentum-dmt.com> > >>Cc: <php-generallists.php.net> > >>Sent: Friday, September 06, 2002 12:36 PM > >>Subject: Re: [PHP] question about Location > >> > >> > >> > >> > >>>Not quite sure what you are getting at here? A hyper link would direct > >>>the user to another page :-) > >>>If you mean after a timeout/auto-magically perhaps you can try meta > >>> > >>> > >>refresh: > >> > >> > >>>http://www.htmlhelp.com/reference/html40/head/meta.html > >>> > >>>HTH > >>>-Brad > >>> > >>>Meltem Demirkus wrote: > >>> > >>> > >>>>Is there anyway to direct my page to another after the php and output > >>>>process work on the page? > >>>> > >>>>thanks > >>>>meltem demirkus > >>>> > >>>> > >>>> > >>>> > >>>> > >>> > >>> > >>> > > > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

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

    attached mail follows:


    Put your code that takes care of the post before the line 2, output the header and exit. Like this <? if($_POST['submit']) { .... do what needs to be done header("Location: nextpage.php"); exit; }

    include "start_html.php"

    Meltem Demirkus wrote:

    >I tried , but it is giving this error: > >Warning: Cannot add header information - headers already sent by (output >started at C:\FoxServ\www\debugger\project_module\project_update_.php:2) in >C:\FoxServ\www\debugger\project_module\project_update_.php on line 37 > >the line 2 is <? include "start_html.php" ?> > >and start_html.php includes: > ><? include("defaults.php") ?> ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> ><HTML> ><HEAD> ><TITLE> <? echo $page_title ?></TITLE> ><META http-equiv="Content-Type" content="text/html; charset=windows-1254"> ></HEAD> ><BODY> > > >and line 37 is the header I wrote <? header("Location: yournewpage.php"); >?> > > >----- Original Message ----- >From: "Marek Kilimajer" <kilimajerwebglobe.sk> >To: "PHP" <php-generallists.php.net> >Sent: Friday, September 06, 2002 12:55 PM >Subject: Re: [PHP] question about Location > > > > >><? ?> doesn't mean output unless you use echo or print or whatever to >>output from there anything. >>Just use header("Location: yournewpage.php"); at the end. >> >>Meltem Demirkus wrote: >> >> >> >>>>I mean I made a page with php and other stuff..And there is form .When >>>> >>>> >I > > >>>>click on okbutton php is dpoing what it should . But after want the >>>> >>>> >page > > >>>> >>>> >>>to >>> >>> >>> >>> >>>>come to another link.I asked that before and they told me that .. there >>>> >>>> >>>> >>>> >>>must >>> >>> >>> >>> >>>>be no uotput but I am using <?...?> which means output.. >>>> >>>>so I dont know what to do.. >>>>meltem >>>> >>>> >>>>----- Original Message ----- >>>>From: "Brad Bonkoski" <bbonkosktampabay.rr.com> >>>>To: "Meltem Demirkus" <mdemirkusmomentum-dmt.com> >>>>Cc: <php-generallists.php.net> >>>>Sent: Friday, September 06, 2002 12:36 PM >>>>Subject: Re: [PHP] question about Location >>>> >>>> >>>> >>>> >>>> >>>> >>>>>Not quite sure what you are getting at here? A hyper link would direct >>>>>the user to another page :-) >>>>>If you mean after a timeout/auto-magically perhaps you can try meta >>>>> >>>>> >>>>> >>>>> >>>>refresh: >>>> >>>> >>>> >>>> >>>>>http://www.htmlhelp.com/reference/html40/head/meta.html >>>>> >>>>>HTH >>>>>-Brad >>>>> >>>>>Meltem Demirkus wrote: >>>>> >>>>> >>>>> >>>>> >>>>>>Is there anyway to direct my page to another after the php and output >>>>>>process work on the page? >>>>>> >>>>>>thanks >>>>>>meltem demirkus >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> >>> >>> >>> >>> >>-- >>PHP General Mailing List (http://www.php.net/) >>To unsubscribe, visit: http://www.php.net/unsub.php >> >> >> >> > > > >

    attached mail follows:


    make sure there is no whitespace before first <?

    ----- Original Message ----- From: "Marek Kilimajer" <kilimajerwebglobe.sk> To: "PHP" <php-generallists.php.net> Sent: Friday, September 06, 2002 11:34 AM Subject: Re: Fw: [PHP] question about Location

    > Put your code that takes care of the post before the line 2, output the > header and exit. Like this > <? > if($_POST['submit']) { > .... do what needs to be done > header("Location: nextpage.php"); > exit; > } > > include "start_html.php" > > > Meltem Demirkus wrote: > > >I tried , but it is giving this error: > > > >Warning: Cannot add header information - headers already sent by (output > >started at C:\FoxServ\www\debugger\project_module\project_update_.php:2) in > >C:\FoxServ\www\debugger\project_module\project_update_.php on line 37 > > > >the line 2 is <? include "start_html.php" ?> > > > >and start_html.php includes: > > > ><? include("defaults.php") ?> > ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> > ><HTML> > ><HEAD> > ><TITLE> <? echo $page_title ?></TITLE> > ><META http-equiv="Content-Type" content="text/html; charset=windows-1254"> > ></HEAD> > ><BODY> > > > > > >and line 37 is the header I wrote <? header("Location: yournewpage.php"); > >?> > > > > > >----- Original Message ----- > >From: "Marek Kilimajer" <kilimajerwebglobe.sk> > >To: "PHP" <php-generallists.php.net> > >Sent: Friday, September 06, 2002 12:55 PM > >Subject: Re: [PHP] question about Location > > > > > > > > > >><? ?> doesn't mean output unless you use echo or print or whatever to > >>output from there anything. > >>Just use header("Location: yournewpage.php"); at the end. > >> > >>Meltem Demirkus wrote: > >> > >> > >> > >>>>I mean I made a page with php and other stuff..And there is form .When > >>>> > >>>> > >I > > > > > >>>>click on okbutton php is dpoing what it should . But after want the > >>>> > >>>> > >page > > > > > >>>> > >>>> > >>>to > >>> > >>> > >>> > >>> > >>>>come to another link.I asked that before and they told me that .. there > >>>> > >>>> > >>>> > >>>> > >>>must > >>> > >>> > >>> > >>> > >>>>be no uotput but I am using <?...?> which means output.. > >>>> > >>>>so I dont know what to do.. > >>>>meltem > >>>> > >>>> > >>>>----- Original Message ----- > >>>>From: "Brad Bonkoski" <bbonkosktampabay.rr.com> > >>>>To: "Meltem Demirkus" <mdemirkusmomentum-dmt.com> > >>>>Cc: <php-generallists.php.net> > >>>>Sent: Friday, September 06, 2002 12:36 PM > >>>>Subject: Re: [PHP] question about Location > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>>>Not quite sure what you are getting at here? A hyper link would direct > >>>>>the user to another page :-) > >>>>>If you mean after a timeout/auto-magically perhaps you can try meta > >>>>> > >>>>> > >>>>> > >>>>> > >>>>refresh: > >>>> > >>>> > >>>> > >>>> > >>>>>http://www.htmlhelp.com/reference/html40/head/meta.html > >>>>> > >>>>>HTH > >>>>>-Brad > >>>>> > >>>>>Meltem Demirkus wrote: > >>>>> > >>>>> > >>>>> > >>>>> > >>>>>>Is there anyway to direct my page to another after the php and output > >>>>>>process work on the page? > >>>>>> > >>>>>>thanks > >>>>>>meltem demirkus > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>> > >>>>> > >>>>> > >>> > >>> > >>> > >>> > >>-- > >>PHP General Mailing List (http://www.php.net/) > >>To unsubscribe, visit: http://www.php.net/unsub.php > >> > >> > >> > >> > > > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    ok thans , I am trying

    meltem

    > Meltem Demirkus wrote: > > >I tried , but it is giving this error: > > > >Warning: Cannot add header information - headers already sent by (output > >started at C:\FoxServ\www\debugger\project_module\project_update_.php:2) in > >C:\FoxServ\www\debugger\project_module\project_update_.php on line 37 > > > >the line 2 is <? include "start_html.php" ?> > > > >and start_html.php includes: > > > ><? include("defaults.php") ?> > ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> > ><HTML> > ><HEAD> > ><TITLE> <? echo $page_title ?></TITLE> > ><META http-equiv="Content-Type" content="text/html; charset=windows-1254"> > ></HEAD> > ><BODY> > > > > > >and line 37 is the header I wrote <? header("Location: yournewpage.php"); > >?> > > > > > >----- Original Message ----- > >From: "Marek Kilimajer" <kilimajerwebglobe.sk> > >To: "PHP" <php-generallists.php.net> > >Sent: Friday, September 06, 2002 12:55 PM > >Subject: Re: [PHP] question about Location > > > > > > > > > >><? ?> doesn't mean output unless you use echo or print or whatever to > >>output from there anything. > >>Just use header("Location: yournewpage.php"); at the end. > >> > >>Meltem Demirkus wrote: > >> > >> > >> > >>>>I mean I made a page with php and other stuff..And there is form .When > >>>> > >>>> > >I > > > > > >>>>click on okbutton php is dpoing what it should . But after want the > >>>> > >>>> > >page > > > > > >>>> > >>>> > >>>to > >>> > >>> > >>> > >>> > >>>>come to another link.I asked that before and they told me that .. there > >>>> > >>>> > >>>> > >>>> > >>>must > >>> > >>> > >>> > >>> > >>>>be no uotput but I am using <?...?> which means output.. > >>>> > >>>>so I dont know what to do.. > >>>>meltem > >>>> > >>>> > >>>>----- Original Message ----- > >>>>From: "Brad Bonkoski" <bbonkosktampabay.rr.com> > >>>>To: "Meltem Demirkus" <mdemirkusmomentum-dmt.com> > >>>>Cc: <php-generallists.php.net> > >>>>Sent: Friday, September 06, 2002 12:36 PM > >>>>Subject: Re: [PHP] question about Location > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>>>Not quite sure what you are getting at here? A hyper link would direct > >>>>>the user to another page :-) > >>>>>If you mean after a timeout/auto-magically perhaps you can try meta > >>>>> > >>>>> > >>>>> > >>>>> > >>>>refresh: > >>>> > >>>> > >>>> > >>>> > >>>>>http://www.htmlhelp.com/reference/html40/head/meta.html > >>>>> > >>>>>HTH > >>>>>-Brad > >>>>> > >>>>>Meltem Demirkus wrote: > >>>>> > >>>>> > >>>>> > >>>>> > >>>>>>Is there anyway to direct my page to another after the php and output > >>>>>>process work on the page? > >>>>>> > >>>>>>thanks > >>>>>>meltem demirkus > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>> > >>>>> > >>>>> > >>> > >>> > >>> > >>> > >>-- > >>PHP General Mailing List (http://www.php.net/) > >>To unsubscribe, visit: http://www.php.net/unsub.php > >> > >> > >> > >> > > > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    Hello

    I have A LOT of files that are already made, but does now Want to make a printerfriendly version of every file, but Ran into some problems

    How can i solve this without have to change every READILE.HTM files ??

    FILE 'DEFAULT.HTM' if (eregi ("PRINT.HTM", $PHP_SELF)) { exit; } HERE IT IS TEXT if (function_exists('write')) { call_user_func ('write'); } AND HERE THERE IS TEXT

    FILE 'READFILE.HTM' if(!isset($mainfile)) { include("DEFAULT.HTM"); } function innhold() { THE TEXT HERE MORE TEXT A LINK TO PRINT.HTM GOES HERE }

    FILE 'PRINT.HTM' $print = $HTTP_REFERER; ... HERE GOES CODES FOR BRAKING THE $print READY FOR INCLUDE include "$print"; if (function_exists('write')) { call_user_func ('write'); }

    Regards Bård Tommy Nilsen

    attached mail follows:


    Hi, Split the calculation up an use echo to find the problem.

    David Rice wrote:

    > Hi: > I am attempting to calculate a mortgage payment using the following code. > > <?PHP > $P = 100000; // principal outstanding > $I = 4.5; // annual interest rate percentage > $N = 20; // number of years > > // The formula that I am using > //(P*(((1+i/200)^(1/6)-1))/(1-(((1+i/200)^(1/6)))^-(n*12))) > > $Pmt = > $P*((pow(1+($I/200),(1/6))-1)/(1-pow(pow((1+$I/200),(1/6)),-($N*12)))); > > echo $Pmt; > ?> > > which produces: 630.40515566726 > > What I am looking for is 632.65 (rounded to 2 places). > > (I am not looking for a rounding mechanism, just a more accurate result) > The manual states that the pow function attempts to return an Integer. > Is this the source of the inaccurate result? > > The manual also says to look at exp but appears to be missing some > sort of usage example. I have no idea how that works. I tried a few > things with no success. > > I also came across a mention of bcpow() but am unable to use this in > the build that I am using. > > So is it some boneheaded coding error on my part or am I asking for > too much of pow()? > > Thanks > > David > >

    attached mail follows:


    4.09.2002, 17:48, Victor V. Evtushenko wrote:

    > Donpro wrote: >> Hi, >> >> Using I.E. 5.5. I can't seem to keep a page from caching. When I click on

    > Have you read "HOWTO: Prevent Caching in Internet Explorer"? > http://support.microsoft.com/default.aspx?scid=kb;EN-US;q234067

    According to the description I inserted "header('Expires: -1');" It is fine if it is Internet Explorer. But e.g. Opera ignore the header. After BACK it displays old content. I even switched off all cache options in preferences but it does not help.

    >> the browser BACK button, I get the cached page so I have to click on Refresh >> to get the actual page content. I've placed the following at the top of the >> HTML file but it doesn't seem to do anything. Any help would be appreciated.

    Krzysztof Dziekiewicz

    attached mail follows:


    I tried to use $HTTP_SERVER_VARS['HTTP_HOST'] but the result is null. Is there an option so I can turn it on? Please help.

    attached mail follows:


    Cirstoiu Aurel Sorin wrote: > I tried to use $HTTP_SERVER_VARS['HTTP_HOST'] but the result is null. > Is there an option so I can turn it on?

    If PHP > 4.1.0: try $_SERVER['HTTP_HOST'] instead. You can also set register_globals = On in the php.ini file (not recommended!)

    HTH Erwin

    attached mail follows:


    I also tried $_HTTP['HTTP_HOST']. Not working. The host has php 4.1.2 version

    --
    --------------------------------
    Cirstoiu Aurel Sorin
    InterAKT Support
    

    http://www.interakt.ro -------------------------------- "Erwin" <erwinisiz.com> wrote in message news:20020906100620.71126.qmailpb1.pair.com... > Cirstoiu Aurel Sorin wrote: > > I tried to use $HTTP_SERVER_VARS['HTTP_HOST'] but the result is null. > > Is there an option so I can turn it on? > > If PHP > 4.1.0: > try $_SERVER['HTTP_HOST'] instead. You can also set register_globals = On in > the php.ini file (not recommended!) > > HTH > Erwin > >

    attached mail follows:


    that's: $_SEVER['HTTP_HOST']

    Cirstoiu Aurel Sorin wrote: > I also tried $_HTTP['HTTP_HOST']. Not working. The host has php 4.1.2 > version > > -- > -------------------------------- > Cirstoiu Aurel Sorin > InterAKT Support > > http://www.interakt.ro > -------------------------------- > "Erwin" <erwinisiz.com> wrote in message > news:20020906100620.71126.qmailpb1.pair.com... > >>Cirstoiu Aurel Sorin wrote: >> >>>I tried to use $HTTP_SERVER_VARS['HTTP_HOST'] but the result is null. >>>Is there an option so I can turn it on? >> >>If PHP > 4.1.0: >>try $_SERVER['HTTP_HOST'] instead. You can also set register_globals = On > > in > >>the php.ini file (not recommended!) >> >>HTH >>Erwin >> >> > > > >

    attached mail follows:


    Yes, I ment $_SEVER['HTTP_HOST'] but I wrote wrong. Still nothing. What is the problem?? This should work but is not.

    --
    --------------------------------
    Cirstoiu Aurel Sorin
    InterAKT Support
    

    http://www.interakt.ro -------------------------------- "Brad Bonkoski" <bbonkosktampabay.rr.com> wrote in message news:3D7880B6.4060502tampabay.rr.com... > that's: $_SEVER['HTTP_HOST'] > > Cirstoiu Aurel Sorin wrote: > > I also tried $_HTTP['HTTP_HOST']. Not working. The host has php 4.1.2 > > version > > > > -- > > -------------------------------- > > Cirstoiu Aurel Sorin > > InterAKT Support > > > > http://www.interakt.ro > > -------------------------------- > > "Erwin" <erwinisiz.com> wrote in message > > news:20020906100620.71126.qmailpb1.pair.com... > > > >>Cirstoiu Aurel Sorin wrote: > >> > >>>I tried to use $HTTP_SERVER_VARS['HTTP_HOST'] but the result is null. > >>>Is there an option so I can turn it on? > >> > >>If PHP > 4.1.0: > >>try $_SERVER['HTTP_HOST'] instead. You can also set register_globals = On > > > > in > > > >>the php.ini file (not recommended!) > >> > >>HTH > >>Erwin > >> > >> > > > > > > > > > >

    attached mail follows:


    This is not the problem. I understand what you mean. Now you wrote wrong and I copy pasted. I tried with $_SERVER['HTTP_HOST'] . No effect.

    --
    --------------------------------
    Cirstoiu Aurel Sorin
    InterAKT Support
    

    http://www.interakt.ro -------------------------------- "Cirstoiu Aurel Sorin" <csorininterakt.ro> wrote in message news:20020906102016.89470.qmailpb1.pair.com... > Yes, I ment $_SEVER['HTTP_HOST'] > but I wrote wrong. > Still nothing. What is the problem?? > This should work but is not. > > -- > -------------------------------- > Cirstoiu Aurel Sorin > InterAKT Support > > http://www.interakt.ro > -------------------------------- > "Brad Bonkoski" <bbonkosktampabay.rr.com> wrote in message > news:3D7880B6.4060502tampabay.rr.com... > > that's: $_SEVER['HTTP_HOST'] > > > > Cirstoiu Aurel Sorin wrote: > > > I also tried $_HTTP['HTTP_HOST']. Not working. The host has php 4.1.2 > > > version > > > > > > -- > > > -------------------------------- > > > Cirstoiu Aurel Sorin > > > InterAKT Support > > > > > > http://www.interakt.ro > > > -------------------------------- > > > "Erwin" <erwinisiz.com> wrote in message > > > news:20020906100620.71126.qmailpb1.pair.com... > > > > > >>Cirstoiu Aurel Sorin wrote: > > >> > > >>>I tried to use $HTTP_SERVER_VARS['HTTP_HOST'] but the result is null. > > >>>Is there an option so I can turn it on? > > >> > > >>If PHP > 4.1.0: > > >>try $_SERVER['HTTP_HOST'] instead. You can also set register_globals = > On > > > > > > in > > > > > >>the php.ini file (not recommended!) > > >> > > >>HTH > > >>Erwin > > >> > > >> > > > > > > > > > > > > > > > > > >

    attached mail follows:


    How I show in IE source code of html page with php ?

    roman