[PHP] Re: unexpected T_SL
Voisine wrote: Hi, What is wrong witht his code? Parse error: parse error, unexpected T_SL in c:\program files\easyphp\www\tutorial\eod.php on line 2 ?php $str = EOD Example of string spanning multiple lines using heredoc syntax. EOD; ? To be honest, there is nothing wrong. It works in version 4.2.2 (at least, here it does) ;-)) Grtz Erwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] using shell_exec
Todd Pasley wrote: Use ; instead of | e.g. shell_exec(cd /change/to/dir; tar cvf /place/for/backup.tar files); Or, if you only want tar to execute after changing directories has succeeded, use instead of | e.g. shell_exec(cd /change/to/dir tar cvf /place/for/backup.tar files); Grtz Erwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] dumping mysql database with php script
I am having a problem with a script to dump a mysql database to a text file. When I run the command below it creates the database.sql file but it only puts the first three lines in that file they look like this # MySQL dump 8.13 # # Host: localhostDatabase: testdata1 # # Server version3.23.37 If I run the following at the command line it work perfect passing the whole database to the txt file /usr/bin/mysqldump -u testdata1 -ptestdata1 testdata1 /home/sites/www.directphp.net/sitebackup/databases/testdata1.sql Why is it stopping on the third line when I run it with a PHP script This is my script while($row = mysql_fetch_array($result)){ $databasename=$row[databasename]; $databaseusername=$row[$databaseusername]; $databasepassword=$row[$databasepassword]; exec(/usr/bin/mysqldump -u $databaseusername -p$databasepassword $databasename $Databasesdir/$databasename.sql); } -- Best regards, rdkurth mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP checkbox/hidden field question
I am executing the follwoing statement as part of a while loop. This is part of a form and I wish to pass the name and value of the checkbox as a hidden field only is the checkbox is checked. Can you suggest how I can accomplish this task? tdinput type=checkbox name=d_c_arr[] value=?php echo $db-f(order_id) ?/td As you might know, checkboxes don't have the VALUE attribute. HTML won't even submit the VALUE attribute to the next page. You will only have an array containing 0's and 1's, the results of the checkboxes. So, on the next page, you will have to lookup the values again. Then print the hidden input's to the page in a for loop, while looping trough $d_c_arr. HTH Erwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] dumping mysql database with php script
put the exec(...) line OUTSIDE the while loop.As your codeis now, it's dumping with each new row , so i'ts overwriting itself. On Mon, 2002-09-02 at 09:47, [EMAIL PROTECTED] wrote: I am having a problem with a script to dump a mysql database to a text file. When I run the command below it creates the database.sql file but it only puts the first three lines in that file they look like this # MySQL dump 8.13 # # Host: localhostDatabase: testdata1 # # Server version3.23.37 If I run the following at the command line it work perfect passing the whole database to the txt file /usr/bin/mysqldump -u testdata1 -ptestdata1 testdata1 /home/sites/www.directphp.net/sitebackup/databases/testdata1.sql Why is it stopping on the third line when I run it with a PHP script This is my script while($row = mysql_fetch_array($result)){ $databasename=$row[databasename]; $databaseusername=$row[$databaseusername]; $databasepassword=$row[$databasepassword]; exec(/usr/bin/mysqldump -u $databaseusername -p$databasepassword $databasename $Databasesdir/$databasename.sql); } -- Best regards, rdkurth mailto:[EMAIL PROTECTED] -- 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
Re[2]: [PHP] dumping mysql database with php script
Hello Petre, There is more than one database to back up so every time it runs through the while loop it is suppose to back up the next database and it changes the name of the text file it is sending it to. I have already tried just doing one database without the while loop and I get the same results. So it is not an over writing problem But Thanks anyway Monday, September 02, 2002, 12:51:12 AM, you wrote: PA put the exec(...) line OUTSIDE the while loop.As your codeis now, it's PA dumping with each new row , so i'ts overwriting itself. PA On Mon, 2002-09-02 at 09:47, [EMAIL PROTECTED] wrote: I am having a problem with a script to dump a mysql database to a text file. When I run the command below it creates the database.sql file but it only puts the first three lines in that file they look like this # MySQL dump 8.13 # # Host: localhostDatabase: testdata1 # # Server version3.23.37 If I run the following at the command line it work perfect passing the whole database to the txt file /usr/bin/mysqldump -u testdata1 -ptestdata1 testdata1 /home/sites/www.directphp.net/sitebackup/databases/testdata1.sql Why is it stopping on the third line when I run it with a PHP script This is my script while($row = mysql_fetch_array($result)){ $databasename=$row[databasename]; $databaseusername=$row[$databaseusername]; $databasepassword=$row[$databasepassword]; exec(/usr/bin/mysqldump -u $databaseusername -p$databasepassword $databasename $Databasesdir/$databasename.sql); } -- Best regards, rdkurth mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Best regards, rdkurthmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] dumping mysql database with php script
I figured it out it was a permission problem with database username and password Monday, September 02, 2002, 12:51:12 AM, you wrote: PA put the exec(...) line OUTSIDE the while loop.As your codeis now, it's PA dumping with each new row , so i'ts overwriting itself. PA On Mon, 2002-09-02 at 09:47, [EMAIL PROTECTED] wrote: I am having a problem with a script to dump a mysql database to a text file. When I run the command below it creates the database.sql file but it only puts the first three lines in that file they look like this # MySQL dump 8.13 # # Host: localhostDatabase: testdata1 # # Server version3.23.37 If I run the following at the command line it work perfect passing the whole database to the txt file /usr/bin/mysqldump -u testdata1 -ptestdata1 testdata1 /home/sites/www.directphp.net/sitebackup/databases/testdata1.sql Why is it stopping on the third line when I run it with a PHP script This is my script while($row = mysql_fetch_array($result)){ $databasename=$row[databasename]; $databaseusername=$row[$databaseusername]; $databasepassword=$row[$databasepassword]; exec(/usr/bin/mysqldump -u $databaseusername -p$databasepassword $databasename $Databasesdir/$databasename.sql); } -- Best regards, rdkurth mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Best regards, rdkurthmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: unexpected T_SL
Hi Erwin, Monday, September 2, 2002, 11:28:09 AM, I've got: E Voisine wrote: Hi, What is wrong witht his code? Parse error: parse error, unexpected T_SL in c:\program files\easyphp\www\tutorial\eod.php on line 2 ?php $str = EOD Example of string spanning multiple lines using heredoc syntax. EOD; ? E To be honest, there is nothing wrong. It works in version 4.2.2 (at least, E here it does) ;-)) E Grtz Erwin Why not to try ?php $str = EOT ??? It seems to me, that EOD - End Of Data, and EOT - End Of Text Silly, but why not to try? :) -- The Same, Steelmailto:[EMAIL PROTECTED] http://www.none.ru -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Imagemagick
Hi, I want to use Imagemagick together with PHP, but I'm not able to find some documentation for it. I've read, that some people are buildung an PHP Module for Imagemagick. And how is the --with-imagemagick command working, when I compile PHP? Is it possible to compile Imagemagick into PHP on a Windows System for testing? Or is it just better to set up an Linux Webserver for my test runs. Where can I find some docs? PLEASE HELP Schura
[PHP] Am I just being stupid or something?
Ok whats going on here: echo Location: .$_SESSION[Project][location]; // above echo's Location: 0 if($_SESSION[Project][location] !=){ if (checkAccess(folder, $_SESSION[Project][location], create)){ newfile(); }else{ reportError(1, Access Denied); } }else{ fatelError(1, Session Location Error); } Ok $_SESSION[Project][location] is set to 0 but for some reason it always calls fatelError? even tho $_SESSION[Project][location] is set to 0 can anyone see anything wrong? is 0 treated as null or something? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: str_replace question
Hello, i have array $reserved_words which i want to replace with bold .. but when i tried to do str_replace($reserved_words, b.$reserved_words./b, $string) it showed Array instead of bword/b if i simply do str_replace($reserved_words, $reserved_words, $string) then it shows the words not Array but not in bold ;) I know i could use 2 arrays one with bold words one without or i could use foreach but i want a simpler solution :)... Any suggestions That does make sence. You try to append b and prepend /b to an array, which will (of course) be converted to string then. Result is that you're call to the str_replaced function can also be written as: str_replace( $reserved_words, 'bArray/b', $string ) which is definitely not what you want! You have two options: a) Create another array of reserved_words, only then appended and prepended with b and /b b) Use the code from Olinux Option B sounds best to me ;-)) HTH Erwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 2 Sep 2002 09:32:28 -0000 Issue 1561
php-general Digest 2 Sep 2002 09:32:28 - Issue 1561 Topics (messages 114851 through 114887): dumping mysql database with php script 114851 by: rdkurth.starband.net 114879 by: rdkurth.starband.net 114881 by: Petre Agenbag 114882 by: rdkurth.starband.net 114883 by: rdkurth.starband.net Re: str_replace question 114852 by: Gregor J 114853 by: olinux 114887 by: Erwin using shell_exec 114854 by: rdkurth.starband.net 114871 by: Todd Pasley 114873 by: Todd Pasley 114876 by: rdkurth.starband.net 114878 by: Erwin fopen() and flock() 114855 by: David McInnis Chaillan-Re: [PHP] Re: PHP shopping 114856 by: Ryan A PHP checkbox/hidden field question 114857 by: Paul Maine 114880 by: Erwin Imap Open Timeout 114858 by: Andy Chapman Re: addslashes($variable)? 114859 by: Justin French Re: PHP shopping 114860 by: Justin French 114861 by: David T-G Re: Imagemangick, can I install on a virtual host? 114862 by: David T-G unexpected T_SL 114863 by: Voisine 114864 by: Peter Houchin 114865 by: Voisine 114877 by: Erwin 114884 by: Steel Escape characters won't go away 114866 by: Mike Mannakee 114868 by: Justin French 114869 by: Mike Mannakee regex help 114867 by: Gerard Samuel linking to secure ssl page using php and Microsoft Explorer - general error serviing up page from MSE... Netscape works fine 114870 by: phplist Still cannot get gd graphics to work 114872 by: David Herring Re: Average Number For Math Functions 114874 by: David Robley Re: Mail problem 114875 by: David Robley Imagemagick 114885 by: Sascha Braun Am I just being stupid or something? 114886 by: Francis Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- ---BeginMessage--- I am having a problem with a script to dump a mysql database to a text file. When I run the command below it creates the database.sql file but it only puts the first three lines in that file they look like this # MySQL dump 8.13 # # Host: localhostDatabase: testdata1 # # Server version3.23.37 If I run the following at the command line it work perfect passing the whole database to the txt file /usr/bin/mysqldump -u testdata1 -ptestdata1 testdata1 /home/sites/www.directphp.net/sitebackup/databases/testdata1.sql Why is it stopping on the third line when I run it with a PHP script This is my script $sql=Select * from datba where domname = '$domname'; $results=safe_query($sql); while($row = mysql_fetch_array($result)){ $databasename=$row[databasename]; $databaseusername=$row[$databaseusername]; $databasepassword=$row[$databasepassword]; exec(/usr/bin/mysqldump -u $databaseusername -p$databasepassword $databasename $Databasesdir/$databasename.sql); } -- Best regards, rdkurth mailto:[EMAIL PROTECTED] ---End Message--- ---BeginMessage--- I am having a problem with a script to dump a mysql database to a text file. When I run the command below it creates the database.sql file but it only puts the first three lines in that file they look like this # MySQL dump 8.13 # # Host: localhostDatabase: testdata1 # # Server version3.23.37 If I run the following at the command line it work perfect passing the whole database to the txt file /usr/bin/mysqldump -u testdata1 -ptestdata1 testdata1 /home/sites/www.directphp.net/sitebackup/databases/testdata1.sql Why is it stopping on the third line when I run it with a PHP script This is my script while($row = mysql_fetch_array($result)){ $databasename=$row[databasename]; $databaseusername=$row[$databaseusername]; $databasepassword=$row[$databasepassword]; exec(/usr/bin/mysqldump -u $databaseusername -p$databasepassword $databasename $Databasesdir/$databasename.sql); } -- Best regards, rdkurth mailto:[EMAIL PROTECTED] ---End Message--- ---BeginMessage--- put the exec(...) line OUTSIDE the while loop.As your codeis now, it's dumping with each new row , so i'ts overwriting itself. On Mon, 2002-09-02 at 09:47, [EMAIL PROTECTED] wrote: I am having a problem with a script to dump a mysql database to a text file. When I run the command below it creates the database.sql file but it only puts the first three lines in that file they look like this # MySQL dump 8.13 # # Host: localhostDatabase: testdata1 # # Server version3.23.37 If I run the
[PHP] Re: getimagesize with image in database
Chaillan Nicolas wrote: Hi, There is no way to get the filesize of a file using a remote file. That's not true. GetImageSize works also on remote files. here's my code $imagesize = getimagesize(http://domain/image.jpg); echo $imagesize[3]; but it returns nothing. If I use a local file, without http it works. But I have no clue what's the problem here. Are you sure the file exists? Grtz Erwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Q:Making an 'expired event' for sessions
Mehran Ziadloo wrote: Hi Thanks for replying, There are some settings for sessions in php.ini but I can't find the thing that I'm looking for. It should exist, I mean isn't there any one who needs to know when the session has expired? Once again I ask my question: How to make a session_on_end event in php? Any help will be appreciated. That's not possible. The session is there, or it's not there. You cannot check if it WAS there. Sounds to me like a nice feature though! You can always make your own solution. Like...set a cookie which says that there is a session. If the session is gone, you can check that by checking the cookie and checking for a session. If the cookie states that there is a session, but there is no session, you know that it's gone. HTH Erwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: turn off a warning with $GET_['var'];
Peter Mr. Eps Thoenen wrote: Hello, trying to figure a way to turn off the following warning. doesn't seem to work neither does switch (isset($_GET['status'])){ Notice: Undefined index: status in E:\php\tt\index.php on line 6 switch ($_GET['status']){ try array_key_exists instead of isset. Neither isset nor array_key_exists should give warning messages. Maybe you have a very high errorlevel? Isset doens't give warnings if E_NOTICE is set as errorlevel. Grtz Erwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to escape in hidden field?
Hello! I have a simple hidden input-field like INPUT TYPE=HIDDEN VALUE=Hello world NAME=Message Now sometimes I need to insert like: INPUT TYPE=HIDDEN VALUE=Hello \world\ NAME=Message But this makes PHP (or the browser?) cutting of the string after Hello . How can I escape the ? Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: posting form values doesn't work
ØYstein HåLand wrote: This is my form: FORM NAME=answerform METHOD=POST Your name:BRINPUT TYPE=TEXT NAME=name SIZE=20 Group:BRINPUT TYPE=TEXT NAME=group SIZE=8nbsp;nbsp; INPUT TYPE=BUTTON VALUE= OK! onClick=Javascript:validate(this); /FORM and the function validate: function validate() { [ CUT Javascript code ] location.href='groups/collect_answer.php?name=?php echo $name; ?group=?php echo $group; ?'; [ CUT Javascript code ] At first I thought is was JavaScript/HTML code, but I can see a little bit PHP now ;-)) The reason that it doens't work is simple. The variables are only available AFTER posting the form. Not during validation! You should just use Javascript to fill in the name and group into the URL. Grtz Erwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: How to escape in hidden field?
Martin Thoma wrote: Hello! I have a simple hidden input-field like INPUT TYPE=HIDDEN VALUE=Hello world NAME=Message Now sometimes I need to insert like: INPUT TYPE=HIDDEN VALUE=Hello \world\ NAME=Message But this makes PHP (or the browser?) cutting of the string after Hello . How can I escape the ? Using the htmlspecialchars() function, so that Hello \world\ will be written in pure HTML: Hello quot;worldquot; HTH Erwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: How to escape in hidden field?
Using the htmlspecialchars() function, so that Hello \world\ will be written in pure HTML: Hello quot;worldquot; Thanx a lot! But how do I get it back to 'Hello world'? Do I have to do it manually? Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: How to escape in hidden field?
Hi Martin, Monday, September 2, 2002, 2:21:10 PM, ß ïîëó÷èë: Using the htmlspecialchars() function, so that Hello \world\ will be written in pure HTML: Hello quot;worldquot; MT Thanx a lot! But how do I get it back to 'Hello world'? Do I have to do it MT manually? MT Martin Yep. But you can use some Regexp features. EX: $string = preg_replace(/\$quot/,\,Hello quot;worldquot;); -- The Same, Steelmailto:[EMAIL PROTECTED] http://www.none.ru -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: PHP checkbox/hidden field question
you need to define the key for checkbox arrays in order to distinguish them (as only the checked ones will be posted).. something like ... tdinput type=checkbox name=d_c_arr[?php echo($count++); ?]/td Tim Ward www.chessish.com -Original Message- From: Paul Maine [mailto:[EMAIL PROTECTED]] Sent: 02 September 2002 00:56 To: PHP PHP Subject: PHP checkbox/hidden field question I am executing the follwoing statement as part of a while loop. This is part of a form and I wish to pass the name and value of the checkbox as a hidden field only is the checkbox is checked. Can you suggest how I can accomplish this task? tdinput type=checkbox name=d_c_arr[] value=?php echo $db-f(order_id) ?/td Thank You Paul php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] coockie expiration problems
Hi there, I am trying to save a var inside a cookie for a certain time (in this example 10s): setcookie('referrer', $user_id, time()+10); //expires in one hour Now I would like to get the value, but only if the coockie is valid (if cockie not older than 10 s in this example) echo 'referrer: '.$_COOKIE[referrer]; Unfortunatelly this does not work, the cockie value is always valid, even after expiration time. What am I doing wrong? Thanx for any help on that, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Am I just being stupid or something?
Hi, Yes sometimes it is treated as null. You should reconsider your code and use empty() and not != . -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet Francis [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] Ok whats going on here: echo Location: .$_SESSION[Project][location]; // above echo's Location: 0 if($_SESSION[Project][location] !=){ if (checkAccess(folder, $_SESSION[Project][location], create)){ newfile(); }else{ reportError(1, Access Denied); } }else{ fatelError(1, Session Location Error); } Ok $_SESSION[Project][location] is set to 0 but for some reason it always calls fatelError? even tho $_SESSION[Project][location] is set to 0 can anyone see anything wrong? is 0 treated as null or something? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: linking to secure ssl page using php and Microsoft Explorer - general error serviing up page from MSE... Netscape works fine
Hi, No, this has nothing to do to with us, call Microsoft or get Linux. -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet Phplist [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] Get general MSE error when using PHP to go from a non-secure page to an ssl page. If I use the back button and try it again it will work, so the code seems solid. Does not fail on Netscape. I heard that there is a Microsoft Explorer issue with secure pages and/or php. Any ideas on how to resolve? Stan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: fopen() and flock()
Hi, You should use a while(!feof) syntax so that can verify that the file is not empty. You should also use $text = implode(,@file($filename)); Thats the easiest way to read a file. It will put each lines into an array and you will just implode it into a variable -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet David McInnis [EMAIL PROTECTED] a écrit dans le message de news: 021001c25210$21c38010$[EMAIL PROTECTED] I use fopen() in a template system that I have developed. I noticed that occasionally I get blank pages served up. Here is one of my snippets. $filename = $ROOTDIR/content/myfile.txt; $fd = fopen ($filename, r); $PAGE_CONTENT = fread ($fd, filesize ($filename)); fclose ($fd); Doing this I get the contents of the file read into the $PAGE_CONTENT variable. I never use fopen() to write to files. Only read with the r directive. So what could be causing my conflicts? Do I need to flock the file to shared? I am running Linux PHP, Apache and Linux. David McInnis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: How to escape in hidden field?
Hi, Its really stupid to use that command because there is not any function to come back to the real way. You should just addslashes() to it then remove them. -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hebergement Group. www.WorldAKT.com - Hebergement de sites Internet Steel [EMAIL PROTECTED] a ecrit dans le message de news: [EMAIL PROTECTED] Hi Martin, Monday, September 2, 2002, 2:21:10 PM, ß ïîëó÷èë: Using the htmlspecialchars() function, so that Hello \world\ will be written in pure HTML: Hello quot;worldquot; MT Thanx a lot! But how do I get it back to 'Hello world'? Do I have to do it MT manually? MT Martin Yep. But you can use some Regexp features. EX: $string = preg_replace(/\$quot/,\,Hello quot;worldquot;); -- The Same, Steelmailto:[EMAIL PROTECTED] http://www.none.ru -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: coockie expiration problems
Hi, I see really nothing wrong in your example. Did you tried to verify with isset() if the cookie is still here or not? And well, you should use double quote on setcookie(referrer, $user_id, time()+10); You call should be also $_COOKIE['referrer'] and not $_COOKIE[referrer]. -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet Andy [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] Hi there, I am trying to save a var inside a cookie for a certain time (in this example 10s): setcookie('referrer', $user_id, time()+10); //expires in one hour Now I would like to get the value, but only if the coockie is valid (if cockie not older than 10 s in this example) echo 'referrer: '.$_COOKIE[referrer]; Unfortunatelly this does not work, the cockie value is always valid, even after expiration time. What am I doing wrong? Thanx for any help on that, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: mail() again...
what is recommended to use instead of mail() then? cheers Manuel Lemos [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, On 09/01/2002 02:30 AM, Liam Mackenzie wrote: It seems nearly everyone has a problem with this function, probably because it relies on third party software. Yes, mail() is probably the most problematic of the frequently used functions of PHP. That can be for many reasons like the need for manual configuration of PHP, useless/meaningless or non-existing error messages produced by mail(), inconsistent documentation of mail() in PHP manual, installation problems of the MTA, configuration problems of the user networks, anti-spam measures, etc... The main difficulty is that it takes a lot of expertise to figure out which of these problems are affecting you. It doesn't work. That's my problem! I'm using Sendmail as my MTA, not running as a Daemon as I have POP3/SMTP server running on the same machine (eXtremail) I'm starting Sendmail like this: /usr/lib/sendmail -q1h When I do this: $this = mail([EMAIL PROTECTED], Subject, Message goes here); echo $this; The scripts hangs, and eventually my browser times out. Is there any way I can get some error messages? Or at least get it to tell me what on earth it's doing? Adding -v to the configuration of sendmail in php.ini may provide you a clue. Anyway, my guess is that your machine may not have a reverse DNS address. What is its IP? There's nothing in any of my Apache logs, nothing in eXtremail's logs, but I get this in my syslog... Sep 1 15:28:01 nudenurd sendmail[19146]: g815S1fW019146: from=nobody, size=63, class=0, nrcpts=1, msgid=[EMAIL PROTECTED], relay=nobody@localhost It seems you are missing seting th return-path. Use mail() 5th argument. Anyone got any ideas? Anyone know if there's any docs on this kind of thing? I looked, I failed... Or where I can get some information on where to get an alternate MTA that WORKS out of the box (or tar.gz) If all else fails, you may want to try this PHP class, with several variants that let you send messages by several methods besides mail(), like: using sendmail directly, using qmail-inject or even relay on specific SMTP server or even the most drastic measure that is to send messages directly to the receipient SMTP server. http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: How to escape in hidden field?
Hi, Its really stupid to use that command because there is not any function to come back to the real way. You should just addslashes() to it then remove them. Hi Nicos, unfortunalty, it doesn't work to use stripslashes: When using: INPUT TYPE=HIDDEN VALUE=Hello \world\ NAME=Message (which is the same the stripslashes would produce), the field gets the value Hello . Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] why is html code written like this? hr /
When I learned html it was always written like this: /hr now I see people write it like this: hr /... why? - Victor www.argilent.com __ Post your free ad now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] why is html code written like this? hr /
thats xhtml - it's xml comliant html. tags must be closed so a tag like hr which didn't have a closing tag is written hr / so,for example in php the nl2br() function now produces br / instead of the old br - Original Message - From: Victor [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 02, 2002 12:16 PM Subject: [PHP] why is html code written like this? hr / When I learned html it was always written like this: /hr now I see people write it like this: hr /... why? - Victor www.argilent.com __ Post your free ad now! http://personals.yahoo.ca -- 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
Re: [PHP] Re: PHP checkbox/hidden field question
You are wrong, this is from HTML 4.01 specification: value = /cdata/ cid:[EMAIL PROTECTED] [CA] cid:[EMAIL PROTECTED] This attribute specifies the initial value cid:[EMAIL PROTECTED] of the control. It is optional except when the type cid:[EMAIL PROTECTED] attribute has the value radio or checkbox. Upon submiting a form, only successfull checkboxes are submited, so on the next page you only need this loop: foreach($d_c_arr as $i) { echo 'input type=hidden name=d_c_arr[] value='. htmlspecialchars($i).''; } $d_c_arr contains only checked checkboxes. Marek Erwin wrote: I am executing the follwoing statement as part of a while loop. This is part of a form and I wish to pass the name and value of the checkbox as a hidden field only is the checkbox is checked. Can you suggest how I can accomplish this task? tdinput type=checkbox name=d_c_arr[] value=?php echo $db-f(order_id) ?/td As you might know, checkboxes don't have the VALUE attribute. HTML won't even submit the VALUE attribute to the next page. You will only have an array containing 0's and 1's, the results of the checkboxes. So, on the next page, you will have to lookup the values again. Then print the hidden input's to the page in a for loop, while looping trough $d_c_arr. HTH Erwin
[PHP] Re: why is html code written like this? hr /
hr tag does not need a closing tag, therefore you don't write /hr. Now TAG NAME / tags are used to make the document compatible with XHTML, XML ... Victor [EMAIL PROTECTED] wrote in message 01c25272$357e6360$a3a96518@jumpy">news:01c25272$357e6360$a3a96518@jumpy... When I learned html it was always written like this: /hr now I see people write it like this: hr /... why? - Victor www.argilent.com __ Post your free ad now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] why is html code written like this? hr /
Ok, but is this kind of html compliant with old browsers like Netscape 4? Is it compliant with most new browsers? - Victor www.argilent.com -Original Message- From: Adrian Murphy [mailto:[EMAIL PROTECTED]] Sent: Monday, September 02, 2002 7:13 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] why is html code written like this? hr / thats xhtml - it's xml comliant html. tags must be closed so a tag like hr which didn't have a closing tag is written hr / so,for example in php the nl2br() function now produces br / instead of the old br - Original Message - From: Victor [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 02, 2002 12:16 PM Subject: [PHP] why is html code written like this? hr / When I learned html it was always written like this: /hr now I see people write it like this: hr /... why? - Victor www.argilent.com __ Post your free ad now! http://personals.yahoo.ca -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: mail() again...
Hello, On 09/02/2002 07:59 AM, :B Nerdy wrote: what is recommended to use instead of mail() then? It depends on what is your problem. In most cases mail will do taking some care that may be platform dependent like the header line break issues that have to be \r\n under Windows but under Unix with sendmail or wrappers you'd better use \n . Anyway, if you use the class I mentioned you will be able to choose exactly the transport method that suits better your needs and platform constraints. In your case, maybe using the sendmail sub-class will give you enough control because it lets you call sendmail program wherever it is in your disk passing any command line switches to better control its operation without depending on any php.ini (except for safe mode that has to be off). Manuel Lemos cheers Manuel Lemos [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, On 09/01/2002 02:30 AM, Liam Mackenzie wrote: It seems nearly everyone has a problem with this function, probably because it relies on third party software. Yes, mail() is probably the most problematic of the frequently used functions of PHP. That can be for many reasons like the need for manual configuration of PHP, useless/meaningless or non-existing error messages produced by mail(), inconsistent documentation of mail() in PHP manual, installation problems of the MTA, configuration problems of the user networks, anti-spam measures, etc... The main difficulty is that it takes a lot of expertise to figure out which of these problems are affecting you. It doesn't work. That's my problem! I'm using Sendmail as my MTA, not running as a Daemon as I have POP3/SMTP server running on the same machine (eXtremail) I'm starting Sendmail like this: /usr/lib/sendmail -q1h When I do this: $this = mail([EMAIL PROTECTED], Subject, Message goes here); echo $this; The scripts hangs, and eventually my browser times out. Is there any way I can get some error messages? Or at least get it to tell me what on earth it's doing? Adding -v to the configuration of sendmail in php.ini may provide you a clue. Anyway, my guess is that your machine may not have a reverse DNS address. What is its IP? There's nothing in any of my Apache logs, nothing in eXtremail's logs, but I get this in my syslog... Sep 1 15:28:01 nudenurd sendmail[19146]: g815S1fW019146: from=nobody, size=63, class=0, nrcpts=1, msgid=[EMAIL PROTECTED], relay=nobody@localhost It seems you are missing seting th return-path. Use mail() 5th argument. Anyone got any ideas? Anyone know if there's any docs on this kind of thing? I looked, I failed... Or where I can get some information on where to get an alternate MTA that WORKS out of the box (or tar.gz) If all else fails, you may want to try this PHP class, with several variants that let you send messages by several methods besides mail(), like: using sendmail directly, using qmail-inject or even relay on specific SMTP server or even the most drastic measure that is to send messages directly to the receipient SMTP server. http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: PHP checkbox/hidden field question
Some check box info here too: http://www.experts-exchange.com/Web/Web_Languages/PHP/Q_20117420.html - Victor www.argilent.com -Original Message- From: Marek Kilimajer [mailto:[EMAIL PROTECTED]] Sent: Monday, September 02, 2002 7:24 AM To: PHP Subject: Re: [PHP] Re: PHP checkbox/hidden field question You are wrong, this is from HTML 4.01 specification: value = /cdata/ cid:[EMAIL PROTECTED] [CA] cid:[EMAIL PROTECTED] This attribute specifies the initial value cid:[EMAIL PROTECTED] of the control. It is optional except when the type cid:[EMAIL PROTECTED] attribute has the value radio or checkbox. Upon submiting a form, only successfull checkboxes are submited, so on the next page you only need this loop: foreach($d_c_arr as $i) { echo 'input type=hidden name=d_c_arr[] value='. htmlspecialchars($i).''; } $d_c_arr contains only checked checkboxes. Marek Erwin wrote: I am executing the follwoing statement as part of a while loop. This is part of a form and I wish to pass the name and value of the checkbox as a hidden field only is the checkbox is checked. Can you suggest how I can accomplish this task? tdinput type=checkbox name=d_c_arr[] value=?php echo $db-f(order_id) ?/td As you might know, checkboxes don't have the VALUE attribute. HTML won't even submit the VALUE attribute to the next page. You will only have an array containing 0's and 1's, the results of the checkboxes. So, on the next page, you will have to lookup the values again. Then print the hidden input's to the page in a for loop, while looping trough $d_c_arr. HTH Erwin __ Post your ad for free now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] how do I send information to a php page from a menu list
Hello, how do I send information to a php page from a menu list? When a user selects an item from the list I would like to be able to send selcategoryid to faqbycat.php without the use of a submit button. Is it done by using the onChange event? if so how may this be done? The code I am using presently is below form action=faqbycat.php select name=selcategoryid value=0 option name=selcategoryid value=0 selectedSelect a Category/option ?php //display list of provider names while ($myrowcating=MySQL_fetch_array($resultcatdet)) { $faqcatsid=stripslashes($myrowcating[breastfaqcatid]); $faqcats=stripslashes($myrowcating[breastfaqcat]); echo option name=\selcategoryid\ value=\$faqcatsid\$faqcats/option; }//while ($myrowadmintitles=MySQL_fetch_array($admintilteresult)) ? /select brbr input type=Submit name=selbycat value=Show FAQ's by Category /form Thanks for your answer, Ivan
[PHP] imagecreatetruecolor is slow
hi i have compared imagecreatetruecolor,imagecopyresampled to imagecreate,imagecopyresized and it is really slow, anyway of optimising this ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] why is html code written like this? hr /
The entire point of xx / is backwards compatibility. Read the spec http://www.w3.org/TR/xhtml1/ -B -Original Message- From: Victor [mailto:[EMAIL PROTECTED]] Sent: Monday, September 02, 2002 7:35 AM To: 'Adrian Murphy'; [EMAIL PROTECTED] Subject: RE: [PHP] why is html code written like this? hr / Ok, but is this kind of html compliant with old browsers like Netscape 4? Is it compliant with most new browsers? - Victor www.argilent.com -Original Message- From: Adrian Murphy [mailto:[EMAIL PROTECTED]] Sent: Monday, September 02, 2002 7:13 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] why is html code written like this? hr / thats xhtml - it's xml comliant html. tags must be closed so a tag like hr which didn't have a closing tag is written hr / so,for example in php the nl2br() function now produces br / instead of the old br - Original Message - From: Victor [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 02, 2002 12:16 PM Subject: [PHP] why is html code written like this? hr / When I learned html it was always written like this: /hr now I see people write it like this: hr /... why? - Victor www.argilent.com __ Post your free ad now! http://personals.yahoo.ca -- 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 -- 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
[PHP] Re: how do I send information to a php page from a menu list
Hello Ivan, select name=selcategoryid value=0 Don't set a value for that tag! echo option name=\selcategoryid\ value=\$faqcatsid\$faqcats/option; no need to name the option tag too, setting the value will be enough. when you submit your form, faqbycat.php will receive $selcategoryid as the user chose from that select list. Elias, Ivan Carey [EMAIL PROTECTED] wrote in message 005801c2527c$dcb00260$0201a8c0@ivan">news:005801c2527c$dcb00260$0201a8c0@ivan... Hello, how do I send information to a php page from a menu list? When a user selects an item from the list I would like to be able to send selcategoryid to faqbycat.php without the use of a submit button. Is it done by using the onChange event? if so how may this be done? The code I am using presently is below form action=faqbycat.php select name=selcategoryid value=0 option name=selcategoryid value=0 selectedSelect a Category/option ?php //display list of provider names while ($myrowcating=MySQL_fetch_array($resultcatdet)) { $faqcatsid=stripslashes($myrowcating[breastfaqcatid]); $faqcats=stripslashes($myrowcating[breastfaqcat]); echo option name=\selcategoryid\ value=\$faqcatsid\$faqcats/option; }//while ($myrowadmintitles=MySQL_fetch_array($admintilteresult)) ? /select brbr input type=Submit name=selbycat value=Show FAQ's by Category /form Thanks for your answer, Ivan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Drawing graphs
Hello, I need to draw graphs in PHP (bar graphs, pie graphs, line/dot graphs, etc.). I know I can do that using the image creation and manipulation functions, but I would like to use a library, or something, so I don't have to write all the low level manipulation code. Is there any graphs libraty available I can use with PHP? Regards, -- _/_/_/ _/_/_/_/_/_/ Ivens Porto _/ _/_/_/ OSE - Open Systems Engineering _/ _/_/_/ http://www.ose.com.br _/ _/ _/_/_/ _/_/_/_/ Phone: (55) 34 - 3214-5995 _/ _/_/_/ Fax: (55) 34 - 3214-5994 _/ _/_/_/ _/_/_/_/_/_/ _/_/_/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP checkbox/hidden field question
Marek Kilimajer wrote: You are wrong, this is from HTML 4.01 specification: You're right. Thanks for your reply! Grtz Erwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Drawing graphs
erm jgraph is what i use but for the life of me I cannot remeber the url Try searching for it on hotscripts.com or http://php.resourceindex.com/ John - Original Message - From: Ivens Porto [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 02, 2002 2:35 PM Subject: [PHP] Drawing graphs Hello, I need to draw graphs in PHP (bar graphs, pie graphs, line/dot graphs, etc.). I know I can do that using the image creation and manipulation functions, but I would like to use a library, or something, so I don't have to write all the low level manipulation code. Is there any graphs libraty available I can use with PHP? Regards, -- _/_/_/ _/_/_/_/_/_/ Ivens Porto _/ _/_/_/ OSE - Open Systems Engineering _/ _/_/_/ http://www.ose.com.br _/ _/ _/_/_/ _/_/_/_/ Phone: (55) 34 - 3214-5995 _/ _/_/_/ Fax: (55) 34 - 3214-5994 _/ _/_/_/ _/_/_/_/_/_/ _/_/_/ -- 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
[PHP] Re: how do I send information to a php page from a menu list
Ivan Carey wrote: Hello, how do I send information to a php page from a menu list? When a user selects an item from the list I would like to be able to send selcategoryid to faqbycat.php without the use of a submit button. Is it done by using the onChange event? if so how may this be done? try: select name=selcategoryid onChange=JavaScript: this.submit(); Grtz Erwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Anybody have a sucessfull use of ADO and php together ?
I tried to use , and have a lot of trouble. For example I can't read fields who is Date time type I can't read memo fields I can't update using the recordtset.updated methode. The only thing I haven't trouble is to show a read only set of characters rows Anybody know where I can find more information on use PHP and ADO together. The Php.net manual contain near nothing ( only few notes about ADO in COM section some writed by myself) Am I the unique trying to use Php and ADO together.? Since I'm making a migration of a working system from Visual Foxpro To Interbase I must USE ADO to acess the VFP databases. Until now the unique solution I found is to mix asp and php, since ASP do everthing that php didn't with ADO, but this isn't what i want, I'm tried to founf a way in php but my resources are near end. Anybody have experience and advanced examples to use ADO and PHP together. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Drawing graphs
www.aditus.nu/jpgraph John Wards [EMAIL PROTECTED] wrote in message 028b01c25285$eca109e0$3100a8c0@JOHNCOMP">news:028b01c25285$eca109e0$3100a8c0@JOHNCOMP... erm jgraph is what i use but for the life of me I cannot remeber the url Try searching for it on hotscripts.com or http://php.resourceindex.com/ John - Original Message - From: Ivens Porto [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 02, 2002 2:35 PM Subject: [PHP] Drawing graphs Hello, I need to draw graphs in PHP (bar graphs, pie graphs, line/dot graphs, etc.). I know I can do that using the image creation and manipulation functions, but I would like to use a library, or something, so I don't have to write all the low level manipulation code. Is there any graphs libraty available I can use with PHP? Regards, -- _/_/_/ _/_/_/_/_/_/ Ivens Porto _/ _/_/_/ OSE - Open Systems Engineering _/ _/_/_/ http://www.ose.com.br _/ _/ _/_/_/ _/_/_/_/ Phone: (55) 34 - 3214-5995 _/ _/_/_/ Fax: (55) 34 - 3214-5994 _/ _/_/_/ _/_/_/_/_/_/ _/_/_/ -- 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
[PHP] Re: coockie expiration problems
OK, I found the reason, but not the solution yet: The cookie time during setting is the time taken from the server. The time for checking the coockie is the time of the local machine!! So what can I do if I would like to last the coockie for 1 hour and the person is sitting on the other site of the world running 10 hours time difference? Puhh.. maybe I am wrong, but this is how it seems to be. Any ideas? Andy [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, I see really nothing wrong in your example. Did you tried to verify with isset() if the cookie is still here or not? And well, you should use double quote on setcookie(referrer, $user_id, time()+10); You call should be also $_COOKIE['referrer'] and not $_COOKIE[referrer]. -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet Andy [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] Hi there, I am trying to save a var inside a cookie for a certain time (in this example 10s): setcookie('referrer', $user_id, time()+10); //expires in one hour Now I would like to get the value, but only if the coockie is valid (if cockie not older than 10 s in this example) echo 'referrer: '.$_COOKIE[referrer]; Unfortunatelly this does not work, the cockie value is always valid, even after expiration time. What am I doing wrong? Thanx for any help on that, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Forum structure
Hi, I'm looking for a developer who have worked already on some forums. I know each forum - depending on it's needs is differnt and then it changes it' structure. What I'm asking for is standart information about forum building. Not exact code, but tested db structure and php functionallity. I'll be nice to have your opinions on that. Thanks in advance. Andrian Ivanov, Bugaria -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: how do I send information to a php page from a menu list
different approach using JavaScript... script language=JavaScript // drop down redirect function doRedirect(value) { if ((value != ) || (value != 0)) { self.location=value; } else { alert('Please Make a Selection'); return false; } } //-- /script form select name=name onchange=javascript:dropdown(this.options[this.selectedIndex].value) option value=0lt; make a selection gt; option value=your_php_page.php?? echo $your_value1 ?? echo $your_value1 ?/option option value=your_php_page.php?? echo $your_value2 ?? echo $your_value2 ?/option /select /form Bueno, Javier --=_NextPart_000_0055_01C252D0.ADA4A940 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hello, how do I send information to a php page from a menu list? When a user selects an item from the list I would like to be able to = send selcategoryid to faqbycat.php without the use of a submit button. Is it done by using the onChange event? if so how may this be done? The code I am using presently is below form action=3Dfaqbycat.php select name=3Dselcategoryid value=3D0 option name=3Dselcategoryid value=3D0 selectedSelect a = Category/option ?php //display list of provider names while ($myrowcating=3DMySQL_fetch_array($resultcatdet)) { $faqcatsid=3Dstripslashes($myrowcating[breastfaqcatid]); =20 $faqcats=3Dstripslashes($myrowcating[breastfaqcat]); echo option name=3D\selcategoryid\ = value=3D\$faqcatsid\$faqcats/option; }//while = ($myrowadmintitles=3DMySQL_fetch_array($admintilteresult)) ?=20 /select brbr input type=3DSubmit name=3Dselbycat value=3DShow FAQ's by = Category /form =20 Thanks for your answer, Ivan --=_NextPart_000_0055_01C252D0.ADA4A940-- _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Newbie Parse error
I am sure that someone here can see somehting that I am too stupid to... Here is my error: Parse error: parse error, unexpected T_VARIABLE in send_contact_form.php on line 13 Here is the code for the page: ? $msg = E-Mail From MCV Contact Form\n; $msg .= Sender's Name: \t$sender.name\n; $msg .= Sender's E-Mail Address: \t$sender.email\n; $msg .= Sender's Subject: \t$sender.subject\n; $msg .- Sender's Message: \t$sender.message\n\n; $to = \t$recipient; $subject = Message From MCV Contact Form $mailheaders = From MyComputerVendor\n; $mailheaders .= Reply-To: $sender.email\n\n; mail($to, $subject, $msg, $mailheaders); html head titleMessage Sent!/title /head body pThe Following Message Was Sent To: ? echo $recipient; ?/p pName:br ? echo $sender.name; ?/p pE-Mail Address:br ? echo $sender.email; ?/p pSubject:br ? echo $sender.subject; ?/p pMessage:br ? echo ?sender.message; ?/p /body /html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Newbie Parse error
I am sure that someone here can see somehting that I am too stupid to... Here is my error: Parse error: parse error, unexpected T_VARIABLE in send_contact_form.php on line 13 $subject = Message From MCV Contact Form Forgot a ;? HTH Erwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Newbie Parse error
$subject = Message From MCV Contact Form you have missed out a ; on the above line use your eyes...:-) John - Original Message - From: Chase Knott [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 02, 2002 4:18 PM Subject: [PHP] Newbie Parse error I am sure that someone here can see somehting that I am too stupid to... Here is my error: Parse error: parse error, unexpected T_VARIABLE in send_contact_form.php on line 13 Here is the code for the page: ? $msg = E-Mail From MCV Contact Form\n; $msg .= Sender's Name: \t$sender.name\n; $msg .= Sender's E-Mail Address: \t$sender.email\n; $msg .= Sender's Subject: \t$sender.subject\n; $msg .- Sender's Message: \t$sender.message\n\n; $to = \t$recipient; $subject = Message From MCV Contact Form $mailheaders = From MyComputerVendor\n; $mailheaders .= Reply-To: $sender.email\n\n; mail($to, $subject, $msg, $mailheaders); html head titleMessage Sent!/title /head body pThe Following Message Was Sent To: ? echo $recipient; ?/p pName:br ? echo $sender.name; ?/p pE-Mail Address:br ? echo $sender.email; ?/p pSubject:br ? echo $sender.subject; ?/p pMessage:br ? echo ?sender.message; ?/p /body /html -- 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
[PHP] Re: Newbie Parse error
Thank you... I knew it was something stupid, but I was too close to see it... Thank you!! Erwin wrote: I am sure that someone here can see somehting that I am too stupid to... Here is my error: Parse error: parse error, unexpected T_VARIABLE in send_contact_form.php on line 13 $subject = Message From MCV Contact Form Forgot a ;? HTH Erwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Anybody have a sucessfull use of ADO and php together ?
I don't know anything about Visual Foxpro, so I may be barking up the wrong tree here, but... Is there anyway you can use ODBC??? The ODBC functions work pretty well. HTH, Richy == Richard Black Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 435 3504 Email: [EMAIL PROTECTED] -Original Message- From: Saci [mailto:[EMAIL PROTECTED]] Sent: 02 September 2002 15:25 To: [EMAIL PROTECTED] Subject: [PHP] Anybody have a sucessfull use of ADO and php together ? I tried to use , and have a lot of trouble. For example I can't read fields who is Date time type I can't read memo fields I can't update using the recordtset.updated methode. The only thing I haven't trouble is to show a read only set of characters rows Anybody know where I can find more information on use PHP and ADO together. The Php.net manual contain near nothing ( only few notes about ADO in COM section some writed by myself) Am I the unique trying to use Php and ADO together.? Since I'm making a migration of a working system from Visual Foxpro To Interbase I must USE ADO to acess the VFP databases. Until now the unique solution I found is to mix asp and php, since ASP do everthing that php didn't with ADO, but this isn't what i want, I'm tried to founf a way in php but my resources are near end. Anybody have experience and advanced examples to use ADO and PHP together. -- 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
Re: [PHP] Newbie Parse error
Maybe you can help me with YOUR eyes again... Now I am getting this error... Parse error: parse error, unexpected '' in send_contact_form.php on line 18 This will be around the html line... John Wards wrote: $subject = Message From MCV Contact Form you have missed out a ; on the above line use your eyes...:-) John - Original Message - From: Chase Knott [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 02, 2002 4:18 PM Subject: [PHP] Newbie Parse error I am sure that someone here can see somehting that I am too stupid to... Here is my error: Parse error: parse error, unexpected T_VARIABLE in send_contact_form.php on line 13 Here is the code for the page: ? $msg = E-Mail From MCV Contact Form\n; $msg .= Sender's Name: \t$sender.name\n; $msg .= Sender's E-Mail Address: \t$sender.email\n; $msg .= Sender's Subject: \t$sender.subject\n; $msg .- Sender's Message: \t$sender.message\n\n; $to = \t$recipient; $subject = Message From MCV Contact Form $mailheaders = From MyComputerVendor\n; $mailheaders .= Reply-To: $sender.email\n\n; mail($to, $subject, $msg, $mailheaders); html head titleMessage Sent!/title /head body pThe Following Message Was Sent To: ? echo $recipient; ?/p pName:br ? echo $sender.name; ?/p pE-Mail Address:br ? echo $sender.email; ?/p pSubject:br ? echo $sender.subject; ?/p pMessage:br ? echo ?sender.message; ?/p /body /html -- 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
Re: [PHP] Newbie Parse error
I thank you... I love these newsgroups, but I tend to feel REALLY stupid when the answer comes... Thanks again! Chase [EMAIL PROTECTED] wrote: You have forgotten a ? before your HTML starts. / Martin Citat Chase Knott [EMAIL PROTECTED]: Maybe you can help me with YOUR eyes again... Now I am getting this error... Parse error: parse error, unexpected '' in send_contact_form.php on line 18 This will be around the html line... John Wards wrote: $subject = Message From MCV Contact Form you have missed out a ; on the above line use your eyes...:-) John - Original Message - From: Chase Knott [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 02, 2002 4:18 PM Subject: [PHP] Newbie Parse error I am sure that someone here can see somehting that I am too stupid to... Here is my error: Parse error: parse error, unexpected T_VARIABLE in send_contact_form.php on line 13 Here is the code for the page: ? $msg = E-Mail From MCV Contact Form\n; $msg .= Sender's Name: \t$sender.name\n; $msg .= Sender's E-Mail Address: \t$sender.email\n; $msg .= Sender's Subject: \t$sender.subject\n; $msg .- Sender's Message: \t$sender.message\n\n; $to = \t$recipient; $subject = Message From MCV Contact Form $mailheaders = From MyComputerVendor\n; $mailheaders .= Reply-To: $sender.email\n\n; mail($to, $subject, $msg, $mailheaders); html head titleMessage Sent!/title /head body pThe Following Message Was Sent To: ? echo $recipient; ?/p pName:br ? echo $sender.name; ?/p pE-Mail Address:br ? echo $sender.email; ?/p pSubject:br ? echo $sender.subject; ?/p pMessage:br ? echo ?sender.message; ?/p /body /html -- 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 mvh Martin Hjort Eriksen Studenterrådet, Roskilde Universitetscenter - Slut på videresendt brev - mvh Martin Hjort Eriksen Studenterrådet, Roskilde Universitetscenter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Anybody have a sucessfull use of ADO and php together ?
Could you please show-me a sample of php code with ODBC to get a data field and a blob field (Memo) ? ODBC and ADO are the very similar , and have both the same problems with php. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: posting form values doesn't work
Yes, you were right. Now a natural question. WHY? I don't understand your explanation, since I thought it was equal, getting a field value using document.answerform.name.value in javascript AND the variable $name in php. I still use php in the location.href-part (it is as follows, the other was faked: location.href=groups/?php echo $formname; ?answer.php This opens the file groups/collectanswer.php. So, why does it work some time mixing javascript and php, and not every time? Erwin [EMAIL PROTECTED] skrev i meddelandet [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... ØYstein HåLand wrote: This is my form: FORM NAME=answerform METHOD=POST Your name:BRINPUT TYPE=TEXT NAME=name SIZE=20 Group:BRINPUT TYPE=TEXT NAME=group SIZE=8nbsp;nbsp; INPUT TYPE=BUTTON VALUE= OK! onClick=Javascript:validate(this); /FORM and the function validate: function validate() { [ CUT Javascript code ] location.href='groups/collect_answer.php?name=?php echo $name; ?group=?php echo $group; ?'; [ CUT Javascript code ] At first I thought is was JavaScript/HTML code, but I can see a little bit PHP now ;-)) The reason that it doens't work is simple. The variables are only available AFTER posting the form. Not during validation! You should just use Javascript to fill in the name and group into the URL. Grtz Erwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SNMP Support Problem
Hi all, I have a problem with use of snmp functions of php. I have compiled UCD binaries and PHP for support snmp functions ( steps by PHP.NET ) but i always receive this error : Fatal error: Call to undefined function: snmpwalk() ... ... and this for all snmp functions. Where i can get a little tutorial to install and setup step-by-step snmp support on php and linux red-hat ?!?! Thanks in advance to all and sorry for my bad english Regards
[PHP] empty php.ini
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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mailing a cookiecontent
Here's what I wanna do: On the first page I collect a lot of formfield values into a cookie. On the next page I display the content of this cookie. This works. What I even want to do is mailing the cookie content in the same time I submit the forms in the first page (or, when the new page loads). I use this code on the second page: if ($REQUEST_METHOD=='POST') { $name = escapeshellcmd($name); $group = escapeshellcmd($group); $to = [EMAIL PROTECTED]; $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('FORMINPUT TYPE=HIDDEN NAME=\comments\ VALUE=\'+cookiestr+'\/FORM'); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: header()-question
Dont use a directory but an url like header(Location: http://www.php.net;); -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet ØYstein HåLand [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] I use this code with the intension to REDIRECT to the file login.php if (!isset($login)) { header(Location: /ha/login/log.php?goal=loggoback=$PHP_SELF); } else { some code here } When I load the page the following happens: The source show the filename with this script and not the log.php, but the content is from log.php I don't understand nthing. So, if header() don't do redirection, which php-function does? (Or, is there a better way to achieve the same?) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Safe_Mode problem....
HI all... I'm trying to use exec and unlink in one of my PHP programs. Here is the code: if (exec ('euro-update.program')) { $result = mysql_query(load data local infile 'euroAUD1.txt' into table Money_AUD) or die (AUD Load did not work.); unlink('euroAUD1.txt'); } else { echo Didn't work again; } 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, php.ini, SuSE's http config file, I've added paths to my php files, and rebooted. Can someone give me an idea what next to do? Either how to turn off safe_mode or a work around on the code. BTW I'm using SuSE 8.0, PHP, and Mysql on a self-made PI/233. Thanks JIM -- Vielfeind -- Viel Ehr' Antiamerikanische Propaganda in der Philatelie des 20. Jahrhunderts http:/www.fecundswamp.net/~hatridge/stamps/index.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Printing ASCII on Linux Server
I am trying to printout some ASCII Text (using LPR, script see below) to a IBM Proprinter compatible dot-matrix printer, on a server running Linux. Printing works fine, however 2 problems: 1. linefeed (\n) doesn't work 2. escape sequences to print BOLD, ITALIC, UNDERLINE, NARROW don't work Any help is appreciated!! Thanks! LM -- ?php // 1. DEFINE ESCAPE SEQUENCES $bold_on = chr(27) . chr(69); $bold_off = chr(27) . chr(70); $underline_on = chr(27) . chr(45) . chr(49); $underline_off = chr(27) . chr(45) . chr(48); $wide_on = chr(27) . chr(87) . chr(1); $wide_off = chr(27) . chr(87) . chr(0); $narrow_on = chr(15); $narrow_off= chr(18); $formfeed = chr(12); $linefeed = \n; // 2. DEFINE PRINT STRING $print_string = ; $print_string .= Line 1 . $linefeed; $print_string .= Line 2 . $linefeed; $print_string .= Line 3 . $linefeed; $print_string .= $bold_on . bold . $bold_off . $linefeed; $print_string .= $underline_on . underline . $underline_off . $linefeed; $print_string .= $wide_on . wide . $wide_off . $linefeed; $print_string .= $narrow_on. narrow. $narrow_off. $linefeed; // 3. PRINT ON LINUX SERVER $lp = popen(lpr -Plp1, w); $bytes_written = fwrite($lp, $print_string); pclose($lp); ? --- __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: unexpected T_SL
Your lucky :) because I'm using the same version and I have this parse error. Erwin wrote: Voisine wrote: Hi, What is wrong witht his code? Parse error: parse error, unexpected T_SL in c:\program files\easyphp\www\tutorial\eod.php on line 2 ?php $str = EOD Example of string spanning multiple lines using heredoc syntax. EOD; ? To be honest, there is nothing wrong. It works in version 4.2.2 (at least, here it does) ;-)) Grtz Erwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problems with cookies
Hi all, I'm using a cookie like this: setcookie(cookiename1,$domin,timeset()+1800); at the top of my script. $domin is a text field that belongs to a post form. This form is in function one(); well, i try use $domin in function two(); writing $_COOKIE['cookiename1']; Here you are the code: ? setcookie(cookiename1,$domin,timeset()+1800); $cookiename1=$domin; echo $cookiename1; // here it works ? --- 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 ? --- HTML code --- ? } ? --- HTML code --- What am I doing wrong? Any tips? Any Ideas? Thanks for help Peace Love skitum
RE: [PHP] mailing a cookiecontent
Here's what I wanna do: On the first page I collect a lot of formfield values into a cookie. On the next page I display the content of this cookie. This works. What I even want to do is mailing the cookie content in the same time I submit the forms in the first page (or, when the new page loads). I use this code on the second page: if ($REQUEST_METHOD=='POST') { $name = escapeshellcmd($name); $group = escapeshellcmd($group); $to = [EMAIL PROTECTED]; $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; see below, but if you cookie is named cookiestr, just us the variable here $body .= \n\n$cookiestr\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('FORMINPUT TYPE=HIDDEN NAME=\comments\ VALUE=\'+cookiestr+'\/FORM'); so your cookie variable name is cookiestr why use Javascript, and not just echo 'FORMINPUT TYPE=HIDDEN NAME=comments VALUE='.$cookiestr.'/FORM'; Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: unexpected T_SL
Hiya, There are two reasons that I can pick up that you may be experiencing this area: 1) You are not using PHP4 or later 2) you are using windoze and. Probably the nastiest gotcha is that there may also not be a carriage return (\r) at the end of the line, only a form feed, AKA newline (\n). Since Microsoft Windows uses the sequence \r\n as a line terminator, your heredoc may not work if you write your script in a Windows editor. However, most programming editors provide a way to save your files with a UNIX line terminator. (http://www.php.net/manual/sv/printwn/language.types.string.php#language.typ es.string.syntax.heredoc) It doesnt matter whether you use EOD or EOT or any other (naming convention compliant) identifier. I hope this helps, Todd. -Original Message- From: Voisine [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 3 September 2002 3:10 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: unexpected T_SL Your lucky :) because I'm using the same version and I have this parse error. Erwin wrote: Voisine wrote: Hi, What is wrong witht his code? Parse error: parse error, unexpected T_SL in c:\program files\easyphp\www\tutorial\eod.php on line 2 ?php $str = EOD Example of string spanning multiple lines using heredoc syntax. EOD; ? To be honest, there is nothing wrong. It works in version 4.2.2 (at least, here it does) ;-)) Grtz Erwin -- 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
Re: [PHP] Re: unexpected T_SL
Voisine wrote: Hi, What is wrong witht his code? Parse error: parse error, unexpected T_SL in c:\program files\easyphp\www\tutorial\eod.php on line 2 ?php $str = EOD Example of string spanning multiple lines using heredoc syntax. EOD; ? Assuming your line 2 is the one with EOD in it, I can get a parse error if there is a space after EOD. I can also get a parse error on line 6 if there is a space before the closing EOD. HTH Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Safe_Mode problem....
Jim Hatridge wrote: Can someone give me an idea what next to do? Either how to turn off safe_mode or a work around on the code. BTW I'm using SuSE 8.0, PHP, and Mysql on a self-made PI/233. Jim, If you have changed safe_mode in php.ini and phpinfo() still reports it as on, then I would think that php is not looking at the php.ini you modified. Are you sure you are editing the php.ini that is located in the directory that phpinfo() says it is looking in? HTH Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Printing ASCII on Linux Server
Mingshuo Lin wrote: I am trying to printout some ASCII Text (using LPR, script see below) to a IBM Proprinter compatible dot-matrix printer, on a server running Linux. Printing works fine, however 2 problems: 1. linefeed (\n) doesn't work 2. escape sequences to print BOLD, ITALIC, UNDERLINE, NARROW don't work Does printing work properly when printing from a file (made up from your code here), not from php? If not then its a print setup problem not a php problem. I'd check out your printing setup and if its a print setup problem then check for any bugs/upgrades. HTH Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Newbie Parse error
Use a closing ? php tag before writing your html and after your mail() function.. Also, in your first $mailheaders variable, you may want to add a : after From.. HTH.. Take care.. peace.. eriol Chase Knott [EMAIL PROTECTED] disgorged: : Maybe you can help me with YOUR eyes again... Now I am getting this : error... : : Parse error: parse error, unexpected '' in send_contact_form.php on line 18 : : This will be around the html line... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] empty php.ini
Hi Timo: From Marc's site: Where is the php.ini file? There is none included in the package. If you need one, just create it as /usr/local/lib/php.ini, including the intermediate lib directory if that doesn't exist already: sudo mkdir -p /usr/local/lib sudo touch /usr/local/lib/php.ini HTH Cheers, David On Monday, September 2, 2002, at 12:15 PM, timo stamm wrote: 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 -- 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
[PHP] Upload
I have a form where i upload files. When I was using windows there was no problem, now I have switched to Linux, and I cannot upload anymore. The form simply does not pass any of the variables on. If i remove enctype=multipart/form-data from the form tag, then the variables are passed. Does anybody have an idea of what is going on? regards Martin Hjort Eriksen Studenterrådet, Roskilde Universitetscenter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: header()-question
[EMAIL PROTECTED] skrev i meddelandet [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Dont use a directory but an url like header(Location: http://www.php.net;); Thanks, that made it work. But now comes the next problem. When finshed logging in login.php is reloaded with a confirmation text ('You're logged in. Click the button to go back'). But, at the bottom of the page the following error message appears: Fatal error: Cannot redeclare createlinks() (previously declared in c:\apache\htdocs\ha\recycle\lankar.php:6) in c:\apache\htdocs\ha\recycle\lankar.php on line 5 The problem is: the call for the function createlinks() is done from the previous page (index.php), the file where I user header(), and I can't see that the function has bin called for yet. Index.php looks as follows: ?php if (!isset($login)) { header(Location: http://127.0.0.1/ha/login/login.php?goal=loggoback=$PHP_SELF;); } else { include(../recycle/head.php); if($skrivut != jepp) { createLinks(); } include(../gjenvinn/foot.php); } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] COM and Word, how?
I am new to COM and tried an example today (See bottom of post) When I execute the code, I get is an error message and if I look in the Task Manager, there is a WINWORD.EXE process running, which I can't end. Every time I reload the page, a new winword is started... How should PHP.ini be set for me to use COM Objects? - Error message: Warning: Unable to obtain IDispatch interface for CLSID {000209FF---C000-0046}: The message filter indicated that the application is busy. in d:\inetpub\wwwroot\incmill\ver2\readfile.php on line 2 Unable to instantiate word Setup: Windows 2000 Professional PHP 4.2.1 Office 2000 PHP.ini COM values: Directive, Local Value, Master Value com.allow_dcom, Off, Off com.autoregister_casesensitive, On, On com.autoregister_typelib, Off, Off com.autoregister_verbose, Off, Off com.typelib_file, no value, no value Code: $word = new COM(word.application) or die(Unable to instantiate Word); print Loaded Word, version {$word-Version}BR; $word-Visible = 1; $word-Documents-Add(); $word-Selection-TypeText(This is a test...); $word-Documents[1]-SaveAs(Useless test.doc); $word-Quit(); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upload
Thank you very much, actually I had already changes that setting, but did not restart apache. Under windows, if I remember correctly, I did not have to worry about apache if I changed something in php.ini, but aperently I there is a connection under linux. Why the difference? /mhe Citat Juan Pablo Aqueveque [EMAIL PROTECTED]: Try this in your php.ini. file_uploads = On and re-start your apache. --jp At 20:24 02-09-2002 +0200, you wrote: I have a form where i upload files. When I was using windows there was no problem, now I have switched to Linux, and I cannot upload anymore. The form simply does not pass any of the variables on. If i remove enctype=multipart/form-data from the form tag, then the variables are passed. Does anybody have an idea of what is going on? regards Martin Hjort Eriksen Studenterrådet, Roskilde Universitetscenter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Juan Pablo Aqueveque [EMAIL PROTECTED] Ingeniero de Sistemas Departamento de Redes y Comunicaciones http://www.drc.uct.cl Universidad Católica de Temuco. Tel:(5645) 205 630 Fax:(5645) 205 628 mvh Martin Hjort Eriksen Studenterrådet, Roskilde Universitetscenter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mailing a cookiecontent
Nope, the cookie is a multivalue cookie (the values from several fields (30-40). The cookiestr is the formatted cookievalue (formatted with numbers and \n) Dave [EMAIL PROTECTED] skrev i meddelandet [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Here's what I wanna do: On the first page I collect a lot of formfield values into a cookie. On the next page I display the content of this cookie. This works. What I even want to do is mailing the cookie content in the same time I submit the forms in the first page (or, when the new page loads). I use this code on the second page: if ($REQUEST_METHOD=='POST') { $name = escapeshellcmd($name); $group = escapeshellcmd($group); $to = [EMAIL PROTECTED]; $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; see below, but if you cookie is named cookiestr, just us the variable here $body .= \n\n$cookiestr\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('FORMINPUT TYPE=HIDDEN NAME=\comments\ VALUE=\'+cookiestr+'\/FORM'); so your cookie variable name is cookiestr why use Javascript, and not just echo 'FORMINPUT TYPE=HIDDEN NAME=comments VALUE='.$cookiestr.'/FORM'; Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help, array values echoed as Array on loop!
I have tried both ways to loop through an array and output the data and verify that the array is an array and I get no erros but I get this value, which should not be so. Here I'm checking if it's an array: if (!is_array($ID_arr)) { # show error if no array echo '$ID_arr is not an array.'; } here I'm counting the keys but it only outputs as 1: $key = count($ID_arr); echo $key; here are two loops that do the same thing and they both output Array: for($i = 0; $i count($ID_arr); $i++) { echo $ID_arr[$i]; } foreach($ID_arr as $ind_picture) { echo $ind_picture; } Why? If it helps, in order to get the array, the values were taken from a database and exploded from a coma delimited string. $ID_arr[] = explode(',', $pictures); # make db data into array This is the string: 15,16,17,18,19 I want each array element to contain = 15 = 16 = 17 etc... why does it echo as Array? - Victor www.argilent.com __ Post your free ad now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Upload
are you using global vars? like $file or you use new var like $_FILES? -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] I have a form where i upload files. When I was using windows there was no problem, now I have switched to Linux, and I cannot upload anymore. The form simply does not pass any of the variables on. If i remove enctype=multipart/form-data from the form tag, then the variables are passed. Does anybody have an idea of what is going on? regards Martin Hjort Eriksen Studenterrådet, Roskilde Universitetscenter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help, array values echoed as Array on loop!
On Mon, 2 Sep 2002, Victor wrote: $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've created an array ($ID_arr) with an array as the first value (the result of the call to explode()). Take the brackets off $ID_arr, and you'll get what you want. You don't want your array in an array ... you just want an array. $ID_arr = explode(',', $pictures); If you really wanted your array in the array, then loop over $ID_arr[0]. (I doubt that's what you were going for, though.) hth, ~Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problems with cookies
A couple problems may exist: 1) If you're trying to do this all in the same script, it's not going to work. You can't set a cookie and use it (with the value you've just set) in the same script (in the same request). You can only use cookies that have been sent back to your script from the browser. If you require the use of a cookie value you're trying to set, use your local variable's value, instead of trying to get the cookie. 2) I'm pretty sure there is not timeset() function in php. setcookie(cookiename1,$domin,timeset()+1800); And you've used it as a quoted string ... set a very funky, if not very invalid, expiry time, and hence didn't set the cookie at all. Try this instead: setcookie( cookiename1, $domin, time()+1800 ); On a different request, you can retrieve $_COOKIE['cookiename1'] g.luck, ~Chris On Mon, 2 Sep 2002, skitum wrote: Hi all, I'm using a cookie like this: setcookie(cookiename1,$domin,timeset()+1800); at the top of my script. $domin is a text field that belongs to a post form. This form is in function one(); well, i try use $domin in function two(); writing $_COOKIE['cookiename1']; Here you are the code: ? setcookie(cookiename1,$domin,timeset()+1800); $cookiename1=$domin; echo $cookiename1; // here it works ? --- 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 ? --- HTML code --- ? } ? --- HTML code --- What am I doing wrong? Any tips? Any Ideas? Thanks for help Peace Love skitum -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] empty php.ini
On Mon, 2 Sep 2002, timo stamm wrote: 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!? ... that package doesn't ship with a php.ini. You'll have to get/make your own. Is there a way Haha ... I'm sure there is. Get one from a knowledgable friend, or download one from php's cvs server. http://cvs.php.net/cvs.php/php4/php.ini-dist g.luck, ~Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Why doesn't the second instance work?
I'm creating a list/menu form item and populating it from a database,=20 the code snippet looks like this: ? $db_name =3D dbname; $table_name =3D endpage; $connection =3D mysql_connect(localhost, test, test) or=20 die(Couldn't connect.); $db =3D mysql_select_db($db_name, $connection) or die(Couldn't select=20= database.); $query =3D select id, productname, bgcolor, imgsrc, cartlink,=20 categorylink, copy, price, titleimg from endpage; $result =3D mysql_query($query); $num_results =3D mysql_num_rows($result); //$row =3D mysql_fetch_array($result); $id =3D$row['id']; $productname =3D$row['productname']; $bgcolor =3D $row['bgcolor']; $imgsrc =3D $row['imgsrc']; $cartlink =3D $row['cartlink']; $categorylink =3D $row['categorylink']; $copy =3D $row['copy']; $price =3D $row['price']; $titleimg =3D $row['titleimg']; ?=00 pEdit an item:/p ? //create a list of editible items echo form method=3Dpost action=3Dedit.php; echo select name=3Did; for ($i=3D0; $i $num_results; $i++) { $row =3D mysql_fetch_array($result); echo option value=3D$row[id] $row[id], = $row[productname]/option; } echo /select; echo input type=3Dsubmit name=3Dsubmit; echo /form; ?=00=00 Everything is good, Everything is fine, so I decide to put the same=20 snippet of code in again, this time pointing to a different page -- One=20= page lets you edit the fields, the other shows you the final output,=20 the item from the database featured on a web page. ppreview an endpage:/p ? //create a list of editible items echo form method=3Dpost action=3Dpreview.php; echo select name=3Did; for ($i=3D0; $i $num_results; $i++) { $row =3D mysql_fetch_array($result); echo option value=3D$row[id] $row[id], = $row[productname]/option; } echo /select; echo input type=3Dsubmit name=3Dsubmit; echo /form; ?=00=00 The second instance does not work, I get a select with , as each=20 option, no population with the id or productname. Clearly, I don't=20 understand something here, can anyone tell me what? Thanks for the time, Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] crontab programmed with mysql ??
I'm looking for the approximate solution of mailing out (or doing anything else ) timed by cron(tab) along with use of mysql as means of identification and storing of the dates in multiuser enviroment. Initial date and interval of recurring event is to be set up by a user. May you know some open source code as an example to do that or so? Thank you, Oleg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] help, array values echoed as Array on loop!
Thank you, I figured it out 30 seconds after I posted the question, you were right about the problem. - Victor www.argilent.com -Original Message- From: Chris Wesley [mailto:[EMAIL PROTECTED]] Sent: Monday, September 02, 2002 4:11 PM To: 'PHP' Cc: Victor Subject: Re: [PHP] help, array values echoed as Array on loop! On Mon, 2 Sep 2002, Victor wrote: $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've created an array ($ID_arr) with an array as the first value (the result of the call to explode()). Take the brackets off $ID_arr, and you'll get what you want. You don't want your array in an array ... you just want an array. $ID_arr = explode(',', $pictures); If you really wanted your array in the array, then loop over $ID_arr[0]. (I doubt that's what you were going for, though.) hth, ~Chris __ Post your free ad now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to escape in hidden field?
Hi, Monday, September 2, 2002, 7:59:43 PM, you wrote: MT Hello! MT I have a simple hidden input-field like MT INPUT TYPE=HIDDEN VALUE=Hello world NAME=Message MT Now sometimes I need to insert like: MT INPUT TYPE=HIDDEN VALUE=Hello \world\ NAME=Message MT But this makes PHP (or the browser?) cutting of the string after Hello MT . How can I escape the ? MT Martin Try this with single quotes: INPUT TYPE=HIDDEN VALUE='Hello world' NAME=Message -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to escape in hidden field?
Hi Martin You can also do this INPUT TYPE=HIDDEN VALUE=Hello quot;world NAME=Message HTH Martin :) -Original Message- From: Tom Rogers [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 03, 2002 11:24 AM To: Martin Thoma Cc: [EMAIL PROTECTED] Subject: Re: [PHP] How to escape in hidden field? Hi, Monday, September 2, 2002, 7:59:43 PM, you wrote: MT Hello! MT I have a simple hidden input-field like MT INPUT TYPE=HIDDEN VALUE=Hello world NAME=Message MT Now sometimes I need to insert like: MT INPUT TYPE=HIDDEN VALUE=Hello \world\ NAME=Message MT But this makes PHP (or the browser?) cutting of the string after Hello MT . How can I escape the ? MT Martin Try this with single quotes: INPUT TYPE=HIDDEN VALUE='Hello world' NAME=Message -- regards, Tom -- 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
[PHP] ftp question
I took the scriopt from php manual and adapted it to my needs, but I get an error: Warning: ftp_put(): user_pictures/vic/: No such file or directory in /home/victor/argilent-www/sites/kodak/upload_picture.php on line 103 This is the code: # set up basic connection $conn_id = ftp_connect($ftp_server); # login with username and password $login_result = ftp_login($conn_id, $ftp_user, $ftp_pass); # check connection if ((!$conn_id) || (!$login_result)) { echo 'FTP connection has failed.'; exit; } $destination = $picture_location.'/'.$f_username.'/'; # upload the file $upload = ftp_put($conn_id, $destination, $picture, FTP_BINARY); # check upload status if (!$upload) { echo 'FTP upload has failed.'; } # close the FTP stream ftp_close($conn_id); I added the destination variable so that I can easily edit the destination if I sweitch servers, I'm guessing the error occurs because php doesn't know where to take the file from?! I'm guessing here, but it would be nice if someone tough me a bit more about ftp with php. user_pictures/vic is the directory the $picture has to go in, but I dunno why it doesn't work. - Victor www.argilent.com __ Post your free ad now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why doesn't the second instance work?
Hi, Tuesday, September 3, 2002, 6:49:25 AM, you wrote: MK Everything is good, Everything is fine, so I decide to put the same=20 MK snippet of code in again, this time pointing to a different page -- MK One=20= MK page lets you edit the fields, the other shows you the final output,=20 MK the item from the database featured on a web page. MK ppreview an endpage:/p MK ? MK //create a list of editible items MK echo form method=3Dpost action=3Dpreview.php; MK echo select name=3Did; MK for ($i=3D0; $i $num_results; $i++) MK { MK $row =3D mysql_fetch_array($result); MK echo option value=3D$row[id] $row[id], = MK $row[productname]/option; MK } MK echo /select; MK echo input type=3Dsubmit name=3Dsubmit; MK echo /form; ?=00=00 MK The second instance does not work, I get a select with , as each=20 MK option, no population with the id or productname. Clearly, I don't=20 MK understand something here, can anyone tell me what? MK Thanks for the time, MK Michael To use the result a second time you will need to reset the internal mysql pointer like this: mysql_data_seek($result,0); After the first loop through. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: crontab programmed with mysql ??
Take that to the correct newsgroup. -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hebergement Group. www.WorldAKT.com - Hebergement de sites Internet [EMAIL PROTECTED] a ecrit dans le message de news: 003201c252cb$ac4f1da0$[EMAIL PROTECTED] I'm looking for the approximate solution of mailing out (or doing anything else ) timed by cron(tab) along with use of mysql as means of identification and storing of the dates in multiuser enviroment. Initial date and interval of recurring event is to be set up by a user. May you know some open source code as an example to do that or so? Thank you, Oleg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] crontab programmed with mysql ??
Hi, Tuesday, September 3, 2002, 7:55:56 AM, you wrote: aac I'm looking for the approximate solution of mailing out (or doing anything aac else ) aac timed by cron(tab) along with use of mysql as means of identification and aac storing aac of the dates in multiuser enviroment. aac Initial date and interval of recurring event is to be set up by a user. aac May you know some open source code as an example to do that or so? aac Thank you, aac Oleg Probably the easiest way is to set up cron to call a php script every 5 mins or whatever the smallest interval you will need and have that script run through your mysql tables looking for jobs to do. That way you only need one cron job. If you are on unix type server the simplest is to use lynx like this 5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/bin/lynx -dump http://domain.com/chkjob.php 1 /dev/null 2 /dev/null -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: ftp question
Hi, Your script upload the file to /home/victor/argilent-www/sites/kodak/user_pictures/vic/ are you sure that is the correct path name? If its not, just put the entier name and not only a part of it. -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet Victor [EMAIL PROTECTED] a écrit dans le message de news: 01c252ea$36e90160$[EMAIL PROTECTED] I took the scriopt from php manual and adapted it to my needs, but I get an error: Warning: ftp_put(): user_pictures/vic/: No such file or directory in /home/victor/argilent-www/sites/kodak/upload_picture.php on line 103 This is the code: # set up basic connection $conn_id = ftp_connect($ftp_server); # login with username and password $login_result = ftp_login($conn_id, $ftp_user, $ftp_pass); # check connection if ((!$conn_id) || (!$login_result)) { echo 'FTP connection has failed.'; exit; } $destination = $picture_location.'/'.$f_username.'/'; # upload the file $upload = ftp_put($conn_id, $destination, $picture, FTP_BINARY); # check upload status if (!$upload) { echo 'FTP upload has failed.'; } # close the FTP stream ftp_close($conn_id); I added the destination variable so that I can easily edit the destination if I sweitch servers, I'm guessing the error occurs because php doesn't know where to take the file from?! I'm guessing here, but it would be nice if someone tough me a bit more about ftp with php. user_pictures/vic is the directory the $picture has to go in, but I dunno why it doesn't work. - Victor www.argilent.com __ Post your free ad now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: ftp question
Actually, that is the correct path. Which is why I don't understand why it's not working. And as a user I'm using myself... waitaminute, the folders are created by the user www, and I argilent may not have write permission, maybe that's why it's not working. I should try with a folder I create as me to see if I can write to it. - Victor www.argilent.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, September 02, 2002 9:46 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: ftp question Hi, Your script upload the file to /home/victor/argilent-www/sites/kodak/user_pictures/vic/ are you sure that is the correct path name? If its not, just put the entier name and not only a part of it. -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet Victor [EMAIL PROTECTED] a écrit dans le message de news: 01c252ea$36e90160$[EMAIL PROTECTED] I took the scriopt from php manual and adapted it to my needs, but I get an error: Warning: ftp_put(): user_pictures/vic/: No such file or directory in /home/victor/argilent-www/sites/kodak/upload_picture.php on line 103 This is the code: # set up basic connection $conn_id = ftp_connect($ftp_server); # login with username and password $login_result = ftp_login($conn_id, $ftp_user, $ftp_pass); # check connection if ((!$conn_id) || (!$login_result)) { echo 'FTP connection has failed.'; exit; } $destination = $picture_location.'/'.$f_username.'/'; # upload the file $upload = ftp_put($conn_id, $destination, $picture, FTP_BINARY); # check upload status if (!$upload) { echo 'FTP upload has failed.'; } # close the FTP stream ftp_close($conn_id); I added the destination variable so that I can easily edit the destination if I sweitch servers, I'm guessing the error occurs because php doesn't know where to take the file from?! I'm guessing here, but it would be nice if someone tough me a bit more about ftp with php. user_pictures/vic is the directory the $picture has to go in, but I dunno why it doesn't work. - Victor www.argilent.com __ Post your free ad now! http://personals.yahoo.ca -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: coockie expiration problems
Hi, Tuesday, September 3, 2002, 12:53:22 AM, you wrote: a OK, I found the reason, but not the solution yet: a The cookie time during setting is the time taken from the server. The time a for checking the coockie is the time of the local machine!! a So what can I do if I would like to last the coockie for 1 hour and the a person is sitting on the other site of the world running 10 hours time a difference? Puhh.. maybe I am wrong, but this is how it seems to be. a Any ideas? a Andy a [EMAIL PROTECTED] schrieb im Newsbeitrag a [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, I see really nothing wrong in your example. Did you tried to verify a with isset() if the cookie is still here or not? And well, you should use double quote on setcookie(referrer, a $user_id, time()+10); You call should be also $_COOKIE['referrer'] and not a $_COOKIE[referrer]. -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet Andy [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] Hi there, I am trying to save a var inside a cookie for a certain time (in this example 10s): setcookie('referrer', $user_id, time()+10); //expires in one hour Now I would like to get the value, but only if the coockie is valid (if cockie not older than 10 s in this example) echo 'referrer: '.$_COOKIE[referrer]; Unfortunatelly this does not work, the cockie value is always valid, a even after expiration time. What am I doing wrong? Thanx for any help on that, Andy According to netscape the cookie date value is expected to be in the GMT time zone only so that is not the problem. This is more likely the cause (from Netscape again) quote The expires header lets the client know when it is safe to purge the mapping but the client is not required to do so. A client may also delete a cookie before it's expiration date arrives if the number of cookies exceeds its internal limits /quote What you will have to do is encode your time in the value passed with the cookie and do your own checking...ignoring it if it is older than 10 seconds -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Forum structure
Hi Andrian, I built a forum from scratch, because I had very specific needs on how it would work... different to everything I've seen so far. Sorry to say it though, the underlying table structure IS determined by the way you want it to work. If you're after something stock-standard, I'd recommend checking out the systems already available for free (it's been discussed many times). For starters, they're ready to go, so you'll save MANY hours. Or if they don't end up being what you want: a) the underlying db structure code may give you some ideas for your own b) you may be able to help/contribute to make the product better, since it's probably open source, and developed by a community of contributors. If you some specific ideas on what you want to achieve, I might be able to make some suggestions. Cheers, Justin on 03/09/02 1:23 AM, Andrian Ivanov ([EMAIL PROTECTED]) wrote: Hi, I'm looking for a developer who have worked already on some forums. I know each forum - depending on it's needs is differnt and then it changes it' structure. What I'm asking for is standart information about forum building. Not exact code, but tested db structure and php functionallity. I'll be nice to have your opinions on that. Thanks in advance. Andrian Ivanov, Bugaria -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mail() function problem
Dear Arul friends, thanks for your kind helps, but the problem still exists. the actual problem is that the 2nd mail() function does not ever send the mail, no matter what the destination and the additional header is. is there a way to debug this problem? thanks Daniel # -Original Message- # From: Arul Venkatesh Kandaswamy [mailto:[EMAIL PROTECTED]] # Sent: Saturday, August 31, 2002 17:07 # To: Akhmad D. Sembiring # Subject: Re: [PHP] mail() function problem # # # Hello # # $from = MIME-Version: 1.0\r\n; # $from .= Content-type: text/html; charset=iso-8859-1\r\n; # $from .= From: [EMAIL PROTECTED]\r\n; # $subject=Registration Confirmation; # $messge=test mail; # mail($mailid,$subject,$message,$from); # # Thanks and Regards # Arul venki # # - Original Message - # From: Akhmad D. Sembiring [EMAIL PROTECTED] # To: [EMAIL PROTECTED] # Sent: Saturday, August 31, 2002 2:02 PM # Subject: [PHP] mail() function problem # # # Dear All, # # I have a little problem with mail() function, # # PHP Code: # # -- # mail($email, Membership ok, $themsg, # From: [EMAIL PROTECTED]\r\n); # # mail([EMAIL PROTECTED], # , , From: $email\r\n); # -- # # Why does the second mail() function did not ever send the email to # yahoogroups? # # I wonder, can the mail() function be put in a loop structure (that # traverse # an array of emails) and send all emails successfully? # # Thanks for your advice, # # Daniel --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.381 / Virus Database: 214 - Release Date: 8/2/02 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() function problem
Hello, On 09/03/2002 12:19 AM, Akhmad D. Sembiring wrote: Dear Arul friends, thanks for your kind helps, but the problem still exists. the actual problem is that the 2nd mail() function does not ever send the mail, no matter what the destination and the additional header is. is there a way to debug this problem? Most likely you have not configured PHP to use the mail() properly. First things first. Which platform are you using? Did you configure php.ini mail options for your platform? what does var_dump(mail(you arguments here)); return? -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mail() function problem
# On 09/03/2002 12:19 AM, Akhmad D. Sembiring wrote: # Dear Arul friends, # # thanks for your kind helps, # but the problem still exists. # # the actual problem is that the 2nd mail() function # does not ever send the mail, no matter what the destination # and the additional header is. # # is there a way to debug this problem? # # Most likely you have not configured PHP to use the mail() properly. # First things first. Which platform are you using? # Did you configure php.ini mail options for your platform? unfortunately, the script is hosted on a hosting server so I don't have access to the php.ini file # what does var_dump(mail(you arguments here)); return? bool(true) thanks Daniel --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.381 / Virus Database: 214 - Release Date: 8/2/02 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() function problem
Hello, On 09/03/2002 12:38 AM, Akhmad D. Sembiring wrote: # thanks for your kind helps, # but the problem still exists. # # the actual problem is that the 2nd mail() function # does not ever send the mail, no matter what the destination # and the additional header is. # # is there a way to debug this problem? # # Most likely you have not configured PHP to use the mail() properly. # First things first. Which platform are you using? # Did you configure php.ini mail options for your platform? unfortunately, the script is hosted on a hosting server so I don't have access to the php.ini file But can't you tell if is it Windows or Unix/Linux? -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php