[PHP] Re: few things...
There is a difference between the two, but speed-wise it should be irrelevant which one you use. print() behaves like a function in that you can do: $ret = print Hello World; And $ret will be 1 That means that print can be used as part of a more complex expression where echo cannot. print is also part of the precedence table which it needs to be if it is to be used within a complex expression. It is just about at the bottom of the precendence list though. Only , AND, OR and XOR are lower. echo is marginally faster since it doesn't set a return value if you really want to get down to the nitty gritty. If the grammar is: echo expression [, expression[, expression] ... ] Then echo ( expression, expression ) is not valid. ( expression ) reduces to just an expression so this would be valid: echo (howdy),(partner); but you would simply write this as: echo howdy,partner; if you wanted to use two expression. Putting the brackets in there serves no purpose since there is no operator precendence issue with a single expression like that. http://www.faqts.com/knowledge_base/view.phtml/aid/1/fid/40 Regards! Jocelyn http://www.hosting-canada.com Matt Zur wrote: First of all... I'm a bit confused is there really a difference between echo and print? They seem to do the same thing? Also... I have trouble searching for these things in the docs: A Call Function to emulate a browser and contact a remote host? For example... to load in a piece of text from another web site? Hidden fuction. For example lets say I have a form with 10 variables. Is there a function where I can do something like: hidden($var1,$var2,$var3) etc etc so it will write this: input type=hidden name=var1name value=var1value input type=hidden name=var2name value=var2value input type=hidden name=var2name value=var2value Thanks for the help! PHP Toolbar for Homesite v5.0 - http://zurnet.com/dl/hsphptb/ Version 1.5 Coming Soon!!! -- Matt Zur [EMAIL PROTECTED] http://www.zurnet.com Need a Web Site??? - Visit... www.zurnet.com 1997 - 2002 - 5th Anniversary!!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SESSION ARRAY
Ooops, thats right. I should check over before i send i guess. Sorry, Todd $_SESSION is a predefined variable, session_start() session_register('BILLARRAY') should work though :) Keith Vance Vance Consulting LLC www.vanceconsulting.net (206) 355-2399 Try my open source PHP authentication system, Rampart by visiting http://rampart.sourceforge.net/. Commercial support is available at, http://www.vanceconsulting.net/support/. On Fri, 30 Aug 2002, Todd Pasley wrote: What is the proper syntax for storing an array in a session? is it $_SESSION[BILLARRAY]=$ARRAY? Yep, providing youre using session_start() and session_register(_SESSION) you can assign any type of data, just like a regular hash. Todd. - Original Message - From: Randy Johnson [EMAIL PROTECTED] To: phplist [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, August 30, 2002 9:08 AM Subject: [PHP] SESSION ARRAY What is the proper syntax for storing an array in a session? is it $_SESSION[BILLARRAY]=$ARRAY? Randy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Script Execution via URL
This would work if the script you wished to call was default.php / index.php / etc etc... what I mean to say is site.com/index.php?var=foo is the same as site.com/?var=foo, as long as your server works that way. leaving out PHP_SELF will give different results if the script you wish to call ISN'T the default for that directory. PHP forms are just HTML forms. That is to say that once the code gets to the browser, it's just HTML code. So once the code is at the browser, it works just like any other page, where a user (or a javascript program) has to submit the form. justin on 01/09/02 12:08 AM, Sascha Braun ([EMAIL PROTECTED]) wrote: Hi everybody, i wrote a script which will be executed by HREF's. If a command is going to be executed by a click on a link the page reloads itself and jumps in the part of the script, which should be executed. Normaly I wrote some like this for doing this: echo 'a href='.$PHP_SELF.'?action=deleteid='.$arrResult['id'].' class=text01'; but now in a very special case i forgot to write $PHP_SELF like this a href=?action=deleteid='.$arrResult['id'].' class=text01 without knowing that I have forgotten to write this $PHP_SELF thing I clicked on the Link and i did execute the Script, like i wanted it to. Is it normal that it works so fine? Can I use this everytime I link on the same page for script execusion? Can I send Forms via an PHP Function like the submit() statement in Javascript? Have a nice day, and please answer. Sascha Braun -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] newest entry in db
SELECT * FROM mytable ORDER BY timestampcolumn DESC LIMIT 1 or SELECT * FROM mytable ORDER BY id DESC LIMIT 1 HTH Justin French on 01/09/02 2:25 AM, Victor ([EMAIL PROTECTED]) wrote: How can I use php to get the newest entry from mysql database? Ie, if I make a timestamp and then I want to retrieve the last timestamp I made how do I go about doing it? Any php or mysql documentation? - Victor www.argilent.com __ Post your ad for free now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] turn off a warning with $GET_['var'];
Hello, trying to figure a way to turn off the following warning. doesn't seem to work neither does switch (isset($_GET['status'])){ Notice: Undefined index: status in E:\php\tt\index.php on line 6 switch ($_GET['status']){ scenario is this var is set in every instance but the first GET request ... subsequent request this is set so no warning. Cheers, -Peter ## Peter Thoenen - Systems Programmer Commercial Communications Camp Bondsteel, Kosovo ## Stumbled Upon...heh (Score:5, Funny) /. by $carab on 23:00 23 August 2002 (#4131637) ForensicTec officials said they stumbled upon the military networks about two months ago, while checking on network security for a private-sector client. Someone new to a Dvorak probably tried to type in lynx http://www.google.com; but instead got nmap -v -p 1-1024 -sS -P0 army.mil -T paranoid. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: turn off a warning with $GET_['var'];
What about switch(@isset($_GET['status'])) ? or @switch(isset($_GET['status'])) -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet Peter Mr. Eps Thoenen [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] Hello, trying to figure a way to turn off the following warning. @ doesn't seem to work neither does switch (isset($_GET['status'])){ Notice: Undefined index: status in E:\php\tt\index.php on line 6 switch ($_GET['status']){ scenario is this var is set in every instance but the first GET request ... subsequent request this is set so no warning. Cheers, -Peter ## Peter Thoenen - Systems Programmer Commercial Communications Camp Bondsteel, Kosovo ## Stumbled Upon...heh (Score:5, Funny) /. by $carab on 23:00 23 August 2002 (#4131637) ForensicTec officials said they stumbled upon the military networks about two months ago, while checking on network security for a private-sector client. Someone new to a Dvorak probably tried to type in lynx http://www.google.com; but instead got nmap -v -p 1-1024 -sS -P0 army.mil -T paranoid. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 1 Sep 2002 09:21:25 -0000 Issue 1559
php-general Digest 1 Sep 2002 09:21:25 - Issue 1559 Topics (messages 114789 through 114817): Re: Last URL visited 114789 by: Marcel Besancon Re: Dumb Question 114790 by: Michael Sims 114805 by: Gerard Samuel UPDATE Query 114791 by: Sascha Braun 114794 by: CHAILLAN Nicolas 114803 by: Mark Charette Download site down? 114792 by: Rodolfo Gonzalez 114793 by: Sperry Russ 114807 by: Andrew Brampton Re: newest entry in db 114795 by: CHAILLAN Nicolas 114815 by: Justin French Re: Script Execution via URL 114796 by: CHAILLAN Nicolas 114797 by: CHAILLAN Nicolas 114814 by: Justin French Re: alter switch variable inside case? 114798 by: CHAILLAN Nicolas 114809 by: Joe Janitor Re: posting form values doesn't work 114799 by: CHAILLAN Nicolas problem with links 114800 by: Brad Lahr database suggestions... 114801 by: Matt Zur whoops... here's the address... 114802 by: Matt Zur Re: Submit form from javascript code 114804 by: Todd Pasley Re: [PHP-LANG] About file premission 114806 by: Bryan image manipulation 114808 by: tux mail() again... 114810 by: Liam MacKenzie 114811 by: Manuel Lemos Re: few things... 114812 by: Hosting-Canada Re: SESSION ARRAY 114813 by: Todd Pasley turn off a warning with $GET_['var']; 114816 by: Thoenen, Peter Mr. EPS 114817 by: CHAILLAN Nicolas Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- ---BeginMessage--- Hallo, I don't know if I understood you correctly. But one way to get the url of the last visited page is using $foobar = getenv('HTTP_REFERER'); This write the url of the last visited page to the variable $foobar. Hope this helps Best regards Marcel ---End Message--- ---BeginMessage--- On Sat, 31 Aug 2002 14:04:11 -0400, you wrote: And I feel foolish asking... What is meant by 'procedural code' ??? It's the opposite of declarative code. Here's a page that briefly explains the difference: http://www.wdvl.com/Authoring/DB/SQL/BeginSQL/beginSQL2_1.html and http://www.wdvl.com/Authoring/DB/SQL/BeginSQL/beginSQL2_2.html There may be other contexts that the term procedural could be used in, and if so it may have other meanings that I am not aware of ---End Message--- ---BeginMessage--- Here is my stab at it. One person described it as the opposite of OO. So something similar to - ?php do_this() { // do this code } do_that() { // do that code } if (isset( $_GET['foo'] )) { do_this(); } else { do_that(); } ? would be considered procedural code. If Im wrong I stand corrected Michael Sims wrote: On Sat, 31 Aug 2002 14:04:11 -0400, you wrote: And I feel foolish asking... What is meant by 'procedural code' ??? It's the opposite of declarative code. Here's a page that briefly explains the difference: http://www.wdvl.com/Authoring/DB/SQL/BeginSQL/beginSQL2_1.html and http://www.wdvl.com/Authoring/DB/SQL/BeginSQL/beginSQL2_2.html There may be other contexts that the term procedural could be used in, and if so it may have other meanings that I am not aware of -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ ---End Message--- ---BeginMessage--- I want to know if its possible to update two databases with one query? Please look at this example: UPDATE news_db, newsreferenz_db SET news_db.head = 'DFB Pokalasfasf', news_db.text = 'alkfhaslk fl akshf lakshf lkahs lfk aslf yxvyxvyxvyxv', newsreferenz_db.kat_id = '3' WHERE news_db.id = '6' AND newsreferenz_db.news_id = '6' it doesn't work. ---End Message--- ---BeginMessage--- Can you please post the exact error? -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet Sascha Braun [EMAIL PROTECTED] a écrit dans le message de news: 000c01c25142$b4d1b990$[EMAIL PROTECTED] I want to know if its possible to update two databases with one query? Please look at this example: UPDATE news_db, newsreferenz_db SET news_db.head = 'DFB Pokalasfasf', news_db.text = 'alkfhaslk fl akshf lakshf lkahs lfk aslf yxvyxvyxvyxv', newsreferenz_db.kat_id = '3' WHERE news_db.id = '6' AND newsreferenz_db.news_id = '6' it doesn't work. ---End Message--- ---BeginMessage--- No, only one db at a time may be updated. The where clauses can contain multiple db. -Original Message- From: Sascha Braun [mailto:[EMAIL PROTECTED]] Sent: Saturday, August 31, 2002 7:04 PM To: PHP Mailingliste Subject: [PHP] UPDATE Query I want to know if its
[PHP] Re: problem with links
If you use global variables in your scripts, please put register global on into php.ini. -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet Brad Lahr [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] I compiled php on a linux machine and am experiencing problems whith links. going to www.domainname.com/index.php in a browser works fine. Clicking on links on this page such as www.domainname.com/?page=teamteamcode=4938412 just sends me back to the main www.domainname.com page. Did a forget to compile in a specific feature of php or apache? Here is the commands I used when compiling php and apache. cd php-4.2.2 ./configure --with-apache=/usr/local/src/apache_1.3.26 make make install *** added AddModule modules/php4/libphp4.a to apache_1.3.26/src/configuration *** cd /usr/local/src/apache_1.3.26 ./configure --activate-module=src/modules/php4/libphp4.a make make install Any help is greatly appreciated. I apoligize iin advance for being such a newbie. Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: image manipulation
Here is the list of the PHP's images functions: http://www.php.net/manual/en/ref.image.php You can look at filesize and getimagesize for the size / height width. For the second question, I dont know look at the list. -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet Tux [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] Hey all, I was just wondering if anyone could recommend any tutorials or books or functions i should look into, to do the following: - decrease the size(kilobytes wise not height/width) of an image - imprint a transparent logo onto every picture displayed any feedback greatly appreciated. jo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] UPDATE Query
What about multiple tables? Can that be done? Mark Charette [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... No, only one db at a time may be updated. The where clauses can contain multiple db. -Original Message- From: Sascha Braun [mailto:[EMAIL PROTECTED]] Sent: Saturday, August 31, 2002 7:04 PM To: PHP Mailingliste Subject: [PHP] UPDATE Query I want to know if its possible to update two databases with one query? Please look at this example: UPDATE news_db, newsreferenz_db SET news_db.head = 'DFB Pokalasfasf', news_db.text = 'alkfhaslk fl akshf lakshf lkahs lfk aslf yxvyxvyxvyxv', newsreferenz_db.kat_id = '3' WHERE news_db.id = '6' AND newsreferenz_db.news_id = '6' it doesn't work. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Word docs
Hi, I have 200 items in a mysql database. Each has a word document with the path: Assets/Reports/Docname.doc How do I open the word doc that is specific to the particular item? Thanks david php novice -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Word docs
Hi, What's your definition of open the word doc? Do you want to parse the contents of the Word Doc into a var? Do you want to produce a link on the page TO the word doc? Please be more specific -- it helps us give better answers. Justin French on 01/09/02 9:11 PM, DC ([EMAIL PROTECTED]) wrote: Hi, I have 200 items in a mysql database. Each has a word document with the path: Assets/Reports/Docname.doc How do I open the word doc that is specific to the particular item? Thanks david php novice -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] FW: suggestion for .hinge
I go this email to my hinge address... I guess they want .h stubby holders!! J -- From: Karen and Jimmy [EMAIL PROTECTED] Organization: Full Scale Reply-To: Karen and Jimmy [EMAIL PROTECTED] Date: Sun, 1 Sep 2002 21:20:17 +1000 To: [EMAIL PROTECTED] stubbie holders! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] FW: suggestion for .hinge
Apologies to the list -- I *totally* sent this to the wrong mailgroup sorry! Justin on 01/09/02 10:00 PM, Justin French ([EMAIL PROTECTED]) wrote: I go this email to my hinge address... I guess they want .h stubby holders!! J -- From: Karen and Jimmy [EMAIL PROTECTED] Organization: Full Scale Reply-To: Karen and Jimmy [EMAIL PROTECTED] Date: Sun, 1 Sep 2002 21:20:17 +1000 To: [EMAIL PROTECTED] stubbie holders! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Safe mode? newbie alert!
Hi Everyone, I have a small question and just need some general direction, tried the mothership(google) but got too many results and got more confused. What is safe mode? If you have any URL or file that can explain it kindly give it to me... cheers and thanks again, -Ryan.
Re: [PHP] Re: alter switch variable inside case?
I'm not sure if you've already tried the idea I posted earlier. Anyway, I tried it myself and it works! (At least with this simple example...) !-- whatevername.php -- ?php echo 'myvar BEFORE the switch : ' . $_GET['myvar']; echo 'hr /'; switch ($_GET['myvar']){ case 1: $_GET['myvar'] = 2; case 2: echo "Hello!br /"; break; case 3: $_GET['myvar'] = 4; case 4: echo "Hello again!br /"; break; } echo 'hr /'; echo 'myvar AFTER the switch : ' . $_GET['myvar']; ? !-- end of whatevername.php -- Try it. For example, http://www.your_domain_name.com/whatevername.php?myvar=1 will change myvar to 2 and will echo "Hello!" (without executing the other "cases"). Then, http://www.your_domain_name.com/whatevername.php?myvar=3 will change myvar to 4 and will echo "Hello again!". As you can see, the key is using "break" ONLY in places you want to "break"... So, setting the variable in the first (or third) case CAN "cause execution of the second [or fourth] case segment". - E Could you elaborate? In the example I posted, setting foo=step1 in the first case segment does NOT cause execution of the second case segment, as would be the case if it was actually re-evaluating the match upon subsequent case statements. --- CHAILLAN Nicolas [EMAIL PROTECTED] wrote: Yes you can. -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - H$BqC(Bergement Group. www.WorldAKT.com - H$BqC(Bergement de sites Internet "Joe Janitor" [EMAIL PROTECTED] a $BqD(Brit dans le message de news: [EMAIL PROTECTED] I'd like to be able to modify the switch variable inside a case statement, like this: switch ($foo) { case 'step2': do_step2(); if ($error) $foo='step1'; //repeat step1 break; case 'step1': do_step1(); break; case 'a_third_thing': do_something_else(); break; } Can you modify the variable ($foo) inside a case statement and have it evaluated for subsequent 'case's like this? If not, I will have to revert to a series of if statements, in which this can be done: if ($foo=='step2') { do_step2(); if ($error) $foo='step1'; } if ($foo=='step1') { do_step1(); } etc. Switch-case seems cleaner, and I'd prefer to stick with it. __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ $B%O%$%;%s%9$J>$r5$7Z$K9XF~(B MSN $B%7%g%C%T%s%0(B http://shopping.msn.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Setting HTACCESS user/pass with php?
Is it possible to set, delete, or alter htaccess usernames and passwords using a php script? If so, where might I find a reference to the code for it or even a walkthrough? I have searched the php functions and I haven't found anything like that. Thank you in advance. -- --- Brian J. Celenza Chief Design Architect - Millennium Dreamworks [EMAIL PROTECTED] ICQ: 100942424 AIM: BJCKnight -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: UPDATE Query
Try changing your query to this: UPDATE news_db, newsreferenz_db SET news_db.head = 'DFB Pokalasfasf', news_db.text = 'alkfhaslk fl akshf lakshf lkahs lfk aslf yxvyxvyxvyxv', newsreferenz_db.kat_id = '3' WHERE (news_db.id = '6' AND newsreferenz_db.news_id = '6') Adding the ()'s around the WHERE definition is essential in an update query, although I have no clue why. Sascha Braun [EMAIL PROTECTED] wrote in message 000c01c25142$b4d1b990$0f00a8c0@squitta">news:000c01c25142$b4d1b990$0f00a8c0@squitta... I want to know if its possible to update two databases with one query? Please look at this example: UPDATE news_db, newsreferenz_db SET news_db.head = 'DFB Pokalasfasf', news_db.text = 'alkfhaslk fl akshf lakshf lkahs lfk aslf yxvyxvyxvyxv', newsreferenz_db.kat_id = '3' WHERE news_db.id = '6' AND newsreferenz_db.news_id = '6' it doesn't work. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Safe mode? newbie alert!
Try the "mothership" again and type php and "safe mode" Click "Search". The first two results: http://www.dynamic-webpages.de/php/features.safe-mode.php http://info.ccone.at/INFO/PHP4/features.safe-mode.html You can read only ONE so as not to get more confused... :) - E PS Of course, you can the info here as well: http://www.php.net/manual/en/features.safe-mode.php Hi Everyone, I have a small question and just need some general direction, tried the mothership(google) but got too many results and got more confused. What is safe mode? If you have any URL or file that can explain it kindly give it to me... cheers and thanks again, -Ryan. _ $B$+$o$$$/$FL{2w$J%$%i%9%HK~:\(B MSN $B%-%c%i%/%?!<(B http://character.msn.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Edwin-Re: [PHP] Safe mode? newbie alert!
Hey, Thanks for the reply, what you sent me I had already read on other sitesI just didnt understand them! I basically wanted a longer explanation. Thanks anyway, -Ryan. - Original Message - From: "@ Edwin" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Sunday, September 01, 2002 2:49 PM Subject: Re: [PHP] Safe mode? newbie alert! Try the "mothership" again and type php and "safe mode" Click "Search". The first two results: http://www.dynamic-webpages.de/php/features.safe-mode.php http://info.ccone.at/INFO/PHP4/features.safe-mode.html You can read only ONE so as not to get more confused... :) - E PS Of course, you can the info here as well: http://www.php.net/manual/en/features.safe-mode.php Hi Everyone, I have a small question and just need some general direction, tried the mothership(google) but got too many results and got more confused. What is safe mode? If you have any URL or file that can explain it kindly give it to me... cheers and thanks again, -Ryan. _ $B$+$o$$$/$FL{2w$J%$%i%9%HK~:\(B MSN $B%-%c%i%/%?!<(B http://character.msn.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Excel sheets
Hey, sorry if this has already been answered somewhere, but I cant find a clear answer to this question. I have multiple xls files with 4 sheets a piece. I need to load them into either mysql or directly php. From what I understand I could simply save as text file tab delimited, but I need something automatic. These xls sheets will be updated at random, and I will need the most current version avalible online. Any comments would be welcome. -C- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Q:Making an 'expired event' for sessions
Well since I was working with ASP before PHP, there's an event for sessions when they start and when they expire in ASP. Well in PHP I can put an IF statement to check if my variables are set or not for on_start event. But what should I do to have an event for the time they expire? Thanks for your help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] image manipulation
Hi tux, For your second question, try: http://www.linuxfocus.org/English/July2001/article211.shtml It'll give some basci info on image manipulation using ImageMagick. Hth, Andre On Sunday 01 September 2002 01:19 pm, tux wrote: Hey all, I was just wondering if anyone could recommend any tutorials or books or functions i should look into, to do the following: - decrease the size(kilobytes wise not height/width) of an image - imprint a transparent logo onto every picture displayed any feedback greatly appreciated. jo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Setting HTACCESS user/pass with php?
http://www.hido.net/projects/htadmin/ That may be what you're looking for.. Searching google for php user authentication htaccess turns up several more results.. HTH.. Take care.. peace.. eriol Brian J. Celenza [EMAIL PROTECTED] disgorged: : Is it possible to set, delete, or alter htaccess usernames and passwords : using a php script? If so, where might I find a reference to the code for it : or even a walkthrough? I have searched the php functions and I haven't found : anything like that. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] getimagesize with image in database
Hi, I'm trying to get an image size from an image in a database. here's my code $imagesize = getimagesize(http://domain/image.jpg); echo $imagesize[3]; but it returns nothing. If I use a local file, without http it works. I have php 4.0.6 any suggestions. Thanks, Chuck
Re: [PHP] getimagesize with image in database clairifation
in my example I'm not pulling from a db. It does not even work like I have it in my example though. Thanks, Chuck - Original Message - From: Chuck Barnett [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, September 01, 2002 11:54 AM Subject: [PHP] getimagesize with image in database Hi, I'm trying to get an image size from an image in a database. here's my code $imagesize = getimagesize(http://domain/image.jpg); echo $imagesize[3]; but it returns nothing. If I use a local file, without http it works. I have php 4.0.6 any suggestions. Thanks, Chuck -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
AW: [PHP] Excel sheets
hi take a look at http://phpclasses.org as far as I remember there are some excel classe robert Hey, sorry if this has already been answered somewhere, but I cant find a clear answer to this question. I have multiple xls files with 4 sheets a piece. I need to load them into either mysql or directly php. From what I understand I could simply save as text file tab delimited, but I need something automatic. These xls sheets will be updated at random, and I will need the most current version avalible online. Any comments would be welcome. -C- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
AW: [PHP] Q:Making an 'expired event' for sessions
hi in php.ini you can control behavior of sessions, for example (take a look for you self;) - session.gc_maxlifetime = 1440, in script you you may use ini_set for dynamic control hope this is the right direction .. robert Von: Mehran Ziadloo [mailto:[EMAIL PROTECTED]] Well since I was working with ASP before PHP, there's an event for sessions when they start and when they expire in ASP. Well in PHP I can put an IF statement to check if my variables are set or not for on_start event. But what should I do to have an event for the time they expire? Thanks for your help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: getimagesize with image in database
Hi, There is no way to get the filesize of a file using a remote file. You should download it to a tmp directory then check. If it is get with an http server, you should code something with sockets to ask to the http server the filesize using a request. -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet Chuck Barnett [EMAIL PROTECTED] a écrit dans le message de news: 006901c251d8$3ce1ec20$[EMAIL PROTECTED] Hi, I'm trying to get an image size from an image in a database. here's my code $imagesize = getimagesize(http://domain/image.jpg); echo $imagesize[3]; but it returns nothing. If I use a local file, without http it works. I have php 4.0.6 any suggestions. Thanks, Chuck -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Imagemangick, can I install on a virtual host?
I'd like to use some of the Imagemagick functions; but my virtual host doesn't include it and won't bother to install it. Is it practical to install Imagemagick php on a virtual host? Has php. It's not a shell account. FTP is the only basic access. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE : [PHP] RE : include interpreted php file
nope sorry... -Message d'origine- De : Chris Knipe [mailto:[EMAIL PROTECTED]] Envoyé : samedi 31 août 2002 20:10 À : you; 'Richard Lynch' Cc : [EMAIL PROTECTED] Objet : Re: [PHP] RE : include interpreted php file fopen() Regards, Chris Knipe Cell: (072) 434-7582 MegaLAN Corporate Networking Services /--- | This email is confidential and may contain legally privileged information. | If you are not the intended recipient, you must not disclose or use | the information contained in it. If you have received this email in error, | please notify us immediately by return email and delete the document. \--- - Original Message - From: you [EMAIL PROTECTED] To: 'Richard Lynch' [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, August 31, 2002 7:44 PM Subject: [PHP] RE : include interpreted php file Hi, Thanks for u help. But i just wanna include a php file in an other. But the included file must be interpreted before including it. Thx kciop -Message d'origine- De : Richard Lynch [mailto:[EMAIL PROTECTED]] Envoyé : samedi 31 août 2002 02:12 À : you Cc : [EMAIL PROTECTED] Objet : Re: include interpreted php file pb : include a php file in an other php file contraints : the php file must be interpreted before being included solution known : fsock then get the html code from the server and include it... Is there an other solution (easier) to include that file? Not real sure if you *want* the PHP file interpreted or not, but if not, try this: ?php $html = file(http://example.com/whatever.htm;) or die(Could not load remote HTML); echo implode('', $html); ? You may (or may not) also want to use http://php.net/htmlentities to show the actual HTML source instead of making it a part of your web design layout HTML... -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] auction scripts?
hi, can anyone relay experience or recommend a php-based ebay-style auction script? tkx, jaxon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: auction scripts?
PHP Auctions I think you can find it on http://www.hotscripts.com if not just search google Jaxon [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hi, can anyone relay experience or recommend a php-based ebay-style auction script? tkx, jaxon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] str_replace question
Hello, i have array $reserved_words which i want to replace with bold .. but when i tried to do str_replace($reserved_words, b.$reserved_words./b, $string) it showed Array instead of bword/b if i simply do str_replace($reserved_words, $reserved_words, $string) then it shows the words not Array but not in bold ;) I know i could use 2 arrays one with bold words one without or i could use foreach but i want a simpler solution :)... Any suggestions ? thx in advance ! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: str_replace question
What about a str_replace($reserved_words, b$reserved_words/b,$string); Tell me. -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet Gregor Jak¹A [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] Hello, i have array $reserved_words which i want to replace with bold .. but when i tried to do str_replace($reserved_words, b.$reserved_words./b, $string) it showed Array instead of bword/b if i simply do str_replace($reserved_words, $reserved_words, $string) then it shows the words not Array but not in bold ;) I know i could use 2 arrays one with bold words one without or i could use foreach but i want a simpler solution :)... Any suggestions ? thx in advance ! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP shopping
Hi, Making an upload script is really easy, I can't do it because of too much work, but you should learn php yourself to do that, anyway this is not a newsletter to get free programs. Just look at www.php.net and start reading the manual to learn PHP. -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet Ryan A [EMAIL PROTECTED] a écrit dans le message de news: 000a01c251f7$d80eb650$[EMAIL PROTECTED] Hi guys, Kinda reached the end of my line, searched on yahoo,google,altavista,excite etc and hotscripts,scriptsearch etc but could not find what i require I need a shopping cart software which will display and sell .swf files, it does *not* have to integrate with ANY ecom credit card processing. Basically all I want it to do is give me a chance to upload a .swf file in a category (eg: images/text/movies etc) and should allow the visitor to search that category,take an order and email it to me Have any or you seen such a script anywhere? unfortunately I dont know PHP to make it myself and am not rich to order custom programming..I am hoping that someone has already made the script and has made it available to the public. Anybody? or even if you know a place (URL) where I can learn shopping cart examples kindly direct me to it so maybe i can learn? Cheers and thank you for reading this message. -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Q:Making an 'expired event' for sessions
Hi Thanks for replying, There are some settings for sessions in php.ini but I can't find the thing that I'm looking for. It should exist, I mean isn't there any one who needs to know when the session has expired? Once again I ask my question: How to make a session_on_end event in php? Any help will be appreciated. Robert Mischke [EMAIL PROTECTED] wrote in message 001601c251db$9877c930$6364a8c0@fatalerror">news:001601c251db$9877c930$6364a8c0@fatalerror... hi in php.ini you can control behavior of sessions, for example (take a look for you self;) - session.gc_maxlifetime = 1440, in script you you may use ini_set for dynamic control hope this is the right direction .. robert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Setting HTACCESS user/pass with php?
Hi, Note that it is just a fileaccess, you can use htpasswd to put a password to the correct file, you can make your own class easily if you know how to parse a file and write in it. You can use exec() to make an apache/bin/htpasswd call assuming you're using apache. -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet Brian J. Celenza [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] Is it possible to set, delete, or alter htaccess usernames and passwords using a php script? If so, where might I find a reference to the code for it or even a walkthrough? I have searched the php functions and I haven't found anything like that. Thank you in advance. -- --- Brian J. Celenza Chief Design Architect - Millennium Dreamworks [EMAIL PROTECTED] ICQ: 100942424 AIM: BJCKnight -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 1 Sep 2002 21:23:17 -0000 Issue 1560
php-general Digest 1 Sep 2002 21:23:17 - Issue 1560 Topics (messages 114818 through 114850): Re: problem with links 114818 by: CHAILLAN Nicolas Re: image manipulation 114819 by: CHAILLAN Nicolas 114833 by: Andre Dubuc Re: UPDATE Query 114820 by: Tony Harrison 114828 by: Brian J. Celenza Word docs 114821 by: DC 114822 by: Justin French Re: suggestion for .hinge 114823 by: Justin French 114824 by: Justin French Safe mode? newbie alert! 114825 by: Ryan A 114829 by: . Edwin Re: alter switch variable inside case? 114826 by: . Edwin Setting HTACCESS user/pass with php? 114827 by: Brian J. Celenza 114834 by: eriol 114849 by: CHAILLAN Nicolas Edwin-Re: [PHP] Safe mode? newbie alert! 114830 by: Ryan A Excel sheets 114831 by: -C- 114837 by: robert mischke Q:Making an 'expired event' for sessions 114832 by: Mehran Ziadloo 114838 by: robert mischke 114848 by: Mehran Ziadloo getimagesize with image in database 114835 by: Chuck Barnett 114839 by: CHAILLAN Nicolas Re: getimagesize with image in database clairifation 114836 by: Chuck Barnett Imagemangick, can I install on a virtual host? 114840 by: Al RE : [PHP] RE : include interpreted php file 114841 by: you auction scripts? 114842 by: jaxon 114843 by: JohnP PHP shopping 114844 by: Ryan A 114847 by: CHAILLAN Nicolas str_replace question 114845 by: Gregor Jak¹a 114846 by: CHAILLAN Nicolas addslashes($variable)? 114850 by: cLeAnEr Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- ---BeginMessage--- If you use global variables in your scripts, please put register global on into php.ini. -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet Brad Lahr [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] I compiled php on a linux machine and am experiencing problems whith links. going to www.domainname.com/index.php in a browser works fine. Clicking on links on this page such as www.domainname.com/?page=teamteamcode=4938412 just sends me back to the main www.domainname.com page. Did a forget to compile in a specific feature of php or apache? Here is the commands I used when compiling php and apache. cd php-4.2.2 ./configure --with-apache=/usr/local/src/apache_1.3.26 make make install *** added AddModule modules/php4/libphp4.a to apache_1.3.26/src/configuration *** cd /usr/local/src/apache_1.3.26 ./configure --activate-module=src/modules/php4/libphp4.a make make install Any help is greatly appreciated. I apoligize iin advance for being such a newbie. Brad ---End Message--- ---BeginMessage--- Here is the list of the PHP's images functions: http://www.php.net/manual/en/ref.image.php You can look at filesize and getimagesize for the size / height width. For the second question, I dont know look at the list. -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet Tux [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] Hey all, I was just wondering if anyone could recommend any tutorials or books or functions i should look into, to do the following: - decrease the size(kilobytes wise not height/width) of an image - imprint a transparent logo onto every picture displayed any feedback greatly appreciated. jo ---End Message--- ---BeginMessage--- Hi tux, For your second question, try: http://www.linuxfocus.org/English/July2001/article211.shtml It'll give some basci info on image manipulation using ImageMagick. Hth, Andre On Sunday 01 September 2002 01:19 pm, tux wrote: Hey all, I was just wondering if anyone could recommend any tutorials or books or functions i should look into, to do the following: - decrease the size(kilobytes wise not height/width) of an image - imprint a transparent logo onto every picture displayed any feedback greatly appreciated. jo ---End Message--- ---BeginMessage--- What about multiple tables? Can that be done? Mark Charette [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... No, only one db at a time may be updated. The where clauses can contain multiple db. -Original Message- From: Sascha Braun [mailto:[EMAIL PROTECTED]] Sent: Saturday, August 31, 2002 7:04 PM To: PHP Mailingliste
[PHP] addslashes($variable)?
Hi. I have recently started prograemming some php. Now I wonder exactly what addslashes() is good for... I´ve read about it that it insert slashes where needed to get data in right form to Mysql? and then use stripeslashes() to remove slashes when reciving data out of database? And I´ve also got this article that its good for not getting a harmful query along with my own query $sql=SELECT * FROM adresses;DELETE * FROM adress ??? plz explain to me! reg: Niclas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] dumping mysql database with php script
I am having a problem with a script to dump a mysql database to a text file. When I run the command below it creates the database.sql file but it only puts the first three lines in that file they look like this # MySQL dump 8.13 # # Host: localhostDatabase: testdata1 # # Server version3.23.37 If I run the following at the command line it work perfect passing the whole database to the txt file /usr/bin/mysqldump -u testdata1 -ptestdata1 testdata1 /home/sites/www.directphp.net/sitebackup/databases/testdata1.sql Why is it stopping on the third line when I run it with a PHP script This is my script $sql=Select * from datba where domname = '$domname'; $results=safe_query($sql); while($row = mysql_fetch_array($result)){ $databasename=$row[databasename]; $databaseusername=$row[$databaseusername]; $databasepassword=$row[$databasepassword]; exec(/usr/bin/mysqldump -u $databaseusername -p$databasepassword $databasename $Databasesdir/$databasename.sql); } -- Best regards, rdkurth mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: str_replace question
Same as with b.$reserved_words./b, i get Array :) Chaillan Nicolas [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... What about a str_replace($reserved_words, b$reserved_words/b,$string); Tell me. -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet Gregor Jak¹A [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] Hello, i have array $reserved_words which i want to replace with bold .. but when i tried to do str_replace($reserved_words, b.$reserved_words./b, $string) it showed Array instead of bword/b if i simply do str_replace($reserved_words, $reserved_words, $string) then it shows the words not Array but not in bold ;) I know i could use 2 arrays one with bold words one without or i could use foreach but i want a simpler solution :)... Any suggestions ? thx in advance ! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: str_replace question
something like this should do foreach ($reserved_words as $key = $value) { $reserved_words_bold[$key] = 'b'.$value.'/b'; } $string = str_replace($reserved_words, $reserved_words_bold,$string); olinux --- Gregor J [EMAIL PROTECTED] wrote: Same as with b.$reserved_words./b, i get Array :) Chaillan Nicolas [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... What about a str_replace($reserved_words, b$reserved_words/b,$string); Tell me. -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet Gregor Jak¹A [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] Hello, i have array $reserved_words which i want to replace with bold .. but when i tried to do str_replace($reserved_words, b.$reserved_words./b, $string) it showed Array instead of bword/b if i simply do str_replace($reserved_words, $reserved_words, $string) then it shows the words not Array but not in bold ;) I know i could use 2 arrays one with bold words one without or i could use foreach but i want a simpler solution :)... Any suggestions ? thx in advance ! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] using shell_exec
Can somebody tell me way this will work at the command line but will not work using PHP I also tried exec and system. from the command line it adds all the files and directors. But using the script below from PHP it creates an empty archive. shell_exec(cd /home/sites/www.directphp.net/ | tar --create --verbose --file=/home/sites/www.directphp.net/sitebackup/backup.192002.tar web); -- Best regards, rdkurth mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] fopen() and flock()
I use fopen() in a template system that I have developed. I noticed that occasionally I get blank pages served up. Here is one of my snippets. $filename = $ROOTDIR/content/myfile.txt; $fd = fopen ($filename, r); $PAGE_CONTENT = fread ($fd, filesize ($filename)); fclose ($fd); Doing this I get the contents of the file read into the $PAGE_CONTENT variable. I never use fopen() to write to files. Only read with the r directive. So what could be causing my conflicts? Do I need to flock the file to shared? I am running Linux PHP, Apache and Linux. David McInnis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Chaillan-Re: [PHP] Re: PHP shopping
Hey, Thanks for your reply, I have no problems trying to make an upload script as I have seen lots of dudes on the list doing so and I know if I screw up being a newbie there are a lot of people on the list who will be kind enough to help me. I am trying to learn PHP, and no, I did not think this was a newsletter to get free programs, coz I tried the search engines and script archives and didnt get anyway I was hopeing someone on the list had come accross such a programa desperate bid I know. If I have to make this myself I was hopeing someone would share some valuable info on shopping cart theory as i'm sure its pretty complex to begin with. I'll take your advise and see what I can find on PHP.net though, thanks. Cheers, -Ryan A. Hi, Making an upload script is really easy, I can't do it because of too much work, but you should learn php yourself to do that, anyway this is not a newsletter to get free programs. Just look at www.php.net and start reading the manual to learn PHP. -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet Ryan A [EMAIL PROTECTED] a écrit dans le message de news: 000a01c251f7$d80eb650$[EMAIL PROTECTED] Hi guys, Kinda reached the end of my line, searched on yahoo,google,altavista,excite etc and hotscripts,scriptsearch etc but could not find what i require I need a shopping cart software which will display and sell .swf files, it does *not* have to integrate with ANY ecom credit card processing. Basically all I want it to do is give me a chance to upload a .swf file in a category (eg: images/text/movies etc) and should allow the visitor to search that category,take an order and email it to me Have any or you seen such a script anywhere? unfortunately I dont know PHP to make it myself and am not rich to order custom programming..I am hoping that someone has already made the script and has made it available to the public. Anybody? or even if you know a place (URL) where I can learn shopping cart examples kindly direct me to it so maybe i can learn? Cheers and thank you for reading this message. -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP checkbox/hidden field question
I am executing the follwoing statement as part of a while loop. This is part of a form and I wish to pass the name and value of the checkbox as a hidden field only is the checkbox is checked. Can you suggest how I can accomplish this task? tdinput type=checkbox name=d_c_arr[] value=?php echo $db-f(order_id) ?/td Thank You Paul php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Imap Open Timeout
Hi guys, just wondering if there is any easy way to set a timeout on the Imap Open function. I've written a script that polls about 50 different peoples e-mail accounts and sometimes it gets stuck on a few accounts that are taking ages to respond. Any thoughts would be gratefully received. Cheers, Andy Chapman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] addslashes($variable)?
on 01/09/02 10:23 PM, cLeAnEr ([EMAIL PROTECTED]) wrote: Hi. I have recently started prograemming some php. Now I wonder exactly what addslashes() is good for... I´ve read about it that it insert slashes where needed to get data in right form to Mysql? and then use stripeslashes() to remove slashes when reciving data out of database? Yes. Depending on your server set-up, adding strings to your database which include quotes will produce errors. Escaping them (adding a slash) will prevent this, and then the slashes will to be removed on the way out of the DB. Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP shopping
on 02/09/02 6:40 AM, Ryan A ([EMAIL PROTECTED]) wrote: Hi guys, Kinda reached the end of my line, searched on yahoo,google,altavista,excite etc and hotscripts,scriptsearch etc but could not find what i require I need a shopping cart software which will display and sell .swf files, it does *not* have to integrate with ANY ecom credit card processing. So how do they place an order? You said the cart produces an email, but does that email include a credit card number, bank details or anything else secure? Basically all I want it to do is give me a chance to upload a .swf file in a category (eg: images/text/movies etc) and should allow the visitor to search that category,take an order and email it to me There is a perfect upload example in the PHP manual. http://www.php.net/manual/en/features.file-upload.php The rest of it is all pretty standard shopping cart stuff, except you want to be searching off directories of SWF files. This is of course similar to searching directories for MP3s or for images. So perhaps this will help broaden your search/cart search. The strange bit is that in the case of a SWF, Image, MP3, etc etc, by the time you search the directory and file the file, there's no point adding the item to the cart, because you can just save (steal) it directly from the browser. Have any or you seen such a script anywhere? unfortunately I dont know PHP to make it myself and am not rich to order custom programming..I am hoping that someone has already made the script and has made it available to the public. The simple answer is to learn some PHP. But first you need to refine your business model and flow. You don't need anything complex, but you have a reasonably unique criteria, which is pretty conducive to learning some PHP and building exactly what you want, just like most of us do everyday. Anybody? or even if you know a place (URL) where I can learn shopping cart examples kindly direct me to it so maybe i can learn? Sorry, this is a really big question. You really need to learn: 1. sessions (remembering a user, and remembering what the user has in thier cart) -- maybe start with Kevin Yank's article and develop it into what you need? http://www.webmasterbase.com/article/319 2. looking through directory structures (see the user contributed notes on all of the filesystem pages of php.net: http://www.php.net/manual/en/ref.filesystem.php) 3. email using mail() see php.net/mail 4. possibly SSL on the server 5. possibly encryption with a key using the mycrypt functions of PHP I seriously doubt you'll find a cart which does everything you want... so why not start researching these topics, and start building your own. At the end of the project, you'll know a heap about PHP :) Justin Cheers and thank you for reading this message. -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP shopping
Ryan -- ...and then Ryan A said... % % Hi guys, Hello! % Kinda reached the end of my line, searched on yahoo,google,altavista,excite etc and hotscripts,scriptsearch etc but could not find what i require Of course not; it's never that easy :-) % % I need a shopping cart software which will display and sell .swf files, it does *not* have to integrate with ANY ecom credit card processing. Hmmm... No ccard stuff; how will you make any money? % % Basically all I want it to do is give me a chance to upload a .swf file in a category (eg: images/text/movies etc) and should allow the visitor to search that category,take an order and email it to me So far all you've mentioned are an upload script for you and a search engine for your visitors. Both of those things are fairly easy and don't require any special cart software. % % Have any or you seen such a script anywhere? unfortunately I dont know PHP to make it myself and am not rich to order custom programming..I am hoping that someone has already made the script and has made it available to the public. % Anybody? Nothing like that... Of course, I wouldn't call that a shopping cart, either! % % or even if you know a place (URL) where I can learn shopping cart examples kindly direct me to it so maybe i can learn? If I were you I'd start with upload scripts and search engines. Once you get those done (particularly the latter), then you might look at how to keep your users from grabbing the files and instead going through whatever hoops you want to have up... I know you said you weren't rich, but if you insist that you can't write this stuff yourself I might be able to help out; I need to build my code library to show off :-) % % Cheers and thank you for reading this message. % -Ryan HTH HAND :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg77427/pgp0.pgp Description: PGP signature
Re: [PHP] Imagemangick, can I install on a virtual host?
Al -- ...and then Al said... % % I'd like to use some of the Imagemagick functions; but my virtual host % doesn't include it and won't bother to install it. Phooey on them. You should switch to me :-) % % Is it practical to install Imagemagick php on a virtual host? Sure; it doesn't have to be under /usr or /usr/local by any means. % % Has php. It's not a shell account. FTP is the only basic access. The trick will be compiling it. If you don't have an identical (or nearly so) platform, then you'll have to compile on your server. I suppose if you were really sneaky you could write some php scripts that run your config and compile for you :-) but you'll probably need access to a shell at least temporarily. HTH HAND :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg77428/pgp0.pgp Description: PGP signature
[PHP] unexpected T_SL
Hi, What is wrong witht his code? Parse error: parse error, unexpected T_SL in c:\program files\easyphp\www\tutorial\eod.php on line 2 ?php $str = EOD Example of string spanning multiple lines using heredoc syntax. EOD; ? Regards! Joe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] unexpected T_SL
simple .. look up docs on putting straight text to the screen and u'll find a number of options such as echo and print i bet ya'd be able to solve really quickly -Original Message- From: Voisine [mailto:[EMAIL PROTECTED]] Sent: Monday, 2 September 2002 12:34 PM To: [EMAIL PROTECTED] Subject: [PHP] unexpected T_SL Hi, What is wrong witht his code? Parse error: parse error, unexpected T_SL in c:\program files\easyphp\www\tutorial\eod.php on line 2 ?php $str = EOD Example of string spanning multiple lines using heredoc syntax. EOD; ? Regards! Joe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] unexpected T_SL
I know how to use echo and print but I'm learning php so I try to understand why I have this error with the heredoc syntax. Thanks! Peter Houchin wrote: simple .. look up docs on putting straight text to the screen and u'll find a number of options such as echo and print i bet ya'd be able to solve really quickly -Original Message- From: Voisine [mailto:[EMAIL PROTECTED]] Sent: Monday, 2 September 2002 12:34 PM To: [EMAIL PROTECTED] Subject: [PHP] unexpected T_SL Hi, What is wrong witht his code? Parse error: parse error, unexpected T_SL in c:\program files\easyphp\www\tutorial\eod.php on line 2 ?php $str = EOD Example of string spanning multiple lines using heredoc syntax. EOD; ? Regards! Joe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Escape characters won't go away
I'm getting multiple backslashes in data I get out of a mysql database. Example : ...Here\\\'s the d... No problem. Except I CANT GET RID OF THEM. I've tried several things: 1. $string = stripslashes($string); - Doesn't do anything 2. $string = ereg_replace(\\, , $string); - Doesn't do anything 3. $string = ereg_replace(\\, , $string); - Gives the following error message: Warning: REG_EESCAPE in script.php on line 1684 None of these have worked. Any thoughts on how to get rid of them? I'm going batty. Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] regex help
Im trying to apply htmlspecialchars() to hrefs in a string. Here is what I have. ?php $str = 'hi bmy friend/b! br / this message uses html entities a href=http://www.trini0.org;test/a!'; $str = preg_replace('/(a href=http:\/\/.*.*\/a)/', htmlspecialchars($1), $str); print($str); ? Any help would be appreciated. Thanks -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Escape characters won't go away
on 02/09/02 1:14 PM, Mike Mannakee ([EMAIL PROTECTED]) wrote: I'm getting multiple backslashes in data I get out of a mysql database. Example : ...Here\\\'s the d... No problem. Except I CANT GET RID OF THEM. I've tried several things: 1. $string = stripslashes($string); - Doesn't do anything have you tried: $string = stripslashes(stripslashes($string)); // OR $string = stripslashes(stripslashes(stripslashes($string))); For multiple occurrences, you have to call it twice... or even three times. also try $string = str_replace(\', , $string); $string = str_replace(\\, , $string); Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Escape characters won't go away
Thanks. I just figured it out myself. I had to change the expression: $string= ereg_replace([\\]+, , $string); The above is what worked. Mike Justin French [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... on 02/09/02 1:14 PM, Mike Mannakee ([EMAIL PROTECTED]) wrote: I'm getting multiple backslashes in data I get out of a mysql database. Example : ...Here\\\'s the d... No problem. Except I CANT GET RID OF THEM. I've tried several things: 1. $string = stripslashes($string); - Doesn't do anything have you tried: $string = stripslashes(stripslashes($string)); // OR $string = stripslashes(stripslashes(stripslashes($string))); For multiple occurrences, you have to call it twice... or even three times. also try $string = str_replace(\', , $string); $string = str_replace(\\, , $string); Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] linking to secure ssl page using php and Microsoft Explorer - general error serviing up page from MSE... Netscape works fine
Get general MSE error when using PHP to go from a non-secure page to an ssl page. If I use the back button and try it again it will work, so the code seems solid. Does not fail on Netscape. I heard that there is a Microsoft Explorer issue with secure pages and/or php. Any ideas on how to resolve? Stan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] using shell_exec
Use ; instead of | e.g. shell_exec(cd /change/to/dir; tar cvf /place/for/backup.tar files); Todd. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, 2 September 2002 9:40 AM To: php-general Subject: [PHP] using shell_exec Can somebody tell me way this will work at the command line but will not work using PHP I also tried exec and system. from the command line it adds all the files and directors. But using the script below from PHP it creates an empty archive. shell_exec(cd /home/sites/www.directphp.net/ | tar --create --verbose --file=/home/sites/www.directphp.net/sitebackup/backup.192002.tar web); -- Best regards, rdkurth mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Still cannot get gd graphics to work....
Help I want to install apache 1.3.26 with php 4.2.2 (plus png support) on a suse 8.0 machine. I constantly get segV errors when using imagecreatefrompng. Have tried gd 1.8.4 / and the gd beta 2.0.1, have also tried installed the latest libpng 1.2.4. The php INSTALL file makes it seem trivial to have this working ?? Has anyone else having issues with getting png support on the latest builds ? Thanks dave ps. My php configure look like:- ./configure --enable-debug \ --with-gd=/usr/local/gd-1.8.4 \ --with-png-dir=/usr \ --with-jpeg-dir=/usr \ --with-zlib-dir=/usr \ --with-mysql=/usr/local/mysql \ --with-apxs=/usr/local/apache/bin/apxs \ --with-config-file-path=/usr/local/apache/config -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] using shell_exec
Only just noticed this when I read my post... Why do you want to use verbose? If you want to capture the output for some reason, use this exec(cd /change/to/dir; tar cvf /place/for/backup.tar files, $capturedoutput); otherwise drop the v (or --verbose) which will chew less resources. Todd. -Original Message- From: Todd Pasley [mailto:[EMAIL PROTECTED]] Sent: Monday, 2 September 2002 1:32 PM To: Richard Kurth; php-general Subject: RE: [PHP] using shell_exec Use ; instead of | e.g. shell_exec(cd /change/to/dir; tar cvf /place/for/backup.tar files); Todd. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, 2 September 2002 9:40 AM To: php-general Subject: [PHP] using shell_exec Can somebody tell me way this will work at the command line but will not work using PHP I also tried exec and system. from the command line it adds all the files and directors. But using the script below from PHP it creates an empty archive. shell_exec(cd /home/sites/www.directphp.net/ | tar --create --verbose --file=/home/sites/www.directphp.net/sitebackup/backup.192002.tar web); -- Best regards, rdkurth mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Average Number For Math Functions
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... Ok I think your definently going in the right direction - when I put this into my series I seem to be getting this message for each result: Resource id #40 or some other number that in some way represents something? Any Clue? Here is my SQL: $rsum =mysql_query(select sum(rating) from ratings)or die (mysql_error()); John You are missing quite a bit there - $rsum is merely a pointer to the data. Look at http://www.php.net/mysql_fetch_assoc which has an example of how to connect to mysql, issue a query and display the results of the query. Also, you might find http://www.php.net/extract useful in future. -- David Robley Temporary Kiwi! Quod subigo farinam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Mail problem
In article 002101c25029$2ca0c490$[EMAIL PROTECTED], [EMAIL PROTECTED] says... I have this set on both boxes. Here are the settings - local box (which does send mail)isp box (does not send mail) sendmail_from me@@localhost.com 'no value' sendmail_path /usr/sbin/sendmail -t -i/usr/sbin/sendmail -t -i SMTP localhost localhost I actually had to set the SMTP setting to localhost on our solaris boxes to get this to work. I discovered this because we have a few older machines without php.ini files altogether, and the default is to have this set (the older machines worked). You may wish to test the value tht mail() returns - if it returns true then the mail has been successfully handed off to the MTA and beyond the scope of PHP; in this case you then need to look at your system mail logs to see if there is something useful there. It may also be that the mail is successfully sent, but bounces for whatever reason; a check of the relevant mailboxes (postmaster, admin etc) may turn up more info. -- David Robley Temporary Kiwi! Quod subigo farinam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] using shell_exec
Hello Todd, verbose was just in there so I could see what was going on at the command line it is not in the php script becase there is no need for it Sunday, September 01, 2002, 8:41:42 PM, you wrote: TP Only just noticed this when I read my post... TP Why do you want to use verbose? TP If you want to capture the output for some reason, use this TP exec(cd /change/to/dir; tar cvf /place/for/backup.tar files, TP $capturedoutput); TP otherwise drop the v (or --verbose) which will chew less resources. TP Todd. -Original Message- From: Todd Pasley [mailto:[EMAIL PROTECTED]] Sent: Monday, 2 September 2002 1:32 PM To: Richard Kurth; php-general Subject: RE: [PHP] using shell_exec Use ; instead of | e.g. shell_exec(cd /change/to/dir; tar cvf /place/for/backup.tar files); Todd. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, 2 September 2002 9:40 AM To: php-general Subject: [PHP] using shell_exec Can somebody tell me way this will work at the command line but will not work using PHP I also tried exec and system. from the command line it adds all the files and directors. But using the script below from PHP it creates an empty archive. shell_exec(cd /home/sites/www.directphp.net/ | tar --create --verbose --file=/home/sites/www.directphp.net/sitebackup/backup.192002.tar web); -- Best regards, rdkurth mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Best regards, rdkurthmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php