php-general Digest 7 Apr 2001 12:32:53 -0000 Issue 613 Topics (messages 47527 through 47557): Re: Nearly all (1755) PHP functions in a text file 47527 by: Plutarck HELP!! comparing arrays 47528 by: paula 47542 by: Yasuo Ohgaki Re: Print or Echo. 47529 by: Philip Olson 47545 by: Jason Lotito how do i...? 47530 by: rswfire PHP form script in Javascript window 47531 by: Claudia cookies that don't expire 47532 by: Joseph Bannon Re: Update: 1767 functions! 47533 by: Steve Werby 47537 by: Plutarck $8/mo php hosting on 24/7, OC3+ web server 47534 by: Jeffrey Greer experienced PHP/MYSQL/Perl/JAVA programmer 47535 by: SAM G PHP coding question 47536 by: Rory O'Connor 47538 by: Gustavo Vieira Goncalves Coelho Rios 47539 by: andre Re: Nested for() loops? -> Now Multi Dimension Arrays 47540 by: Yasuo Ohgaki Double your website traffic 47541 by: webmaster.gopopup.com Re: fwrite() 47543 by: Adam Re: escape characters 47544 by: Adam AUTO_INCREMENT with MySQL & phpmyadmin 47546 by: Plutarck 47547 by: Jason Lotito here doc performance 47548 by: Jack Dempsey 47550 by: Plutarck 47551 by: Jack Dempsey 47552 by: Plutarck Ahhh...I see 47549 by: Plutarck help! - array comparision 47553 by: paula text string in a gif 47554 by: Victor Re: String in a string 47555 by: Christian Reiniger Re: mail() limit? 47556 by: Christian Reiniger X509 47557 by: Martin Thoma Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] ----------------------------------------------------------------------
The ones that started talking to me half-way through. I'd like to give a shout out to 346, 789, and 1747, and blue function#9. *twitch* -- Plutarck Should be working on something... ...but forgot what it was. ""Johnson, Kirk"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > So, now that you've seen 'em all, which one is your favorite? :) > > Kirk > > > -----Original Message----- > > From: Plutarck [mailto:[EMAIL PROTECTED]] > > Sent: Friday, April 06, 2001 1:17 AM > > To: [EMAIL PROTECTED] > > Subject: [PHP] Nearly all (1755) PHP functions in a text file > > > In any case, there are 1755 entries in the blasted thing. If > > it's in the PHP > > manual or get_defined_functions, it's in there. And damn is that alot. > > > > -- > 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] >
Hi- I'm new here and have this problem that's DRIVING ME CRAZY. I have two arrays as a result of two queries that I have to compare. Supose this two tables: This is my today table showing my actual stock (2001-04): t-shirt blue L jacket black M sweater red S shirt white M Then I have a future stock table, it's showing changes for the next month (2001-05). t-shirt red L sweater green S If the user selects in a menu 2001-04 the orginal first table should display. But if user selects 2001-05 this should be display: t-shirt red L jacket black M sweater green S shirt white M This has to work with PHP3 and using PHPLIB templates. I've tried EVERYTHING! Nested whiles, nested for, just E V E R Y T H I N G . I don't know what else to do and my nerves are about to kill me. PLEASE! ANY HELP IS WELCOME!! thank you people, /paula
How about post some code that does not work as expected? (Simpler code is better) Regards, -- Yasuo Ohgaki ""paula"" <[EMAIL PROTECTED]> wrote in message 001501c0bf29$2f35e740$0f01a8c0@pau">news:001501c0bf29$2f35e740$0f01a8c0@pau... Hi- I'm new here and have this problem that's DRIVING ME CRAZY. I have two arrays as a result of two queries that I have to compare. Supose this two tables: This is my today table showing my actual stock (2001-04): t-shirt blue L jacket black M sweater red S shirt white M Then I have a future stock table, it's showing changes for the next month (2001-05). t-shirt red L sweater green S If the user selects in a menu 2001-04 the orginal first table should display. But if user selects 2001-05 this should be display: t-shirt red L jacket black M sweater green S shirt white M This has to work with PHP3 and using PHPLIB templates. I've tried EVERYTHING! Nested whiles, nested for, just E V E R Y T H I N G . I don't know what else to do and my nerves are about to kill me. PLEASE! ANY HELP IS WELCOME!! thank you people, /paula
See this faq : What is the difference between echo and print? ----------------------------------------------------------- http://www.faqts.com/knowledge_base/view.phtml/aid/1/fid/40 regards, philip On Fri, 6 Apr 2001, Sterling wrote: > H- > > Just a quick question. > > Is there any difference between using print or echo? > > >From what I have read and seen there isn't any. > Than why the two different commands? > > Thanks. > -Sterling > > -- > 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] >
> -----Original Message----- > From: Alexander Wagner [mailto:[EMAIL PROTECTED]] > Sent: Friday, April 06, 2001 3:24 PM > To: [EMAIL PROTECTED] > Cc: PHP > Subject: Re: [PHP] Print or Echo. > > > Jeff Oien wrote: > > "As for a print vs. echo, echo gives you more options, > > such as being able to continue output on multiple lines > > like an <<EOT in perl. Look at the above notes. With print > > you would not be able to accomplish this." > > There's another difference. print() returns true on success and false > when called after a connection abort. Echo doesn't, and that's why it's > slightly (very slightly) faster. > > regards > Wagner > http://www.e-gineer.com/articles/php-hackers-paradise.phtml More details here on Print/Echo/Inline Jason Lotito www.NewbieNetwork.net Where those who can, teach; and those who can, learn.
$var = "thisclass"; $myclass = new $var; how can i make it recognize $var as a class name? thankz in advance... ===== ===================================== [ rswfire ] http://rswfire.swifte.net/ http://profiles.yahoo.com/rswfire ===================================== __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
I am attempting to use a Javascript popup window to open a new php form window that uses a php script to process the form data. All processing for the form is completed in the popup window. The issue I am encoutering is occurring with Netscape only -- I receive the following msg: Warning there is a possible security hazard here opening <name of my script> The called script is used in this statement on the initial form that appears in the popup window: <form method=POST action="http://www.contus.com/test/miniquote.scp.php3"> The error occurs when the email field is blank or if I enter an incorrect email address such as cc. The code to check the email field in my script is as follows: <?php INCLUDE "global.inc"; if (isset($miniquote_submit)) { if ( ( ($sender_name != "") && ($Contact != "Contact_by_Phone") && ($email != "") ) || ( ($sender_name != "") && ($Contact == "Contact_by_Phone") && ($Phone != "") ) ) { $msg = "Trip Request Name: $headline\n"; $msg .= "Travel Site: $travel_site\n\n"; $msg .= "Full Name: $sender_name\n"; $msg .="Contact via: $Contact\n"; $msg .= "E_mail: $email\n"; $msg .= "E_mail confirmation: $email2\n"; $msg .= "Include on Email List? $Email_list\n"; $msg .= "Phone: $Phone\n"; $msg .= "Best Time to Call: $time_to_call\n"; $msg .= "Departure Date: $departure_date\n"; $msg .= "Desired length of trip: $trip_length\n"; $msg .= "Comments Questions: $comments_questions\n\n"; The referring form code is: <font face="Arial, Helvetica, sans-serif" size="2">Name: <input type="text" name="sender_name" size="15" maxlength="35"> </font> <font face="Arial, Helvetica, sans-serif" size="2"> <br> Please contact me via: <input type="radio" name="Contact" value="Contact by E-Mail" checked> E-Mail <input type="radio" name="Contact" value="Contact_by_Phone"> Phone </font> <br> <font face="Arial, Helvetica, sans-serif" size="2"> E-mail Address: <input type="text" name="email" size="15" maxlength="40"> </font> <br> <font face="Arial, Helvetica, sans-serif" size="2"> Please confirm your E-mail Address: <input type="text" name="email2" size="15" maxlength="35"> </font> <br> <font face="Arial, Helvetica, sans-serif" size="2"> Click here if you do NOT wish to be on our e-mail list: <input type="checkbox" name="Email_list" value="No"> </font> <br> <font face="Arial, Helvetica, sans-serif" size="2"> Phone (with area code): <input type="text" name="Phone" size="10" maxlength="20"> </font> Any help would be appreciated. Again this works OK in IE...
How do you set cookies that don't expire? J Say I'm Hot! - Post Your Picture! http://www.sayimhot.com
"Plutarck" <[EMAIL PROTECTED]> wrote: > I just discovered http://www.php.net/manual-lookup.php again, which happens > to list all the ones found in the manual. But, it doesn't have them all, so > my time wasn't wasted! I haven't counted the # of functions at Zend's PHP function table, but I'm pretty sure it's greater than the # at the URL above. http://www.zend.com/phpfunc/ -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/
Unfortunately I can't find an option to make them all display on one page, or an option to make them easy to cut and paste so I can run them past my PHP script. So I'd have to manually compare the two lists...lmao -- Plutarck Should be working on something... ...but forgot what it was. ""Steve Werby"" <[EMAIL PROTECTED]> wrote in message 9alrlp$ptc$[EMAIL PROTECTED]">news:9alrlp$ptc$[EMAIL PROTECTED]... > "Plutarck" <[EMAIL PROTECTED]> wrote: > > I just discovered http://www.php.net/manual-lookup.php again, which > happens > > to list all the ones found in the manual. But, it doesn't have them all, > so > > my time wasn't wasted! > > I haven't counted the # of functions at Zend's PHP function table, but I'm > pretty sure it's greater than the # at the URL above. > > http://www.zend.com/phpfunc/ > > -- > Steve Werby > President, Befriend Internet Services LLC > http://www.befriend.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] >
Hello, I am offering php hosting with features at a price no one else has, as far as I know. I'm not going to create a giant web hosting service. I'm doing this to pay for my web portal. - This web portal has been operated by the same person (my partner) for over four years. I have been a co-administrator for about six months. - this is on a dedicated server with OC3+ connection, bandwidth is guaranteed - 24/7 uptime is guaranteed, last reboot was 2/12/01. This site will not be down for more than one hour per year. - The computer running this site is at a web server farm in a protected building. Any hardware that fails is replaced immediately. - no bandwidth sucking sites are allowed, e.g. porno, fileserver, video, etc. - php 4.02 is installed - perl 5.0x and DBI are installed - MySQL 3.23.32 and PostgreSQL 7.0.3 are set up - You get a total of two databases - You get five email addresses, telnet, ssh, and ftp access - I will set up your domain name for an extra $15 or you can put your site at www.singlesconnection.org/<your username> - you get 40MB of hd space - webserver is Apache 1.3.12 and Red Hat Linux with kernel 2.2.18 - hardware - Pentium II with 128MB ram, scsi hard drive My name is Jeffrey Greer. You can mail me at [EMAIL PROTECTED] You can view more info at http://www.singlesconnection.org/services/php_hosting.php -- Jeff Greer - B.S. computer science - Univ. MO - Rolla - web developer/software engineer, dedicated to the struggle against the fascist Microsoft hegemony
Hi, I am experienced PHP/MYSQL/Perl/JAVA programmer, with many applications developed. If you have any projects need help, we can work together. If you are interested, pls send me e-mail for more details. Besides, I am in Toronto, would like to make some friends to exchange programming skill. Thanks, __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
I'm not a real programmer, so I am wondering if anyone can help me translate this psuedo-code into php code: if ($page_num is a multiple of 8) { do this } If you want to know what I'm trying to do... I have a left frame showing a recordset of 8 records at a time. the frame on the right shows the detail (more info) of one record at a time. if the user clicks "next record" in the right frame and the record goes beyond the 8 on the left, I want to be able to refresh the left frame to show the next 8 records. Thanks! Rory
Rory O'Connor wrote: > > I'm not a real programmer, so I am wondering if anyone can help me translate > this psuedo-code into php code: > > if ($page_num is a multiple of 8) { > > do this > > } > > If you want to know what I'm trying to do... > I have a left frame showing a recordset of 8 records at a time. the frame > on the right shows the detail (more info) of one record at a time. if the > user clicks "next record" in the right frame and the record goes beyond the > 8 on the left, I want to be able to refresh the left frame to show the next > 8 records. > > Thanks! > > Rory > > -- > 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] if ($page_num & 15) ; else { do this } My best guess! Tell me your results!
Try this : if($page_num % 8 == 0) { do this } or to make it a bit more obvious: if(($page_num % 8) == 0) { do this } This way the "if" statement is executed only when the remainder of $page_num divided by 8 is equal to zero, i.e. $page_num is a multiple of 8. > > if ($page_num is a multiple of 8) { > > do this > > } > > If you want to know what I'm trying to do... > I have a left frame showing a recordset of 8 records at a time. the frame > on the right shows the detail (more info) of one record at a time. if the > user clicks "next record" in the right frame and the record goes beyond the > 8 on the left, I want to be able to refresh the left frame to show the next > 8 records. > > Thanks! > > Rory > > > > -- > 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] >
Simple to fix it. You just need to resolve ambiguity with {}. > $res = $i * $j; > $target_array[$i][$j] = $res; > print("result = $target_array[$i][$j] <br>"); print("result = {$target_array[$i][$j]} <br>"); Regards, -- Yasuo Ohgaki <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > Joe Stump wrote: > > > > A copy and paste into foo.php and then a php -q foo.php yielded results for > > me. > > Yeah, it's giving me results too today. I don't know what went wrong > yesterday. > > To extend my question, I'm trying to work with multidimensional arrays. > > For example, I would like to do this: > > <? > error_reporting(E_ALL); > > $target_array = array(); > > echo "starting <br>"; > > for( $i=0; $i<5; $i++ ) > for( $j=0; $j<5; $j++ ) > { > $res = $i * $j; > $target_array[$i][$j] = $res; > print("result = $target_array[$i][$j] <br>"); print("result = {$target_array[$i][$j]} <br>"); > } > echo "done"; > ?> > > And this is my result today: > starting > result = Array[0] > result = Array[1] > result = Array[2] > result = Array[3] > result = Array[4] > result = Array[0] > result = Array[1] > result = Array[2] > result = Array[3] > result = Array[4] > result = Array[0] > result = Array[1] > result = Array[2] > result = Array[3] > result = Array[4] > result = Array[0] > result = Array[1] > result = Array[2] > result = Array[3] > result = Array[4] > result = Array[0] > result = Array[1] > result = Array[2] > result = Array[3] > result = Array[4] > done > > My thinking is that PHP ought to be like C when doing simple stuff like > this. > I must have something wrong with the declaration of the array. > > How do you declare a multidimensional array??!!?? > How do you work with it then??? > > Thanks in advance!! > > John > > -- > 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] >
Do you want to double the number of visitors to your homepage everyday? The perfect solution is PopUp Window Exchange! It's a brand new concept from LinkExchange. It will pop up websites instead of traditional banners. As a result, it can bring you REAL web traffic instead of raw banner impressions which do not give you unique hits. Here is how it works. Let's assume your website currently has 100 visitors daily. If you join our free popup exchange, 30 days later, your website can have up to 100*(1+50%)**30days=19175105 visitors/day! The above calculation is very simple. Since every member needs to insert a simple HTML code in their homepage, when other website pops up in your homepage, your homepage will also popup in a member's website. Essentially giving you a free visitor everytime someone visits your page. If you used to have 1 visitor, now you will have 2 (The 2nd visitor is brought to you by other members) More Information can be found at.. http://GoPopUp.com ----------------------------------------------------- [EMAIL PROTECTED] http://GoPopUp.com To be removed from our mailing list -> http://gopopup.com/unsubscrib.php?[EMAIL PROTECTED] ---------------------------------------------------------------Chinese-Big5 想更多人知道你的網站嗎﹖ 我們可以幫你每天將你的網站人數增加雙倍. 假如你每天現有100個訪客, 如果你加入PopUp Exchange, 30天後﹐ 你的網站將會有19175105個訪客. 100 * (1 + 50%) ** 30 days = 19175105 vistors/day PopUp Exchange 的運作非常簡單。 每名成員只需在他的網站中加入 一段PopUp HTML_CODE。 這就是說, 當其它會員的網頁在你的網站中 PopUp一次﹐ 同樣地﹐ 你的網頁也會在其它會員的網站中PopUp一次。 就是說, 如果你有一個訪客﹐ 就變成倆個。 另外﹐ PopUp不會影響訪客參觀你的網站。彈出窗口顯示于你原有窗口的底部。 請到以下網址加入 http://GoPopUp.com/chinese.php [EMAIL PROTECTED] http://GoPopUp.com 取消電子報? -> http://gopopup.com/unsubscrib.php?[EMAIL PROTECTED]
simply add: $conteudo = stripslashes($conteudo)
nevermind, i found them
At first I thought this might be better suited on the mysql list, but since I'm using phpmyadmin I thought it better to ask here. My problem is I can't figure out how to create a column with the auto_increment attribute. I want to make one called userid whose value is one higher than the highest number in the userid column, which according to the manual is exactly what auto_increment should do. But I flat out can't figure out how to do it. I'm using the "add new field" attribute in phpmyadmin, and I've tried making one with no name and with many different names, and I don't get nuttin'. Occassionally it will announce that the table was altered with something like the message: SQL-query: ALTER TABLE test_kingdoms_userauth ADD useridi TINYINT not null AUTO_INCREMENT But according to the display, no matter how many times I refresh it, there is no listing of ANY column other than the two I currently have. So I'm totally confused, and out of the whole mysql manual I just don't know what's wrong. So the question: What kind of selections do I need to make to create an AUTO_INCREMENT column? -- Plutarck Should be working on something... ...but forgot what it was.
> -----Original Message----- > From: Plutarck [mailto:[EMAIL PROTECTED]] > Sent: Friday, April 06, 2001 10:35 PM > To: [EMAIL PROTECTED] > Subject: [PHP] AUTO_INCREMENT with MySQL & phpmyadmin > > > At first I thought this might be better suited on the mysql list, > but since > I'm using phpmyadmin I thought it better to ask here. > > My problem is I can't figure out how to create a column with the > auto_increment attribute. I want to make one called userid whose value is > one higher than the highest number in the userid column, which > according to > the manual is exactly what auto_increment should do. > > But I flat out can't figure out how to do it. > > I'm using the "add new field" attribute in phpmyadmin, and I've > tried making > one with no name and with many different names, and I don't get nuttin'. > > Occassionally it will announce that the table was altered with something > like the message: > > SQL-query: > ALTER TABLE test_kingdoms_userauth ADD useridi TINYINT not null > AUTO_INCREMENT > > But according to the display, no matter how many times I refresh it, there > is no listing of ANY column other than the two I currently have. > > So I'm totally confused, and out of the whole mysql manual I just > don't know > what's wrong. > > > So the question: > > What kind of selections do I need to make to create an AUTO_INCREMENT > column? > Can you post the current schema (design) of the table with datatypes, etc. http://www.newbienetwork.net/sections.php?op=viewarticle&artid=10 Also, check out the above link, that my help some. Jason Lotito www.NewbieNetwork.net Where those who can, teach; and those who can, learn.
Hi all, I use the here doc option heavily in pages i create, outputting large chunks of HTML with variables inside the echo<<<EOF ...... EOF; syntax...is there a better way to do this? I'm wondering if anyone knows of running times for things like that...i would think that it'd be better than going back and forth between php and html (certainly easier), wouldn't have to escape the quotes like you would if you used echo " lots of html ... "; Any thoughts on this?
To my knowledge, though I haven't done any testing with microtime, heredoc is as faster as using single quotes. Since the only thing PHP looks for is the characters that were present at the very begining on the string, there should certainly be no slowdowns at all. If it's not that way, I imagine it would be just a bad implementation which will be fixed soon. But I strongly doubt a bad implementation of here doc printing was made. -- Plutarck Should be working on something... ...but forgot what it was. ""Jack Dempsey"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi all, > > I use the here doc option heavily in pages i create, outputting large chunks > of HTML with variables inside the echo<<<EOF ...... EOF; syntax...is there a > better way to do this? I'm wondering if anyone knows of running times for > things like that...i would think that it'd be better than going back and > forth between php and html (certainly easier), wouldn't have to escape the > quotes like you would if you used > echo " > > lots of html > ... > > "; > > Any thoughts on this? > > > -- > 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] >
Thanks for your thoughts. I don't believe it can be as fast as single quotes, simply because it does variable interpolation, and that's why printing doubly quoted strings are slower than singles, hence i would think here docs would be slower as well...but nothing so great that i would to worry about.... anyone else? is a big here doc the "fastest" way to print out a lot of html with variables? -----Original Message----- From: Plutarck [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 07, 2001 2:31 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] here doc performance To my knowledge, though I haven't done any testing with microtime, heredoc is as faster as using single quotes. Since the only thing PHP looks for is the characters that were present at the very begining on the string, there should certainly be no slowdowns at all. If it's not that way, I imagine it would be just a bad implementation which will be fixed soon. But I strongly doubt a bad implementation of here doc printing was made. -- Plutarck Should be working on something... ...but forgot what it was. ""Jack Dempsey"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi all, > > I use the here doc option heavily in pages i create, outputting large chunks > of HTML with variables inside the echo<<<EOF ...... EOF; syntax...is there a > better way to do this? I'm wondering if anyone knows of running times for > things like that...i would think that it'd be better than going back and > forth between php and html (certainly easier), wouldn't have to escape the > quotes like you would if you used > echo " > > lots of html > ... > > "; > > Any thoughts on this? > > > -- > 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]
I'm sorry, I was mistaken. I was thinking that it did not perform variable interpolation for some reason, but of course in fact it does. So switch my comment around to say that here doc is about as fast as double quotes. I'd test it with microtime, but on windows the "it finished before it started" bug prevents me from it :) -- Plutarck Should be working on something... ...but forgot what it was. ""Jack Dempsey"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Thanks for your thoughts. I don't believe it can be as fast as single > quotes, simply because it does variable interpolation, and that's why > printing doubly quoted strings are slower than singles, hence i would think > here docs would be slower as well...but nothing so great that i would to > worry about.... > anyone else? is a big here doc the "fastest" way to print out a lot of html > with variables? > > > > -----Original Message----- > From: Plutarck [mailto:[EMAIL PROTECTED]] > Sent: Saturday, April 07, 2001 2:31 AM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] here doc performance > > > To my knowledge, though I haven't done any testing with microtime, heredoc > is as faster as using single quotes. > > Since the only thing PHP looks for is the characters that were present at > the very begining on the string, there should certainly be no slowdowns at > all. > > If it's not that way, I imagine it would be just a bad implementation which > will be fixed soon. But I strongly doubt a bad implementation of here doc > printing was made. > > > -- > Plutarck > Should be working on something... > ...but forgot what it was. > > > ""Jack Dempsey"" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Hi all, > > > > I use the here doc option heavily in pages i create, outputting large > chunks > > of HTML with variables inside the echo<<<EOF ...... EOF; syntax...is there > a > > better way to do this? I'm wondering if anyone knows of running times for > > things like that...i would think that it'd be better than going back and > > forth between php and html (certainly easier), wouldn't have to escape the > > quotes like you would if you used > > echo " > > > > lots of html > > ... > > > > "; > > > > Any thoughts on this? > > > > > > -- > > 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] >
Thanks for the site...it answered my question, actually. I was not aware that an auto_increment must be not null. And am I correct that when it says it must be a "key", it means that it must be either Primary or Unique? That I did not know. Anyway, it's working now :) -- Plutarck Should be working on something... ...but forgot what it was. ""Jason Lotito"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > > -----Original Message----- > > From: Plutarck [mailto:[EMAIL PROTECTED]] > > Sent: Friday, April 06, 2001 10:35 PM > > To: [EMAIL PROTECTED] > > Subject: [PHP] AUTO_INCREMENT with MySQL & phpmyadmin > > > > > > At first I thought this might be better suited on the mysql list, > > but since > > I'm using phpmyadmin I thought it better to ask here. > > > > My problem is I can't figure out how to create a column with the > > auto_increment attribute. I want to make one called userid whose value is > > one higher than the highest number in the userid column, which > > according to > > the manual is exactly what auto_increment should do. > > > > But I flat out can't figure out how to do it. > > > > I'm using the "add new field" attribute in phpmyadmin, and I've > > tried making > > one with no name and with many different names, and I don't get nuttin'. > > > > Occassionally it will announce that the table was altered with something > > like the message: > > > > SQL-query: > > ALTER TABLE test_kingdoms_userauth ADD useridi TINYINT not null > > AUTO_INCREMENT > > > > But according to the display, no matter how many times I refresh it, there > > is no listing of ANY column other than the two I currently have. > > > > So I'm totally confused, and out of the whole mysql manual I just > > don't know > > what's wrong. > > > > > > So the question: > > > > What kind of selections do I need to make to create an AUTO_INCREMENT > > column? > > > > > Can you post the current schema (design) of the table with datatypes, etc. > > http://www.newbienetwork.net/sections.php?op=viewarticle&artid=10 > > Also, check out the above link, that my help some. > > Jason Lotito > www.NewbieNetwork.net > Where those who can, teach; > and those who can, learn. > > > > -- > 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] >
Yesterday I posted a HELP message without any code as a reference. A member of this list suggests me to post something so here is the story: The idea is to compare two arrays and substitute information when necessary. I have to use PHP3 and PHPLIB templates. This is my today table showing my actual stock (2001-04-01): (table 1 - actual date) t-shirt blue L jacket black M sweater red S shirt white M Then I have a future stock table, it's showing changes for the next month (2001-05-01). (table 2 - changes for 2001-05-01) t-shirt red L sweater green S If the user selects in a menu 2001-04 the orginal table 1 should be seen. But if user selects 2001-05 this should be display: (table 3- a mix of table 1 and table 2) t-shirt red L jacket black M sweater green S shirt white M I tried different code but basically this is the idea and it's not working: <?php //MySqlConn - function to connect to db $mylink=MySqlConn($host,$user,$passw,$db,"error connecting"); $t=new Template(); $t->set_file("internal", "templates/chnl_lu_info_internal.html"); // TODAY DATE SHOWS TABLE 1 $today_date=date("Y").'-'.date("m").'-'.date("d"); // IF USERS SELECTS A FUTURE DATE, FOR EXAMPLE 2001-05-01, THEN THE TABLE 3 SHOULD BE ON THE SCREEN if($future_dates != $today_date) { $sql_changes='select * from stock_changes where stock_id="'.$stock_id.'" and activ_date="'.$future_dates.'"'; // QUERIES, OBVIOUSLY, IS A FUNCTION TO MAKE SQL QUERIES $result_changes=queries($sql_changes,"sql error!"); } $sql='select * from stock where stock_id="'.$stock_id.'"'; $result=queries($sql,"sql error 2!"); // THIS IS THE PART THAT IS NOT WORKING if (!empty ($result_changes)) { while ($ret=mysql_fetch_array($result)) { while (list($key,$value)=each($ret)) { while ($ret_ch=mysql_fetch_array($result_changes)) { if(!empty($ret_ch[$key])) { $t->set_var(array($key, $ret_ch[$key])); } else { $t->set_var(array($key, $ret[$key])); } } } $t->parse("channel_lineup_info_internal","internal",true); } } else { // THIS PART IS WORKING 'COS THERE IS NO COMPARISION HERE- I LEAVE IT AS A REFERENCE while ($ret=@mysql_fetch_array($result)) { while (list($key,$value)=each($ret)) { if ($key=="carriage_type") { if ($value=="P") { $value='<a href="carriage_type.php3?ftime='.$ret['from_time'].'&ttime='.$ret['to_time'].'">'.$value.'</a>'; } } $t->set_var(array($key=>$value)); } $t->parse("channel_lineup_info_internal","internal",true); } } // CLOSING CONNECTION TO DB @mysql_close(); ?> Hope someone can help me. /paula
Hello friends, For those who are not allergic to newbie questions: I want to make a button for a web page from a background gif and a string. Till here nothing unusual. I used the example from the php manual and it works like a breeze. <?php Header("Content-type: image/gif"); $string=implode($argv," "); $im = imageCreateFromGif("MyBackground.gif"); $color = ImageColorAllocate($im, 196, 51, 28); ImageTTFText ($im, 20, 0, 6, 7, $color, "MyFont.ttf", $string); ImageGif($im); ImageDestroy($im); ?> The only problem I have (and for me it is really biiiiig) is that when I use a string which contains a blank eg "My text" the text of the button looks like "My%20TEXT" :-( How can I fix it?? TIA, Victor
On Friday 06 April 2001 16:42, you wrote: > How do I find out if a string is contained in a string. I just need > true/false. strstr()? -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) This is JohnC IMHO, I compaired tri-word groupings here and in his plan and got a good match. - /. posting discussing the likelihood that an AC post that claimed to be posted by John Carmack during his honeymoon (and having the login info at home) was actually from him.
On Friday 06 April 2001 22:47, you wrote: > Hi, > Does anyone know if and what the limit is of bcc that can be used in > the mail() function? Hundreds, thousands? If you wonder about approaching such a limit you'll be better off with a real mailinglist manager (mailman, listar, ezmlm, ...) -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) This is JohnC IMHO, I compaired tri-word groupings here and in his plan and got a good match. - /. posting discussing the likelihood that an AC post that claimed to be posted by John Carmack during his honeymoon (and having the login info at home) was actually from him.
Hello ! I want to write a small script to decrypt/encrypt/sign emails with the X509-protocoll. Does anybody know, where to get information about this protocoll ? Does anybody has some examples how to use it in php ? Any ready-to-go-code ? Any help is welcome ! Martin