Re: [PHP] text grabber
you can try something like: ?php include(file_with_just_the_table_and_html_tags.txt); ? put your table in the above file (of course with a different name!) then call it when ever you need to. Other's will disagree but you also need to give the destination file a .php extension. Hugh - Original Message - From: Jason Whitaker [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 14, 2002 11:32 PM Subject: [PHP] text grabber How do i pull text from one file and have it print to another? example: I have a site where i use a table alot on alot of different pages but i dont want to type out the table each time but rather use php to grab the table from file-1.txt and print it on file-2.php? -- Jason Whitaker -- 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] Empty form
I am trying to have my form redirect back to my form, if the 'name' field is not filled in or the submit button is not pushed. Can someone tell me what my problem is with the script below that I have in my header: ? if(!isset($name)||($HTTP_POST_VARS[submit])) { header(Location: form.htm); } ? Thanks, Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Decode Encoded text in phpMyAdmin
So then there's no way to get it decoded :(. Ah well, thanks for your help anyway. -- - Dave Visit http://www.geocities.com/earthtohorny/ for info on Computers and Upgrading. Joffrey Van Wageningen [EMAIL PROTECTED] wrote in message 00f101c1b570$d4697450$[EMAIL PROTECTED]">news:00f101c1b570$d4697450$[EMAIL PROTECTED]... Hello, How can I decode encoded text/numbers in my phpMyAdmin? I looked at BASE64, but thats not it. Any help is great. Thanks Example: 8e73b27568cb3be29e2da74d42eab6dd i dont wanna spoil your day, but your looking at a md5 hash... md5 is a one way encoding scheme, no way back... md5 is used to make a sum of a load of data and compared by a second sum to see if the data matches (like passwords or file integrety) if you want 7bit encoding try base64_encoding and _decoding hope you can have a good night sleep :) mvgr, Joffrey van Wageningen -- .-[ Joffrey van Wageningen | WoLFjuh | [EMAIL PROTECTED] ]-- | Networking Event 2000 - www.ne2000.nl - IRCnet:#ne2000, Undernet:#clue | PGP:1024D/C6BA5863 - 3B93 52D3 CB91 9CB7 C50D FA79 865F 628A C6BA 5863 | * We demand guaranteed rigidly defined areas of doubt and uncertainty. | -- Douglas Adams -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Empty form
Using header() to return will clear the entire form where all you want is the person to fill in missing data. Yes? I'd use something like: if(!isset($name) die(Use the Browser's Back Button, fill in your name and hit the \Submit\ Button); if(!isset($address) die(Use the Browser's Back Button, fill in your address and hit the \Submit\ Button); etc. This way, the user fills in only the missing data. Hope this helps. Hugh - Original Message - From: Ben Clumeck [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 15, 2002 12:24 AM Subject: [PHP] Empty form I am trying to have my form redirect back to my form, if the 'name' field is not filled in or the submit button is not pushed. Can someone tell me what my problem is with the script below that I have in my header: ? if(!isset($name)||($HTTP_POST_VARS[submit])) { header(Location: form.htm); } ? Thanks, Ben -- 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] Looking for optimal coding
This is not a big thing. But I am looking at this thinking there is a way to make the code take up even less lines. for($i=01;$i=50;$i++) { if (!empty($content)) { if ($row[$content]==$states[$i]) echo option value=\$states[$i]\ selected$nstates[$i]\n; else echo option value=\$states[$i]\$nstates[$i]\n; } else{ if ($dstate == $states[$i]) echo option value=\$states[$i]\ selected$nstates[$i]\n; else echo option value=\$states[$i]\$nstates[$i]\n; } } i would try: for($i=01;$i=50;$i++) { if(!empty($content) $row[$content] == $states[$i]) $selected = selected; elseif($dstate == $states[$i]) $selected = selected; else $selected = ; echo option value=\.$states[$i].\.$selected..$nstates[$i]./option; } trading four echo's for a one echo and a extra var and nest the ifs Basically I want to check for two possible conditions to make an item selected. If the first one is valid then do not check for the other. Get what I mean? Any expert programmers out there with the way to chop this even further? test it :) mvgr, Joffrey van Wageningen -- .-[ Joffrey van Wageningen | WoLFjuh | [EMAIL PROTECTED] ]-- | Networking Event 2000 - www.ne2000.nl - IRCnet:#ne2000, Undernet:#clue | PGP:1024D/C6BA5863 - 3B93 52D3 CB91 9CB7 C50D FA79 865F 628A C6BA 5863 | * We demand guaranteed rigidly defined areas of doubt and uncertainty. | -- Douglas Adams -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] strange behaviour with output buffering
hi, i'm working on content management sytem entirely written in Object oriented PHP using templates i used output buffering to be able to send header calls in the middle of my classes i have noticed that performance has become random meaning that the same script could take from 1 up to 30 seconds in the same conditions, passing exactly the same parms. while trying to find a solution, i removed the ob_end_flush() call while keeping the ob_start() call at the beginning of the script and strangely speed of execution came back to normal. output buffering is still on i am not flushing it out the pages are generated just fine without freeing the buffer ?? i would like to know if anyone has had similr experiences with output buffering this behaviour occured on a windows and a linux box both with php 4.1.1 and pretty much the same php.ini settings Regards Hassan El Forkani http://WarmAfrica.com EveryOne's Africa _ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] http header?
hello php guys, how can i get the http header ? greetings marc -- --- magic garden GmbH - Agentur für Informationsarchitektur Hermannstr. 15 - 70178 Stuttgart (Am Feuersee) www.magic-garden.de ¦ [EMAIL PROTECTED] Tel. (07 11) 619 57-42 ¦ Fax (07 11) 615 01 38 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Looking for optimal coding
for($i=1;$i=50;$i++) { if ((!empty($content) $row[$content] == $states[$i]) || ($dstate == $states[$i])) $selected=SELECTED; else $selected=; printf(option value=\%s\ %s%s/option, $states[$i], $selected, $nstates[$i]); } I always prefer to use printf to mix content and data. And why not use the || your reaching a single solution Jerry Verhoef -Original Message- From: Joffrey van Wageningen [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 10:00 AM To: PHP Email List Subject: Re: [PHP] Looking for optimal coding This is not a big thing. But I am looking at this thinking there is a way to make the code take up even less lines. for($i=01;$i=50;$i++) { if (!empty($content)) { if ($row[$content]==$states[$i]) echo option value=\$states[$i]\ selected$nstates[$i]\n; else echo option value=\$states[$i]\$nstates[$i]\n; } else{ if ($dstate == $states[$i]) echo option value=\$states[$i]\ selected$nstates[$i]\n; else echo option value=\$states[$i]\$nstates[$i]\n; } } i would try: for($i=01;$i=50;$i++) { if(!empty($content) $row[$content] == $states[$i]) $selected = selected; elseif($dstate == $states[$i]) $selected = selected; else $selected = ; echo option value=\.$states[$i].\.$selected..$nstates[$i]./option; } trading four echo's for a one echo and a extra var and nest the ifs Basically I want to check for two possible conditions to make an item selected. If the first one is valid then do not check for the other. Get what I mean? Any expert programmers out there with the way to chop this even further? test it :) mvgr, Joffrey van Wageningen -- .-[ Joffrey van Wageningen | WoLFjuh | [EMAIL PROTECTED] ]-- | Networking Event 2000 - www.ne2000.nl - IRCnet:#ne2000, Undernet:#clue | PGP:1024D/C6BA5863 - 3B93 52D3 CB91 9CB7 C50D FA79 865F 628A C6BA 5863 | * We demand guaranteed rigidly defined areas of doubt and uncertainty. | -- Douglas Adams -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Chat on line met vrienden en probeer MSN Messenger uit: http://messenger.msn.nl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] fopen
On Thu, 2002-02-14 at 18:27, Martin Towell wrote: or read the original file into memory, reopen the file for writing, write the first prepend bit, then write what you just read The problem with that is that you have a time lag (perhaps only in microseconds, but it still is a problem) while you're writing the new data to the file. If some other process--say, another invocation of the same script--tries to read from that file while you're still overwriting it--you've got problems, since it'll find only a partially-written file. That's called a 'race condition'. The other method avoids that, since while you're writing data to the temp file, processes just keep using the original. Once you're done, the rename happens atomically, preventing the race condition. Torben -Original Message- From: Lars Torben Wilson [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 1:18 PM To: John Smythe Cc: [EMAIL PROTECTED] Subject: Re: [PHP] fopen On Thu, 2002-02-14 at 17:34, John Smythe wrote: i wanna know if there is a way of opening a file in a certian mode so when i write to a txt file it writes at the top of the file, and doesnt overwrite whats at the start of the file No, not with fopen(). What you can do is create a temporary file with tempnam(), write the new data to that, *append* the data from the original file, and rename the temp file over the original file. Cheers, Torben Regards, John Smythe http://www.smythey.org/ -- Torben Wilson [EMAIL PROTECTED] http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Torben Wilson [EMAIL PROTECTED] http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] uuencode
Hi! All I want is, to call my php with a URL in my querystring! myphp.php?URL=http my php should download the URL, uuencode it, and then return the uuencoded text! as this should be binary-safe, it thought of using the linux-included uuencode! But how to get the (perhaps large binary) file and use uuencode like uuencode input output? thanks Michi -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mail()
I have been installing NuSphere (Apache and PHP 4.0.6). As that I configure the Apache or PHP, so that I get to use and to test the command mail in my computer? André -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and shadow suite
Can PHP directly work with shadow password suite on Linux machines (reading and writing shadow file)? I supose that some module or extension should be activate so PHP could read and write to files owned by root. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] fsockopen timeout
According to the manual; http://www.php.net/manual/en/function.fsockopen.php Depending on the environment, optional connect timeout may not be available. Does anyone know what environment is needed for it to be available? I have Redhat Linux 7.1 - and the timeout doen't seem to work. Any ideas? Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Apache - Virtual Name
How can I configure the apache, so that my local access is different from http://localhost. I want to access my local server through a virtual name (Example: http://www.test.com). I only want to change the name localhost for any other name. I already possess a domain (Example: www.test.com) and I want to use this same name also in my local server in case I am not connected in the internet, only to simulate some cases of PHP. Thanks, André -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] array variable name
Dnia czwartek 14 luty 2002 21:14, Rick Emery napisa: How can I get the name of array variable into str? what are your trying to do with it?? This: function show_arr($array) //wyswietla wartosci z tablicy wraz z kluczami (przeznaczone do debugowania) { if(DABUG) { echo b---/bbr; echo Array contentsb.strval($array)./bbr; while(list($k,$v)=each($array)) { echo $k = $vbr; } echo b---/b; } } quite useful when making big project with lots of array and debuging -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uuencode
to convert take a look at http://www.php.net/manual/en/function.popen.php IMHO M.N. --- Michael Mehlmann wrote: Hi! All I want is, to call my php with a URL in my querystring! myphp.php?URL=http my php should download the URL, uuencode it, and then return the uuencoded text! as this should be binary-safe, it thought of using the linux-included uuencode! But how to get the (perhaps large binary) file and use uuencode like uuencode input output? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 15 Feb 2002 12:31:44 -0000 Issue 1173
php-general Digest 15 Feb 2002 12:31:44 - Issue 1173 Topics (messages 84848 through 84886): Re: searching key words from a database field 84848 by: David Robley 84849 by: Philip J. Newman 84851 by: Martin Towell 84857 by: David Robley 84858 by: Martin Towell Sessions just not working... 84850 by: Norman Cates 84865 by: Yasuo Ohgaki Re: Sorting an array of arrays 84852 by: Toni Kustiana fopen 84853 by: John Smythe 84854 by: Lars Torben Wilson 84855 by: Martin Towell 84879 by: Lars Torben Wilson GOOD, EASY part-time jobs for PROGRAMERS!!! 84856 by: Balazs Laszlo Re: good practice 84859 by: Peter J. Schoenster 84860 by: Peter J. Schoenster 84861 by: Philip J. Newman Imap-uw Horde::IMP 84862 by: Devin Atencio Re: class and session identyfier 84863 by: Yasuo Ohgaki 84864 by: Yasuo Ohgaki Looking for optimal coding 84866 by: Phillip S. Baker 84867 by: Jason Murray 84875 by: Joffrey van Wageningen 84878 by: LuC . text grabber 84868 by: Jason Whitaker 84871 by: hugh danaher phpTriad 84869 by: mm fernandez How get the name of the array variable? 84870 by: Tomek Golembiewski Empty form 84872 by: Ben Clumeck 84874 by: hugh danaher Re: Decode Encoded text in phpMyAdmin 84873 by: David strange behaviour with output buffering 84876 by: gaouzief http header? 84877 by: marcbey uuencode 84880 by: Michael Mehlmann 84886 by: Mirek Novak Mail() 84881 by: André Felix Miertschink PHP and shadow suite 84882 by: Dejan Milenkovic fsockopen timeout 84883 by: Peter Clarke Apache - Virtual Name 84884 by: André Felix Miertschink Re: array variable name 84885 by: Tomek Golembiewski 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--- In article 000801c1b5b0$ee66f180$0401a8c0@philip, [EMAIL PROTECTED] says... This works for the loop. now spliting up the words. now it searchs for just one word in the loop any suggestions on this - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 14, 2002 9:51 PM Subject: Re: [PHP] searching key words from a database field On Thursday 14 February 2002 16:38, Philip J. Newman wrote: I'm trying to make a search engine for my database of links. I have been using the following. SELECT * FROM `hyperlinks` WHERE 1 AND `keywords` LIKE '%$getme%' ORDER BY `id` ASC LIMIT 0, 30 if $getme = big trees then it would only search for key words that are there same big trees not for big and trees Split up your keywords. Loop through each one to construct something like: SELECT * FROM `hyperlinks` WHERE 1 AND `keywords` LIKE '%big%' AND `keywords` LIKE '%trees%' ORDER BY `id` ASC LIMIT 0, 30 This will only match when ALL the specified keywords are present. To match on any one of the keywords construct something like: SELECT * FROM `hyperlinks` WHERE `keywords` LIKE '%big%' OR `keywords` LIKE '%trees%' ORDER BY `id` ASC LIMIT 0, 30 -- Jason Wong - Gremlins Associates - www.gremlins.com.hk I don't quite understand what you are asking here? You are using explode or something to break the input string into separate words, and then using the list of words to build your query? Perhaps showing your problem code might be useful. -- David Robley Temporary Kiwi! ---End Message--- ---BeginMessage--- the problem is there isn't any code yet and yes what you said is corrent if text input is: the big tree would like $string1 = the would like $string2 = big would like $string3 = tree and so on and so on for all the key words entered. Each key word needs to have its own string alocated. Any suggestions. ps: nice to see another kiwi in here. - Original Message - From: David Robley [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 15, 2002 1:19 PM Subject: Re: [PHP] searching key words from a database field In article 000801c1b5b0$ee66f180$0401a8c0@philip, [EMAIL PROTECTED] says... This works for the loop. now spliting up the words. now it searchs for just one word in the loop any suggestions on this - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 14, 2002 9:51 PM Subject: Re: [PHP] searching key words from a database field On Thursday 14 February 2002 16:38, Philip J. Newman wrote: I'm trying to make a search engine for my database of links. I
[PHP] Difference between vpopmail_add_domain AND vpopmail_add_domain_ex
Hi, where's the difference between the Popmail vpopmail_add_domain AND vpopmail_add_domain_ex?? Do you have to make vpopmail_add_domain first, before you make vpopmail_add_domain_ex? Thanx, -- Mit freundlichem Gruß, Johannes Tyra -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] db design
hi all, I need some tips on database (mySQL) design. The problems lie in languages. I'm gonna make a e-commerce webiste. it's rather big (in my terms/experience). The website should be expandible easily with regard to languages/translations. My biggest table with product descriptions has 43 columns. Other tables include a list of FAQ's, manufacturers and so on. What do you think I have to do? Make a new table for each language, or define more columns for each language within a table? What is normal in this, also with regard to doing queries? e.g. In the table with 43 columns, there are 11 columns which are the same for each language (product name, manufacturer and so on) The other columns will depend on language (like product description). --If I use a seperate table for each language than there is double info (no normalization with regard to the 11 columns) --If I use more columns, than I have 32 columns extra per language. If I make 10 translations, then this table will reach over 10x32=320 columns. I need somebody who can give me overall info on this, or shine a broad light on my Q. Does the db design has a large influence on flexibility with regard to future expanding? And how about query times (response) on a server. I don't want it to get too slow Well I think, you know my point now, any info is much appreciated!! thx in advance, Wilbert Enserink - Pas de Deux Van Mierisstraat 25 2526 NM Den Haag tel 070 4450855 fax 070 4450852 http://www.pdd.nl [EMAIL PROTECTED] - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How get the name of the array variable?
Tomek, I got the problem , I want make preety debug function that shows array keys and values and name of the variable containing array: Here it is: function show_arr($array) //wyswietla wartosci z tablicy wraz z kluczami (przeznaczone do debugowania) { if(DABUG) { echo b---/bbr; echo Array contentsb.strval($array)./bbr; while(list($k,$v)=each($array)) { echo $k = $vbr; } echo b---/b; } } unfortunatly strval want work with arrays... Any possible solution how to get name of the array variable? This doesn't solve the strval problem, but in my debug output I wasn't so interested in the array's name, as in the meaning/status of the data it contained. Here is an equivalent approach (- the idea of nesting the two functions was the subject of a conversation with Torben here, a few days back): Function ShowList( $title, $aList ) // Debug output routine to echo an array/list to the screen //requires a documentary name for the list as $title //requires the array to be listed as $aList // NB co-requisite FnShowListItem { echo brListing array=$title: n= . count( $aList ); array_walk( $aList, FnShowListItem ); } Function FnShowListItem( $item, $key ) { echo br$key= . $item . ~; } //end of function ShowList In the main routine make a call something like: if ( DEBUG ) ShowList( Prefixed, $aURLs ); Please feel free to translate it into Polish. I haven't tried to time/test, but I figured that the array_walk() would be more efficient than writing an (interpreted) PHP loop to run through the entire array/list, even with the function call. Perhaps someone can confirm/refute that? Regards, =dn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uuencode
to convert take a look at http://www.php.net/manual/en/function.popen.php thanks, but you can only write OR read to popen() but I need to write AND read to/from uuencode!!! thanks michi IMHO M.N. --- Michael Mehlmann wrote: Hi! All I want is, to call my php with a URL in my querystring! myphp.php?URL=http my php should download the URL, uuencode it, and then return the uuencoded text! as this should be binary-safe, it thought of using the linux-included uuencode! But how to get the (perhaps large binary) file and use uuencode like uuencode input output? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Using winpopup to notify users
Thanks, very useful info... I'll prolly use that with some code, detect windows then do a net send othewise if not windows do as you suggest... Just have to escapeshellargs first... :) -Garth Northern.CA ===-- http://www.northern.ca Canada's Search Engine On Thu, 14 Feb 2002 15:24:05 +0100 Tomek Golembiewski wrote: Dnia czwartek 14 luty 2002 13:55, Garth Dahlstrom napisa³: I'm wondering if anyone has a class to do a the equivalent of a net send through PHP? If U got samba instaled on Your serwer U can always do exec(smbclient -M $message); Thanks, -Garth Northern.CA ===-- http://www.northern.ca Canada's Search Engine -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Finding out the resolution of an image
Hi there, I would like to do an upload thing with images. Is their a way to find out which resolution the image has the client wants to upload? I know the hight and with are values provided. As well as the file size. But you never know the compression. So two unknown variables. Is there a way to do a math thing on that? Thanx for any help ANdy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How get the name of the array variable?
This doesn't solve the strval problem, :((( it's the only problem I have but in my debug output I wasn't so interested in the array's name, as in the meaning/status of the data it contained. Here is an equivalent approach (- the idea of nesting the two functions was the subject of a conversation with Torben here, a few days back): Please feel free to translate it into Polish. How did You know it was Polish? :) I haven't tried to time/test, but I figured that the array_walk() would be more efficient than writing an (interpreted) PHP loop to run through the entire array/list, even with the function call. Efficient is not the main problem when U debuging scripts IMHO. I found that on php.net in doc. function db($call,$cname) { // call: the variable you want to print_r // cname: the label for your debugging output if (DEBUG) { global $SCRIPT_NAME; echo prefont size=2$cname in $SCRIPT_NAME; if (!is_array($call)) { $call=htmlspecialchars($call); } print_r($call); if ( is_array($call)) { reset($call); } echo /font/pre--; } // end function db() == } Very nice IMO, but still not solve the value name problem. BTW it's third solution that I see and every one of them have label for your debugging output given as parameter. But I'm very lezy and I prefer to write down db($my_var) then db($my_var,this is my_var), I doing lot's of debugin. Regards, TG -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Dynamic Date Select and SQL
I have a problem I hope someone can help me with... Firstly I have an SQL Query with a WHERE dateMonthAndYear = $month1 Already this shows part of what I'm trying to do. The date format in the DB is -MM-DD HH:MM:SS. Now I need to dynamically generate a pulldown of months... The range of months in the pulldown are historical, so the last month would be the current month (which should also be the SELECTED option). The first month would be a fixed date, say Jan 2002. The value of the options would probably be like so: select name=month1 // --- Jump Menu option value=$PHP_SELF?month1=$current_month SELECTEDFeb 2002/option // --- Current Month (SELECTED) option value=$PHP_SELF?month1=$first_month$first_month_text/option // --- First Month in range option value=$PHP_SELF?month1=$subsequent_month1$subsequent_month1_text/option // --- Other months in range . // --- Other months in range option value=$PHP_SELF?month1=$current_month SELECTEDFeb 2002/option // --- Current Month option value=$PHP_SELF?month1=ALL/option // --- Empty value will show all /select I guess the question is, how do I dynamically create the select, based on the above spec (or make $first_month, the first month available in the SQL Query i.e. get the earliest month from the Query), then do the select using ONLY the month and year information. I can do most of the bits in between, just do know how to do the dynamic select for this particular application, or get the date into the SQL where ONLY the month and year are relevant. I am using Pear DB and need this to work on MySQL and Access through Pear so the SQL needs to be quite standard. The above code is not syntaxed properlyjust meant for readability. Any ideas are much appreciated as I don't even know where to start with this one. Thanks Simon H -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Looking for optimal coding
-Original Message- From: Joffrey van Wageningen [mailto:[EMAIL PROTECTED]] Sent: 15 February 2002 09:00 i would try: for($i=01;$i=50;$i++) { if(!empty($content) $row[$content] == $states[$i]) $selected = selected; elseif($dstate == $states[$i]) $selected = selected; else $selected = ; echo option value=\.$states[$i].\.$selected..$nstates[$i]./option; } Well, all the boolean operators use lazy evaluation, so you can safely collapse your tests into a single one. Also, using the ?: operator, you can turn the whole thing into a single echo statement: for($i=01;$i=50;$i++): echo option value=\${states[$i]}\ .((!empty($content) $row[$content] == $states[$i]) || $dstate == $states[$i] ? selected : ) .${nstates[$i]}/option; endfor; Mind you, I wouldn't particularly claim this to be particularly readable, but it's about as compact as you can get! Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] COOKIE HEADER????
hey php guys, i have a problem: i have extracted cookie information from the header of an ASP site in an PHP script, and now i want to send these session information back to an ASP site in order that the ASP site remember me. i dont know how i have to send it back, because i dont kown where and how to put the ASPSESSIONIDKJHKJHHKJH=HJVHJGHJGJGHJGJHGKJ information (in the header?) any idea??? greetings marc -- --- magic garden GmbH - Agentur für Informationsarchitektur Hermannstr. 15 - 70178 Stuttgart (Am Feuersee) www.magic-garden.de ¦ [EMAIL PROTECTED] Tel. (07 11) 619 57-42 ¦ Fax (07 11) 615 01 38 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How get the name of the array variable?
your mailing address TLD (the .pl in emarket.pl) says you're from Poland -Original Message- From: Tomek Golembiewski [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 7:20 AM To: DL Neil; [EMAIL PROTECTED] Subject: Re: [PHP] How get the name of the array variable? Please feel free to translate it into Polish. How did You know it was Polish? :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail()
It should be configured automatically if you have PHP compiled into your Apache server. That said, I know nothing about NuSphere, so they might do something different. Have you tried??? -Original Message- From: André Felix Miertschink [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 5:55 AM To: [EMAIL PROTECTED] Subject: [PHP] Mail() I have been installing NuSphere (Apache and PHP 4.0.6). As that I configure the Apache or PHP, so that I get to use and to test the command mail in my computer? André -- 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] The ASP application object in PHP?
I've recently started to learn ASP (*ducks the hurled flowerpots and vases*) because my school requires it, but of course I prefer PHP for my own scripting needs. I have however, noticed one feature that ASP has that I have not found an equal for in PHP: the application object. For those of you not familiar with ASP, the lowdown is this: The application object acts like a global session. You assign it variables and values like you would a session, but those variables are available to all instances and sessions. It is for example very useful to track different users at the same time, or to send messages from one session to another, or the likes. Anything like this in PHP, or will I have to find a workaround for it, or *ick* do that little sniplet in ASP? Thanks, Bendik Simonsen --- [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Access Denied !!
Hi, I'm facing a rather tricky problem. The thing is, while connecting to the mySQL database using my php page, i get the acess denied error on only One Particular command, and on any other query, the same page, with the same login details works fine! For ex, this works fine : ?php $db = mysql_connect(localhost,m,pwd); mysql_select_db(m,$db); $sql = CREATE table try (ID bigint(21) NOT NULL auto_increment, name varchar(50), email varchar(70), PRIMARY KEY (ID)); $result = mysql_query($sql); echo Thank you! Your information has been entered.\n; ? But this gives an Access Denied error : ?php $db = mysql_connect(localhost,m,pwd); mysql_select_db(m,$db); $query = LOAD DATA INFILE 'fanlist.csv' INTO TABLE try FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\' LINES TERMINATED BY '\n'; mysql_query($query) or die(error:. mysql_error()); ? Why is this happening? T. Edison jr. = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Got something to say? Say it better with Yahoo! Video Mail http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Apache - Virtual Name
edit /etc/httpd/conf/httpd.conf look for ServerName in Core directives. Change to something like: ServerName myserver Find VirtualHost section and locate a VirtualHost block. It should be commented out. Copy the lines between #VirtualHost #/VirtualHost and paste them. Remove # comment designator. Change to: VirtualHost 192.168.1.6 ServerName www.test.com DocumentRoot /var/www/testsite/html ServerAdmin [EMAIL PROTECTED] /VirtualHost In the above, change 192.168.1.6 to the internal IP address of you Apache host Find the NameVirtualHost directive that preceds the VirtualHost directives. Change to: NameVirtualHost 192.168.1.6 create a directory: /var/www/testsite/html put an index.html file in it. go to /etc/init.d, type: ./httpd restart Ensure your DNS records ( A, CNAME ) for test.com point to the static IP address of your system. If you do not have direct control of your DNS records, use www.everydns.net to do so. Read the Apache PDF documentation at www.apache.org concerning Virtual Hosts Get more info from one of the Apache mailing lists I just went through this exercise, so the frustration and pain is still fresh -Original Message- From: André Felix Miertschink [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 6:05 AM To: [EMAIL PROTECTED] Subject: [PHP] Apache - Virtual Name How can I configure the apache, so that my local access is different from http://localhost. I want to access my local server through a virtual name (Example: http://www.test.com). I only want to change the name localhost for any other name. I already possess a domain (Example: www.test.com) and I want to use this same name also in my local server in case I am not connected in the internet, only to simulate some cases of PHP. Thanks, André -- 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] Access Denied !!
Thomas, What happens when you enter the LOAD DATA INFILE command directly into the MYSQL command line? -Original Message- From: Thomas Edison Jr. [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 7:58 AM To: [EMAIL PROTECTED] Subject: [PHP] Access Denied !! Hi, I'm facing a rather tricky problem. The thing is, while connecting to the mySQL database using my php page, i get the acess denied error on only One Particular command, and on any other query, the same page, with the same login details works fine! For ex, this works fine : ?php $db = mysql_connect(localhost,m,pwd); mysql_select_db(m,$db); $sql = CREATE table try (ID bigint(21) NOT NULL auto_increment, name varchar(50), email varchar(70), PRIMARY KEY (ID)); $result = mysql_query($sql); echo Thank you! Your information has been entered.\n; ? But this gives an Access Denied error : ?php $db = mysql_connect(localhost,m,pwd); mysql_select_db(m,$db); $query = LOAD DATA INFILE 'fanlist.csv' INTO TABLE try FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\' LINES TERMINATED BY '\n'; mysql_query($query) or die(error:. mysql_error()); ? Why is this happening? T. Edison jr. = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Got something to say? Say it better with Yahoo! Video Mail http://mail.yahoo.com -- 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] uuencode
uuencode() is a function, not a process. You cannot read and write to it. It takes a string and converts it. Then use uudecode() to translate it back. Now, what do you REALLY want to do?? -Original Message- From: Michael Mehlmann [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 6:51 AM To: [EMAIL PROTECTED] Cc: Mirek Novak Subject: Re: [PHP] uuencode to convert take a look at http://www.php.net/manual/en/function.popen.php thanks, but you can only write OR read to popen() but I need to write AND read to/from uuencode!!! thanks michi IMHO M.N. --- Michael Mehlmann wrote: Hi! All I want is, to call my php with a URL in my querystring! myphp.php?URL=http my php should download the URL, uuencode it, and then return the uuencoded text! as this should be binary-safe, it thought of using the linux-included uuencode! But how to get the (perhaps large binary) file and use uuencode like uuencode input output? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net -- 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] Sessions just not working...
Did you register each variable individually? Did you have a session_start() as the first line of each page? -Original Message- From: Norman Cates [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 6:34 PM To: [EMAIL PROTECTED] Subject: [PHP] Sessions just not working... I cannot get session information to work under any circumstances I think I've read every single comment on http://www.php.net/manual/en/ref.session.php session_start(); Function setup() { global $HTTP_SESSION_VARS; if (!(isset($HTTP_SESSION_VARS[notesType]))){ $HTTP_SESSION_VARS[notesType]=DAILY; } if (isset($HTTP_GET_VARS[notesTypeFilter])){ $HTTP_SESSION_VARS[notesType]=$HTTP_GET_VARS[notesTypeFilter]; } } // End setup Function //Call the page with page.php?notesTypeFilter=ALL setup(); //$HTTP_SESSION_VARS[notesType] returns all //Call the page with page.php //Read $HTTP_SESSION_VARS. It's empty. It should return ALL I do have register_global set. And I do have track_vars set. But even reading the comments on the above page, nothing will work. It will not persist with the session variable... Am I doing something wrong? Norman -- 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] http header?
you get get some header variable data, such as $HTTP_REFERER execute ?php phpinfo(); ? to determine what is available to you (differs from system to system) You might also iterate through $HTTP_SERVER_VARS[], $HTTP_ENV_VARS[] -Original Message- From: marcbey [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 3:39 AM To: [EMAIL PROTECTED] Subject: [PHP] http header? hello php guys, how can i get the http header ? greetings marc -- --- magic garden GmbH - Agentur für Informationsarchitektur Hermannstr. 15 - 70178 Stuttgart (Am Feuersee) www.magic-garden.de ¦ [EMAIL PROTECTED] Tel. (07 11) 619 57-42 ¦ Fax (07 11) 615 01 38 -- 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] uuencode
uuencode() is a function, not a process. You cannot read and write to it. It takes a string and converts it. Then use uudecode() to translate it back. it's the first time, I hear of this php-function (which version do you use). I use v4.0.6 and there isn't such a function! I only knew of the base64_encode and -_decode - function! Now, what do you REALLY want to do?? I want to save (binary) files as uuencoded-files! thanks michi to convert take a look at http://www.php.net/manual/en/function.popen.php thanks, but you can only write OR read to popen() but I need to write AND read to/from uuencode!!! thanks michi IMHO M.N. --- Michael Mehlmann wrote: Hi! All I want is, to call my php with a URL in my querystring! myphp.php?URL=http my php should download the URL, uuencode it, and then return the uuencoded text! as this should be binary-safe, it thought of using the linux-included uuencode! But how to get the (perhaps large binary) file and use uuencode like uuencode input output? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net -- 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 -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Access Denied !! SOLVED!!
Hi, well, after about a week or so, finally, the turmoil fire has extinguished. the whole problem of importing .csv data and the access denied thingy has been solved, all due to just 'one' single syntax! As it turns out, the command to be applied is NOT THIS : LOAD DATA INFILE 'fanlist.csv' INTO TABLE try FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\' LINES TERMINATED BY '\n' But in fact it is THIS : LOAD DATA LOCAL INFILE 'fullpath/fanlist.csv' REPLACE INTO TABLE try FIELDS TERMINATED BY ';' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\r\n' Wether you enter the command directly into the mySQL command line, or through PHP, the error was coming the same, and now with this, it works both ways too! The syntax being missed was LOCAL in Load Data! Thank! T. Edison Jr. --- Rick Emery [EMAIL PROTECTED] wrote: Thomas, What happens when you enter the LOAD DATA INFILE command directly into the MYSQL command line? -Original Message- From: Thomas Edison Jr. [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 7:58 AM To: [EMAIL PROTECTED] Subject: [PHP] Access Denied !! Hi, I'm facing a rather tricky problem. The thing is, while connecting to the mySQL database using my php page, i get the acess denied error on only One Particular command, and on any other query, the same page, with the same login details works fine! For ex, this works fine : ?php $db = mysql_connect(localhost,m,pwd); mysql_select_db(m,$db); $sql = CREATE table try (ID bigint(21) NOT NULL auto_increment, name varchar(50), email varchar(70), PRIMARY KEY (ID)); $result = mysql_query($sql); echo Thank you! Your information has been entered.\n; ? But this gives an Access Denied error : ?php $db = mysql_connect(localhost,m,pwd); mysql_select_db(m,$db); $query = LOAD DATA INFILE 'fanlist.csv' INTO TABLE try FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\' LINES TERMINATED BY '\n'; mysql_query($query) or die(error:. mysql_error()); ? Why is this happening? T. Edison jr. = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Got something to say? Say it better with Yahoo! Video Mail http://mail.yahoo.com -- 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 = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Got something to say? Say it better with Yahoo! Video Mail http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] good practice
It does to a certain extent. If you're writing code that you're expecting others to see and use, you should try to be consistent and follow convention. If you write up a large project in C++ and suddenly start naming header files with a .doc extension, somebody's going to get confused. Of course, if nobody's using your code but yourself, then whatever. But for the purposes of consistency, portability and common sense, following a common coding standard is a good thing. J Philip J. Newman wrote: WHo really cares, if it works it don't matter what they call it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] db design
I would make 2 tables, a product table and a language table... It would look like so: Product ID | product name | manufacturer | etc Then a language table that looks like: Language ID | Product ID | product description | etc Then you won't be replicated your 11 columns since they are not in the product table anymore.. If there are 100 products, and 1 language then there will be 100 records in the product table and 100 in the language table. If there are 2 languages then there will be 200 in the language table. This method means you will be able to expand your language endless... and I don't think your DB Server will be slowed down too much by this, since u can pull this all of with 1 query.. something like (from memory) SELECT tblProducts.name, tblLanguage.Description FROM tblProducts, tblLanguage WHERE tblProducts.productID=tblLanguage.productID AND {some other query} Hope this helps Andrew - Original Message - From: Wilbert Enserink [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 15, 2002 12:33 PM Subject: [PHP] db design hi all, I need some tips on database (mySQL) design. The problems lie in languages. I'm gonna make a e-commerce webiste. it's rather big (in my terms/experience). The website should be expandible easily with regard to languages/translations. My biggest table with product descriptions has 43 columns. Other tables include a list of FAQ's, manufacturers and so on. What do you think I have to do? Make a new table for each language, or define more columns for each language within a table? What is normal in this, also with regard to doing queries? e.g. In the table with 43 columns, there are 11 columns which are the same for each language (product name, manufacturer and so on) The other columns will depend on language (like product description). --If I use a seperate table for each language than there is double info (no normalization with regard to the 11 columns) --If I use more columns, than I have 32 columns extra per language. If I make 10 translations, then this table will reach over 10x32=320 columns. I need somebody who can give me overall info on this, or shine a broad light on my Q. Does the db design has a large influence on flexibility with regard to future expanding? And how about query times (response) on a server. I don't want it to get too slow Well I think, you know my point now, any info is much appreciated!! thx in advance, Wilbert Enserink - Pas de Deux Van Mierisstraat 25 2526 NM Den Haag tel 070 4450855 fax 070 4450852 http://www.pdd.nl [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
[PHP] Re: fsockopen timeout
OK I've found it... The time out value is a FLOAT. So a timeout of 1 second is 1.0. Strange since the examples in the manual are integers. Anyway this works: $socket = fsockopen($urlArray[host], $urlArray[port], $errnum, $errstr, 1.0); Peter Clarke [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... According to the manual; http://www.php.net/manual/en/function.fsockopen.php Depending on the environment, optional connect timeout may not be available. Does anyone know what environment is needed for it to be available? I have Redhat Linux 7.1 - and the timeout doen't seem to work. Any ideas? Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How get the name of the array variable?
So Rick, Guess you've squashed my little scheme for (fraudulently) convincing everyone that I can speak Polish fluently - given that I counldn't answer Tomek's question, I'm already scoring it up as a 'bad day'! On the subject of email addresses, does this observation mean that we are patriotic but you are not? =dn OT polishing of PHP (Programming his Puns) your mailing address TLD (the .pl in emarket.pl) says you're from Poland Please feel free to translate it into Polish. How did You know it was Polish? :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] uuencode
Sorry...I missed it...I was thinking of urlencode(). Lack of sleep, I guess I would suggest doing GOOGLE search for the uuencode algorithm and coding it in PHP -Original Message- From: Michael Mehlmann [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 8:38 AM To: Rick Emery Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] uuencode uuencode() is a function, not a process. You cannot read and write to it. It takes a string and converts it. Then use uudecode() to translate it back. it's the first time, I hear of this php-function (which version do you use). I use v4.0.6 and there isn't such a function! I only knew of the base64_encode and -_decode - function! Now, what do you REALLY want to do?? I want to save (binary) files as uuencoded-files! thanks michi to convert take a look at http://www.php.net/manual/en/function.popen.php thanks, but you can only write OR read to popen() but I need to write AND read to/from uuencode!!! thanks michi IMHO M.N. --- Michael Mehlmann wrote: Hi! All I want is, to call my php with a URL in my querystring! myphp.php?URL=http my php should download the URL, uuencode it, and then return the uuencoded text! as this should be binary-safe, it thought of using the linux-included uuencode! But how to get the (perhaps large binary) file and use uuencode like uuencode input output? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net -- 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 -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] how to require php file in a.html file
Hi, How do you (or is it possible) to ask a html tagged file (snoopy.html) to include a php file that reads and embeds cookies and talks to a MySQL database? The code below (written before the html tag) is not working for me and really want to avoid changing all my .html files to .php files. Thanks for any help, David ? // includes include(track.php); ? html etc... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How get the name of the array variable?
Actually, if I had my druthers, my domain TLD would be .texas. Some day, when Texas becomes the independent country it should be, that will be my TLD. BIG Frigging GRIN -Original Message- From: DL Neil [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 8:57 AM To: Rick Emery; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] How get the name of the array variable? So Rick, Guess you've squashed my little scheme for (fraudulently) convincing everyone that I can speak Polish fluently - given that I counldn't answer Tomek's question, I'm already scoring it up as a 'bad day'! On the subject of email addresses, does this observation mean that we are patriotic but you are not? =dn OT polishing of PHP (Programming his Puns) your mailing address TLD (the .pl in emarket.pl) says you're from Poland Please feel free to translate it into Polish. How did You know it was Polish? :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to require php file in a.html file
If you're using apache, make sure .html is included as an extension that gets parsed by PHP. Tyler - Original Message - From: mysqlphp [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 15, 2002 8:08 AM Subject: [PHP] how to require php file in a.html file Hi, How do you (or is it possible) to ask a html tagged file (snoopy.html) to include a php file that reads and embeds cookies and talks to a MySQL database? The code below (written before the html tag) is not working for me and really want to avoid changing all my .html files to .php files. Thanks for any help, David ? // includes include(track.php); ? html etc... -- 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] good practice
On Thursday, February 14, 2002, at 04:40 PM, Michael Kimsal wrote: On that same topic, *why* do people name files with both .inc and .php? Your .inc file has PHP code in it, right? Why not just call it .php and spare the server reconfiguration. If knowing which files are include files (long time since I've made that distinction!) just prepend them with inc_ or put them all in an includes/ directory. If you are including a file into another file with PHP's 'include()' function, it doesn't matter what the extension is. You don't even need an extension. Apache doesn't even see this as a separate file, it thinks of it all as one big file with the name of whichever file is doing the including. Giving the .inc suffix is a nice way to keep your code organized. Also, I keep my .incs in a separate directory. Not to mention I have a directive in my server's conf file that specifically prevents it from serving any file with the extension '.inc'. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] uuencode
Sorry...I missed it...I was thinking of urlencode(). Lack of sleep, I guess and I thougth it was my lack of sleep ;-) I would suggest doing GOOGLE search for the uuencode algorithm and coding it in PHP already done - found only a non-binary-safe coding!! thanks michi -Original Message- From: Michael Mehlmann [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 8:38 AM To: Rick Emery Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] uuencode uuencode() is a function, not a process. You cannot read and write to it. It takes a string and converts it. Then use uudecode() to translate it back. it's the first time, I hear of this php-function (which version do you use). I use v4.0.6 and there isn't such a function! I only knew of the base64_encode and -_decode - function! Now, what do you REALLY want to do?? I want to save (binary) files as uuencoded-files! thanks michi to convert take a look at http://www.php.net/manual/en/function.popen.php thanks, but you can only write OR read to popen() but I need to write AND read to/from uuencode!!! thanks michi IMHO M.N. --- Michael Mehlmann wrote: Hi! All I want is, to call my php with a URL in my querystring! myphp.php?URL=http my php should download the URL, uuencode it, and then return the uuencoded text! as this should be binary-safe, it thought of using the linux-included uuencode! But how to get the (perhaps large binary) file and use uuencode like uuencode input output? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net -- 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 -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: The ASP application object in PHP?
Bendik Simonsen wrote: I've recently started to learn ASP (*ducks the hurled flowerpots and vases*) because my school requires it, but of course I prefer PHP for my own scripting needs. I have however, noticed one feature that ASP has that I have not found an equal for in PHP: the application object. For those of you not familiar with ASP, the lowdown is this: The application object acts like a global session. You assign it variables and values like you would a session, but those variables are available to all instances and sessions. It is for example very useful to track different users at the same time, or to send messages from one session to another, or the likes. Anything like this in PHP, or will I have to find a workaround for it, or *ick* do that little sniplet in ASP? Thanks, Bendik Simonsen It doesn't exist. ASP is an application framework which exposes and manages those types of objects. It could easily be approximated simply by storing things in a database. There are significant drawbacks to earlier versions of ASP's handling of application variables - I can not vouch for these issues with Windows 2000 and above. However: 1. Application variables didn't scale across machines. Just like session variables, application variables were/are tied to one machine. In load balanced environments, this is useless. 2. Resource management. Application variables were tied to a specific thread, so even in your multithreaded IIS environment, accessing/updating app variables would require a specific thread to be open/available. If 10 threads needed to update the application variable, they'd all have to wait sequenatially. 3. Easy to abuse. So many people abused the heck out of them it gave ASP a bad name in speed with average users. MS went so far as to say in some of their white papers not to use application variables if speed was a concern. Also, many people would put database connection objects inside application variables, which was just hilarious, because of the single-thread issue above. There are a few other issues with application variables which rub me the wrong way - at least the early MS implementations - again, I can't speak to modern variations, but I suspect many of the same issues exist to some degree or another. They seem much like a 'crutch' if you will - if you need global variables, build an 'appobject' table and put variables in there, and simply create some functions to manage it. Maybe even create an 'application object' of your own, and instantiate it at the start of every PHP request. It would be a farily trivial thing, except for 'restarting' the application object when the application was 'restarted' (stop/start IIS, among other things). Remember, ASP is not a language, and PHP is. You're not programming ASP - you are most likely programming VBScript and your server environment gives that language access to server-specific functions such as an application object. Remember the distinction, and it should be easy to see how to duplicate that type of functionality within the context of the PHP language. Hope that helps. P.S. This is the kind of stuf we go over in depth in our PHP training courses for people migrating from ASP and/or operating in dual-language mode. :) -- Michael Kimsal http://www.tapinternet.com/php PHP Training Courses 734-480-9961 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] good practice
Erik Price wrote: On Thursday, February 14, 2002, at 04:40 PM, Michael Kimsal wrote: On that same topic, *why* do people name files with both .inc and .php? Your .inc file has PHP code in it, right? Why not just call it .php and spare the server reconfiguration. If knowing which files are include files (long time since I've made that distinction!) just prepend them with inc_ or put them all in an includes/ directory. If you are including a file into another file with PHP's 'include()' function, it doesn't matter what the extension is. You don't even need an extension. Apache doesn't even see this as a separate file, it thinks of it all as one big file with the name of whichever file is doing the including. Giving the .inc suffix is a nice way to keep your code organized. Also, I keep my .incs in a separate directory. Not to mention I have a directive in my server's conf file that specifically prevents it from serving any file with the extension '.inc'. That's great for you that you have that luxury, as do I, but not everyone has access to their server's conf file. 'Organizing' would be better served with the separate directory and/or a prepend, because most directory structures are sorted by name by default. I replied privately to someone on this already, but I'll post it here as well. The majority of people learning PHP do so by examining other code, and a great many do so in shared hosting environments where they can't control the server config files. Furthermore, because they are new they don't understand the security implications of .inc or other extensions, and blindly copy code and run it without knowing they are exposed security-wise. That's my primary beef with .inc and other non- .php extensions. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] creating PDF on the fly
Hi, I don't know if this question was here before.. but... :-) I would like to know if someone have some experience on creating PDF files on the fly, in my new job I need to do this .. well.. actually I must do this :-) files to be generated are documents with free information for any user of our website, but some documents must have portrait and landscape pages.. I found a couple of classes but with them I only can create informs in portrait or landscape orientation then how can I create a pdf file (on the fly) that containt portrait and landscape orientation? I hope that you can understand my tarzan-english :-) thanks. Best Regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Installing php_4.0.6 on Mandarke
Hi all, I have just installed Mandrake 8.1 with MySQL, Apache and PHP and Apache and MySQL are working but when I do the phpinfo.php file I get a 404 error even though the file is there. It is as though it cannot see php files. Any suggestions? George -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Anyway to open a PHP file and view its code in the browser?
If you are on the same machine, why don't you just open the file as follows: file:/filename.php Just don't go thru the webserver. --- Kevin Stone [EMAIL PROTECTED] wrote: How can I open a local PHP script and view its code to the browser? The Readfile() method appears to parse and execute the code. The Fopen() method appears to parse and then not execute the code, leaving a blank screen, or at the very least displaying any non-PHP text existing in the script. This is obviously rare question because I can't find any references on this list or on Usenet. Is there a trick to this? Or is it simply not possible. Much Thanks, Kevin Stone [EMAIL PROTECTED] = Anas Mughal [EMAIL PROTECTED] [EMAIL PROTECTED] Tel: 973-249-6665 __ Do You Yahoo!? Got something to say? Say it better with Yahoo! Video Mail http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Polymorphism question
I am new to PHP but 10 years in C++ One of the cool/powerful things you can do in C++ is the following: class DrawPlainDialog { public: ... virtual Draw(); // implementation draws a vanilla dialog box }; class DrawStyleDialog : public DrawPlainDialog { public: ... virtual Draw(); // implementation draws better dialog }; Somewhere in my code I have a function like: void ShowGUI( DrawPlainDialog dd ) { dd.Draw(); } ShowGUI can be called with any object that is derived from DrawPlainDialog, obviously. Only code that calls ShowGUI must be changed when a new implementation of DrawPlainDialog is used. This feature of C++ to have a base class pointer (or reference) be able to access derived class functionality is not something I've seen in any PHP documentation. Does it exist, and if not is there a workaround for this highly desirable feature? TIA Rich PS Can anyone point me to the most comprehensive OOP documentation for PHP? -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How get the name of the array variable?
Lone Star Rick, I see that your day, and helpfulness to list members, is going a lot better than mine! Actually, if I had my druthers, my domain TLD would be .texas. Some day, when Texas becomes the independent country it should be, that will be my TLD. BIG Frigging GRIN If it comes from TX... it would have to be BIG! There have been some moves in the last few days to get the .US TLD sorted out and properly mobilised. That would give you -.TX.US. Santa Anna mightn't like it, but at least you could get to be both patriotic and parochial, er, provincial ! =dn Citizen of the world, and hoarder of TX jokes So Rick, Guess you've squashed my little scheme for (fraudulently) convincing everyone that I can speak Polish fluently - given that I counldn't answer Tomek's question, I'm already scoring it up as a 'bad day'! On the subject of email addresses, does this observation mean that we are patriotic but you are not? =dn OT polishing of PHP (Programming his Puns) your mailing address TLD (the .pl in emarket.pl) says you're from Poland Please feel free to translate it into Polish. How did You know it was Polish? :) -- 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] Dynamic Date Select and SQL
If I understand your question, you are looking for the MYSQL sql statement. Based upon your info, I've found something like this example: mysql describe a; ++--+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | ++--+--+-+-+---+ | mydate | datetime | YES | | NULL| | ++--+--+-+-+---+ 1 row in set (0.04 sec) mysql select * from a; +-+ | mydate | +-+ | 2002-01-01 12:00:00 | | 2002-02-01 12:00:00 | | 2002-03-01 12:00:00 | | 2002-04-01 12:00:00 | | 2002-05-01 12:00:00 | | 2002-06-01 12:00:00 | | 2002-07-01 12:00:00 | +-+ 7 rows in set (0.00 sec) mysql select year(mydate)*100+month(mydate) as sel,mydate, concat(left(monthname(mydate),3),' ',year(mydate)) as monyr from a where mydate now()+03; ++-+--+ | sel| mydate | monyr| ++-+--+ | 200201 | 2002-01-01 12:00:00 | Jan 2002 | | 200202 | 2002-02-01 12:00:00 | Feb 2002 | | 200203 | 2002-03-01 12:00:00 | Mar 2002 | | 200204 | 2002-04-01 12:00:00 | Apr 2002 | | 200205 | 2002-05-01 12:00:00 | May 2002 | ++-+--+ 5 rows in set (0.05 sec) -Original Message- From: Simon H [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 6:32 AM To: PHP General Subject: [PHP] Dynamic Date Select and SQL Sensitivity: Confidential I have a problem I hope someone can help me with... Firstly I have an SQL Query with a WHERE dateMonthAndYear = $month1 Already this shows part of what I'm trying to do. The date format in the DB is -MM-DD HH:MM:SS. Now I need to dynamically generate a pulldown of months... The range of months in the pulldown are historical, so the last month would be the current month (which should also be the SELECTED option). The first month would be a fixed date, say Jan 2002. The value of the options would probably be like so: select name=month1 // --- Jump Menu option value=$PHP_SELF?month1=$current_month SELECTEDFeb 2002/option // --- Current Month (SELECTED) option value=$PHP_SELF?month1=$first_month$first_month_text/option // --- First Month in range option value=$PHP_SELF?month1=$subsequent_month1$subsequent_month1_text/option // --- Other months in range . // --- Other months in range option value=$PHP_SELF?month1=$current_month SELECTEDFeb 2002/option // --- Current Month option value=$PHP_SELF?month1=ALL/option // --- Empty value will show all /select I guess the question is, how do I dynamically create the select, based on the above spec (or make $first_month, the first month available in the SQL Query i.e. get the earliest month from the Query), then do the select using ONLY the month and year information. I can do most of the bits in between, just do know how to do the dynamic select for this particular application, or get the date into the SQL where ONLY the month and year are relevant. I am using Pear DB and need this to work on MySQL and Access through Pear so the SQL needs to be quite standard. The above code is not syntaxed properlyjust meant for readability. Any ideas are much appreciated as I don't even know where to start with this one. Thanks Simon H -- 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] fopen
On Friday, February 15, 2002, at 04:53 AM, Lars Torben Wilson wrote: The problem with that is that you have a time lag (perhaps only in microseconds, but it still is a problem) while you're writing the new data to the file. If some other process--say, another invocation of the same script--tries to read from that file while you're still overwriting it--you've got problems, since it'll find only a partially-written file. That's called a 'race condition'. The other method avoids that, since while you're writing data to the temp file, processes just keep using the original. Once you're done, the rename happens atomically, preventing the race condition. What method do you use to get rid of the temporary file once you've used it? It appears, from reading the man page, that the file is still present in the directory specified in tempname(). Erik -- doesn't know much about working with files in PHP Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] writing / reading from text files
I need to write to a specific line in a text file, read from a line on demand, and update values at random, I want to do this all in the same text file. what is the best way to go about this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Speed problems
Hi everyone, I am having a small speed problem and I think I may be on track to solve it. i need some input. I have a search script which either returns results or not. if No results I use a header location redirect to an insert form if one result I redirect to part 2 else if many I display the list of results. It appears as if the redirect takes alot of time before it can display the redirected page if results are found and I loop thropugh them and display results, it is very fast. php 4.02 With Postgresql db version 7.x Anyone have any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Polymorphism question
I've also done C and C++ since the 80's. My experience with virtual, is that there is no base implementation for a function. Rather, the function is expected to be defined in the derived class. The inheritance you describe would have a base implementation (no virtual declaration), which could be over-ridden in the derived class. Yes, PHP does have the latter capability. -Original Message- From: Richard Fox [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 9:01 AM To: [EMAIL PROTECTED] Subject: [PHP] Polymorphism question I am new to PHP but 10 years in C++ One of the cool/powerful things you can do in C++ is the following: class DrawPlainDialog { public: ... virtual Draw(); // implementation draws a vanilla dialog box }; class DrawStyleDialog : public DrawPlainDialog { public: ... virtual Draw(); // implementation draws better dialog }; Somewhere in my code I have a function like: void ShowGUI( DrawPlainDialog dd ) { dd.Draw(); } ShowGUI can be called with any object that is derived from DrawPlainDialog, obviously. Only code that calls ShowGUI must be changed when a new implementation of DrawPlainDialog is used. This feature of C++ to have a base class pointer (or reference) be able to access derived class functionality is not something I've seen in any PHP documentation. Does it exist, and if not is there a workaround for this highly desirable feature? TIA Rich PS Can anyone point me to the most comprehensive OOP documentation for PHP? -- -- 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] writing / reading from text files
fopen(), fwrite(),fseek(),fread(),fclose() -Original Message- From: cyberskydive [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 10:29 AM To: [EMAIL PROTECTED] Subject: [PHP] writing / reading from text files I need to write to a specific line in a text file, read from a line on demand, and update values at random, I want to do this all in the same text file. what is the best way to go about this? -- 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] writing / reading from text files
lol- so I use fseek() to move the file pointer before where I need to write/replace/update a value? Is there a parameter for fseek to tell it to move to a newline, or stop after a certain bytes? Rick Emery [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... fopen(), fwrite(),fseek(),fread(),fclose() -Original Message- From: cyberskydive [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 10:29 AM To: [EMAIL PROTECTED] Subject: [PHP] writing / reading from text files I need to write to a specific line in a text file, read from a line on demand, and update values at random, I want to do this all in the same text file. what is the best way to go about this? -- 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] writing / reading from text files
from the manual: int fseek (int fp, int offset [, int whence]) Sets the file position indicator for the file referenced by fp.The new position, measured in bytes from the beginning of the file, is obtained by adding offset to the position specified by whence, whose values are defined as follows: SEEK_SET - Set position equal to offset bytes. SEEK_CUR - Set position to current location plus offset. SEEK_END - Set position to end-of-file plus offset. -Original Message- From: cyberskydive [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 10:43 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] writing / reading from text files lol- so I use fseek() to move the file pointer before where I need to write/replace/update a value? Is there a parameter for fseek to tell it to move to a newline, or stop after a certain bytes? Rick Emery [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... fopen(), fwrite(),fseek(),fread(),fclose() -Original Message- From: cyberskydive [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 10:29 AM To: [EMAIL PROTECTED] Subject: [PHP] writing / reading from text files I need to write to a specific line in a text file, read from a line on demand, and update values at random, I want to do this all in the same text file. what is the best way to go about this? -- 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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Dynamic Date Select and SQL
Thanks Rick But the SQL needs to work with MS Access AND MySQL through the PEAR DB Abstraction layer... I'm not saying it wont work with Access because I don't know yet...maybe it will, but there looks to be functions in there that may be MySQL specific. If I can do something like this it would be great...what I would like is to get the earliest month year from the DB table then fill in the gaps between then and now, month by month to populate the SELECT BOX Options. Thanks Simon H -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: 15 February 2002 16:06 To: 'Simon H'; PHP General Subject: RE: [PHP] Dynamic Date Select and SQL Sensitivity: Confidential If I understand your question, you are looking for the MYSQL sql statement. Based upon your info, I've found something like this example: mysql describe a; ++--+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | ++--+--+-+-+---+ | mydate | datetime | YES | | NULL| | ++--+--+-+-+---+ 1 row in set (0.04 sec) mysql select * from a; +-+ | mydate | +-+ | 2002-01-01 12:00:00 | | 2002-02-01 12:00:00 | | 2002-03-01 12:00:00 | | 2002-04-01 12:00:00 | | 2002-05-01 12:00:00 | | 2002-06-01 12:00:00 | | 2002-07-01 12:00:00 | +-+ 7 rows in set (0.00 sec) mysql select year(mydate)*100+month(mydate) as sel,mydate, concat(left(monthname(mydate),3),' ',year(mydate)) as monyr from a where mydate now()+03; ++-+--+ | sel| mydate | monyr| ++-+--+ | 200201 | 2002-01-01 12:00:00 | Jan 2002 | | 200202 | 2002-02-01 12:00:00 | Feb 2002 | | 200203 | 2002-03-01 12:00:00 | Mar 2002 | | 200204 | 2002-04-01 12:00:00 | Apr 2002 | | 200205 | 2002-05-01 12:00:00 | May 2002 | ++-+--+ 5 rows in set (0.05 sec) -Original Message- From: Simon H [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 6:32 AM To: PHP General Subject: [PHP] Dynamic Date Select and SQL Sensitivity: Confidential I have a problem I hope someone can help me with... Firstly I have an SQL Query with a WHERE dateMonthAndYear = $month1 Already this shows part of what I'm trying to do. The date format in the DB is -MM-DD HH:MM:SS. Now I need to dynamically generate a pulldown of months... The range of months in the pulldown are historical, so the last month would be the current month (which should also be the SELECTED option). The first month would be a fixed date, say Jan 2002. The value of the options would probably be like so: select name=month1// --- Jump Menu option value=$PHP_SELF?month1=$current_month SELECTEDFeb 2002/option // --- Current Month (SELECTED) option value=$PHP_SELF?month1=$first_month$first_month_text/option // --- First Month in range option value=$PHP_SELF?month1=$subsequent_month1$subsequent_month1_tex t/option // --- Other months in range . // --- Other months in range option value=$PHP_SELF?month1=$current_month SELECTEDFeb 2002/option // --- Current Month option value=$PHP_SELF?month1=ALL/option // --- Empty value will show all /select I guess the question is, how do I dynamically create the select, based on the above spec (or make $first_month, the first month available in the SQL Query i.e. get the earliest month from the Query), then do the select using ONLY the month and year information. I can do most of the bits in between, just do know how to do the dynamic select for this particular application, or get the date into the SQL where ONLY the month and year are relevant. I am using Pear DB and need this to work on MySQL and Access through Pear so the SQL needs to be quite standard. The above code is not syntaxed properlyjust meant for readability. Any ideas are much appreciated as I don't even know where to start with this one. Thanks Simon H -- 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] good practice
On Friday, February 15, 2002, at 10:50 AM, Michael Kimsal wrote: That's great for you that you have that luxury, as do I, but not everyone has access to their server's conf file. Whether or not you want to call administrating a web server a luxury is debatable -- I'm learning new things about it all the time. 'Organizing' would be better served with the separate directory and/or a prepend, because most directory structures are sorted by name by default. On using a separate directory, that's agreed. As a matter of personal aesthetics, I don't care to clutter a single directory with many many files (as prefixing filenames could lead to). The majority of people learning PHP do so by examining other code, and a great many do so in shared hosting environments where they can't control the server config files. It is an extreme misconception that this is a luxury that few have, in fact I would go so far as to say that shared hosting is a luxury more than anything else. If all you're doing is learning (and I assume that's what you're referring to in your post), then there's absolutely no reason to pay someone else to host your content. Linux and Apache are 100% free of charge. MySQL is also 100% free of charge, for those who wish to use it. I understand that a web hosting provider can provide more stability for public sites than a home connection, so for actually publising content it makes sense to go with a provider. But for development, you don't even need a phone line -- nothing could be easier than accessing a directory through 127.0.0.1, you don't even need to ftp/scp your files to a remote server. In fact, for development, you're better off if you -don't- put your server on the net, for security reasons. It allows you to experiment without fear that someone's going to try to root your box. A few months back I decided to learn how to administrate a web site, use a SQL database, and develop with a scripting language, to add to my limited knowledge of HTML. I'm doing it with an old Pentium II with only 256 MB of RAM. There's no reason a 386 or 68k (pre-PowerPC) couldn't do the same thing. Linux, Apache, MySQL, PHP -- none of them cost me anything more than the time it takes to learn them, which pays itself back in dividends. I still don't know everything, and I'm sure that a competent cracker -could- root my box. But I'm learning all the time, and mentioning things like Apache directives (which are discussed all the time on this list) doesn't hurt anyone. Furthermore, because they are new they don't understand the security implications of .inc or other extensions, and blindly copy code and run it without knowing they are exposed security-wise. That's my primary beef with .inc and other non- .php extensions. Maybe I don't understand the security implications of .inc -- I thought that it was perfectly safe. Since my php.ini is not configured to parse files with '.inc' extensions, I thought that I was better off using a separate extension than '.php': so that the code cannot be executed out of context. I got this idea from a post by Rasmus Lerdorf on this very list, only a month ago. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Polymorphism question
I am new to PHP but 10 years in C++ One of the cool/powerful things you can do in C++ is the following: class DrawDialog { public: ... virtual Draw(); // implementation draws a plain dialog box }; class DrawStyleDialog : public DrawPlainDialog { public: ... virtual Draw(); // implementation draws better dialog based on some parameters }; Somewhere in my code I have a function like: void ShowGUI( DrawDialog dd ) { dd.Draw(); } ShowGUI can be called with any object that is derived from DrawDialog, obviously. Only code that calls ShowGUI must be changed when a new implementation of DrawDialog is used. This feature of C++ to have a base class pointer (or reference) be able to access derived class functionality is not something I've seen in any PHP documentation. Does it exist, and if not is there a workaround for this highly desirable feature? TIA Rich PS Can anyone point me to the most comprehensive OOP documentation for PHP? -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] OOP: Polymorphism question
I am new to PHP but 10 years in C++ One of the cool/powerful things you can do in C++ is the following: class DrawDialog { public: ... virtual Draw(); // implementation draws a plain dialog box }; class DrawStyleDialog : public DrawPlainDialog { public: ... virtual Draw(); // implementation draws better dialog based on some parameters }; Somewhere in my code I have a function like: void ShowGUI( DrawDialog dd ) { dd.Draw(); } ShowGUI can be called with any object that is derived from DrawDialog, obviously. Only code that calls ShowGUI must be changed when a new implementation of DrawDialog is used. This feature of C++ to have a base class pointer (or reference) be able to access derived class functionality is not something I've seen in any PHP documentation. Does it exist, and if not is there a workaround for this highly desirable feature? TIA Rich PS Can anyone point me to the most comprehensive OOP documentation for PHP?
Re: [PHP] good practice
The only real security problem is that if the file isn't parsed and it's in the web server's document path, somebody can just go to http://www.example.com/include/config.inc and see the entire contents in plaintext -- passwords and config options galore. However, sticking those .inc files outside of the web server's document path or otherwise cutting off access to those files makes things a lot safer. When I met Rasmus at a seminar a few months ago, he mentioned that he kind of started the whole .inc thing with included files, but he was astonished how so many people followed his convention without realizing that somebody could look into the .inc file so easily. When he was going it, he always explicitly denied access to those files through a Files directive in Apache's httpd.conf file, which nobody else bothered to do. So if you want people to view those files and all of the code in them, go nuts. Otherwise, you'd better somehow cut off access to them. (Personally, I use an include directory and use a .htaccess file to limit access.) J Erik Price wrote: On Friday, February 15, 2002, at 10:50 AM, Michael Kimsal wrote: Maybe I don't understand the security implications of .inc -- I thought that it was perfectly safe. Since my php.ini is not configured to parse files with '.inc' extensions, I thought that I was better off using a separate extension than '.php': so that the code cannot be executed out of context. I got this idea from a post by Rasmus Lerdorf on this very list, only a month ago. Erik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [imp] CRAM-MD5 problem with Horde2/IMP3 and PHP4.1.1 ..
I know of no reason in c-client that would cause this. The log messages indicate either some imapd other than UW, or a modified version of UW imapd. Either way, I can't speak for that imapd's performance. I can only speak for the performance of unmodified UW imapd directly from UW. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problem with working with dates
I'm sorry to bother the newsgroup with this, but I've been racking my brain on it for a few hours, and tried all the documentation, and realize it's a coding problem that will take someone about 3 seconds to figure out the error in. I have this code: ?php $current_month = date (m); $current_year = date (Y); if($current_month = 1) { $previous_month = 12; $previous_year = $current_year - 1; } else { $previous_month = $current_month - 1; $previous_year = $current_year; } print(ul); print(lia href=\inquiry_reports.php?search=searchnew_year=$previous_yearnew_month=$previous_month\Previous Month/a); print(lia href=\inquiry_reports.php?search=searchnew_year=$current_yearnew_month=$current_month\Current Month/a); print(/ul); ? but for some reason, no matter what the month, the first if statement (if current_month = 1) is seen as true and executes... any suggestions? Cheers Jake Walker [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] good practice
Well, .inc seems to be so common as to be a standard practice. At the very least, the real issue is education on the need to protect included files anyway so that they can't be accessed directly. c -- Chris Lott http://www.chrislott.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: problem with working with dates
but for some reason, no matter what the month, the first if statement (if current_month = 1) is seen as true and executes... any suggestions? Try using 'equivalence-equals' (==) instead of 'assignment-equals' (=). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] good practice
On 15 Feb 2002 at 10:50, Michael Kimsal wrote: Erik Price wrote: On Thursday, February 14, 2002, at 04:40 PM, Michael Kimsal wrote: On that same topic, *why* do people name files with both .inc and .php? Your .inc file has PHP code in it, right? Why not just call it .php and spare the server reconfiguration. If knowing which files are include files (long time since I've made that distinction!) just prepend them with inc_ or put them all in an includes/ directory. If you are including a file into another file with PHP's 'include()' function, it doesn't matter what the extension is. You don't even need an extension. Apache doesn't even see this as a separate file, it thinks of it all as one big file with the name of whichever file is doing the including. Giving the .inc suffix is a nice way to keep your code organized. Also, I keep my .incs in a separate directory. Not to mention I have a directive in my server's conf file that specifically prevents it from serving any file with the extension '.inc'. That's great for you that you have that luxury, as do I, but not everyone has access to their server's conf file. Yeah, you may not be able to access the server's conf file but you can still put your include files outside the server's web space and name them whatever you want. Put something like this in your scripts if you can't modify the php.ini or access the server's conf directory. ini_set(include_path, /path_to_your_include_directory); Regardless of the extension you use, putting them outside the server's web accessible area is the best way to protect them. I just use .php and put them in subdirectories to differentiate what site they are for or what their specific purpose is. 'Organizing' would be better served with the separate directory and/or a prepend, because most directory structures are sorted by name by default. I replied privately to someone on this already, but I'll post it here as well. The majority of people learning PHP do so by examining other code, and a great many do so in shared hosting environments where they can't control the server config files. Furthermore, because they are new they don't understand the security implications of .inc or other extensions, and blindly copy code and run it without knowing they are exposed security-wise. That's my primary beef with .inc and other non- .php extensions. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php K E I T H V A N C E Web Developer, IT Professional http://www.vanceconsulting.net [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] What Do You Think?
I hope you won't consider this as spam... A Php-Nuke powered web-site, I got a lot of themes, so you can view them, but first you need to sign up... anyway, give me your honest opinion. Sincerely Arik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Anyway to open a PHP file and view its code in the browser?
Thanks for proving the point. It's like I said. No one is willing to explain what symbolic links are. -Kevin -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 8:41 AM To: Kevin Stone Subject: Re: [PHP] Anyway to open a PHP file and view its code in the browser? On Thursday, February 14, 2002, at 05:44 PM, Kevin Stone wrote: I did a net wide search on Symbolic links to learn what they are and how to use them. Wouldn't you know everyone's talking about them but no one explains what they are or how to use them. It's because it's a very common thing in Unix, about as basic as copy and paste is in Windows. And Unix is the widest-used platform on the web, so a lot of web people are familiar with it. I'm not sure what the Windows equivalent is. HTH, - Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Anyway to open a PHP file and view its code in the browser?
Kevin Stone wrote: Thanks for proving the point. It's like I said. No one is willing to explain what symbolic links are. -Kevin You just didn't search well enough: http://pucc.princeton.edu/~clients/symlink.readme -- W | I haven't lost my mind; it's backed up on tape somewhere. + Ashley M. Kirchner mailto:[EMAIL PROTECTED] . 303.442.6410 x130 IT Director / SysAdmin / WebSmith . 800.441.3873 x130 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6 http://www.pcraft.com . . .. Boulder, CO 80303, U.S.A. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Anyway to open a PHP file and view its code in the browser?
Kevin Stone wrote: Thanks for proving the point. It's like I said. No one is willing to explain what symbolic links are. -Kevin I just realized that URL talks about backing up symbolic links, as opposed to doing an indepth explanation of what they are. Never the less, at the top it does say what a symlink is: A UNIX symbolic link is a file that contains a pointer to another file or directory. One could say, it's like creating a Shortcut on a Win9x (and up) platform. -- W | I haven't lost my mind; it's backed up on tape somewhere. + Ashley M. Kirchner mailto:[EMAIL PROTECTED] . 303.442.6410 x130 IT Director / SysAdmin / WebSmith . 800.441.3873 x130 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6 http://www.pcraft.com . . .. Boulder, CO 80303, U.S.A. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] problem with working with dates
Change it to == 1 if($current_month == 1) Jason -Original Message- From: Jacob Walker [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 10:44 AM To: [EMAIL PROTECTED] Subject: [PHP] problem with working with dates I'm sorry to bother the newsgroup with this, but I've been racking my brain on it for a few hours, and tried all the documentation, and realize it's a coding problem that will take someone about 3 seconds to figure out the error in. I have this code: ?php $current_month = date (m); $current_year = date (Y); if($current_month = 1) { $previous_month = 12; $previous_year = $current_year - 1; } else { $previous_month = $current_month - 1; $previous_year = $current_year; } print(ul); print(lia href=\inquiry_reports.php?search=searchnew_year=$previous_yearnew_month=$ previous_month\Previous Month/a); print(lia href=\inquiry_reports.php?search=searchnew_year=$current_yearnew_month=$c urrent_month\Current Month/a); print(/ul); ? but for some reason, no matter what the month, the first if statement (if current_month = 1) is seen as true and executes... any suggestions? Cheers Jake Walker [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: [PHP] problem with working with dates
Jacob, I'm sorry to bother the newsgroup with this, but I've been racking my brain on it for a few hours, and tried all the documentation, and realize it's a coding problem that will take someone about 3 seconds to figure out the error in. I have this code: =don't be sorry, these 'blind spots' are the strength of the group. =check out the differences between =, the assignment operator; and == the logical comparision operator; and === the logical type and comparison operator. You've used the first in the IF, when you want the second! =Regards, =dn ?php $current_month = date (m); $current_year = date (Y); if($current_month = 1) { $previous_month = 12; $previous_year = $current_year - 1; } else { $previous_month = $current_month - 1; $previous_year = $current_year; } print(ul); print(lia href=\inquiry_reports.php?search=searchnew_year=$previous_yearnew_month=$previous_month\Previous Month/a); print(lia href=\inquiry_reports.php?search=searchnew_year=$current_yearnew_month=$current_month\Current Month/a); print(/ul); ? but for some reason, no matter what the month, the first if statement (if current_month = 1) is seen as true and executes... any suggestions? Cheers Jake Walker [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: [PHP] Symbolic links...
Kevin Stone wrote: Thanks for proving the point. It's like I said. No one is willing to explain what symbolic links are. -Kevin This is probably a better explanation: http://kb.indiana.edu/data/abbe.html -- W | I haven't lost my mind; it's backed up on tape somewhere. + Ashley M. Kirchner mailto:[EMAIL PROTECTED] . 303.442.6410 x130 IT Director / SysAdmin / WebSmith . 800.441.3873 x130 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6 http://www.pcraft.com . . .. Boulder, CO 80303, U.S.A. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Undefined class name
Hi all, I am working at home today and have to use windows. I am trying to use PEAR and keep getting an undefined class name for $db = DB::connect(mysql://$user:$pass@$host/$dname); my include for PEAR ini_set('include_path', 'J:\Program Files\php\pear\DB.php'); where did I screw up. TIA Gary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] good practice
On Friday, February 15, 2002, at 12:35 PM, J Smith wrote: The only real security problem is that if the file isn't parsed and it's in the web server's document path, somebody can just go to http://www.example.com/include/config.inc and see the entire contents in plaintext -- passwords and config options galore. However, sticking those .inc files outside of the web server's document path or otherwise cutting off access to those files makes things a lot safer. When I met Rasmus at a seminar a few months ago, he mentioned that he kind of started the whole .inc thing with included files, but he was astonished how so many people followed his convention without realizing that somebody could look into the .inc file so easily. When he was going it, he always explicitly denied access to those files through a Files directive in Apache's httpd.conf file, which nobody else bothered to do. So if you want people to view those files and all of the code in them, go nuts. Otherwise, you'd better somehow cut off access to them. (Personally, I use an include directory and use a .htaccess file to limit access.) Exactly. So we have two problems: 1) we don't want people to be able to request 'domain.com/includes/file.inc' and see the text output 2) we don't want the parser to ever execute code out of context, ie serve a parsed version of 'domain.com/includes/file.inc' without including it into its parent. So to tackle the first problem we set a directive in httpd.conf that denies any requests for any page that ends in '.inc' (I suppose a .htaccess file could work as well but I don't use them), and to tackle the second problem, we don't add '.inc' to our list of file types that should be parsed in the AddType line. Here's the directive: Files ~ \.inc$ Order allow,deny Deny from all /Files If you look under the archives, you will find the thread where I was the one who thought that parsing .inc was a good idea, and someone explained this very subject to -me-. :) (I think it was Mike Cullerton) Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] s.osborne, are you out there?
Am I the only one who gets the following message each time I post to php-general? Is there a moderator who could remove this subscriber? Begin forwarded message: From: Postmaster Postmaster To: [EMAIL PROTECTED] Subject: Error delivering message to: [EMAIL PROTECTED]! Received: from epimetheus.hosting4u.net ([209.15.2.70]) by exchange1.hhbrown.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id DPC7L2V6; Fri, 15 Feb 2002 13:30:42 -0500 Received: (qmail 7276 invoked from network); 15 Feb 2002 18:31:28 - Received: from norma.hosting4u.net (HELO rejection.noreply) (209.15.2.65) by mail-gate.hosting4u.net with SMTP; 15 Feb 2002 18:31:28 - Return-Path: [EMAIL PROTECTED] Your message was not delivered for the following reason: E-mail Account: s.osborne is over the limit of 31457280 bytes. Automated Postmaster Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] writing / reading from text files
thanks guys, there is just one more question I dont see an answer for anywhere I've looked. will fseek read past \n's and if so how do I move the filepointer to a newline, or should I just put all the data on one line? (not unreasonable n this case) Rick Emery [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... from the manual: int fseek (int fp, int offset [, int whence]) Sets the file position indicator for the file referenced by fp.The new position, measured in bytes from the beginning of the file, is obtained by adding offset to the position specified by whence, whose values are defined as follows: SEEK_SET - Set position equal to offset bytes. SEEK_CUR - Set position to current location plus offset. SEEK_END - Set position to end-of-file plus offset. -Original Message- From: cyberskydive [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 10:43 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] writing / reading from text files lol- so I use fseek() to move the file pointer before where I need to write/replace/update a value? Is there a parameter for fseek to tell it to move to a newline, or stop after a certain bytes? Rick Emery [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... fopen(), fwrite(),fseek(),fread(),fclose() -Original Message- From: cyberskydive [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 10:29 AM To: [EMAIL PROTECTED] Subject: [PHP] writing / reading from text files I need to write to a specific line in a text file, read from a line on demand, and update values at random, I want to do this all in the same text file. what is the best way to go about this? -- 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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: s.osborne, are you out there?
nope, I am getting it too. Gary Erik Price wrote: Am I the only one who gets the following message each time I post to php-general? Is there a moderator who could remove this subscriber? Begin forwarded message: From: Postmaster Postmaster To: [EMAIL PROTECTED] Subject: Error delivering message to: [EMAIL PROTECTED]! Received: from epimetheus.hosting4u.net ([209.15.2.70]) by exchange1.hhbrown.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id DPC7L2V6; Fri, 15 Feb 2002 13:30:42 -0500 Received: (qmail 7276 invoked from network); 15 Feb 2002 18:31:28 - Received: from norma.hosting4u.net (HELO rejection.noreply) (209.15.2.65) by mail-gate.hosting4u.net with SMTP; 15 Feb 2002 18:31:28 - Return-Path: [EMAIL PROTECTED] Your message was not delivered for the following reason: E-mail Account: s.osborne is over the limit of 31457280 bytes. Automated Postmaster Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] good practice
On 15 Feb 2002, at 17:04, Philip J. Newman wrote: WHo really cares, if it works it don't matter what they call it. In response to: On that same topic, *why* do people name files with both .inc and .php? Your .inc file has PHP code in it, right? Why not just call it .php and spare the server reconfiguration. If knowing which files are Heck, I've seen inc,cls,html,php3,php4 In the last 7 years I've worked for 4 companies in role of web developer. I've also done some consulting here and there. I've had to work with a lot of applications, using that term VERY loosely, written by other people. I've even been suprised by some of my older code :) In Perl no self-respecting programmer writes anything that takes more than 5 minutes without using 'strict'. You can write Perl in stream of consciousnsess and you can use OO. If no one is every going to look at your code again, do it however you want. But if there is that odd chance that your script might become an application or at least evolve then it behooves you to do more than just make sure it works. Spolsky has an interesting, somewhat related, article here: http://www.joelonsoftware.com/articles/fog000348.html I'm certainly not without sin myself. It's all to easy to just banging away at the keyboard. If you are going to do anything that lasts then consider thinking about it before doing it. I had a case where a programmer wrote a script to be run by cron for one reason or another. He needed to use a lot of code written in a cgi script but he put the cron script in his root directory. Rather than include that script properly (should have been a module) he just copied that script to the root directory. It worked. But gosh ... when we evolved that cgi script we did not know that there was another copy out there. It was a real fun bug to track down. The database was getting screwed up from that old script but no one recalled that this had been done and that old script was doing funky things (now that it had evolved). Peter http://www.readbrazil.com/ Answering Your Questions About Brazil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] writing / reading from text files
from the manual: fgets -- Gets line from file pointer Description string fgets (int fp, int length) Returns a string of up to length - 1 bytes read from the file pointed to by fp. Reading ends when length - 1 bytes have been read, on a newline (which is included in the return value), or on EOF (whichever comes first). If an error occurs, returns FALSE. The file pointer must be valid, and must point to a file successfully opened by fopen(), popen(), or fsockopen(). fputs -- Writes to a file pointer Description int fputs (int fp, string str [, int length]) fputs() is an alias to fwrite(), and is identical in every way. Note that the length parameter is optional and if not specified the entire string will be written -Original Message- From: cyberskydive [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 12:36 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] writing / reading from text files thanks guys, there is just one more question I dont see an answer for anywhere I've looked. will fseek read past \n's and if so how do I move the filepointer to a newline, or should I just put all the data on one line? (not unreasonable n this case) Rick Emery [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... from the manual: int fseek (int fp, int offset [, int whence]) Sets the file position indicator for the file referenced by fp.The new position, measured in bytes from the beginning of the file, is obtained by adding offset to the position specified by whence, whose values are defined as follows: SEEK_SET - Set position equal to offset bytes. SEEK_CUR - Set position to current location plus offset. SEEK_END - Set position to end-of-file plus offset. -Original Message- From: cyberskydive [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 10:43 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] writing / reading from text files lol- so I use fseek() to move the file pointer before where I need to write/replace/update a value? Is there a parameter for fseek to tell it to move to a newline, or stop after a certain bytes? Rick Emery [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... fopen(), fwrite(),fseek(),fread(),fclose() -Original Message- From: cyberskydive [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 10:29 AM To: [EMAIL PROTECTED] Subject: [PHP] writing / reading from text files I need to write to a specific line in a text file, read from a line on demand, and update values at random, I want to do this all in the same text file. what is the best way to go about this? -- 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 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] Anyway to open a PHP file and view its code in the browser?
On Friday, February 15, 2002, at 01:08 PM, Kevin Stone wrote: Thanks for proving the point. It's like I said. No one is willing to explain what symbolic links are. -Kevin Actually, if you inspect the message I sent you (it's quoted below), you'll see that the specific part of your original post that I quoted is the part about how difficult it is to find information on them, and why no one seems to explain them. I never intended to explain them to you, because I thought that someone else on the list had already taken care of that. If you're still curious, the following document explains all about the filesystem used on Unix -- and is very readable (not some obscure technical document). Please read it: http://www.linuxdoc.org/HOWTO/Unix-and-Internet-Fundamentals- HOWTO/disk-layout.html This is part of Eric Raymond's Unix and Internet Fundamentals How-To document. Even for people who really could care less about Unix, it explains pretty much how computers work in general. I found it very informative when I first set about learning everything there is to know about computers. http://www.linuxdoc.org/HOWTO/Unix-and-Internet-Fundamentals-HOWTO/ HTH, Erik -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 8:41 AM To: Kevin Stone Subject: Re: [PHP] Anyway to open a PHP file and view its code in the browser? On Thursday, February 14, 2002, at 05:44 PM, Kevin Stone wrote: I did a net wide search on Symbolic links to learn what they are and how to use them. Wouldn't you know everyone's talking about them but no one explains what they are or how to use them. It's because it's a very common thing in Unix, about as basic as copy and paste is in Windows. And Unix is the widest-used platform on the web, so a lot of web people are familiar with it. I'm not sure what the Windows equivalent is. HTH, - Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] writing / reading from text files
On Fri, 2002-02-15 at 10:36, cyberskydive wrote: thanks guys, there is just one more question I dont see an answer for anywhere I've looked. will fseek read past \n's and if so how do I move the filepointer to a newline, or should I just put all the data on one line? (not unreasonable n this case) fseek() neither knows nor cares what the contents of the byte it's pointing to are--it's not even an error to seek beyond the ends of a file, so watch your bounds checking. :) fread() will read a line at a time, and update the file pointer as it goes, and is the usual way of reading a file line-by-line. A lot of file work in PHP is done with the file() function, which reads a file all at once, placing each line into its own array element. This makes line processing very, very easy--dunno if that will help you in this situation, though. Torben Rick Emery [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... from the manual: int fseek (int fp, int offset [, int whence]) Sets the file position indicator for the file referenced by fp.The new position, measured in bytes from the beginning of the file, is obtained by adding offset to the position specified by whence, whose values are defined as follows: SEEK_SET - Set position equal to offset bytes. SEEK_CUR - Set position to current location plus offset. SEEK_END - Set position to end-of-file plus offset. -Original Message- From: cyberskydive [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 10:43 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] writing / reading from text files lol- so I use fseek() to move the file pointer before where I need to write/replace/update a value? Is there a parameter for fseek to tell it to move to a newline, or stop after a certain bytes? Rick Emery [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... fopen(), fwrite(),fseek(),fread(),fclose() -Original Message- From: cyberskydive [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 10:29 AM To: [EMAIL PROTECTED] Subject: [PHP] writing / reading from text files I need to write to a specific line in a text file, read from a line on demand, and update values at random, I want to do this all in the same text file. what is the best way to go about this? -- 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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Torben Wilson [EMAIL PROTECTED] http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Built-In Functionality (was: writing / reading from text files)
Torben, Just a side note: I am continually amazed by the functionality that you and the rest of the PHP development team put into PHP. You have functions in PHP that would take a dozen lines for me to code in PERL and/or C. Quite often, when I think I've got to code some capability, I discover you have a function already. from those of us who have been pushing bits for a long time (30 years for me), thanks... rick -Original Message- From: Lars Torben Wilson [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 12:53 PM To: cyberskydive Cc: [EMAIL PROTECTED] Subject: Re: [PHP] writing / reading from text files On Fri, 2002-02-15 at 10:36, cyberskydive wrote: thanks guys, there is just one more question I dont see an answer for anywhere I've looked. will fseek read past \n's and if so how do I move the filepointer to a newline, or should I just put all the data on one line? (not unreasonable n this case) fseek() neither knows nor cares what the contents of the byte it's pointing to are--it's not even an error to seek beyond the ends of a file, so watch your bounds checking. :) fread() will read a line at a time, and update the file pointer as it goes, and is the usual way of reading a file line-by-line. A lot of file work in PHP is done with the file() function, which reads a file all at once, placing each line into its own array element. This makes line processing very, very easy--dunno if that will help you in this situation, though. Torben Rick Emery [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... from the manual: int fseek (int fp, int offset [, int whence]) Sets the file position indicator for the file referenced by fp.The new position, measured in bytes from the beginning of the file, is obtained by adding offset to the position specified by whence, whose values are defined as follows: SEEK_SET - Set position equal to offset bytes. SEEK_CUR - Set position to current location plus offset. SEEK_END - Set position to end-of-file plus offset. -Original Message- From: cyberskydive [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 10:43 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] writing / reading from text files lol- so I use fseek() to move the file pointer before where I need to write/replace/update a value? Is there a parameter for fseek to tell it to move to a newline, or stop after a certain bytes? Rick Emery [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... fopen(), fwrite(),fseek(),fread(),fclose() -Original Message- From: cyberskydive [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 10:29 AM To: [EMAIL PROTECTED] Subject: [PHP] writing / reading from text files I need to write to a specific line in a text file, read from a line on demand, and update values at random, I want to do this all in the same text file. what is the best way to go about this? -- 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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Torben Wilson [EMAIL PROTECTED] http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- 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: The ASP application object in PHP?
On Friday, February 15, 2002, at 10:42 AM, Michael Kimsal wrote: Remember, ASP is not a language, and PHP is. You're not programming ASP - you are most likely programming VBScript and your server environment gives that language access to server-specific functions such as an application object. Where were you yesterday when I needed this kind of explanation! :) To explain the nature of my site and why I chose the route that I did, I used a brief explanation of how the client-server-PHP system works. But, with no experience with any other scripting language, I didn't have much to justify why I chose PHP (the real reason is a matter of ethics ;). I would love to have had your explanation of ASP's application object vs PHP's lack of an application object when I wrote that. I'm saving this post. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: The ASP application object in PHP?
Erik Price wrote: On Friday, February 15, 2002, at 10:42 AM, Michael Kimsal wrote: Remember, ASP is not a language, and PHP is. You're not programming ASP - you are most likely programming VBScript and your server environment gives that language access to server-specific functions such as an application object. Where were you yesterday when I needed this kind of explanation! :) To explain the nature of my site and why I chose the route that I did, I used a brief explanation of how the client-server-PHP system works. But, with no experience with any other scripting language, I didn't have much to justify why I chose PHP (the real reason is a matter of ethics ;). I would love to have had your explanation of ASP's application object vs PHP's lack of an application object when I wrote that. I'm saving this post. I've been here all along! :) Seriously, we cover some of this in our class as well, and at our monthly PHP user group meetings. I'm actually writing up a small paper on this and other topics. If you're interested in it, let me know. I can also be reached at 734-480-9961 if you've questions that might be faster talking about than emailing, and my AIM is 'mgkimsal' is you're on that and need some help. That goes for anyone else on the list too... Michael Kimsal http://www.tapinternet.com/php PHP Training Courses 734-480-9961 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Empty form
Ben, I've been dealing with this problem recently. The solution I found works great in my case... the data processing page is the same as the form page. When the page is loaded it tests for post data. If no data is available (ie !isset($name)), then the form will be displayed. When the user submits the form, it actually submits it to the same page ($PHP_SELF). This way, no matter how many times the user makes mistakes, your page will faithfully redisplay the form until they get it right. You can even build in special formatting, such as highlighting missing or incorrect fields. When the post data is verified, the page can display the next page by using an include() or header() redirect, and bypass the form. I hope this helps. Steven J. Walker Walker Effects www.walkereffects.com [EMAIL PROTECTED] On Friday, February 15, 2002, at 12:24 AM, Ben Clumeck wrote: I am trying to have my form redirect back to my form, if the 'name' field is not filled in or the submit button is not pushed. Can someone tell me what my problem is with the script below that I have in my header: ? if(!isset($name)||($HTTP_POST_VARS[submit])) { header(Location: form.htm); } ? Thanks, Ben -- 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] What Do You Think?
I think you need to give us the link. Also, I think a site showing where all the commercial breweries are would be a nice project. hugh - Original Message - From: Arik Ashepa [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 15, 2002 10:07 AM Subject: [PHP] What Do You Think? I hope you won't consider this as spam... A Php-Nuke powered web-site, I got a lot of themes, so you can view them, but first you need to sign up... anyway, give me your honest opinion. Sincerely Arik -- 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] The ASP application object in PHP?
On Fri, 2002-02-15 at 05:43, Bendik Simonsen wrote: I've recently started to learn ASP (*ducks the hurled flowerpots and vases*) because my school requires it, but of course I prefer PHP for my own scripting needs. I have however, noticed one feature that ASP has that I have not found an equal for in PHP: the application object. For those of you not familiar with ASP, the lowdown is this: The application object acts like a global session. You assign it variables and values like you would a session, but those variables are available to all instances and sessions. It is for example very useful to track different users at the same time, or to send messages from one session to another, or the likes. Anything like this in PHP, or will I have to find a workaround for it, or *ick* do that little sniplet in ASP? Thanks, Bendik Simonsen There is a project called SRM to do just this sort of thing; you can find out more at http://www.vl-srm.net. It's currently in beta, but you might find it useful. Torben --- [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Torben Wilson [EMAIL PROTECTED] http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What Do You Think?
I'd be much more interested in microbreweries, though. Most commercial breweries like Anheuser Busch and Coors don't brew beer. Send some of their product to a lab, and the results will say something like, Your horse has diabetes. Hmm. I'd also be interested in a Guinness Finder site. Plug in your zip code, and you get a list of all of the pubs and bars in your area that serve draft Guinness. I could support a site like that, or help build one. On Fri, 2002-02-15 at 11:34, hugh danaher wrote: I think you need to give us the link. Also, I think a site showing where all the commercial breweries are would be a nice project. hugh - Original Message - From: Arik Ashepa [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 15, 2002 10:07 AM Subject: [PHP] What Do You Think? I hope you won't consider this as spam... A Php-Nuke powered web-site, I got a lot of themes, so you can view them, but first you need to sign up... anyway, give me your honest opinion. Sincerely Arik -- 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 -- Sliante, Richard S. Crawford mailto:[EMAIL PROTECTED] http://www.mossroot.com AIM: Buffalo2K ICQ: 11646404 Yahoo!: rscrawford MSN: [EMAIL PROTECTED] It is only with the heart that we see rightly; what is essential is invisible to the eye. --Antoine de Saint Exupery Push the button, Max! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What Do You Think?
On Fri, 2002-02-15 at 11:40, Richard Crawford wrote: I'd be much more interested in microbreweries, though. Most commercial breweries like Anheuser Busch and Coors don't brew beer. Send some of their product to a lab, and the results will say something like, Your horse has diabetes. Hmm. I'd also be interested in a Guinness Finder site. Plug in your zip code, and you get a list of all of the pubs and bars in your area that serve draft Guinness. I could support a site like that, or help build one. I'd survive about a week after finding a site with that feature. On Fri, 2002-02-15 at 11:34, hugh danaher wrote: I think you need to give us the link. Also, I think a site showing where all the commercial breweries are would be a nice project. hugh - Original Message - From: Arik Ashepa [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 15, 2002 10:07 AM Subject: [PHP] What Do You Think? I hope you won't consider this as spam... A Php-Nuke powered web-site, I got a lot of themes, so you can view them, but first you need to sign up... anyway, give me your honest opinion. Sincerely Arik -- 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 -- Sliante, Richard S. Crawford mailto:[EMAIL PROTECTED]http://www.mossroot.com AIM: Buffalo2K ICQ: 11646404 Yahoo!: rscrawford MSN: [EMAIL PROTECTED] It is only with the heart that we see rightly; what is essential is invisible to the eye. --Antoine de Saint Exupery Push the button, Max! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Torben Wilson [EMAIL PROTECTED] http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What Do You Think?
On Friday, February 15, 2002, at 02:40 PM, Richard Crawford wrote: Hmm. I'd also be interested in a Guinness Finder site. Plug in your zip code, and you get a list of all of the pubs and bars in your area that serve draft Guinness. I could support a site like that, or help build one. Guiness lovers have it easy. My favorite beer, of all time, which I love with a passion far greater than the zeal of any Guinness drinker on this list, is Tetley's English Ale. I live for that stuff. Not only can I hardly find a place with Tetley's on tap, I can hardly find it in stores! LOVE Tetley's. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What Do You Think?
Tetley's is good stuff. Try Old Nick. Only beer I've found that needs a chaser. On Fri, 2002-02-15 at 11:52, Erik Price wrote: On Friday, February 15, 2002, at 02:40 PM, Richard Crawford wrote: Hmm. I'd also be interested in a Guinness Finder site. Plug in your zip code, and you get a list of all of the pubs and bars in your area that serve draft Guinness. I could support a site like that, or help build one. Guiness lovers have it easy. My favorite beer, of all time, which I love with a passion far greater than the zeal of any Guinness drinker on this list, is Tetley's English Ale. I live for that stuff. Not only can I hardly find a place with Tetley's on tap, I can hardly find it in stores! LOVE Tetley's. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Sliante, Richard S. Crawford mailto:[EMAIL PROTECTED] http://www.mossroot.com AIM: Buffalo2K ICQ: 11646404 Yahoo!: rscrawford MSN: [EMAIL PROTECTED] It is only with the heart that we see rightly; what is essential is invisible to the eye. --Antoine de Saint Exupery Push the button, Max! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] scheduled tasks
Is currently anyway of doing scheduled tasks with PHP (without using crontab)? For example, using an email script to send out e-mail reminders every Monday or something like that? Thanks, Rodney