RE: [PHP] removing lines from array
? $recordsarray = file (../auto/records); $remove = schopf.net ; while(list($i, $line) = each($recordsarray)) { if(ereg($remove, $line)) { unset($recordsarray[$i]); } } $newFileContent = implode('', $recordsarray); ? -Original Message- From: Richard Kurth [mailto:[EMAIL PROTECTED]] Sent: 23 iulie 2001 02:36 To: php Subject: [PHP] removing lines from array I an trying to figure out how to remove lines from a text file from within an array. I fill the array with this The lines I what to remove have this in them What I need is how to loop through this array and pull out the lines that have what is in the $remove variable. Then I will write the array to a temp file and thin copy it back to the records file This is a small sample of the file I what two remove lines from mx - schopf.net High www.schopf.net ptr - readinggenius.tv 207.200.75.55 24 a - time-management-by-higher-productivity.com 207.252.75.55 24 ptr www speedreading123.com 207.200.75.55 24 ptr - mindbodyspirit123.com 207.200.75.247 24 a www schopf.net 207.252.75.242 24 soa - schopf.net dns1.northwesthost.com:dns2.northwesthost.com:[EMAIL PROTECTED] westhost.com:10800:3600:604800:86400 - Best regards, Richard mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: removing lines from array
$recordsarray = file(records); $remove = schopf.net; $temp = array(); for ($i=0;$icount($recordsarray);$i++) { if (!strstr($recordsarray[$i], $remove)) { $temp[] = $recordsarray[$i]; } } $recordsarray = $temp; $lines = join($recordsarray, '\n'); $fp = fopen(records, w); fwrite($fp, $lines, strlen($lines)); fclose($fp); . . //should work //elias Richard Kurth [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I an trying to figure out how to remove lines from a text file from within an array. I fill the array with this $recordsarray = file (../auto/records); The lines I what to remove have this in them $remove = schopf.net ; What I need is how to loop through this array and pull out the lines that have what is in the $remove variable. Then I will write the array to a temp file and thin copy it back to the records file This is a small sample of the file I what two remove lines from mx - schopf.net High www.schopf.net ptr - readinggenius.tv 207.200.75.55 24 a - time-management-by-higher-productivity.com 207.252.75.55 24 ptr www speedreading123.com 207.200.75.55 24 ptr - mindbodyspirit123.com 207.200.75.247 24 a www schopf.net 207.252.75.242 24 soa - schopf.net dns1.northwesthost.com:dns2.northwesthost.com:[EMAIL PROTECTED]:1 0800:3600:604800:86400 - Best regards, Richard mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: HTTP Authentication and PHP
Try this when you want to logout: ? header( 'WWW-Authenticate: Basic realm=Private'); header( 'HTTP/1.0 401 Unauthorized' ); ? //elias Jason Rennie [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi all, I've been playing around with PHP authentication via HTTP. I'm using apache, and when i use the header('WWW_Auth...) headers i get a username/password dialog pop up (as i wanted). How do i get those values unset in the browser, so that i can get a user to re authenticate ? I need to get a user to re-auth part way through the use of the app i'm writing becasue they are deleting files from a file system. Also how would i allow them to logout and let someone else log in. The docs seemed to imply that the headers command should have repopped the auth box. Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: need help w/ variables
Ah! But never forget...the code in some books have bugs too. Van At 12:47 AM 7/23/01, you wrote: it was my error reporting along i copied that script dtraight from the text book so i knew it wasnt the variables themselves -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] question about forum
Dear all, I want to set up an online forum by using PHP. But I don't have a clue. Could somebody kind enough tell me where to start? thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: need help w/ variables
that error is because the php error checking had been changed from the default...but still some do have problems... :D - Original Message - From: Van Tate Jr. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 23, 2001 5:01 PM Subject: Re: [PHP] Re: need help w/ variables Ah! But never forget...the code in some books have bugs too. Van At 12:47 AM 7/23/01, you wrote: it was my error reporting along i copied that script dtraight from the text book so i knew it wasnt the variables themselves -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] question about forum
This is my suggestion Start with making your user management...setup design and layout management, then do the browsing, then your viewing, then different catagories, then do other little bits... - Original Message - From: Jason Wang [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 23, 2001 5:05 PM Subject: [PHP] question about forum Dear all, I want to set up an online forum by using PHP. But I don't have a clue. Could somebody kind enough tell me where to start? thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] RECOMENDED WEBSITE ..by CN YEONG
Sure u will like this website!!! It can send SMS message to any handphone in MALAYSIA, include 016,012,013,017,019...Good leh. *** GOOD THINGS WE SHARE TOGEHTER! http://sms.ac __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: HTTP Authentication and PHP
Hi, I am attaching one example program. I hope this will help you a lot. Regards -Balaji Hi all, I've been playing around with PHP authentication via HTTP. I'm using apache, and when i use the header('WWW_Auth...) headers i get a username/password dialog pop up (as i wanted). How do i get those values unset in the browser, so that i can get a user to re authenticate ? I need to get a user to re-auth part way through the use of the app i'm writing becasue they are deleting files from a file system. Also how would i allow them to logout and let someone else log in. The docs seemed to imply that the headers command should have repopped the auth box. Jason The Information contained and transmitted by this E-MAIL is proprietary to Wipro Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If this is a forwarded message, the content of this E-MAIL may not have been sent with the authority of the Company. If you are not the intended recipient, an agent of the intended recipient or a person responsible for delivering the information to the named recipient, you are notified that any use, distribution, transmission, printing, copying or dissemination of this information in any way or in any manner is strictly prohibited. If you have received this communication in error, please delete this mail notify us immediately at [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Destroy object
Hi, how can I destroy an object created with new ? Thanks, Rosen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Modssl php 4 fears
Hi again all, I recompiled apache with modssl and it works. (Well the snake oil inc cert's work ;) But i get a warning on apache load about, loading a standard module (php4.so) and how this may crash becasue it isn't compiled to work with EAPI. Please comile with -DEAPI Now the question is, do i need to worry about this ? I just did a quick recompile of PHP but didn't change the config at all. Hence no -DEAPI. Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] When did this become the advertising Mailing List
When?!? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] date
Hi, how do i check that the current date is the end of month ? thanks in advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] date HELP !!!!!
hi, how do i check that the current date is the end of month Thanks in Advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] date HELP !!!!!
$todaydate = date(m); $tomorrowdate = date(m,time() + 86400); if($todaydate != $tomorrowdate){ echo Tomorrow is a new month; } - Original Message - From: Yamin Prabudy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 23, 2001 5:27 PM Subject: [PHP] date HELP ! hi, how do i check that the current date is the end of month Thanks in Advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] date HELP !!!!!
Hello Yamin, Monday, July 23, 2001, 9:27:46 AM, you wrote: YP hi, YP how do i check that the current date is the end of month YP Thanks in Advance If you want to check how long is current month and use this value later you can use this: $month=(m); //can be like this depend on if you scrolling between moths. If yes variable $month must be recieved from link. $d=27; while ($d = 32) { $mon = date(m,mktime(0,0,0,$month,$d,$rok)); if ($month != $mon) { $daylast = $d-1; $d=33; } else { $d++; } } I hope it helps. -- Best regards, Danielmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] date HELP !!!!!
[EMAIL PROTECTED] (Reductor) wrote: $todaydate = date(m); $tomorrowdate = date(m,time() + 86400); if($todaydate != $tomorrowdate){ echo Tomorrow is a new month; } or if (date(d) == date(j)) echo last day; or something else :) - Original Message - From: Yamin Prabudy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 23, 2001 5:27 PM Subject: [PHP] date HELP ! hi, how do i check that the current date is the end of month Thanks in Advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] date HELP !!!!!
Better still, use the date(t); to find out how many days are in the given month. This part of the date function is a blessing, given the varying days in months, and the fact that we've a leap year every four years. James Daniel Rezny [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello Yamin, Monday, July 23, 2001, 9:27:46 AM, you wrote: YP hi, YP how do i check that the current date is the end of month YP Thanks in Advance If you want to check how long is current month and use this value later you can use this: $month=(m); //can be like this depend on if you scrolling between moths. If yes variable $month must be recieved from link. $d=27; while ($d = 32) { $mon = date(m,mktime(0,0,0,$month,$d,$rok)); if ($month != $mon) { $daylast = $d-1; $d=33; } else { $d++; } } I hope it helps. -- Best regards, Danielmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php 4.0.6
Hi, It works now. I did a stupid mistake instead of putting --enable-sockets I put --with-sockets g Adrian On Sat, 21 Jul 2001, E. Peter K. Chan wrote: Hi Try going to the source directory ie where you unzipped the tarball for php. May as well upgrade to php4.0.6 - that could save you some problems now and later. Type in: # ./configure --help it says --with-readline[=DIR] so maybe you need to install readline first or point php to where it is? (FYI, I just installed 4.0.6 and it did not automatically install readline - I didn't include --with-readline in my options) if this doesn't help out then the only thing I can suggest is to start from scratch, but BACKUP first! See: http://www.devshed.com/Server_Side/PHP/SoothinglySeamless/page1.html It's an excellent tutorial on setting up mysql, php,apache and even openssl. And it works. Peter - Original Message - From: Adrian D'Costa [EMAIL PROTECTED] To: E. Peter K. Chan [EMAIL PROTECTED] Cc: php general list [EMAIL PROTECTED] Sent: Saturday, July 21, 2001 4:48 PM Subject: Re: [PHP] php 4.0.6 Hi Peter, I think the guru of php on the list can tell us what the problem is. I am going to compile 4.0.4pl2 and see if I get that error. In fact I am unable to access mysql now even though I have given --with-mysql. Any clues Adrian On Fri, 20 Jul 2001, E. Peter K. Chan wrote: Hi Adrian I just rebuilt my PHP to 4.0.6 and get a similar message with the bcmath functions. I don't have an answer for you at the moment. it may be the configure options selected. If you find out the answer please tell me and I'll do like wise. Peter - Original Message - From: Adrian D'Costa [EMAIL PROTECTED] To: php general list [EMAIL PROTECTED] Sent: Thursday, July 19, 2001 7:12 PM Subject: [PHP] php 4.0.6 Hi, I am trying to use the socket or readline functions but get a message: call to undefined function readline(). Why? Is this not implemented in 4.0.6. Adrian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: reg exp help
Hi Justin, for the username, you can use: if (!preg_match(/^[a-z0-9]*$/, $username)) { // error } else { // ok } The ^ means start of the string, the characters between the [ and ] are ones that we want, the * means however many times, and the $ means the end of the line / string. So if there isn't a match against lower case letters and numbers throughout the string (from start to finish), there's an error. I'd advise you to go more complex with the email address. James. Justin French [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hi all, two quick reg exp problems: one: $username must only contain a-z lowercase, 0-9, no spaces, no other characters. what would the regexp be? if(ereg(, $username)) { $valid = yes } else { $valid = no) two: i want to do a really small email validation, just to make sure the email probably right, as in: [EMAIL PROTECTED] what's the best reg exp to use. i'm aware there are email validating script out there, but I want to learn for myself many thanks in advance justin french -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Replace ANYTHING between TAG /TAG
Hi Dan, maybe something like: $newvariablethatwewantbetweenthetags = Long variable!; $string = preg_replace(/(TAG)(.*?)(\/TAG)/i, \\1$newvariablethatwewantbetweenthetags\\2, $string)); There should be a after and before the second part of that statement, but my email proggy strips them. James Dan Krumlauf [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I've been trying this one for a bit and Im in a twist. I need to replace ANYTHING or even nothing between two tags with the contents of a variable and just havent been able to get the expression right for all cases. As an example concept follows: TAG/TAG Nothing between the tags variable is $varname=some junk so after the function TAGsome junk/TAG run it again after making variable $varname=some completly different junk so now the tags would be TAGsome completly different junk/TAG and so on and so on. One other breaker Ive had, it needs to always replace no matter whats between the tags, whats not between the tags or even if its 1000s of characters. My code kept breaking when it was alot of characters. Any funtions or even just the right regex would be appreciated Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] number generator
Hi there I would like to generate numbers (random) like a credit card number and can be check is the number valid or not how can i do that.. yamin prabudy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] limit items per page
Ive got an image gallery, and rather than having one really long page of thumbnails, I'd like to have around 25 thumbnails (5 rows of 5 thumbs) per page. Can you guys point me in the right direction?? Steph
[PHP] Re: limit items per page
Hi Steph, as the name suggests, use LIMIT ;) Ie, SELECT * FROM TABLE LIMIT 0,25 The 0 (or other number) is optional, and tells the table which row to start limiting from, the secon number is the number of rows to limit to.. So: SELECT * FROM TABLE LIMIT 25,25 Would bring out 25 rows, starting from row 25 (rows 25 to 50). See the documentation at the mysql site for more info. Cheers, James. Steph [EMAIL PROTECTED] wrote in message 001701c11354$db6b2fa0$ab8d7a3f@vaio">news:001701c11354$db6b2fa0$ab8d7a3f@vaio... Ive got an image gallery, and rather than having one really long page of thumbnails, I'd like to have around 25 thumbnails (5 rows of 5 thumbs) per page. Can you guys point me in the right direction?? Steph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] limit items per page
What sort of database do you have, and what is your current source?!? - Original Message - From: Steph [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 23, 2001 6:52 PM Subject: [PHP] limit items per page Ive got an image gallery, and rather than having one really long page of thumbnails, I'd like to have around 25 thumbnails (5 rows of 5 thumbs) per page. Can you guys point me in the right direction?? Steph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: regex for cleaning up username
thinking it may be easier to parse for only allowed characters. *much* better idea. Try: preg_match('/[^\w]/', $string) to find all non-alphanumeric+underscore -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] question about forum
have a look at other people's codes. you can start by looking at my forum, which is pretty simple to install and work with : http://www.wde.org/me/php/ /sunny -Original Message- From: Jason Wang [mailto:[EMAIL PROTECTED]] Sent: 23 July 2001 08:06 To: [EMAIL PROTECTED] Subject: [PHP] question about forum Dear all, I want to set up an online forum by using PHP. But I don't have a clue. Could somebody kind enough tell me where to start? thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: limit items per page
[EMAIL PROTECTED] (James Holloway) wrote: Hi Steph, as the name suggests, use LIMIT ;) AFAIK it's mysql specific (at least it does not work with mssql) -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] number generat {Luhn algorithm}
anybody know about the Luhn algorithm ?? how can i do that in php yamin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: limit items per page
Perhaps I shouldn't have made the assumption that steph was using mysql :) Henrik Hansen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... [EMAIL PROTECTED] (James Holloway) wrote: Hi Steph, as the name suggests, use LIMIT ;) AFAIK it's mysql specific (at least it does not work with mssql) -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: number generat {Luhn algorithm}
[EMAIL PROTECTED] (Yamin Prabudy) wrote: anybody know about the Luhn algorithm ?? how can i do that in php google is your friend http://px.sklar.com/code-pretty.html?code_id=234 http://perl.about.com/library/weekly/aa073000a.htm http://www.phpbuilder.com/mail/php3-list/199807/2939.php and many more -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] holding values in a select list on a form
Some help please... I am creating a select list from a database, and I am trying to hold the value of what has been selected by a user, while I do some error checking. It is searching a mysql db to pull out the list. It will then need to pass values back into the database. The code I am using is this... ? echo select name=\FIELDNAME\; print option value=\\Select/option; for ($index = 0; $index mysql_num_rows($query); $index++) { $row = mysql_fetch_row ($query) or die (mysql_error()); print option value=$row[1]$row[1]/option; } echo /select; ? If there is an easier way, let me know Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] MySQL PRIVILEGES problem
Dear all, I have the following problem : I want change te root password for mysql and we receive the following error message ERROR 1064: parse error near 'FLUSH PRIVILEGES' at line 1 I login to my MySQL server and type the following commands shell mysql -u root mysql mysql UPDATE user SET Password=PASSWORD('new_password') where user='root'; mysql FLUSH PRIVILEGES; ERROR 1064: parse error near 'FLUSH PRIVILEGES' at line 1 thanks in advance.
Re: [PHP] PHP MySQL
'order by text asc' will sort in alphabetical order A-Z .. and your query should be select [campo] from table where campo like 'A%' ... seems like an expensive way of sorting ... i think mysql has natural order sorting functions in there somewhere ... Steve Marisol díaz e. [EMAIL PROTECTED] wrote in message 000e01c1113b$5df255f0$[EMAIL PROTECTED]">news:000e01c1113b$5df255f0$[EMAIL PROTECTED]... select [campo] from [tabla] order by [campo] if you want for each leter select [campo] from [tabla] where [campo] like 'A' Marisol - Original Message - From: Erich Kolb [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 20, 2001 11:32 AM Subject: [PHP] PHP MySQL When you query a MySQL Database, how do you set the order alphabetically? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] mail with html
Hi, I know this subject had been discussed here before. Tried searching in list.php.net, I get a message search not setup (or something). I want to send html mails thru php using mail(). Could someone tell me where I can study some scripts or tutorials. TIA Adrian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] mail with html
here's a script i wrote a while back. copied and pasted. - ? if ($submit) { $headers .= From: $myemail \n; $headers .= cc:$cc \n; $headers .= bcc:$bcc \n; // $headers .= Content-Type: text/html; charset=iso-8859-1\n; $message = stripslashes($contents); header(Location:http://www.wde.org/me/;); mail($to, $subject, $message, $headers); } else { echo html; $myemail1 = nothing [EMAIL PROTECTED]; echo brform action=\$php_self\ method=\post\ table cellpadding=15 cellspacing=0 width=100% bgcolor=#ff tr td align=rightstrong class=blackfrom which account :/strong/td tdselect name=\myemail\ option value=\$myemail1\[EMAIL PROTECTED] /select /td /tr tr td align=rightstrong class=blackemail to :/strong/td tdinput type=text name=\to\/td /tr tr td align=rightstrong class=blackcopy to :/strong/td tdinput type=text name=\cc\/td /tr tr td align=rightstrong class=blackblind copy to :/strong/td tdinput type=text name=\bcc\/td /tr tr td align=rightstrong class=blacksubject :/strong/td tdinput type=text name=\subject\/td /tr tr td valign=top align=rightstrong class=blackemail message :/strong/td tdtextarea cols=45 rows=15 name=\contents\ wrap=physical/textarea/td /tr tr tdnbsp;/td tdstrong class=blackinput type=submit name=submit value=\send this email\/strong/td /tr /table /form; } ? - that should work as a page in itself let me know if you have problems /sunny -Original Message- From: Adrian D'Costa [mailto:[EMAIL PROTECTED]] Sent: 23 July 2001 11:09 To: php general list Subject: [PHP] mail with html Hi, I know this subject had been discussed here before. Tried searching in list.php.net, I get a message search not setup (or something). I want to send html mails thru php using mail(). Could someone tell me where I can study some scripts or tutorials. TIA Adrian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: One2Many Logic Problem - phpMySQL bibliography
wouldn't the structure of the database be determined by the fact you have a many to many relationship ? i.e. the two tables would decompose into three with a 'link' table defining the many to may part ? steve Mike Gifford [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, I'm not sure if anyone else as the need for a php/MySQL based bibliography, but the application that I am developing (which is basically a module for phpSlash) is coming along fairly well. If anyone is interested in seeing the code I can bundle it up and send it out to them (still a long way from finished mind). The draft version of it is up and running here: http://openconcept.ca/WLP/biblio/index.php3 I'm running into a couple problems though that I don't have the logic language for and I was hoping folks here could help me (as you have done in the past). The problem is that I've set up a many to many table to ensure that I can have an author be listed as writing many books and a book be written by many authors. However in listing the books as a bibliography (as the URL above), I want to be able to list multiple authors, and do so in a different format for the first author than for all subsequent ones. I'm hoping to be able to produce output like this: Young, D. and N. Dixon. Helping Leaders Take Effective Action: A Program Evaluation. Greensboro, North Carolina: Center for Creative Leadership, 1996. So, I think the first challenge should be to calculate which books have multiple authors by doing something like this (It's using phplib structures, sorry): $q2 = SELECT * FROM WLPbib2profile ORDER BY bibID; $this-db-query($q2); // Performs above query while ($this-db-next_record()) { if ($this-db-Record[bibID] != $last_bibID) { echo br . $this-db-Record[bibID] . : . $this-db-Record[profileID]; } else { // Multiple Authors echo , . $this-db-Record[profileID]; $multiple_profileID .= array ($this-db-Record[bibID] = $this-db-Record[profileID]); $multiple_profileID .= array($this-db-Record[bibID] = yes); } $last_bibID = $this-db-Record[bibID]; } } With this I can then use the value $multiple_profileID to determine if this record has duplicates or not and use something like this to include both authors and not repeat the bibliography item: if ($multiple_profileID[$bibID]==yes) { while (list($key, $val) = each($multiple_profileID)) { $written_by = $key . : . $val . br; if ($this-db-Record[firstName]) { $written_by .= stripslashes($this-db-Record[firstName]) . ; } if($this-db-Record[lastName]) { $written_by .= stripslashes($this-db-Record[lastName]); } } } else { if($this-db-Record[lastName]) { $written_by .= stripslashes($this-db-Record[lastName]) . , ; } if ($this-db-Record[firstName]) { $written_by .= stripslashes($this-db-Record[firstName]); } } But this seems really awkward (at the best of times) and (worst of all) it isn't working. I've got another related problem in that I've set up the following fields in one table: firstName lastName organization and I need to be able to order them by a combination of lastName organization. I could list the organization field simply as the lastName, but that seems like it would be confusing the data types... Must be a way around this.. I suspect it is limited by my logic not PHP's. Any ideas would be appreciated. Mike -- Mike Gifford, OpenConcept Consulting, http://openconcept.ca Offering everything your organization needs for an effective web site. Abolish Nuclear Weapons Now!: http://pgs.ca/petition/ It is a miracle that curiosity survives formal education. - A Einstein -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] mail with html
oh yeah, you might want to tidy up the code a bit... the email has put in line breaks. and replace [EMAIL PROTECTED] with your own email... the mail() command does all the work... the header command redirects the page.. you might want to change the address or remove it. /sunny -Original Message- From: Sandeep Hundal [mailto:[EMAIL PROTECTED]] Sent: 23 July 2001 11:06 To: 'Adrian D'Costa'; php general list Subject: RE: [PHP] mail with html here's a script i wrote a while back. copied and pasted. - ? if ($submit) { $headers .= From: $myemail \n; $headers .= cc:$cc \n; $headers .= bcc:$bcc \n; // $headers .= Content-Type: text/html; charset=iso-8859-1\n; $message = stripslashes($contents); header(Location:http://www.wde.org/me/;); mail($to, $subject, $message, $headers); } else { echo html; $myemail1 = nothing [EMAIL PROTECTED]; echo brform action=\$php_self\ method=\post\ table cellpadding=15 cellspacing=0 width=100% bgcolor=#ff tr td align=rightstrong class=blackfrom which account :/strong/td tdselect name=\myemail\ option value=\$myemail1\[EMAIL PROTECTED] /select /td /tr tr td align=rightstrong class=blackemail to :/strong/td tdinput type=text name=\to\/td /tr tr td align=rightstrong class=blackcopy to :/strong/td tdinput type=text name=\cc\/td /tr tr td align=rightstrong class=blackblind copy to :/strong/td tdinput type=text name=\bcc\/td /tr tr td align=rightstrong class=blacksubject :/strong/td tdinput type=text name=\subject\/td /tr tr td valign=top align=rightstrong class=blackemail message :/strong/td tdtextarea cols=45 rows=15 name=\contents\ wrap=physical/textarea/td /tr tr tdnbsp;/td tdstrong class=blackinput type=submit name=submit value=\send this email\/strong/td /tr /table /form; } ? - that should work as a page in itself let me know if you have problems /sunny -Original Message- From: Adrian D'Costa [mailto:[EMAIL PROTECTED]] Sent: 23 July 2001 11:09 To: php general list Subject: [PHP] mail with html Hi, I know this subject had been discussed here before. Tried searching in list.php.net, I get a message search not setup (or something). I want to send html mails thru php using mail(). Could someone tell me where I can study some scripts or tutorials. TIA Adrian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] MySQL PRIVILEGES problem
Hi, u have to change the database first and then try to update. Plz do the following. shell mysql -u root mysql mysqluse mysql; mysql UPDATE user SET Password=PASSWORD('new_password') where user='root';mysql FLUSH PRIVILEGES; Regards -Balaji - Original Message - From: Manu Verhaegen To: [EMAIL PROTECTED] Sent: Monday, July 23, 2001 3:19 PM Subject: [PHP] MySQL PRIVILEGES problem Dear all,I have the following problem :I want change te root password for mysql and we receive the following error message ERROR 1064: parse error near 'FLUSH PRIVILEGES' at line 1I login to my MySQL server and type the following commands shell mysql -u root mysql mysql UPDATE user SET Password=PASSWORD('new_password') where user='root'; mysql FLUSH PRIVILEGES; ERROR 1064: parse error near 'FLUSH PRIVILEGES' at line 1thanks in advance. The Information contained and transmitted by this E-MAIL is proprietary to Wipro Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If this is a forwarded message, the content of this E-MAIL may not have been sent with the authority of the Company. If you are not the intended recipient, an agent of the intended recipient or a person responsible for delivering the information to the named recipient, you are notified that any use, distribution, transmission, printing, copying or dissemination of this information in any way or in any manner is strictly prohibited. If you have received this communication in error, please delete this mail notify us immediately at [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Networking
Hey does any one know if it is possible to do something like read stuff thro file and printer sharing on a remote pc, i tried \\computer\dir for the dirs but that didn't work any suggestions(btw i did addslashes :D ) so ne ideas...please -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: limit items per page
Here's a Quick Dirty script that I ran up to get a display of 10 items per page with each click on a hyper-linked page returning a new page .. if you know what I mean. I've even included the headers so that any newbies can see the complete script and not just bits. The theory is that the first sql statement goes and gets the total number of rows for the display. This is then held in a global variable. The second query goes and gets the rows limited by an incrementing number. Simple, huh! ? include(radius.inc); radius_db_connect(); define (INITIAL_PAGE,0); $sql=select distinct username from user; $res=mysql_query($sql) or die (OK);; $num_rows=mysql_num_rows($res); $j=1; $i=0; function initial_page(){ global $PHP_SELF, $num_rows, $i,$j, $n; $sql=select distinct username from user limit $n, 10; $res=mysql_query($sql); while($row=mysql_fetch_array($res)){ print $row[username].br; } $k=0; while($i = $num_rows){ print a href = '$PHP_SELF?action=0n=$i' [$k]nbsp/a\n; $k++; $i+=10; } } switch($action){ case INITIAL_PAGE: initial_page(); break; default: die (Could not find function number $action); } ? On Mon, 23 Jul 2001 21:25, you wrote: Perhaps I shouldn't have made the assumption that steph was using mysql :) Henrik Hansen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... [EMAIL PROTECTED] (James Holloway) wrote: Hi Steph, as the name suggests, use LIMIT ;) AFAIK it's mysql specific (at least it does not work with mssql) -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] User ID's
Try Sessions, bud. That's what they're there for. On Mon, 23 Jul 2001 21:46, you wrote: Hi all, I need store all the userid's connected to my site, in a database. the database, if the user has closed his browser a php script will check after intervals of a few minutes, if the user is not logged in, then changed relating to that user, will be undone. my quesiotns are , 1) how do i get a user's ID. 2) what sort of check do i put to see if the variable is destroyed or not. thanx in advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: mail with html
[EMAIL PROTECTED] (Adrian D'Costa) wrote: Hi, I know this subject had been discussed here before. Tried searching in list.php.net, I get a message search not setup (or something). I want to send html mails thru php using mail(). Could someone tell me where I can study some scripts or tutorials. if I were you i would read the manual page for the mail function, there is examples of sending html mails and not. http://php.net/manual/en/function.mail.php -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Check for exist function
Hi, How can I check, thath some function is declared and to do not declare it second time ( with require ) ? Thanks, Rosen Marinov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] mail with html
Hi Sandeep, Thanks for your mail but I was looking at something else. This is what I need. I have a table that I will be selecting certian records and mailing to clients that have signed up. The result should be in html and plain text. The plain text is working now but I want to put into a table format to look neater, below is a sample in text format. Any clues? Destinazione Periodo Vitofferte London 2001-07-31 Chf 385 Hammamet2001-07-28 Chf 999 Adrian On Mon, 23 Jul 2001, Sandeep Hundal wrote: oh yeah, you might want to tidy up the code a bit... the email has put in line breaks. and replace [EMAIL PROTECTED] with your own email... the mail() command does all the work... the header command redirects the page.. you might want to change the address or remove it. /sunny -Original Message- From: Sandeep Hundal [mailto:[EMAIL PROTECTED]] Sent: 23 July 2001 11:06 To: 'Adrian D'Costa'; php general list Subject: RE: [PHP] mail with html here's a script i wrote a while back. copied and pasted. - ? if ($submit) { $headers .= From: $myemail \n; $headers .= cc:$cc \n; $headers .= bcc:$bcc \n; // $headers .= Content-Type: text/html; charset=iso-8859-1\n; $message = stripslashes($contents); header(Location:http://www.wde.org/me/;); mail($to, $subject, $message, $headers); } else { echo html; $myemail1 = nothing [EMAIL PROTECTED]; echo brform action=\$php_self\ method=\post\ table cellpadding=15 cellspacing=0 width=100% bgcolor=#ff tr td align=rightstrong class=blackfrom which account :/strong/td tdselect name=\myemail\ option value=\$myemail1\[EMAIL PROTECTED] /select /td /tr tr td align=rightstrong class=blackemail to :/strong/td tdinput type=text name=\to\/td /tr tr td align=rightstrong class=blackcopy to :/strong/td tdinput type=text name=\cc\/td /tr tr td align=rightstrong class=blackblind copy to :/strong/td tdinput type=text name=\bcc\/td /tr tr td align=rightstrong class=blacksubject :/strong/td tdinput type=text name=\subject\/td /tr tr td valign=top align=rightstrong class=blackemail message :/strong/td tdtextarea cols=45 rows=15 name=\contents\ wrap=physical/textarea/td /tr tr tdnbsp;/td tdstrong class=blackinput type=submit name=submit value=\send this email\/strong/td /tr /table /form; } ? - that should work as a page in itself let me know if you have problems /sunny -Original Message- From: Adrian D'Costa [mailto:[EMAIL PROTECTED]] Sent: 23 July 2001 11:09 To: php general list Subject: [PHP] mail with html Hi, I know this subject had been discussed here before. Tried searching in list.php.net, I get a message search not setup (or something). I want to send html mails thru php using mail(). Could someone tell me where I can study some scripts or tutorials. TIA Adrian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Check for exist function
http://php.net/require_once -Original Message- From: ROsen [mailto:[EMAIL PROTECTED]] Sent: 23 iulie 2001 14:17 To: [EMAIL PROTECTED] Subject: [PHP] Check for exist function Hi, How can I check, thath some function is declared and to do not declare it second time ( with require ) ? Thanks, Rosen Marinov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: holding values in a select list on a form
I worked it out by doing something like this... ? if (!$WR_COUNTRY ==) { $topic = $WR_COUNTRY; }; echo select name=\WR_COUNTRY\; $toplist = mysql_query(select * from wr_country where wr_country_enabled = 1 ); echo option value=\\Select/option\n; while(list($topicid, $topics) = mysql_fetch_row($toplist)) { if ($topicid==$topic) { $sel = selected ; } echo option $sel value=\$topicid\$topics/option\n; $sel = ; } ? Mark Bayfield [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Some help please... I am creating a select list from a database, and I am trying to hold the value of what has been selected by a user, while I do some error checking. It is searching a mysql db to pull out the list. It will then need to pass values back into the database. The code I am using is this... ? echo select name=\FIELDNAME\; print option value=\\Select/option; for ($index = 0; $index mysql_num_rows($query); $index++) { $row = mysql_fetch_row ($query) or die (mysql_error()); print option value=$row[1]$row[1]/option; } echo /select; ? If there is an easier way, let me know Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Check for exist function
[EMAIL PROTECTED] (Rosen) wrote: Hi, How can I check, thath some function is declared and to do not declare it second time ( with require ) ? http://dk.php.net/manual/en/function.function-exists.php -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] mail with html
well all you need to do is use part of the script i sent you.. and in the header variable, uncomment the bit which says text/html and then you can send html email instead of text email... i'm assuming you've already written the script to sent plain text email. i thought you needed that. /sunny -Original Message- From: Adrian D'Costa [mailto:[EMAIL PROTECTED]] Sent: 23 July 2001 12:26 To: Sandeep Hundal Cc: php general list Subject: RE: [PHP] mail with html Hi Sandeep, Thanks for your mail but I was looking at something else. This is what I need. I have a table that I will be selecting certian records and mailing to clients that have signed up. The result should be in html and plain text. The plain text is working now but I want to put into a table format to look neater, below is a sample in text format. Any clues? Destinazione Periodo Vitofferte London 2001-07-31 Chf 385 Hammamet2001-07-28 Chf 999 Adrian On Mon, 23 Jul 2001, Sandeep Hundal wrote: oh yeah, you might want to tidy up the code a bit... the email has put in line breaks. and replace [EMAIL PROTECTED] with your own email... the mail() command does all the work... the header command redirects the page.. you might want to change the address or remove it. /sunny -Original Message- From: Sandeep Hundal [mailto:[EMAIL PROTECTED]] Sent: 23 July 2001 11:06 To: 'Adrian D'Costa'; php general list Subject: RE: [PHP] mail with html here's a script i wrote a while back. copied and pasted. - ? if ($submit) { $headers .= From: $myemail \n; $headers .= cc:$cc \n; $headers .= bcc:$bcc \n; // $headers .= Content-Type: text/html; charset=iso-8859-1\n; $message = stripslashes($contents); header(Location:http://www.wde.org/me/;); mail($to, $subject, $message, $headers); } else { echo html; $myemail1 = nothing [EMAIL PROTECTED]; echo brform action=\$php_self\ method=\post\ table cellpadding=15 cellspacing=0 width=100% bgcolor=#ff tr td align=rightstrong class=blackfrom which account :/strong/td tdselect name=\myemail\ option value=\$myemail1\[EMAIL PROTECTED] /select /td /tr tr td align=rightstrong class=blackemail to :/strong/td tdinput type=text name=\to\/td /tr tr td align=rightstrong class=blackcopy to :/strong/td tdinput type=text name=\cc\/td /tr tr td align=rightstrong class=blackblind copy to :/strong/td tdinput type=text name=\bcc\/td /tr tr td align=rightstrong class=blacksubject :/strong/td tdinput type=text name=\subject\/td /tr tr td valign=top align=rightstrong class=blackemail message :/strong/td tdtextarea cols=45 rows=15 name=\contents\ wrap=physical/textarea/td /tr tr tdnbsp;/td tdstrong class=blackinput type=submit name=submit value=\send this email\/strong/td /tr /table /form; } ? - that should work as a page in itself let me know if you have problems /sunny -Original Message- From: Adrian D'Costa [mailto:[EMAIL PROTECTED]] Sent: 23 July 2001 11:09 To: php general list Subject: [PHP] mail with html Hi, I know this subject had been discussed here before. Tried searching in list.php.net, I get a message search not setup (or something). I want to send html mails thru php using mail(). Could someone tell me where I can study some scripts or tutorials. TIA Adrian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] mail with html
The question is how do I declare the html coding in the message part. Any samples Adrian On Mon, 23 Jul 2001, Sandeep Hundal wrote: well all you need to do is use part of the script i sent you.. and in the header variable, uncomment the bit which says text/html and then you can send html email instead of text email... i'm assuming you've already written the script to sent plain text email. i thought you needed that. /sunny -Original Message- From: Adrian D'Costa [mailto:[EMAIL PROTECTED]] Sent: 23 July 2001 12:26 To: Sandeep Hundal Cc: php general list Subject: RE: [PHP] mail with html Hi Sandeep, Thanks for your mail but I was looking at something else. This is what I need. I have a table that I will be selecting certian records and mailing to clients that have signed up. The result should be in html and plain text. The plain text is working now but I want to put into a table format to look neater, below is a sample in text format. Any clues? Destinazione Periodo Vitofferte London 2001-07-31 Chf 385 Hammamet2001-07-28 Chf 999 Adrian On Mon, 23 Jul 2001, Sandeep Hundal wrote: oh yeah, you might want to tidy up the code a bit... the email has put in line breaks. and replace [EMAIL PROTECTED] with your own email... the mail() command does all the work... the header command redirects the page.. you might want to change the address or remove it. /sunny -Original Message- From: Sandeep Hundal [mailto:[EMAIL PROTECTED]] Sent: 23 July 2001 11:06 To: 'Adrian D'Costa'; php general list Subject: RE: [PHP] mail with html here's a script i wrote a while back. copied and pasted. - ? if ($submit) { $headers .= From: $myemail \n; $headers .= cc:$cc \n; $headers .= bcc:$bcc \n; // $headers .= Content-Type: text/html; charset=iso-8859-1\n; $message = stripslashes($contents); header(Location:http://www.wde.org/me/;); mail($to, $subject, $message, $headers); } else { echo html; $myemail1 = nothing [EMAIL PROTECTED]; echo brform action=\$php_self\ method=\post\ table cellpadding=15 cellspacing=0 width=100% bgcolor=#ff tr td align=rightstrong class=blackfrom which account :/strong/td tdselect name=\myemail\ option value=\$myemail1\[EMAIL PROTECTED] /select /td /tr tr td align=rightstrong class=blackemail to :/strong/td tdinput type=text name=\to\/td /tr tr td align=rightstrong class=blackcopy to :/strong/td tdinput type=text name=\cc\/td /tr tr td align=rightstrong class=blackblind copy to :/strong/td tdinput type=text name=\bcc\/td /tr tr td align=rightstrong class=blacksubject :/strong/td tdinput type=text name=\subject\/td /tr tr td valign=top align=rightstrong class=blackemail message :/strong/td tdtextarea cols=45 rows=15 name=\contents\ wrap=physical/textarea/td /tr tr tdnbsp;/td tdstrong class=blackinput type=submit name=submit value=\send this email\/strong/td /tr /table /form; } ? - that should work as a page in itself let me know if you have problems /sunny -Original Message- From: Adrian D'Costa [mailto:[EMAIL PROTECTED]] Sent: 23 July 2001 11:09 To: php general list Subject: [PHP] mail with html Hi, I know this subject had been discussed here before. Tried searching in list.php.net, I get a message search not setup (or something). I want to send html mails thru php using mail(). Could someone tell me where I can study some scripts or tutorials. TIA Adrian -- PHP General
RE: [PHP] mail with html
you don't. as far as I know, you just put the code in the message like such : $message = table tr td$name/tdtdareacode/td /tr /table ; and then send off $message using mail(). You might want to stripslashes() as I did. /sunny -Original Message- From: Adrian D'Costa [mailto:[EMAIL PROTECTED]] Sent: 23 July 2001 13:04 To: Sandeep Hundal Cc: php general list Subject: RE: [PHP] mail with html The question is how do I declare the html coding in the message part. Any samples Adrian On Mon, 23 Jul 2001, Sandeep Hundal wrote: well all you need to do is use part of the script i sent you.. and in the header variable, uncomment the bit which says text/html and then you can send html email instead of text email... i'm assuming you've already written the script to sent plain text email. i thought you needed that. /sunny -Original Message- From: Adrian D'Costa [mailto:[EMAIL PROTECTED]] Sent: 23 July 2001 12:26 To: Sandeep Hundal Cc: php general list Subject: RE: [PHP] mail with html Hi Sandeep, Thanks for your mail but I was looking at something else. This is what I need. I have a table that I will be selecting certian records and mailing to clients that have signed up. The result should be in html and plain text. The plain text is working now but I want to put into a table format to look neater, below is a sample in text format. Any clues? Destinazione Periodo Vitofferte London 2001-07-31 Chf 385 Hammamet2001-07-28 Chf 999 Adrian On Mon, 23 Jul 2001, Sandeep Hundal wrote: oh yeah, you might want to tidy up the code a bit... the email has put in line breaks. and replace [EMAIL PROTECTED] with your own email... the mail() command does all the work... the header command redirects the page.. you might want to change the address or remove it. /sunny -Original Message- From: Sandeep Hundal [mailto:[EMAIL PROTECTED]] Sent: 23 July 2001 11:06 To: 'Adrian D'Costa'; php general list Subject: RE: [PHP] mail with html here's a script i wrote a while back. copied and pasted. - ? if ($submit) { $headers .= From: $myemail \n; $headers .= cc:$cc \n; $headers .= bcc:$bcc \n; // $headers .= Content-Type: text/html; charset=iso-8859-1\n; $message = stripslashes($contents); header(Location:http://www.wde.org/me/;); mail($to, $subject, $message, $headers); } else { echo html; $myemail1 = nothing [EMAIL PROTECTED]; echo brform action=\$php_self\ method=\post\ table cellpadding=15 cellspacing=0 width=100% bgcolor=#ff tr td align=rightstrong class=blackfrom which account :/strong/td tdselect name=\myemail\ option value=\$myemail1\[EMAIL PROTECTED] /select /td /tr tr td align=rightstrong class=blackemail to :/strong/td tdinput type=text name=\to\/td /tr tr td align=rightstrong class=blackcopy to :/strong/td tdinput type=text name=\cc\/td /tr tr td align=rightstrong class=blackblind copy to :/strong/td tdinput type=text name=\bcc\/td /tr tr td align=rightstrong class=blacksubject :/strong/td tdinput type=text name=\subject\/td /tr tr td valign=top align=rightstrong class=blackemail message :/strong/td tdtextarea cols=45 rows=15 name=\contents\ wrap=physical/textarea/td /tr tr tdnbsp;/td tdstrong class=blackinput type=submit name=submit value=\send this email\/strong/td /tr /table /form; } ? - that should work as a page in itself let me know if you have problems /sunny -Original Message- From: Adrian D'Costa [mailto:[EMAIL
[PHP] RE: holding values in a select list on a form
? echo select name='FIELDNAME'; print option value=''Select/option; if($result = mysql_db_query($db, $query)) while($row = mysql_fetch_row($result)) print option value={$row[1]}{$row[1]}/option; echo /select; ? although personally I use mysql_fetch_array() so I can use the field name to get the appropriate field rather than getting the second field returned from the query (as you are doing). Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html -Original Message- From: Mark Bayfield [mailto:[EMAIL PROTECTED]] Sent: 23 July 2001 10:34 To: [EMAIL PROTECTED] Subject: holding values in a select list on a form Some help please... I am creating a select list from a database, and I am trying to hold the value of what has been selected by a user, while I do some error checking. It is searching a mysql db to pull out the list. It will then need to pass values back into the database. The code I am using is this... ? echo select name=\FIELDNAME\; print option value=\\Select/option; for ($index = 0; $index mysql_num_rows($query); $index++) { $row = mysql_fetch_row ($query) or die (mysql_error()); print option value=$row[1]$row[1]/option; } echo /select; ? If there is an easier way, let me know Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mail with html
Here is an example that I use myself for sending HTML code via email. ? function qp_encode($str) { $chars = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY); foreach ($chars as $char) { if (ord($char) 127 || ord($char) == 61) $result .= sprintf(=%X, ord($char)); else $result .= $char; } return $result; } $content = HTML/HTML; $content = qp_encode($content); mail(email,subject,$content,From: someone@someone\nMime-Version: 1.0\nContent-Type: text/html; charset=\iso-8859-1\\nContent-Transfer-Encoding: quoted-printable\n); ? This encodes the content so email readers like Microsoft Outlook can read the mail. Best regards, Jome - Original Message - From: Adrian D'Costa [EMAIL PROTECTED] To: php general list [EMAIL PROTECTED] Sent: Monday, July 23, 2001 12:08 PM Subject: [PHP] mail with html Hi, I know this subject had been discussed here before. Tried searching in list.php.net, I get a message search not setup (or something). I want to send html mails thru php using mail(). Could someone tell me where I can study some scripts or tutorials. TIA Adrian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] New User - Problem with php and pop3-class...
Hi all, I'm new to this ML as well as to php, so I have a problem that someone might have a solution for. What I have to do is to get mails from a mail-account and get them into a flash-movie. The latter thing is not the problem, probably. I downloaded the pop3-class from Manuel Lemos. What I have problems with is the use of this pop3-class. I just uploaded them to the server. I thought there should come up an error-message, saying something like can't find the mail-account or something like that. But what I got when I run the script is an output like this: -hostname=localhost; if(($error=$pop3_connection-Open())==) { Connected to the POP3 server $pop3_connection-hostname if(($error=$pop3_connection-Login($user,$password,$apop))==) { ... and so on. So what happens is that part of the php-code written in the html-site is written to the screen. It seems that the server is interpreting the php-script, though, as the echo-commands are executed right. But the first line (starting with - should be written to the screen, right? Does anyone know what the problem could be? Thanks for any help on this problem. Greetings, Stephan Hübner -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php vs Filemaker
Hello Christian, Monday, July 23, 2001, 3:39:14 PM, you wrote: CSP This might sound a little strange but I'd like to query a Filmeker CSP database using CSP Php. I read in the Filemaker manual that ODBC drivers let us be able to CSP query the CSP database using basic SQL calls. Meanwhile, I tried to perform the task CSP but it CSP seems quite complicated to acheive... As anyone done this before ? If CSP so, some CSP tips would be appreciated. CSP Thanks a lot, CSP Christ. Cooperation of filemaker and php together is very hard. First of all I'd like to write that filemaker is not sql server. I've done it before but only for a short time. With filemaker I'm prefering lasso. I've used MyODBC driver. -- Best regards, Danielmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Unlink Woes
Ok that didn't give any output... and I checked in phpinfo() and found safe_mode off. Any other ideas? Sheridan - Original Message - From: Jack Dempsey [EMAIL PROTECTED] To: 'Sheridan Saint-Michel' [EMAIL PROTECTED] Sent: Friday, July 20, 2001 12:12 PM Subject: RE: [PHP] Unlink Woes ? if(get_cfg_var('safe_mode')){ echo running in safe mode; } ? -Original Message- From: Sheridan Saint-Michel [mailto:[EMAIL PROTECTED]] Sent: Friday, July 20, 2001 1:04 PM To: [EMAIL PROTECTED] Cc: php-general Subject: Re: [PHP] Unlink Woes How can I find out if my server is in Safe mode? Do I have to call my Host and ask them? Sheridan - Original Message - From: [EMAIL PROTECTED] To: Sheridan Saint-Michel [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, July 20, 2001 11:25 AM Subject: Re: [PHP] Unlink Woes on 7/20/01 11:48 AM, Sheridan Saint-Michel at [EMAIL PROTECTED] wrote: Warning: Unlink failed (Permission denied) in /home/www/foxjet/employees/admin.php on line 108 Here's the code if($submit == Delete) { for ($j = 0; $j $numfiles; $j++) { $checkname = $files[$j]; if (${$checkname} = on) { $temp = $pwd . $files[$j]; unlink($temp); } } } I had this error to from unlink, it may be because your server is in safe mode Susan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Speeding up MySQL querys
Hello, for the moment I'm trying to write searchengine kind-of-thing in PHP using MySQL, however MySQL tend to be very slow when searching. My table is about 100 mb and the query is SELECT * FROM search WHERE search.content LIKE '%$keyword%' OR search.filnamn LIKE '%$keyword%' I've tried setting INDEX but it didn't work out since I'm using BLOB-fields. Is there any other way than using INDEX? Thanks, Jome -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Speeding up MySQL querys
The key to speed with SQL databases is INDEX. You are doing sequential reads of the contents of each of these fields; no matter what database you used performance would be atrocious. Can you break some keywords out of your text, and assign them to fields like keywd1, keywd2, etc.? How often does the data change? Could you periodically parse the contents of those target fields and create a lookup table, with an exclusion list so that you don't index the, a and the like, with pointers from the lookup table to the primary key of search? Semi-finally, this may not be a good scenario for a database. What about storing these files as text and using something like htdig to index them and return search results. Finally (you can thell this isn't any logical order), doesn't one of the beta versions of MySQL support text indexing? Anyway - some thought starters. But you will NEVER get good performance with sequential reads. HTH - Miles Thompson At 03:56 PM 7/23/01 +0200, Jome wrote: Hello, for the moment I'm trying to write searchengine kind-of-thing in PHP using MySQL, however MySQL tend to be very slow when searching. My table is about 100 mb and the query is SELECT * FROM search WHERE search.content LIKE '%$keyword%' OR search.filnamn LIKE '%$keyword%' I've tried setting INDEX but it didn't work out since I'm using BLOB-fields. Is there any other way than using INDEX? Thanks, Jome -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mail with html
You just need to have the proper MIME information deopending on what exactly you are trying to do. Also, the HTML must be in Quoted Printable Format. If you have PHP configured with imap you can just run your message through the imap_8bit function (or so I am told... I didn't have that luxury =P ). If not you just need to read the MIME specifications for quoted printable and follow all the rules. The rules for quoted printable can be found in section 5.1 of this document http://www.faqs.org/rfcs/rfc1521.html or section 6.7 of this document http://www.faqs.org/rfcs/rfc2045.html The other piece of advice I have to offer (having just finished a fairly large mail program myself) is to send yourself html messages in whatever mail reader you use and then telnet to your mail server and look at them there. That should at least give you an idea of what your message should look like. Sheridan - Original Message - From: Adrian D'Costa [EMAIL PROTECTED] To: Sandeep Hundal [EMAIL PROTECTED] Cc: php general list [EMAIL PROTECTED] Sent: Monday, July 23, 2001 7:03 AM Subject: RE: [PHP] mail with html The question is how do I declare the html coding in the message part. Any samples Adrian On Mon, 23 Jul 2001, Sandeep Hundal wrote: well all you need to do is use part of the script i sent you.. and in the header variable, uncomment the bit which says text/html and then you can send html email instead of text email... i'm assuming you've already written the script to sent plain text email. i thought you needed that. /sunny -Original Message- From: Adrian D'Costa [mailto:[EMAIL PROTECTED]] Sent: 23 July 2001 12:26 To: Sandeep Hundal Cc: php general list Subject: RE: [PHP] mail with html Hi Sandeep, Thanks for your mail but I was looking at something else. This is what I need. I have a table that I will be selecting certian records and mailing to clients that have signed up. The result should be in html and plain text. The plain text is working now but I want to put into a table format to look neater, below is a sample in text format. Any clues? Destinazione Periodo Vitofferte London 2001-07-31 Chf 385 Hammamet2001-07-28 Chf 999 Adrian On Mon, 23 Jul 2001, Sandeep Hundal wrote: oh yeah, you might want to tidy up the code a bit... the email has put in line breaks. and replace [EMAIL PROTECTED] with your own email... the mail() command does all the work... the header command redirects the page.. you might want to change the address or remove it. /sunny -Original Message- From: Sandeep Hundal [mailto:[EMAIL PROTECTED]] Sent: 23 July 2001 11:06 To: 'Adrian D'Costa'; php general list Subject: RE: [PHP] mail with html here's a script i wrote a while back. copied and pasted. - ? if ($submit) { $headers .= From: $myemail \n; $headers .= cc:$cc \n; $headers .= bcc:$bcc \n; // $headers .= Content-Type: text/html; charset=iso-8859-1\n; $message = stripslashes($contents); header(Location:http://www.wde.org/me/;); mail($to, $subject, $message, $headers); } else { echo html; $myemail1 = nothing [EMAIL PROTECTED]; echo brform action=\$php_self\ method=\post\ table cellpadding=15 cellspacing=0 width=100% bgcolor=#ff tr td align=rightstrong class=blackfrom which account :/strong/td tdselect name=\myemail\ option value=\$myemail1\[EMAIL PROTECTED] /select /td /tr tr td align=rightstrong class=blackemail to :/strong/td tdinput type=text name=\to\/td /tr tr td align=rightstrong class=blackcopy to :/strong/td tdinput type=text name=\cc\/td /tr tr td align=rightstrong class=blackblind copy to :/strong/td tdinput type=text name=\bcc\/td /tr tr td align=rightstrong class=blacksubject :/strong/td tdinput type=text name=\subject\/td /tr tr td valign=top align=rightstrong class=blackemail message :/strong/td tdtextarea cols=45 rows=15 name=\contents\ wrap=physical/textarea/td /tr tr tdnbsp;/td tdstrong class=blackinput type=submit name=submit value=\send this email\/strong/td /tr /table /form; } ? - that should work as a page in itself let me know if you have problems /sunny -Original Message- From: Adrian D'Costa [mailto:[EMAIL PROTECTED]] Sent: 23 July 2001 11:09 To: php general list Subject: [PHP] mail with html Hi, I know this subject had been discussed here before. Tried searching in list.php.net, I get a message search not setup (or something). I want to send html mails thru php using mail(). Could someone tell me where I can study
[PHP] session on win32
Hi, I can't get session_register() to work on a win2k system with IIS4. After creating the session 'session_start()' and registering a variable 'session_register(counter)' which is set a a non zero value, the only thing, the session data file contains is: !counter| The value never gets stored! On a LINUX system the very same script behaves like expected. By the way, I tryed the script with php 4.0.4pl1 and 4.0.6 Is there anything wrong with sessions on win32? Dieter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Send variables from php to dll and back.
I'm trying to call a VB DLL to run validation checks on user input. I know nothing of VB, or even how to call a DLL for something like this, so I'm going to need to be shown like a newbie. I've already read over Luiz Fernando's request and responses, and they didn't seem to help me. For example, I need to send: $string=Hello World; $string2=This/Would/Fail $string3=Test 3; $string4=Test%5; script sends $string to helloworld.dll .DLL grabs the string, validates it, and sends back the variables that passed, and the variables that failed. IE: $passed=string, string3; $failed=string2, string4; Any ideas how I would go about sending this information to the .dll and returning it? Thanks in advance! Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] templates
i've been looking for a template site that i used and never bookmarked. I'll tell you what i remember about the site and hopefully someone will know what site i'm talking about. I've spend the last 5 hours looking for this siteso this is my final stab in the dark. The site had 4 categories of templates. one was business templates and the other was user templates. most of the designs were linkware. and most of the templates were in plain html. the site had a lot of templates...150+? does anybody remember a free template site like that? I'm pulling my hair out because ti was a good template site...not one of those cheezy one design 50 different color template sites. ~kurth -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] templates
Your web browser should have a history option, and you can sift through the list of domains you surfed that approximate time frame ago...Also you can search in some applications like netscape the history file, and look for key things like templates... Good Luck Kurth Bemis wrote: i've been looking for a template site that i used and never bookmarked. I'll tell you what i remember about the site and hopefully someone will know what site i'm talking about. I've spend the last 5 hours looking for this siteso this is my final stab in the dark. The site had 4 categories of templates. one was business templates and the other was user templates. most of the designs were linkware. and most of the templates were in plain html. the site had a lot of templates...150+? does anybody remember a free template site like that? I'm pulling my hair out because ti was a good template site...not one of those cheezy one design 50 different color template sites. ~kurth -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- ___ Jack Sasportas Innovative Internet Solutions Phone 305.665.2500 Fax 305.665.2551 www.innovativeinternet.com www.web56.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Another how do i question
I made this code for a simple for (the end of it) but what do i change in the $message variable so there is a new line between each other variable in $message (ive tried $name. br. $last_name and. happens) ?php $email = [EMAIL PROTECTED]; $subject = Mini survey; $message = $name. $last_name. $age. $system. $res. $cpu. $comments; ? ?php mail($email, $subject, $message); ? -legokiller666- http://www.StupeedStudios.f2s.com New address new site ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666
Re: [PHP] templates
At 11:29 AM 7/23/2001, Jack Sasportas wrote: I last visited this site about 2 months ago...too long for any history :-( Your web browser should have a history option, and you can sift through the list of domains you surfed that approximate time frame ago...Also you can search in some applications like netscape the history file, and look for key things like templates... Good Luck Kurth Bemis wrote: i've been looking for a template site that i used and never bookmarked. I'll tell you what i remember about the site and hopefully someone will know what site i'm talking about. I've spend the last 5 hours looking for this siteso this is my final stab in the dark. The site had 4 categories of templates. one was business templates and the other was user templates. most of the designs were linkware. and most of the templates were in plain html. the site had a lot of templates...150+? does anybody remember a free template site like that? I'm pulling my hair out because ti was a good template site...not one of those cheezy one design 50 different color template sites. ~kurth -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- ___ Jack Sasportas Innovative Internet Solutions Phone 305.665.2500 Fax 305.665.2551 www.innovativeinternet.com www.web56.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Another how do i question
on 7/23/01 6:25 PM, Kyle Smith at [EMAIL PROTECTED] wrote: I made this code for a simple for (the end of it) but what do i change in the $message variable so there is a new line between each other variable in $message (ive tried $name. br. $last_name and. happens) Did you try $name . br . $last_name, etc. Although the br will just show up as plain text in a text email, so I'd try the new line character \n. Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Another how do i question
on 7/23/01 10:49 AM, Matt Greer at [EMAIL PROTECTED] wrote: on 7/23/01 6:25 PM, Kyle Smith at [EMAIL PROTECTED] wrote: I made this code for a simple for (the end of it) but what do i change in the $message variable so there is a new line between each other variable in $message (ive tried $name. br. $last_name and. happens) Did you try $name . br . $last_name, etc. Er, I mean $message = $name . 'br' ... ; Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Resolution
is there a code to show a users screen resolution and/or make a webpage go to a certain page of the site depending on the users screen resolution? -legokiller666- http://www.StupeedStudios.f2s.com New address new site ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666
Re: [PHP] Resolution
I don't believe you can get screen resolution with PHP. You'd need to use something client side, such as Javascript. Tyler - Original Message - From: Kyle Smith [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 23, 2001 6:45 PM Subject: [PHP] Resolution is there a code to show a users screen resolution and/or make a webpage go to a certain page of the site depending on the users screen resolution? -legokiller666- http://www.StupeedStudios.f2s.com New address new site ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] templates
For future purposes you should set your history to expire some ridiculous time in the future. I still reference sites from as far back as 2 years ago... It's really nice to be able to do that. I use netscape and my setting is 999 days.. Jack Kurth Bemis wrote: At 11:29 AM 7/23/2001, Jack Sasportas wrote: I last visited this site about 2 months ago...too long for any history :-( Your web browser should have a history option, and you can sift through the list of domains you surfed that approximate time frame ago...Also you can search in some applications like netscape the history file, and look for key things like templates... Good Luck Kurth Bemis wrote: i've been looking for a template site that i used and never bookmarked. I'll tell you what i remember about the site and hopefully someone will know what site i'm talking about. I've spend the last 5 hours looking for this siteso this is my final stab in the dark. The site had 4 categories of templates. one was business templates and the other was user templates. most of the designs were linkware. and most of the templates were in plain html. the site had a lot of templates...150+? does anybody remember a free template site like that? I'm pulling my hair out because ti was a good template site...not one of those cheezy one design 50 different color template sites. ~kurth -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- ___ Jack Sasportas Innovative Internet Solutions Phone 305.665.2500 Fax 305.665.2551 www.innovativeinternet.com www.web56.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- ___ Jack Sasportas Innovative Internet Solutions Phone 305.665.2500 Fax 305.665.2551 www.innovativeinternet.com www.web56.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Keeping fields out of URL
You forgot to put method=POST in your form action=blah.php should be: form action=blah.php method=POST Tyler - Original Message - From: Shrout, Ryan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 23, 2001 10:55 AM Subject: [PHP] Keeping fields out of URL How can I keep fields in a form out of the URL? I am writing a basic PHP/login script to password protect a directory of the web site (if anyone knows of something pre-made, please do let me know). But, the first stumbling block is that when sometypes in their username/password, even when the I use th INPUT Type Password so only asterics appear when it is typed, the password still appears in the submit query URL. How do I stop that? Ryan Shrout -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Resolution
If you want to see what you can get from the client, serverside. Please run the following: ? phpinfo(); ? Put that into some php file, and it will tell you what PHP will allow you to get be default. I feel that the JS answer is about as correct as your going to get. -- Austin Gonyou Systems Architect, CCNA Coremetrics, Inc. Phone: 512-796-9023 email: [EMAIL PROTECTED] -Original Message- From: Tyler Longren [mailto:[EMAIL PROTECTED]] Sent: Monday, July 23, 2001 10:54 AM To: Kyle Smith; [EMAIL PROTECTED] Subject: Re: [PHP] Resolution I don't believe you can get screen resolution with PHP. You'd need to use something client side, such as Javascript. Tyler - Original Message - From: Kyle Smith [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 23, 2001 6:45 PM Subject: [PHP] Resolution is there a code to show a users screen resolution and/or make a webpage go to a certain page of the site depending on the users screen resolution? -legokiller666- http://www.StupeedStudios.f2s.com New address new site ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Keeping fields out of URL
on 7/23/01 10:55 AM, Shrout, Ryan at [EMAIL PROTECTED] wrote: How can I keep fields in a form out of the URL? I am writing a basic PHP/login script to password protect a directory of the web site (if anyone knows of something pre-made, please do let me know). If you're on a unix server you can use .htaccess A search on any search engine should pull up lots of info on it. But, the first stumbling block is that when sometypes in their username/password, even when the I use th INPUT Type Password so only asterics appear when it is typed, the password still appears in the submit query URL. How do I stop that? Change your method to post as in form method=post action=somefile.php Keep in mind that just sticks the variables in the header rather than on the command line. It's not any more secure than what you had before. Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Resolution
Hi Kyle, I use the following: script language=JavaScript !-- hide from none JavaScript Browsers function PassScreenWidth(what) { document.login_frm.screen_width.value=what } function GetScreenSize() { var screen_width = screen.width; return screen_width; } // - stop hiding -- /script . . . FORM ACTION=login1.php METHOD=POST NAME=login_frm input type=hidden name=screen_width input type=submit value=Login name=Login onClick=PassScreenWidth(GetScreenSize()) /form Cheers Rudolf -Original Message- From: Kyle Smith [mailto:[EMAIL PROTECTED]] Sent: 24 July 2001 01:45 To: [EMAIL PROTECTED] Subject: [PHP] Resolution is there a code to show a users screen resolution and/or make a webpage go to a certain page of the site depending on the users screen resolution? -legokiller666- http://www.StupeedStudios.f2s.com New address new site ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Email Software
Am Mittwoch, 18. Juli 2001 14:50 schrieb Wee Chua: Hi all, I need a little help from you guys. Can anyone tell what is the best software for sending million emails at a time or something like that? sendmail -- mfg Gregor Welters -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Send variables from php to dll and back.
What you are probably looking for is: http://www.php.net/manual/en/class.com.php Make a COM object out of your VB DLL (more info on this is available on a VB faq). You can use the functions on the page above to access the functionality of the COM object. Best Regards, Patrick Lynch. == Eirco == Web: http://www.eirco.com -Original Message- From: Ryan Marrs [mailto:[EMAIL PROTECTED]] Sent: 23 July 2001 16:00 To: [EMAIL PROTECTED] Subject: [PHP] Send variables from php to dll and back. I'm trying to call a VB DLL to run validation checks on user input. I know nothing of VB, or even how to call a DLL for something like this, so I'm going to need to be shown like a newbie. I've already read over Luiz Fernando's request and responses, and they didn't seem to help me. For example, I need to send: $string=Hello World; $string2=This/Would/Fail $string3=Test 3; $string4=Test%5; script sends $string to helloworld.dll .DLL grabs the string, validates it, and sends back the variables that passed, and the variables that failed. IE: $passed=string, string3; $failed=string2, string4; Any ideas how I would go about sending this information to the .dll and returning it? Thanks in advance! Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Resolution
Hello Kyle, Tuesday, July 24, 2001, 1:45:00 AM, you wrote: KS is there a code to show a users screen resolution and/or make a webpage go to a certain page of the site depending on the users screen resolution? KS -legokiller666- KS http://www.StupeedStudios.f2s.com KS New address new site KS ICQ: 115852509 KS MSN: [EMAIL PROTECTED] KS AIM: legokiller666 Use a javascript code screen.width(); screen.height(); -- Best regards, Danielmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] REPOST: Image color quality problems
I need to learn to stop posting things over the weekend since they rarely get a response. Can anyone help with the below?: I have the following code that takes an existing image, creates a new one from it and writes some white text on top of that image: ?php header(Content-type: image/png); $startingImage = leftphoto_01.png; $image = imageCreateFromPNG($startingImage); //$white = imageColorAt($image, 30, 215); $white = imageColorAllocate($image, 255, 255, 255); imageTTFText($image, 24, 0, 10, 25, $white, arialbd.ttf, This is a test); imagePNG($image); imagedestroy($image); ? Problem is, the white text isn't white -- it's a dingy gray color. From reading around, I thought maybe if I took an existing white pixel in the image and used that to set white, that might help (hence the commented out //$white = imageColorAt... line in my code above) That didn't help either. (and the pixel I sampled is exactly the shade of white I want) I am almost completely unfamiliar with color pallettes and how to manipulate them. Can someone shed some light on how I can get some clean, bright white text on my image? Thanks. --kurt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Another how do i question
Unless you are sending HTML mail, you need to use newline - not BR ?php $email = [EMAIL PROTECTED]; $subject = Mini survey; $message = $name . \n . $last_name . \n . $age . \n . $system . \n . $res . \n . $cpu . \n . $comments; mail($email, $subject, $message); ? Best Regards, Patrick Lynch. == Eirco == -Original Message- From: Kyle Smith [mailto:[EMAIL PROTECTED]] Sent: 24 July 2001 00:25 To: [EMAIL PROTECTED] Subject: [PHP] Another how do i question I made this code for a simple for (the end of it) but what do i change in the $message variable so there is a new line between each other variable in $message (ive tried $name. br. $last_name and. happens) ?php $email = [EMAIL PROTECTED]; $subject = Mini survey; $message = $name. $last_name. $age. $system. $res. $cpu. $comments; ? ?php mail($email, $subject, $message); ? -legokiller666- http://www.StupeedStudios.f2s.com New address new site ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Add system user using php
HI, I would like to know how to add a system user using php. etc. adduser mark..and then passwd mark --password -- password. Thank you Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Why wont this work?
news_publish.php *** ?php function DoTemplate() { $filedir = func_get_arg(0); $filename = func_get_arg(1); $news = func_get_arg(2); $tempfile = fopen ($filedir . / . $filename . .html, r) or die (Failed to open template file $filename); while($templine=fgets($tempfile, 4096) ) { $templine = preg_replace(/(NEWS)(.*?)(\/NEWS)/i,\\1$news\\2, $templine)); print ($templine); } fclose ($tempfile); } $template_dir=/php/work/boz; $template_filename=news; $news=SOME STUFF GOES HERE BUILD IT AS A VAR; DoTemplate($template_dir,$template_filename); ? ** news.html *** !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN html head titleNo Title/title /head body NEWSThis is some text/NEWS /body /html Results in Parse error: parse error in /php/work/boz/news_publish.php on line 8 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Why wont this work?
-Original Message- From: Dan Krumlauf [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 24, 2001 11:24 AM To: [EMAIL PROTECTED] Subject: [PHP] Why wont this work? news_publish.php *** [snip] $templine = preg_replace(/(NEWS)(.*?)(\/NEWS)/i,\\1$news\\2, $templine)); Unless my counting skills have gone downhill lately, this line has more )'s than ('s. --- Mark Roedel ([EMAIL PROTECTED]) | There cannot be a crisis next week. Systems Programmer / WebMaster | My schedule is already full. LeTourneau University | -- Henry Kissinger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Why wont this work?
Your line in in news_publish.php is: while($templine=fgets($tempfile, 4096) ) { if you want to test if $templine is equal to fgets($tempfile, 4096) then you should use 2 equal signs. So, while($templine==fgets($tempfile, 4096) ) { 1 equal sign sets the value of the right side to the left. HTH, Pat In a message dated 7/23/01 12:18:51 PM Eastern Daylight Time, [EMAIL PROTECTED] writes: news_publish.php *** ?php function DoTemplate() { $filedir = func_get_arg(0); $filename = func_get_arg(1); $news = func_get_arg(2); $tempfile = fopen ($filedir . / . $filename . .html, r) or die (Failed to open template file $filename); while($templine=fgets($tempfile, 4096) ) { $templine = preg_replace(/(NEWS)(.*?)(\/NEWS)/i,\\1$news\\2, $templine)); print ($templine); } fclose ($tempfile); } $template_dir=/php/work/boz; $template_filename=news; $news=SOME STUFF GOES HERE BUILD IT AS A VAR; DoTemplate($template_dir,$template_filename); ? ** news.html *** !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN head titleNo Title/title /head NEWSThis is some text/NEWS Results in Parse error: parse error in /php/work/boz/news_publish.php on line 8
RE: [PHP] sleep() function question
Is output_buffering = On set in the php.ini file? If it is set to on, no content or headers are sent back to the browser until the whole page has been processed by PHP. Best Regards, Patrick Lynch. Eirco Web: http://www.eirco.com -Original Message- From: Andrew Brampton [mailto:[EMAIL PROTECTED]] Sent: 23 July 2001 02:38 To: drb Cc: [EMAIL PROTECTED] Subject: Re: [PHP] sleep() function question I know very little about PHP, but in other languages, what u describe happens because the webserver doesn't send the output until the excution is done... But you can make it write your output as its generated... check out the function flush also after 20seconds of looking, I found ob_implicit_flush that may help as well.. Hope I could help Andrew - Original Message - From: drb [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, July 22, 2001 11:25 PM Subject: [PHP] sleep() function question just wanted to make sure I was not doing anything incorrectly. I want to return some values to the screen and then sleep(), then return more values. It seems that nothing is returned till the sleep is over and then all the values are returned at once. Is this the natural function of sleep(); thanks, DRB -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] number generat {Luhn algorithm}
Yamin Prabudy pressed the little lettered thingies in this order... anybody know about the Luhn algorithm ?? how can i do that in php yamin http://www.zend.com/codex.php?id=31single=1 Christopher Ostmo a.k.a. [EMAIL PROTECTED] AppIdeas.com Innovative Application Ideas Meeting cutting edge dynamic web site needs since the dawn of Internet time (1995) For a good time, http://www.AppIdeas.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] D d d d database?
ok i dont know the first thing about data bases so could someone please guide me through the process of making a score board for a flash game i have made with the variables $name and $score?? (note: i have hosting at f2s.com so i have to use myADMIN) -legokiller666- http://www.StupeedStudios.f2s.com New address new site ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666
[PHP] Zip Code Locator?
Hi, Does anyone know where can I find documentation or example scripts for a zip code locator. I'm looking for something that will list other zip codes within a number of miles radius of the zip specified. Thanks! Vince -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Single Digit in Double digit column
guys, I don't know If this is the rigth place to ask this question, but please help me! I have a mySQL table, where the ID field is an auto increment number (INT(2)). I have a query that selects 2 colunms in the table and the lists them But only the items with a double digit id are displayd. it fails to display items with 1 digit! What did I do wrong I want to know where to look. Stretsh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Another how do i question
Hey Kyle... Try \r\n instead of \n I had the same problem, and this fixed it for me! (someone on the net tipped me on this one!) Stretsh Kyle Smith [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I made this code for a simple for (the end of it) but what do i change in the $message variable so there is a new line between each other variable in $message (ive tried $name. br. $last_name and. happens) ?php $email = [EMAIL PROTECTED]; $subject = Mini survey; $message = $name. $last_name. $age. $system. $res. $cpu. $comments; ? ?php mail($email, $subject, $message); ? -legokiller666- http://www.StupeedStudios.f2s.com New address new site ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Author.class - Does it exist?
Hello, Does anyone know if there's a GPL author class out there? There are online book stores bibliographies all need to manage author names in a similar way (I would think), and I'd just like to not recreate the wheel if I don't have to. Mike -- Mike Gifford, OpenConcept Consulting, http://openconcept.ca Offering everything your organization needs for an effective web site. Abolish Nuclear Weapons Now!: http://pgs.ca/petition/ It is a miracle that curiosity survives formal education. - A Einstein -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: One2Many Logic Problem - phpMySQL bibliography
Hello Steve, Thanks for the response. I tried to reply to this earlier, but seems like Mozilla ate it. :( Steve Brett wrote: wouldn't the structure of the database be determined by the fact you have a many to many relationship ? i.e. the two tables would decompose into three with a 'link' table defining the many to may part ? Sorry if I wasn't clear about this. You are right there is a linking table to manage the relationship. I can create a query which will find duplicate author's for each book listed in this linking table. However, I don't know how to effectively use this data to affect how information is extracted from the database in the second query. CREATE TABLE WLPprofile ( profileID mediumint(9) NOT NULL, languageID varchar(5), addressID mediumint(9), firstName varchar(255), middleName varchar(255), lastName varchar(255), organization varchar(255), nationality varchar(255), professionID smallint(3), bio text, status varchar(5), PRIMARY KEY (profileID) ); CREATE TABLE WLPbib ( bibID mediumint(9) NOT NULL, languageID varchar(5), publisherID mediumint(9), categoryID smallint(6), type varchar(55), title varchar(255), pageNumber varchar(55), source_bibID varchar(55), publicationDate varchar(5), dateAdded date, publishedLanguage varchar(5), URL varchar(100), status varchar(5), PRIMARY KEY (bibID) ); CREATE TABLE WLPbib2profile ( bibID mediumint(9), profileID mediumint(9) ); Thanks. Mike Mike Gifford [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, I'm not sure if anyone else as the need for a php/MySQL based bibliography, but the application that I am developing (which is basically a module for phpSlash) is coming along fairly well. If anyone is interested in seeing the code I can bundle it up and send it out to them (still a long way from finished mind). The draft version of it is up and running here: http://openconcept.ca/WLP/biblio/index.php3 I'm running into a couple problems though that I don't have the logic language for and I was hoping folks here could help me (as you have done in the past). The problem is that I've set up a many to many table to ensure that I can have an author be listed as writing many books and a book be written by many authors. However in listing the books as a bibliography (as the URL above), I want to be able to list multiple authors, and do so in a different format for the first author than for all subsequent ones. I'm hoping to be able to produce output like this: Young, D. and N. Dixon. Helping Leaders Take Effective Action: A Program Evaluation. Greensboro, North Carolina: Center for Creative Leadership, 1996. So, I think the first challenge should be to calculate which books have multiple authors by doing something like this (It's using phplib structures, sorry): $q2 = SELECT * FROM WLPbib2profile ORDER BY bibID; $this-db-query($q2); // Performs above query while ($this-db-next_record()) { if ($this-db-Record[bibID] != $last_bibID) { echo br . $this-db-Record[bibID] . : . $this-db-Record[profileID]; } else { // Multiple Authors echo , . $this-db-Record[profileID]; $multiple_profileID .= array ($this-db-Record[bibID] = $this-db-Record[profileID]); $multiple_profileID .= array($this-db-Record[bibID] = yes); } $last_bibID = $this-db-Record[bibID]; } } With this I can then use the value $multiple_profileID to determine if this record has duplicates or not and use something like this to include both authors and not repeat the bibliography item: if ($multiple_profileID[$bibID]==yes) { while (list($key, $val) = each($multiple_profileID)) { $written_by = $key . : . $val . br; if ($this-db-Record[firstName]) { $written_by .= stripslashes($this-db-Record[firstName]) . ; } if($this-db-Record[lastName]) { $written_by .= stripslashes($this-db-Record[lastName]); } } } else { if($this-db-Record[lastName]) { $written_by .= stripslashes($this-db-Record[lastName]) . , ; } if ($this-db-Record[firstName]) { $written_by .= stripslashes($this-db-Record[firstName]); } } But this seems really awkward (at the best of times) and (worst of all) it isn't working. I've got another related problem in that I've set up the following fields in one table: firstName lastName organization and I need to be able to order them by a combination of lastName organization. I could list the organization field simply as the lastName, but that seems like it would be confusing the data types... Must be a way around this.. I suspect it is limited by my logic not PHP's. Any ideas would be appreciated. Mike -- Mike
RE: [PHP] REPOST: Image color quality problems
I had the same problem when using JPEG, but having a white pixel in the picture solved it. But that did obviosly not solve your problem. Perhabs this is due to bug-version of GD library, have you tried a newer one? Does this also happen if you use JPEG and GIF files? Let us know if you find solution! Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage:www.sed.is -- -Original Message- From: Kurt Lieber [mailto:[EMAIL PROTECTED]] Sent: 23. júlí 2001 16:14 To: [EMAIL PROTECTED] Subject: [PHP] REPOST: Image color quality problems I need to learn to stop posting things over the weekend since they rarely get a response. Can anyone help with the below?: I have the following code that takes an existing image, creates a new one from it and writes some white text on top of that image: ?php header(Content-type: image/png); $startingImage = leftphoto_01.png; $image = imageCreateFromPNG($startingImage); //$white = imageColorAt($image, 30, 215); $white = imageColorAllocate($image, 255, 255, 255); imageTTFText($image, 24, 0, 10, 25, $white, arialbd.ttf, This is a test); imagePNG($image); imagedestroy($image); ? Problem is, the white text isn't white -- it's a dingy gray color. From reading around, I thought maybe if I took an existing white pixel in the image and used that to set white, that might help (hence the commented out //$white = imageColorAt... line in my code above) That didn't help either. (and the pixel I sampled is exactly the shade of white I want) I am almost completely unfamiliar with color pallettes and how to manipulate them. Can someone shed some light on how I can get some clean, bright white text on my image? Thanks. --kurt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP Uploads - Sorry!!!
Sorry to again bring up the subject, but could somebody please help me with file uploads. I have written the script below, but it doesn't work properly. please help. Alternatively, could somebody give me a simple upload script. My system is Win 98, Apache 1.3.17, php 4.0.5, IE5. The code is below. Thanks, Corin Rathbone ?php $root_path = E:/System/htdocs; if(isset($uploads_go)){ static $worked = array(); for($x=0; $x9; $x++){ $current_file = $userfile[$x]; $current_file_name = $userfile_name[$x]; $current_file_size = $userfile_size[$x]; $current_file_path = $root_path.$path_to_file[$x]; print( $xbr\n ); print( $current_filebr\n ); print( $current_file_namebr\n ); print( $current_file_sizebr\n ); print( $current_file_pathbrbr\n ); if(!$current_file=){ if(!file_exists($current_file_path)){ //copy($current_file, $current_file_path); //unlink($current_file); $fp = fopen($current_file_path, wb) or die(Could not write file!); fwrite($fp, $current_file) or die(Could not write file!); fclose($fp) or die(Could not close file pointer!); $worked[] = 1; } else{ //die(File does not exists!); } } else{ $worked[] = 0; } } } elseif(!isset($uploads_go)){ $cfg_upload_max_filesize = get_cfg_var(upload_max_filesize); print( form action=\upload.php\ method=\post\ enctype=\multipart/form-data\\n ); print( input type=\hidden\ name=\MAX_FILE_SIZE\ value=\$cfg_upload_max_filesize\\n ); print( input type=\hidden\ name=\uploads_go\ value=\1\\n ); print( Upload these files:br\n ); print( File: input name=\userfile[0]\ type=\file\brPath: input type=\text\ name=\path_to_file[]\ size=\40\brbr\n ); print( File: input name=\userfile[1]\ type=\file\brPath: input type=\text\ name=\path_to_file[]\ size=\40\brbr\n ); print( File: input name=\userfile[2]\ type=\file\brPath: input type=\text\ name=\path_to_file[]\ size=\40\brbr\n ); print( File: input name=\userfile[3]\ type=\file\brPath: input type=\text\ name=\path_to_file[]\ size=\40\brbr\n ); print( File: input name=\userfile[4]\ type=\file\brPath: input type=\text\ name=\path_to_file[]\ size=\40\brbr\n ); print( File: input name=\userfile[5]\ type=\file\brPath: input type=\text\ name=\path_to_file[]\ size=\40\brbr\n ); print( File: input name=\userfile[6]\ type=\file\brPath: input type=\text\ name=\path_to_file[]\ size=\40\brbr\n ); print( File: input name=\userfile[7]\ type=\file\brPath: input type=\text\ name=\path_to_file[]\ size=\40\brbr\n ); print( File: input name=\userfile[8]\ type=\file\brPath: input type=\text\ name=\path_to_file[]\ size=\40\brbr\n ); print( File: input name=\userfile[9]\ type=\file\brPath: input type=\text\ name=\path_to_file[]\ size=\40\brbr\n ); print( input type=\submit\ value=\Send files\\n ); print( /form ); } elseif(isset($worked)){ for($x=0; $x9; $x++){ if($worked[$x]){ print( The file upload for file $path_to_file[$x] was successfulbr\n ); } else{ print( The file upload for file $path_to_file[$x] was bnot/b successfulbr\n ); } } } else{ print( div class=\main-center\Please select files to be uploaded/div ); } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Using $$ to access a variable
Please forgive my probably newbie question... I am cycling thru my database using a SQL describe statement and then am getting values from a form based upon the field name I find. This is working up 'til I try to read the form data. I have defined a variable like this: $var = $prefix.$table_array[$iCnt][0].$postfix; If I echo $var the printed result is: HTTP_POST_VARS[Id_val] This is perfect because I want to access a field on the submitted form named Id_val, but when I try echoing with a $$ like this: echo $$var I get nothing. I was under the impression that I could access my variable this way. Am I missing something basic here?? Thanks! Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] javascript ?
Hi !!! I know maybe this is not the right place to make this question but I have been a PHP user for long time and this list had been very helpful. I want to create a form which once you select a radio button or a drop down menu display the proper fields according to the selection. Let say that we have two options : To go and Pick Up. If the user select to go then automatically display the address field, zip field etc, if the user select pick up display the time field etc. I 've been looking a lot of javascript sites but can't find something similar to that I want. Hope any of you can help me. Thanks in advance. Angel. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: [PHP-DEV] Re: IMAP/POP3 Administration API?
...None of them will. This is not a part of IMAP protocol; it is part of the mail server, and each server does that in its own way. On a brighter note - if you use qmail, there is a very nice patch for it that will allow to store users in a mysql database, so you can use php to add/delete users whenever you want. We used that in production for a couple of years now. Very convenient. Also patches to make it work with postgres, and it won't take much time to make it work with the DB of your choice, if you look at the sources of those patches - they are rather simple. Website is http://www.qmail.org/. Now, crossposting is a *really* bad idea, and is not looked well upon by the developers. You posted to 15(!) different groups while only one (php-general) is somewhat proper for that question. This significantly reduces your chances to get an answer to your question at all. Vlad Christopher Cheng wrote: Have looked through it already. None of them allows me to add/delete users Dave Mertens [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... On Sun, Jul 22, 2001 at 07:41:01PM +0800, Christopher Cheng wrote: Is there any IMAP/POP3 API/Modules of Linux email system (Sendmail) written in PHP? I am looking for API to write a signup page for users. Have to tried http://www.php.net/imap ?? Great source for API's ;-) Dave Mertens -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP]include question, WHY doesn't this work...
hey- I have a piece of code which does a simply INSERT query into an mp3 table. I've tested it out, and it completes the query, however there is one bug that I just have no clue about. this code does not work when i try to connect to the db: include(lib/db_config.php); $connection = db_connect(fplg); if(!connection) { die(sql_error()); } the include fails and so the db_connect function is undefined. this code works: include(db_config.php); $connection = db_connect(fplg); if(!connection) { die(sql_error()); } I DO have a directory called lib in my root folder. am I calling the include wrong in that first piece. Note that I also tried the first one with a foward slash in front of the 'lib', but had no luck. help! chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Why wont this work?
Hi Dan, try changing: $tempfile = fopen ($filedir . / . $filename . .html, r) or die To: $tempfile = fopen ($filedir . / . $filename . .html, r) or die for starters ;) James. Dan Krumlauf [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... news_publish.php *** ?php function DoTemplate() { $filedir = func_get_arg(0); $filename = func_get_arg(1); $news = func_get_arg(2); $tempfile = fopen ($filedir . / . $filename . .html, r) or die (Failed to open template file $filename); while($templine=fgets($tempfile, 4096) ) { $templine = preg_replace(/(NEWS)(.*?)(\/NEWS)/i,\\1$news\\2, $templine)); print ($templine); } fclose ($tempfile); } $template_dir=/php/work/boz; $template_filename=news; $news=SOME STUFF GOES HERE BUILD IT AS A VAR; DoTemplate($template_dir,$template_filename); ? ** news.html *** !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN html head titleNo Title/title /head body NEWSThis is some text/NEWS /body /html Results in Parse error: parse error in /php/work/boz/news_publish.php on line 8 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP, Excel, .CSV's, and Regular Expressions Help Needed!
Hello Everyone, A client of mine is working with excel, and I need to move the data from excel to something php can deal with a little better. Naturally, I figured using .csv would be easiest, but I am running into several problems.I can get around them, but I need a regular expression (and I am NOT good at writing those). I'm not quite sure how I should explain what the regular expression ought to do, so I am giving an example of the data ought to look like in php (after the regular expressions), and how it looks in the .csv. NOTE: I am exploding the data, so all ,'s must be changed into COMMA's. +---++ | php | .cvs | +---++ piCOMMA 3.14,hey is for horsespi, 3.14,hey is for horses byeCOMMA bye,ciaoCOMMA ciaobye, bye, ciao, ciao good morning,I'm Bob good morning, I'm Bob sleep is good,IceCOMMACOMMAsleep is good,Ice,, If those four examples aren't enough, please let me know. I am NOT on the php mailing list, so PLEASE send messages to me ([EMAIL PROTECTED] AND to [EMAIL PROTECTED]). Thank you very much (in advance), Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Networking
I don't see why you wouldn't be able to access that share... Did you try escaping the path? e.g. chdir(computer\\dir); -Original Message- From: ReDucTor [mailto:[EMAIL PROTECTED]] Sent: Monday, July 23, 2001 6:20 AM To: [EMAIL PROTECTED] Subject: [PHP] Networking Hey does any one know if it is possible to do something like read stuff thro file and printer sharing on a remote pc, i tried \\computer\dir for the dirs but that didn't work any suggestions(btw i did addslashes :D ) so ne ideas...please -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]