Re: [PHP] GD Chinese support - php4.3
but even i tried the hong kong local chinese font, it still display the same thing! -- - Eddy Wong __ inframatrix internet solutions http://www.inframatrix.com/ ¥¿¤KEddy Regular Octa-Eddy ¡@¢¨¡½¢ª¡½¢©¡@ ¢¨¢«¡@¡@¡½¢ª¢© ¡½¡@¡@¡@¡½¡@¡½ ¡½¡½¡½¡@¡½¡@¡½ ¡½¡@¡@¡@¡½¡@¡½ ¢ª¢©¡@¡@¡½¢¨¢« ¡@¢ª¡½¢¨¡½¢«¡@ Tom Rogers [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, Saturday, February 8, 2003, 3:30:11 AM, you wrote: ED any one know how display Chinese Characters (tradition or simplified) in ED GD.? ED is that something deal with multibyte functions...? ED i have installed the bundled GD and Libjpeg ED they all worked perfectly with english words ED but when i generate a Chinese character, it just display two symbols ED i've already set the encoding (of php) to BIG5 ED and even i use mb_detect_encoding() it can show BIG-5 ED but when i use ImageTTFtext(blah blah blah , mb_convert_encoding([Chinese ED word here],BIG-5) ED it pops out 2 symbol ED the ttf font i loaded is the one distributed by Microsoft (HKSCS) ED any php experts know how to solve this problem? ED Thank you all :) ED Regards, ED Eddy @ Hong Kong ED [EMAIL PROTECTED] You will probably find the microsoft font is unicode not Big5 -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Dynamic input fields in Form
Hi, Thanks guys for helping me out! Regards, Frank Original Message - From: 1LT John W. Holmes [EMAIL PROTECTED] To: Frank Keessen [EMAIL PROTECTED]; Jon Haworth [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, February 07, 2003 9:23 PM Subject: Re: [PHP] Dynamic input fields in Form Thanks for the answer; but there is nobody who can show me an example in code??? You mean do the work for you? Do you want the PHP or Javascript solution? Only one can be posted on this list... No you don't have to do the coding for me The PHP one is simple. Assuming $_POST['num'] is the number from your drop down... for($x=0;$x$_POST['num'];$x++) { echo 'input type=text'; } That's it. ---John Holmes... I have a form where the user selects for example; how many cars you have: 4. Then it most dynamicly create 4 input fields [...] Using only PHP, you'll have to make this a two-step process where page 1 collects the number of cars and posts to page 2, which generates the form accordingly. If is has to be done on the same page, you'll need to call a Javascript function every time the number of cars changes. That function will have to add or remove inputs from the form depending on the number of cars entered, and of course the whole page will break completely for anyone without Javascript. I'd make it a two-step process myself, it's considerably more robust and offers considerably less room for problems (what happens if I claim I have five cars, fill out their details, and then change it to three cars? which details do you get rid of?) Cheers Jon -- 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] Multi-User phpMyAdmin
on 2/7/03 3:35 PM, Stephen at [EMAIL PROTECTED] wrote: Can anyone tell me a tutorial on how to setup a multi-user phpmyadmin installation? I would like to just have one central copy, then have other users able to access their corresponding database in phpMyAdmin. How can I do this? It is on the phpmyadmin documentation page and it looks something like this... --snip-- This example assumes you want to use pma as the controluser and pmapass as the controlpass, but this is only an example: use something else in your file: GRANT USAGE ON mysql.* TO 'pma'@'localhost' IDENTIFIED BY 'pmapass'; GRANT SELECT (Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv, Index_priv, Alter_priv) ON mysql.user TO 'pma'@'localhost'; GRANT SELECT ON mysql.db TO 'pma'@'localhost'; GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv) ON mysql.tables_priv TO 'pma'@'localhost'; ... and if you want to use the many new relation and bookmark features: GRANT SELECT, INSERT, UPDATE, DELETE ON pma_db TO 'pma'@'localhost'; (this of course requires you to have a special DB for phpMyAdmin, the contents will be explained later) *Then each of the true users should be granted of a set of privileges on a set of particular databases but shouldn't have any global privileges. For example, to grant the user real_user with all privileges on the database user_base: GRANT ALL PRIVILEGES ON user_base.* TO 'real_user'@localhost IDENTIFIED BY 'real_password'; --snip-- -- Mike Yrabedra President 323 Enterprises Home of The MacDock and The MacSurfshop [http://macdock.com] : [http://macsurfshop.com] VOICE: 770.382.1195 iChat/AIM: ichatmacdock ___ in all your ways acknowledge Him and He will direct your paths. Proverbs 3:6 NIV {{{ -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Vars in URL
on 06/02/03 10:03 AM, Shawn McKenzie ([EMAIL PROTECTED]) wrote: I am trying to do something simple to sell items with paypal. One of the options paypal has is a return url, so that after the buyer pays via the paypal website they are forwarded to the return url (my site) so they can access some info.. The problem is that the form on my site that collects info and posts to paypal has the hidden return url vars in it. So a simple view source in the browser reveals the return url. So what I did is made a form that submits to a php script on my site that then adds the appropriate paypal vars and submits to the paypal site. I used header(Location:), but this shows the return url var in the url address bar. I want to pass vars to paypal without them being shown in the url address bar. Not a chance really -- you can't use cookies (essentially the third way to do pass vars around), because cookies are tied to a specific domain. I say if the rest of society can deal with POST and GET vars for Paypal etc, then so can you :) Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to remove only the last character?
Good day. Is there any PHP function that removes only the last character of a string and returns the new string? I'm looking in the manual and I can't find anything. Until now I'm doing this: $var=substr($var,0,strlen($var)-1) Is this the most efficient way? Thanks. __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to remove only the last character?
Hiya, Try this, *probably* more efficient but I don't know for sure. ? $string = 'testing 1 2 3 testing'; echo $string . \n; $string[strlen($string)-1] = \0; echo $string . \n; ? Regards, Ian Packer - Original Message - From: Douglas Douglas [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 08, 2003 1:21 PM Subject: [PHP] How to remove only the last character? Good day. Is there any PHP function that removes only the last character of a string and returns the new string? I'm looking in the manual and I can't find anything. Until now I'm doing this: $var=substr($var,0,strlen($var)-1) Is this the most efficient way? Thanks. __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] config.ini question
Virtual Directory Support is set to disabled where in the config file do I set this to enabled? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: How to remove only the last character?
www.php.net/substr -- Regards. M.CHAILLAN Nicolas [EMAIL PROTECTED] www.WorldAKT.com Hébergement de sites internets. Douglas Douglas [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] Good day. Is there any PHP function that removes only the last character of a string and returns the new string? I'm looking in the manual and I can't find anything. Until now I'm doing this: $var=substr($var,0,strlen($var)-1) Is this the most efficient way? Thanks. __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Globals off and passing data
I'm working in a multitiered envoronment in development. I'd like to turn globals off, but I can't figure out how to pass data back and forth between machines. I'm sending data to a database machine using POST, and I can use the data once it gets there, but I can't seem to get anything back. At the moment I'm using a meta refresh statement to get back to the next page on the web server on the originating machine (would like something more elegant than this to go to the next page, but just getting some data back is first on my list). Does such a thing as a tutorial exist for this? TIA, Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to remove only the last character?
I want to thank you Ian, Zydox and Nicos. After Zydox response I checked the manual again and read this part in the substr function: If length is given and is negative, then that many characters will be omitted from the end of string (after the start position has been calculated when a start is negative) Sorry to bother you guys, and thanks again. __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] pg_connect $B$,;H$($J$$(B
$B;O$a$^$7$F!#(Blin $B$H?=$7$^$9!#(B (B (Bphp$B$N(Bpg_connect$B$G(BpostgreSQL $B$K@\B3$r;n$_$^$7$?$,!"4X?t$,(B $B8+$D$+$j$^$;$s$H%(%i!<$,=P$F$7$^$$$^$7$?!#F1MM$J8=>]$,Ax(B $B6x$7$?J}$,$$$?$h$&$G$9$,!"4N?4$J2r7hJ}K!$O8+$D$+$j$^$;$s(B $B$G$7$?!#$I$J$?$+$,2r7hJ}K!$r$4B8CN$G$7$?$i!"CN7C$r$*B_$7(B $B$/$@$5$$!#(B (B (B (B (B (B__ (BDo You Yahoo!? (BYahoo! BB is Broadband by Yahoo! (Bhttp://bb.yahoo.co.jp/ (B (B (B-- (BPHP General Mailing List (http://www.php.net/) (BTo unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Globals off and passing data
On Sunday 09 February 2003 06:32, Paul wrote: I'm working in a multitiered envoronment in development. I'd like to turn globals off, but I can't figure out how to pass data back and forth between machines. I'm sending data to a database machine using POST, and I can use the data once it gets there, but I can't seem to get anything back. At the moment I'm using a meta refresh statement to get back to the next page on the web server on the originating machine (would like something more elegant than this to go to the next page, but just getting some data back is first on my list). Does such a thing as a tutorial exist for this? Perhaps you could elaborate on what your setup is and what you're doing. For example, what do you mean by sending data to a database machine using POST? The usual method of accessing a remote database does not involve the use of POST. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* What this country needs is a good five dollar plasma weapon. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Globals off and passing data
I'm opening a socket to the remote machine and using post to send the data. But please enlighten me, what is the usual method of accessing a remote database? Jason Wong wrote: On Sunday 09 February 2003 06:32, Paul wrote: I'm working in a multitiered envoronment in development. I'd like to turn globals off, but I can't figure out how to pass data back and forth between machines. I'm sending data to a database machine using POST, and I can use the data once it gets there, but I can't seem to get anything back. At the moment I'm using a meta refresh statement to get back to the next page on the web server on the originating machine (would like something more elegant than this to go to the next page, but just getting some data back is first on my list). Does such a thing as a tutorial exist for this? Perhaps you could elaborate on what your setup is and what you're doing. For example, what do you mean by sending data to a database machine using POST? The usual method of accessing a remote database does not involve the use of POST. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 8 Feb 2003 15:01:27 -0000 Issue 1871
php-general Digest 8 Feb 2003 15:01:27 - Issue 1871 Topics (messages 134845 through 134872): Re: delete query doesnt work 134845 by: Hardik Doshi Re: strip slashes from variable content 134846 by: Hardik Doshi Re: mail() vs sockets 134847 by: Jason Wong 134852 by: Jeff Busby PHP 4.3.0 safe_mode 134848 by: Devin Re: delete query doesnt work (fixed) 134849 by: Chris Shiflett Array sorting 134850 by: Zydox 134856 by: Philip Hallstrom Re: Strings and regular expression? 134851 by: John W. Holmes Re: ImageJPEG? 134853 by: Jason Wong Permenant Page Generation 134854 by: Mecca 134855 by: Mecca 134857 by: John W. Holmes Re: Need To Find A php Person 134858 by: Jean-Christian Imbeault Re: mysql auto increment question 134859 by: Justin Garrett Re: GD Chinese support - php4.3 134860 by: Eddy-Das Re: Dynamic input fields in Form 134861 by: Frank Keessen Re: Multi-User phpMyAdmin 134862 by: MIKE YRABEDRA Re: Vars in URL 134863 by: Justin French How to remove only the last character? 134864 by: Douglas Douglas 134865 by: Ian Packer 134867 by: nicos.php.net 134869 by: Douglas Douglas config.ini question 134866 by: RoyW Globals off and passing data 134868 by: Paul 134871 by: Jason Wong 134872 by: Paul pg_connect $B$,;H$($J$$(B 134870 by: $BNS(B $B7C72(B 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--- Hi, I think you are facing problem with variable delete. Make sure your Php.ini settings for global off. Check value of variable is coming on the form or not. In case of your update, i think you forget to put where part. For example: mysql_query(update table_name set varible_name='$variable_name' WHERE key_name = '$key_variable') or die(mysql_error()); May be it will help u Hardik --- Sunfire [EMAIL PROTECTED] wrote: i have a delete query: mysql_query(delete from members where company='$delete'); it doesnt work should i change it to : mysql_query(delete from members where company like '$delete');?? the first one worked in mysql client but it doesnt work in php script for some reason... also having problems with update... if nothing on the form changes and it gets submitted anyways all the records in the db gets changed to the same thing that one record has in it... --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com ---End Message--- ---BeginMessage--- Ok i got your problem. First of all check php.ini settings for magic_gpc_quotes. If it is on then turn it off. I guess that the only problem you have. If you want to make it turn it on then you have to use stripslashes function. thanks Hardik --- Jason Wong [EMAIL PROTECTED] wrote: On Saturday 08 February 2003 09:51, Sunfire wrote: hi.. i have a hidden variable and when its submitted to another script it has the value of \\\... anybody know how to get the \ out of it? Search www.php.net for strip slash. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* The first rule of magic is simple. Don't waste your time waving your hands and hoping when a rock or a club will do. -- McCloctnik the Lucid */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com ---End Message--- ---BeginMessage--- On Saturday 08 February 2003 06:39, Jeff Busby wrote: Sorry, every time I posted I got an auto reply saying it had an attatchment and it wasn't sent...and I had to post again. The only way it worked was for me to reply to another post and change the subject and message. Didn't mean to annoy anyone with multiple posts. 1) Don't attach attachments, most mailing lists strip them out. 2) Don't start a new post by replying to an old one. 3) Search
Re: [PHP] Globals off and passing data
On Sunday 09 February 2003 07:59, Paul wrote: I'm opening a socket to the remote machine and using post to send the data. But please enlighten me, what is the usual method of accessing a remote database? One usually use stuff like mysql_connect() and friends to connect to databases. If you're using 'post' (as in HTTP POST) then aren't you in fact accessing a webserver which returns data from a database as opposed to accessing the database directly? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* If it heals good, say it. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Single vs. Multiple DBs || Which way to go?
Hey all. I'm attempting to organize a sport report site into working order. We've got approximately 100 tables, and I'm unsure whether to break the info up by sport (i.e. baseball, basketball, hockey, etc.) or to lump all the tables in one db and prefix tables by their sport name (e.g. bk_scoring = basketball scoring table). On the surface, it would seem easier to use multiple dbs, but then again, common tables, such as schools and coach_info would have to be duplicated in each db. Any ideas/suggestions much appreciated, --Noah -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Single vs. Multiple DBs || Which way to go?
I'm attempting to organize a sport report site into working order. We've got approximately 100 tables, and I'm unsure whether to break the info up by sport (i.e. baseball, basketball, hockey, etc.) or to lump all the tables in one db and prefix tables by their sport name (e.g. bk_scoring = basketball scoring table). How about just a scoring table that has a column on whether it's Basketball, Hockey, Basket-Weaving, etc? How similar are the scoring tables between sports? If the tables for each sport are the same, then keep them in one database and just have identifiers in the table that say what sport it's for. Do you normally run queries that combine sports? Or is it something like if a user is in the basketball area, then all of the queries will pull basketball related data? On the surface, it would seem easier to use multiple dbs, but then again, common tables, such as schools and coach_info would have to be duplicated in each db. That's not a good idea... ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Single vs. Multiple DBs || Which way to go?
Hey John. Thanks for the candid reply -- basket weaving ;--) Re: scoring, yes, you're right, queries are sport dependent; i.e. if you're in the basketball section, basketball queries are run... At this point in my development experience, creating an all sport scoring table is stretching it a bit. Based on a hockey report I created a few months ago, I understand how to create functional, albeit crude, single sport interfaces. Given the limited time frame I'm working with, using the single sport model is preferred -- because I've yet to learn the alternatives! In any case, the multi-db model is out of the picture for now. I'll just have to alias the table names and do the best I can to organize the table structure in a sensible manner. If you have any brainstorms about how to work with a multi-sport interface in a single db, let me know. I'm not looking forward to sifting through a 100 tables.. Thanks, --Noah - Original Message - From: John W. Holmes [EMAIL PROTECTED] To: 'CF High' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, February 08, 2003 7:32 AM Subject: RE: [PHP] Single vs. Multiple DBs || Which way to go? I'm attempting to organize a sport report site into working order. We've got approximately 100 tables, and I'm unsure whether to break the info up by sport (i.e. baseball, basketball, hockey, etc.) or to lump all the tables in one db and prefix tables by their sport name (e.g. bk_scoring = basketball scoring table). How about just a scoring table that has a column on whether it's Basketball, Hockey, Basket-Weaving, etc? How similar are the scoring tables between sports? If the tables for each sport are the same, then keep them in one database and just have identifiers in the table that say what sport it's for. Do you normally run queries that combine sports? Or is it something like if a user is in the basketball area, then all of the queries will pull basketball related data? On the surface, it would seem easier to use multiple dbs, but then again, common tables, such as schools and coach_info would have to be duplicated in each db. That's not a good idea... ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] need help with preg_match
Hi I have to alter this code: ?php $fp = fopen ('http://www.whatever.ee/', 'r'); for ($src = ''; !feof ($fp); $src .= fgets ($fp, 1024)); fclose ($fp); if (preg_match ('/\font color=black\([^]*)\\/font/i', $src, $matches)) echo'Match: b'.$matches[1].'/b'; else echo'No match !'; ? It extracts the data (words) from www.whatever.com between font=black and /font. It works well if the source looks something like this: font=blacktext/font (it echos text) but i am having some serious problems when the source looks like thistablefont=blacktrtext/tr/font/table. It wont do anything if it is supposed to echo html. but i need html! Could somebody help me change the script so that it can extract html as well? If you can, mail me at [EMAIL PROTECTED] or just reply here Thank You! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Permenant Page Generation
I would like to create two pages using the fwrite() and fopen() variables...btw I am a newbie: One form page to enter information. I've done that and used the same format as a typical html page. method=post action=submit.php I want the second page to show the information was submitted and have the information create a permenant html page named after one of the text areas on the page. I guess this will lead to three pages because i will have a template set up for the created page to look like the pages that have already been created by static html. In effect...the user will physically upload a file to an intranet server. Next go to the form page and add the information on the file they just submitted to the server. Once that information is added and the submit button is pressed, it will trigger a html page to be created with the info submitted. Help!
[PHP] Problems with SQL queries in PHP script
Hello, I am running into an issue where when a user inputs an apostrophie ' into the textarea section of my form, it will generate an error in the SQL statement. I have narrowed down the issue to this snippet of code: $insertQuery = INSERT INTO changeLog(vendorNumber, newVendorNumber, oldName, newName, changedBy, dateChanged, comments) VALUES('$vendorNumber','$newVendorNumber','$oldName','$newName','$changedBy' ,'$dateChanged','$comments'); The thing that is causing this issue is the use of apostrophies to designate my variables in the SQL query. How do I rewrite this to avoid this issue? Thanks, Mike Hilty -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Permenant Page Generation
I would like to create two pages using the fwrite() and fopen() variables...btw I am a newbie I don't know where to start: One form page to enter information. I've done that and used the same format as a typical html page. method=post action=submit.php I want the second page to show the information was submitted and have the information create a permenant html page named after one of the text areas on the page. I guess this will lead to three pages because i will have a template set up for the created page to look like the pages that have already been created by static html. In effect...the user will physically upload a file to an intranet server. Next go to the form page and add the information on the file they just submitted to the server. Once that information is added and the submit button is pressed, it will trigger a html page to be created with the info submitted. Help! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Problems with SQL queries in PHP script
http://www.php.net/manual/en/function.addslashes.php Justin Garrett Mike Hilty [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, I am running into an issue where when a user inputs an apostrophie ' into the textarea section of my form, it will generate an error in the SQL statement. I have narrowed down the issue to this snippet of code: $insertQuery = INSERT INTO changeLog(vendorNumber, newVendorNumber, oldName, newName, changedBy, dateChanged, comments) VALUES('$vendorNumber','$newVendorNumber','$oldName','$newName','$changedBy' ,'$dateChanged','$comments'); The thing that is causing this issue is the use of apostrophies to designate my variables in the SQL query. How do I rewrite this to avoid this issue? Thanks, Mike Hilty -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Permenant Page Generation
Hello msmecca, I would suggest reading the PHP tutorials and then taking a look at the PHP manual. If you want to save and display the same page you can use output buffering to capture the html output of your script. If you are just starting with PHP I would recommend reading tutorials or getting a good PHP book like PHP MySQL Development, Programming PHP, or many others. You can find many PHP books on amazon.com or bn.com Jason On Sat, 2003-02-08 at 10:17, msmecca wrote: I would like to create two pages using the fwrite() and fopen() variables...btw I am a newbie I don't know where to start: One form page to enter information. I've done that and used the same format as a typical html page. method=post action=submit.php I want the second page to show the information was submitted and have the information create a permenant html page named after one of the text areas on the page. I guess this will lead to three pages because i will have a template set up for the created page to look like the pages that have already been created by static html. In effect...the user will physically upload a file to an intranet server. Next go to the form page and add the information on the file they just submitted to the server. Once that information is added and the submit button is pressed, it will trigger a html page to be created with the info submitted. 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] Attaining NTLM information from IE browsers.
I know this is in the archives, but I couldnt seem to find the answer I needed. I am running redhat8, apache 2.0.44, and php 4.2.2. I am trying to write a script that will emulate the IIS server and request NTLM auth. from the browser. And then decode the base64? information and compate the user information against a ldap function that connects to a active directory server. I know that you must modify the header with the header() command. I have done that, and the most I get in one line of information back from the browser. There is suppose to be three lines of encoded information sent back. If anyone has any code or knows the complete hand shake or anything really, I would really like the help. This is a really big project at my company, and they are considering moving to a linux platform and even PHP. But if I can't make the same stuff work that their w2k cold fusion platform does. It's not going to work so well. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Downloading File rather then Executing
Got a problem. For some reason, when I try to view a PHP file on my server, it wants to download the file rather then open and execute. I have no control over my server so what should I do? Here's a sample URL: http://d2mods.xfernet.com/filecenter/team.php Please help! I'm not sending any header() commands so why is it doing this?
[PHP] html tags
Hi everyone, A quick question about html tags and PHP. I have a text area where users can submit text, and I need them to able to have links in the text if they so choose. The contents get written to an ini style flat file database. The problem comes when I try to print that content back out from the file - I get a warning from the parse_ini_file() function: Warning: Error parsing ./data/events on line 9 in Unknown on line 0 Line 9 happens to be the line in the events file that contains the a href tag. I have tried to do a base64_encode() on the data from the text area, and then wrote it to the ini file encapsulated in double quotes. It still fails when I do the base64_decode(), except then I get nothing printed back to the browser. Any ideas? -Erich- ===CODE // Get the form variables $month = $_REQUEST['month']; $day = $_REQUEST['day']; $year = $_REQUEST['year']; $time = $_REQUEST['time']; $bands = $_REQUEST['bands']; $venue = $_REQUEST['venue']; $description = base64_encode($_REQUEST['description']); list_events() { $ALLEVENTS = parse_ini_file('./data/events', TRUE); while (list ($key, $value) = each ($ALLEVENTS)) { print 'br'; print 'table border=0 cellpadding=0 cellspacing=0 width=100% tr td bgcolor=#AA align=left font color=black size=2 Saje, Live at '.stripslashes($value['venue']). '/font /td td bgcolor=#AA align=right font color=black size=2'. $value['month'].'/'.$value['day'].'/'.$value['year'].'/font /td /tr tr td colspan=2 font color=#efa68aWith: '.stripslashes($value['bands']).'/fontbr brfont color=white'.base64_decode($value['description']). '/font/td /tr /table'; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Downloading File rather then Executing
On Sunday 09 February 2003 02:46, Stephen Craton wrote: Got a problem. For some reason, when I try to view a PHP file on my server, it wants to download the file rather then open and execute. I have no control over my server so what should I do? Here's a sample URL: http://d2mods.xfernet.com/filecenter/team.php Please help! I'm not sending any header() commands so why is it doing this? Does this happen for that particular file or for all files? If the latter then take it up with whomever has control over your server. If the former then post your code. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Our country has plenty of good five-cent cigars, but the trouble is they charge fifteen cents for them. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Downloading File rather then Executing
It happens for all the files on the server. Some other subdomains had the same problem but somehow they had fixed it by changing their username and passwords. Another file is this : http://d2mods.xfernet.com/test.php All it has on it is ?php phpinfo(); ? - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 08, 2003 1:51 PM Subject: Re: [PHP] Downloading File rather then Executing On Sunday 09 February 2003 02:46, Stephen Craton wrote: Got a problem. For some reason, when I try to view a PHP file on my server, it wants to download the file rather then open and execute. I have no control over my server so what should I do? Here's a sample URL: http://d2mods.xfernet.com/filecenter/team.php Please help! I'm not sending any header() commands so why is it doing this? Does this happen for that particular file or for all files? If the latter then take it up with whomever has control over your server. If the former then post your code. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Our country has plenty of good five-cent cigars, but the trouble is they charge fifteen cents for them. */ -- 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] Attaining NTLM information from IE browsers.
There is actually an NTLM Auth module available for Apache. (http://modntlm.sourceforge.net/). If you really need to do it though PHP I'd suggest running a packet sniffer to see what headers IIS sends and what to expect back from IE. HTH Danny Shepherd. - Original Message - From: Marriner, Bruce W. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 08, 2003 6:39 PM Subject: [PHP] Attaining NTLM information from IE browsers. I know this is in the archives, but I couldnt seem to find the answer I needed. I am running redhat8, apache 2.0.44, and php 4.2.2. I am trying to write a script that will emulate the IIS server and request NTLM auth. from the browser. And then decode the base64? information and compate the user information against a ldap function that connects to a active directory server. I know that you must modify the header with the header() command. I have done that, and the most I get in one line of information back from the browser. There is suppose to be three lines of encoded information sent back. If anyone has any code or knows the complete hand shake or anything really, I would really like the help. This is a really big project at my company, and they are considering moving to a linux platform and even PHP. But if I can't make the same stuff work that their w2k cold fusion platform does. It's not going to work so well. -- 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] problems with 'exec' in 4.3
I'm having problems with the exec command since upgrading to 4.3. Code that previously worked now doesn't. I'm using IIS5 and have checked in the php.ini file to make sure that safe mode is off. Is there anything else that I should check? Thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Another Prob: MySQL Passwords
It's me again, trying to get some more help. My boss is hosting sites now for games and I need some help with setting up phpMyAdmin privelages for certain MySQL users and such. Right now, my problem is setting up a new MySQL username and password. I add a new user in phpMyAdmin, I type in the details, everything is fine. When I go to test the connection with those connection details, I get this error: (I copied and pasted the username and password so they are the same for both the script and when I entered them into phpMyAdmin.) Access denied for user: 'd2sector@localhost' (Using password: YES) My code is as follows: ?php if(@mysql_connect('localhost', 'd2sector', '**Edited Out**')) { header(Location: index.php); } else { echo 'font color=redUnable to connect to database. Error as follows:/fontbr'.mysql_error(); } ? Does anyone have a clue as to why this happens and how to fix it? I'll need to know how to fix this for future users as well. Thanks in advanced. Thanks, Stephen Craton http://www.melchior.us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Alternating Row Colors in PHP........
Hey all. I'm coming from Cold Fusion to PHP; in CF I could alternate rows with the following: tr bgcolor=###Iif(((CurrentRow MOD 2) is 0),de('FF'),de('EE'))# Any ideas how to do this in PHP? Thanks for clues, --Noah -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Alternating Row Colors in PHP........
Pop this in your loop $bgcolor = ($i++ % 2) ? '#FF' : '#EE'; echo tr bgcolor=\$bgcolor\; olinux --- CF High [EMAIL PROTECTED] wrote: Hey all. I'm coming from Cold Fusion to PHP; in CF I could alternate rows with the following: tr bgcolor=###Iif(((CurrentRow MOD 2) is 0),de('FF'),de('EE'))# Any ideas how to do this in PHP? Thanks for clues, --Noah -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Alternating Row Colors in PHP........
At 00:25 9-2-2003, you wrote: Hey all. I'm coming from Cold Fusion to PHP; in CF I could alternate rows with the following: tr bgcolor=###Iif(((CurrentRow MOD 2) is 0),de('FF'),de('EE'))# Any ideas how to do this in PHP? one way would be: ?PHP $color_toggle=true; $color1='red'; $color2='white'; $output=table border=1; for ($i=0;$i10;$i++) //or any other way to walk through results { $output.= 'TR bgcolor='.(($color_toggle)?$color1:$color2).'td'.$i.' Make love not war/td/tr'; $color_toggle=!$color_toggle; } $output.=/table; echo $output; - or shorter: $color_toggle=false; echo('table border=1'); for ($i=0;$i10;$i++) { echo('TR bgcolor='.(($color_toggle=!$color_toggle)?'red':'white').'td'.$i.' Leve de SP/td/tr'); } echo('/table'); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem When Linking Array Element To Itself
Hello, I have an array called $array_of_files. I want to echo each element of that array as a link to itself. That way when I click on an element I can send it as an actual value Here's my code: for ($counter = 0; $counter count($array_of_files); $counter++) { $category = $array_of_files[$counter]; echo a href='$category'$category/abr; } exit; } Here's an example of the variable $category before I place it in the a href: /usr/local/plesk/apache/vhosts/myserver.com/httpdocs/php/categories/links1.txt Once I place the variable $category inside the a href statement it looks like this: http://www.myserver.com/usr/local/plesk/apache/vhosts/myserver.com/httpdocs/php/categories/links1.txt Why is it the a href adds 'http://www.myserver.com' to the front of the value of $category? I worked around this by placing '?file=$category' in the echo statement above. Just wondered if anyone had any better way to do this... Thanks in advance, Roger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] need help with preg_match
At 17:21 8-2-2003, you wrote: Hi I have to alter this code: ?php $fp = fopen ('http://www.whatever.ee/', 'r'); for ($src = ''; !feof ($fp); $src .= fgets ($fp, 1024)); fclose ($fp); if (preg_match ('/\font color=black\([^]*)\\/font/i', $src, $matches)) echo'Match: b'.$matches[1].'/b'; else echo'No match !'; ? It extracts the data (words) from www.whatever.com between font=black and /font. It works well if the source looks something like this: font=blacktext/font (it echos text) but i am having some serious problems when the source looks like thistablefont=blacktrtext/tr/font/table. It wont do anything if it is supposed to echo html. but i need html! Could somebody help me change the script so that it can extract html as well? If you can, mail me at [EMAIL PROTECTED] or just reply here Thank You! anyway. this did what you asked for. ?PHP $src='tablefont color=blacktrtext/tr/font/table.'; $pattern='/\font color=black\(.*)\\/font/i'; if (preg_match ($pattern, $src, $matches)) echo'Match: b'.htmlspecialchars($matches[0]).'/b'; else echo'No match !'; ? note that i show the output with htmlspecialchars() so you can actually see the tag while testing also note that i replaced your [^]* with .* -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Alternating Row Colors in PHP........
Thanks olinux. Just what I was looking for -- I'll check it out. -Noah - Original Message - From: olinux [EMAIL PROTECTED] To: CF High [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, February 08, 2003 12:45 PM Subject: Re: [PHP] Alternating Row Colors in PHP Pop this in your loop $bgcolor = ($i++ % 2) ? '#FF' : '#EE'; echo tr bgcolor=\$bgcolor\; olinux --- CF High [EMAIL PROTECTED] wrote: Hey all. I'm coming from Cold Fusion to PHP; in CF I could alternate rows with the following: tr bgcolor=###Iif(((CurrentRow MOD 2) is 0),de('FF'),de('EE'))# Any ideas how to do this in PHP? Thanks for clues, --Noah -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem When Linking Array Element To Itself
I have an array called $array_of_files. I want to echo each element of that array as a link to itself. That way when I click on an element I can send it as an actual value /usr/local/plesk/apache/vhosts/myserver.com/httpdocs/php/categories/links1.txt Once I place the variable $category inside the a href statement it looks like this: http://www.myserver.com/usr/local/plesk/apache/vhosts/myserver.com/httpdocs/php/categories/links1.txt Why is it the a href adds 'http://www.myserver.com' to the front of the value of $category? It is the browser trying to help by completing what it sees as a relative link. I worked around this by placing '?file=$category' in the echo statement above. Just wondered if anyone had any better way to do this... Looks like an excellent way. Other ways might include making associated arrays but i see no reason to do it differently. By the way, i don't know what you do with the rest of the code but what happens if some joker links to '?file=etc/passwd' ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Output yyyymmdd formatted date || 20030131 to FridayJanuary 31, 2003
Sorry for the frequent simple posts... I've been storing my dates in mmdd format (apparently this is a bad idea). In any case, I need to display this date format as [day name month name day #, year] e.g. Friday January 31, 2003. Any ideas? Thanks for any leads, --Noah -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Output yyyymmdd formatted date || 20030131 to FridayJanuary 31, 2003
the real question here is are you storing your dates in a file or database. If in a database (say MySQL), you can use the native DATE_FORMAT function of MySQL to pull the date out in the proper format. Otherwise, have a look at http://www.php.net/date Quoting CF High [EMAIL PROTECTED]: Sorry for the frequent simple posts... I've been storing my dates in mmdd format (apparently this is a bad idea). In any case, I need to display this date format as [day name month name day #, year] e.g. Friday January 31, 2003. Any ideas? Thanks for any leads, --Noah -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php === Michael Geier CDM Sports, Inc. Systems Administration email: [EMAIL PROTECTED] phone: 314.692.3540 --- This email sent using CDM Sports Webmail v3.1 [ http://webmail.cdmsports.com ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Output yyyymmdd formatted date || 20030131 to FridayJanuary 31, 2003
Hey Michael. The dates are stored in a MySql db. I checked out the MySql DATE_FORMAT function -- pretty cool. However, pardon my ignorance here, how can I do date comparisons? For example, if I want to retrieve records from the db where the date is between say, 2003-02-01 and 2003-02-07, will MySql be able to compare the strings? I stored my dates as integer fields to do such a comparison, but it looks like I need to graduate to MySql date time functions.. --Noah - Original Message - From: Michael Geier [EMAIL PROTECTED] To: CF High [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, February 08, 2003 1:31 PM Subject: Re: [PHP] Output mmdd formatted date || 20030131 to FridayJanuary 31, 2003 the real question here is are you storing your dates in a file or database. If in a database (say MySQL), you can use the native DATE_FORMAT function of MySQL to pull the date out in the proper format. Otherwise, have a look at http://www.php.net/date Quoting CF High [EMAIL PROTECTED]: Sorry for the frequent simple posts... I've been storing my dates in mmdd format (apparently this is a bad idea). In any case, I need to display this date format as [day name month name day #, year] e.g. Friday January 31, 2003. Any ideas? Thanks for any leads, --Noah -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php === Michael Geier CDM Sports, Inc. Systems Administration email: [EMAIL PROTECTED] phone: 314.692.3540 --- This email sent using CDM Sports Webmail v3.1 [ http://webmail.cdmsports.com ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] returning results of cURL POST
I'm using cURL to POST form fields to a PHP script on a different server that does a database insertion. I know the POST is working, because the values are being inserted into the database. But I want to return results from the remote server so I can tell if the insert was *not* done. Here's the relevant part of the sending script: $ch = curl_init(); $remote_url = http://www.whatever.com/scriptname.php;; curl_setopt ($ch, CURLOPT_URL, $remote_url); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_POST, 1); curl_setopt ($ch, CURLOPT_POSTFIELDS, $field_values); ob_start(); curl_exec ($ch); curl_close ($ch); $curl_results = ob_get_contents(); ob_end_clean(); // check cURL results if ((trim($curl_results) != 1) || (trim($curl_results) != 0)) { // maybe nothing returned, bail out echo(pCan't confirm results of attempt to add to database!/p\n); exit; } Here are the relevant parts of the receiving script: // return notice if connection fails if (!$db_connection) { echo 0; exit; } ... // return notice if database insert fails if (!$db_connection-execute($insert_sql)) { echo 0; exit; } else { echo 1; } The receiving script doesn't display anything and should only echo as shown above. I don't get how to return success or failure from the receiving script. The information I've been able to find on cURL doesn't clarify this. Can anyone shed some light? Thanks. -- Lowell Allen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] need help with preg_match
Thank You very much! It Really works the way I want it to. But i still have a slight problem. The script cant read the data if it is on several rows. For example: table font color=black trtext/tr /font /table Is there a way to fix this problem? Thank You! Chris Hayes [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... At 17:21 8-2-2003, you wrote: Hi I have to alter this code: ?php $fp = fopen ('http://www.whatever.ee/', 'r'); for ($src = ''; !feof ($fp); $src .= fgets ($fp, 1024)); fclose ($fp); if (preg_match ('/\font color=black\([^]*)\\/font/i', $src, $matches)) echo'Match: b'.$matches[1].'/b'; else echo'No match !'; ? It extracts the data (words) from www.whatever.com between font=black and /font. It works well if the source looks something like this: font=blacktext/font (it echos text) but i am having some serious problems when the source looks like thistablefont=blacktrtext/tr/font/table. It wont do anything if it is supposed to echo html. but i need html! Could somebody help me change the script so that it can extract html as well? If you can, mail me at [EMAIL PROTECTED] or just reply here Thank You! anyway. this did what you asked for. ?PHP $src='tablefont color=blacktrtext/tr/font/table.'; $pattern='/\font color=black\(.*)\\/font/i'; if (preg_match ($pattern, $src, $matches)) echo'Match: b'.htmlspecialchars($matches[0]).'/b'; else echo'No match !'; ? note that i show the output with htmlspecialchars() so you can actually see the tag while testing also note that i replaced your [^]* with .* -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 3 tier web development
I use Smarty for seperate PHP logic and template logic. For database abstraction, I use AdoDB. Not much a fan of Pear Adodb was pretty faithful when I ported my MySQL app to PostGreSQL. Hardik Doshi [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Ok so for seperating interface and PHP code, smarty templace engine is the best right? What about database abstraction layer? thanks for your information. I really appreciate that. Hardik --- John Wells [EMAIL PROTECTED] wrote: Hardik Doshi said: 1. How one can seperate HTML and PHP (or any other programming code). Is there anything in PHP so i can seperate Interface layer and programming logic layer? http://smarty.php.net __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] returning results of cURL POST
From: Lowell Allen [EMAIL PROTECTED] [snip] // check cURL results if ((trim($curl_results) != 1) || (trim($curl_results) != 0)) { // maybe nothing returned, bail out echo(pCan't confirm results of attempt to add to database!/p\n); exit; } I knew I'd find a stupid mistake as soon as I posted the question. I was using a condition that could never be true, instead, I needed: if ((trim($curl_results) != 1) (trim($curl_results) != 0)) Sorry. -- Lowell Allen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] any windows php developers out here?
Hello, I am wondering if any of you got a reliable php and MySQL installation (MySQL is easy) I am mostly wondering if there is a point in tying to use windows as a development platform for PHP. I have a nice and working red hat 8.0 installation, but I did an upgrade from 7.3 and now apache doesn't work cuz it wants me to switch form apache 1.X to 2.X and all I want is to erase the old apache and use the new one or erase the new one and use the old one, whichever works. But anyway... I also do design and I have people submit me illustrator and Photoshop files and word docs, so for now I might have to stick to windows for work. BUT what do u suggest? I it futile to try to get php to work in windows? With IIS preferably so that I can play with ASP and Cold Fusion once in a while. Please help if you are using windows with php and send me some instructions if you feel like it, much appreciated. - Vic __ Post your free ad now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] any windows php developers out here?
Hello, I am wondering if any of you got a reliable php and MySQL installation (MySQL is easy) I am mostly wondering if there is a point in tying to use windows as a development platform for PHP. I have a nice and working red hat 8.0 installation, but I did an upgrade from 7.3 and now apache doesn't work cuz it wants me to switch form apache 1.X to 2.X and all I want is to erase the old apache and use the new one or erase the new one and use the old one, whichever works. But anyway... I also do design and I have people submit me illustrator and Photoshop files and word docs, so for now I might have to stick to windows for work. BUT what do u suggest? I it futile to try to get php to work in windows? With IIS preferably so that I can play with ASP and Cold Fusion once in a while. Please help if you are using windows with php and send me some instructions if you feel like it, much appreciated. I've got PHP and IIS running on a production server and several development servers with no issues. It takes all of 5 minutes to get installed. Do you at least have IIS running yet? It's only a couple steps after that, most of which are outlined in the manual. Contact me off list if you want more help and let me know what point you're at right now. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] any windows php developers out here?
You can install PHP + Apache 1.3 on Windows pretty easily. There are instructions in the manual at http://www.php.net/manual and there are also pre-constructed installers that other people make (try www.hotscripts.com/PHP under applications). If you just need to get apache 1.3 installed on redhat you just need to either disable apache 2 or install apache 1.3 and make it listen on a different port (8080 or something). You can have both installed if you configure them with a --prefix, something like ./configure --prefix=/usr/local/apache13 Jason On Sat, 2003-02-08 at 16:13, Victor wrote: Hello, I am wondering if any of you got a reliable php and MySQL installation (MySQL is easy) I am mostly wondering if there is a point in tying to use windows as a development platform for PHP. I have a nice and working red hat 8.0 installation, but I did an upgrade from 7.3 and now apache doesn't work cuz it wants me to switch form apache 1.X to 2.X and all I want is to erase the old apache and use the new one or erase the new one and use the old one, whichever works. But anyway... I also do design and I have people submit me illustrator and Photoshop files and word docs, so for now I might have to stick to windows for work. BUT what do u suggest? I it futile to try to get php to work in windows? With IIS preferably so that I can play with ASP and Cold Fusion once in a while. Please help if you are using windows with php and send me some instructions if you feel like it, much appreciated. - Vic __ Post your free ad now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] need help with preg_match
Thank You very much! It Really works the way I want it to. But i still have a slight problem. The script cant read the data if it is on several rows. For example: table font color=black trtext/tr /font /table Is there a way to fix this problem? http://www.php.net/manual/en/pcre.pattern.modifiers.php In particular, look at the 's' modifier. Also, if your matching (.*) between your font elements, you will probably want to use the 'U' modifier, also, if there can be more than one pattern on the page. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Output yyyymmdd formatted date || 20030131 to FridayJanuary 31, 2003
The dates are stored in a MySql db. I checked out the MySql DATE_FORMAT function -- pretty cool. However, pardon my ignorance here, how can I do date comparisons? For example, if I want to retrieve records from the db where the date is between say, 2003-02-01 and 2003-02-07, will MySql be able to compare the strings? I stored my dates as integer fields to do such a comparison, but it looks like I need to graduate to MySql date time functions.. If you've done it correctly and stored your dates in a MySQL DATE, DATETIME, or TIMESTAMP column, then you can do something like this: SELECT * FROM table WHERE yourdate BETWEEN 20030201 AND 20030207 If you're storing them in an INT column, then change it over to one of the above. Go back to the manual and read about date_sub() and date_add() in MySQL for further date manipulation... ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Permenant Page Generation
I would like to create two pages using the fwrite() and fopen() variables...btw I am a newbie: One form page to enter information. I've done that and used the same format as a typical html page. method=post action=submit.php I want the second page to show the information was submitted and have the information create a permenant html page named after one of the text areas on the page. I guess this will lead to three pages because i will have a template set up for the created page to look like the pages that have already been created by static html. In effect...the user will physically upload a file to an intranet server. Next go to the form page and add the information on the file they just submitted to the server. Once that information is added and the submit button is pressed, it will trigger a html page to be created with the info submitted. Help! Assuming $_POST['text'] would contain what is in your text area, writing it to a page is as simple as this: $fp = fopen('filename.html','w'); $fwrite($fp,$_POST['text']); fclose($fp); How easy is that? Have you even read the manual pages on fopen() or fwrite()?? ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] question about quote and double-quoted strings
Hi, i am just adding some mail() functions to my script and had to realize, that this: $email_from = 'From: [EMAIL PROTECTED]\r\nReply-To: [EMAIL PROTECTED]\r\n'; mail($_POST['email'],'Your account details','You can login with your account details\r\nusername: '.$_POST['username'].'\npassword: '.$_POST['password'].'\n\nhere: http:///index.php',$email_from); will make the email include the \r\n instead of adding a line feed, but this works just fine: $email_from = From: [EMAIL PROTECTED]\r\nReply-To: [EMAIL PROTECTED]\r\n; mail($_POST['email'],'Your account details',You can login with your account details\r\nusername: .$_POST['username'].\npassword: .$_POST['password'].\n\nhere: http:///index.php,$email_from); Why is there this difference in the normal- double-quoted string, i though it would only affect included variables, where one shows them and the other would need them to be added via '.' ? ...just curious :) Regards, Duncan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Test
Just checking to see if there's a problem with the list, or my STMP server. -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: question about quote and double-quoted strings
http://www.php.net/manual/en/language.types.string.php Just the way ' and are defined. understands more escape sequences then '. Justin Garrett Duncan [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, i am just adding some mail() functions to my script and had to realize, that this: $email_from = 'From: [EMAIL PROTECTED]\r\nReply-To: [EMAIL PROTECTED]\r\n'; mail($_POST['email'],'Your account details','You can login with your account details\r\nusername: '.$_POST['username'].'\npassword: '.$_POST['password'].'\n\nhere: http:///index.php',$email_from); will make the email include the \r\n instead of adding a line feed, but this works just fine: $email_from = From: [EMAIL PROTECTED]\r\nReply-To: [EMAIL PROTECTED]\r\n; mail($_POST['email'],'Your account details',You can login with your account details\r\nusername: .$_POST['username'].\npassword: .$_POST['password'].\n\nhere: http:///index.php,$email_from); Why is there this difference in the normal- double-quoted string, i though it would only affect included variables, where one shows them and the other would need them to be added via '.' ? ...just curious :) Regards, Duncan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MIME Decoding Class
I'm looking through Google for MIME decoding classes, one developed by Richard Heyes used in Pear and a few others. What I'm curious is how complete are these classes or if there is one you recommend that completely decodes emails from Outlook, Hotmail, Eudora, etc. based emails. I've looked at solutions written in C and they are about 800 KB source code in size compared to classes written in apps like Squirrel Mail which is 90KB. Does anyone know of any complete decoding classes in PHP either free or commercial. Command line are also fine. If there are C, C++, or C# libraries, those are okay as well if you know of any. I just couldn't come across any that are well coded to perform the task of complete MIME decoding. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] any windows php developers out here?
I got IIS working fine, and I did I think, the steps in the php ISAPI instaltion manual. I think. .. but when I call the php page, it tries to download it, as far as I know that is a sign that is doesn't know how to handle that file, whicth means that my instaltion is not that great. So I guess I al looking to finding out what I need to configure IIS to to get the ISAPI module to work, etc. -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 08, 2003 6:27 PM To: 'Victor'; [EMAIL PROTECTED] Subject: RE: [PHP] any windows php developers out here? Hello, I am wondering if any of you got a reliable php and MySQL installation (MySQL is easy) I am mostly wondering if there is a point in tying to use windows as a development platform for PHP. I have a nice and working red hat 8.0 installation, but I did an upgrade from 7.3 and now apache doesn't work cuz it wants me to switch form apache 1.X to 2.X and all I want is to erase the old apache and use the new one or erase the new one and use the old one, whichever works. But anyway... I also do design and I have people submit me illustrator and Photoshop files and word docs, so for now I might have to stick to windows for work. BUT what do u suggest? I it futile to try to get php to work in windows? With IIS preferably so that I can play with ASP and Cold Fusion once in a while. Please help if you are using windows with php and send me some instructions if you feel like it, much appreciated. I've got PHP and IIS running on a production server and several development servers with no issues. It takes all of 5 minutes to get installed. Do you at least have IIS running yet? It's only a couple steps after that, most of which are outlined in the manual. Contact me off list if you want more help and let me know what point you're at right now. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ __ Post your free ad now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] any windows php developers out here?
How do I disable apache 2.0? -Original Message- From: Jason Sheets [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 08, 2003 6:33 PM To: Victor Cc: [EMAIL PROTECTED] Subject: Re: [PHP] any windows php developers out here? You can install PHP + Apache 1.3 on Windows pretty easily. There are instructions in the manual at http://www.php.net/manual and there are also pre-constructed installers that other people make (try www.hotscripts.com/PHP under applications). If you just need to get apache 1.3 installed on redhat you just need to either disable apache 2 or install apache 1.3 and make it listen on a different port (8080 or something). You can have both installed if you configure them with a --prefix, something like ./configure --prefix=/usr/local/apache13 Jason On Sat, 2003-02-08 at 16:13, Victor wrote: Hello, I am wondering if any of you got a reliable php and MySQL installation (MySQL is easy) I am mostly wondering if there is a point in tying to use windows as a development platform for PHP. I have a nice and working red hat 8.0 installation, but I did an upgrade from 7.3 and now apache doesn't work cuz it wants me to switch form apache 1.X to 2.X and all I want is to erase the old apache and use the new one or erase the new one and use the old one, whichever works. But anyway... I also do design and I have people submit me illustrator and Photoshop files and word docs, so for now I might have to stick to windows for work. BUT what do u suggest? I it futile to try to get php to work in windows? With IIS preferably so that I can play with ASP and Cold Fusion once in a while. Please help if you are using windows with php and send me some instructions if you feel like it, much appreciated. - Vic __ Post your free ad now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Post your free ad now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Output yyyymmdd formatted date || 20030131 to FridayJanuary 31, 2003
Right. I've switched the date column from type INT to type DATE in our MySql db. The problem I've had with retrieving records in a certain date range with: SELECT * FROM table WHERE yourdate BETWEEN 20030201 AND 20030207 is getting the latter part of the expression; i.e. in this case 20030207 to be seven days older than the first part. This is where I need to use MySql's DATE_ADD, and other date manipulation functions.. Lots to learn; little time to do it. Thanks for feedback, John. --Noah - Original Message - From: John W. Holmes [EMAIL PROTECTED] To: 'Noah' [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, February 08, 2003 3:31 PM Subject: RE: [PHP] Output mmdd formatted date || 20030131 to FridayJanuary 31, 2003 The dates are stored in a MySql db. I checked out the MySql DATE_FORMAT function -- pretty cool. However, pardon my ignorance here, how can I do date comparisons? For example, if I want to retrieve records from the db where the date is between say, 2003-02-01 and 2003-02-07, will MySql be able to compare the strings? I stored my dates as integer fields to do such a comparison, but it looks like I need to graduate to MySql date time functions.. If you've done it correctly and stored your dates in a MySQL DATE, DATETIME, or TIMESTAMP column, then you can do something like this: SELECT * FROM table WHERE yourdate BETWEEN 20030201 AND 20030207 If you're storing them in an INT column, then change it over to one of the above. Go back to the manual and read about date_sub() and date_add() in MySQL for further date manipulation... ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MIME Decoding Class
http://sourceforge.net/projects/phpmimeclass Jonathan Chum [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] I'm looking through Google for MIME decoding classes, one developed by Richard Heyes used in Pear and a few others. What I'm curious is how complete are these classes or if there is one you recommend that completely decodes emails from Outlook, Hotmail, Eudora, etc. based emails. I've looked at solutions written in C and they are about 800 KB source code in size compared to classes written in apps like Squirrel Mail which is 90KB. Does anyone know of any complete decoding classes in PHP either free or commercial. Command line are also fine. If there are C, C++, or C# libraries, those are okay as well if you know of any. I just couldn't come across any that are well coded to perform the task of complete MIME decoding. -- 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] Alternating Row Colors in PHP........
On Sat, 2003-02-08 at 18:25, CF High wrote: Hey all. I'm coming from Cold Fusion to PHP; in CF I could alternate rows with the following: tr bgcolor=###Iif(((CurrentRow MOD 2) is 0),de('FF'),de('EE'))# Any ideas how to do this in PHP? One possibility: while (whatever) { $bgcolor = ($i++ 1) ? '#c0c0c0' : '#ff'; echo tr bgcolor=\$bgcolor\tdbla-bla/td/tr; } -Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] any windows php developers out here?
On Sat, 2003-02-08 at 20:18, Victor wrote: How do I disable apache 2.0? In Windows, go to service-apache-manual start In GNU/Linux, chkconfig --level 35 httpd off -- __ / \\ @ __ __@ Adolfo Bello [EMAIL PROTECTED] / // // /\ / \\ // \ // Bello Ingenieria S.A, ICQ: 65910258 / \\ // / \\ / // // / //cel: +58 416 609-6213 /___// // / _/ \__\\ //__/ // fax: +58 212 952-6797 www.bisapi.com //pager: www.tun-tun.com (# 609-6213) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Why does this happen?
Hey all. Got a problem with I'm sure a simple solution:: In this test form when I submit and insert into my db, only the last select field get entered; i.e. in this case the day value of 25. form name=form1 method=post action= Year select name=date onSelect=return check_submit() option selected value=20022002/option /select Month select name=date option selected value=1212/option /select Day select name=date option selected value=2525/option /select input type=submit name=textfield /form Why does this happen? In Cold Fusion I'm able to refer to the three selects as #date# and it returns 20021225 as expected. Any ideas? Thanks, --Noah -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Output yyyymmdd formatted date || 20030131 to FridayJanuary 31, 2003
SELECT * FROM table WHERE date BETWEEN 20030201 AND 20030201 + INTERVAL 7 DAY I assume '20030201' will come from PHP eventually, right, or the current date? For any record between now and 7 days from now: SELECT * FROM table WHERE date BETWEEN CURDATE() AND CURDATE() + INTERVAL 7 DAY For a date from PHP, $date = '20030201'; SELECT * FROM table WHERE date BETWEEN $date AND $date + INTERVAL 7 DAY ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -Original Message- From: Noah [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 08, 2003 10:20 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Output mmdd formatted date || 20030131 to FridayJanuary 31, 2003 Right. I've switched the date column from type INT to type DATE in our MySql db. The problem I've had with retrieving records in a certain date range with: SELECT * FROM table WHERE yourdate BETWEEN 20030201 AND 20030207 is getting the latter part of the expression; i.e. in this case 20030207 to be seven days older than the first part. This is where I need to use MySql's DATE_ADD, and other date manipulation functions.. Lots to learn; little time to do it. Thanks for feedback, John. --Noah - Original Message - From: John W. Holmes [EMAIL PROTECTED] To: 'Noah' [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, February 08, 2003 3:31 PM Subject: RE: [PHP] Output mmdd formatted date || 20030131 to FridayJanuary 31, 2003 The dates are stored in a MySql db. I checked out the MySql DATE_FORMAT function -- pretty cool. However, pardon my ignorance here, how can I do date comparisons? For example, if I want to retrieve records from the db where the date is between say, 2003-02-01 and 2003-02-07, will MySql be able to compare the strings? I stored my dates as integer fields to do such a comparison, but it looks like I need to graduate to MySql date time functions.. If you've done it correctly and stored your dates in a MySQL DATE, DATETIME, or TIMESTAMP column, then you can do something like this: SELECT * FROM table WHERE yourdate BETWEEN 20030201 AND 20030207 If you're storing them in an INT column, then change it over to one of the above. Go back to the manual and read about date_sub() and date_add() in MySQL for further date manipulation... ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to uncompress PHP
Hi, I am Lin. (B (BWhen I execute a command (B (Bgzip -d php-4_3_0_tar.gz (B (Bon the linux. The system show the following error. (B (Bgzip: php-4_3_0_tar.gz: not in gzip format (B (BHow can I uncompress this file. (B (B__ (BDo You Yahoo!? (BYahoo! BB is Broadband by Yahoo! (Bhttp://bb.yahoo.co.jp/ (B (B (B-- (BPHP General Mailing List (http://www.php.net/) (BTo unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to uncompress PHP
I think it's tar -xvf name -Original Message- From: Ñ bQ [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 08, 2003 8:26 PM To: [EMAIL PROTECTED] Subject: [PHP] How to uncompress PHP Hi, I am Lin. When I execute a command gzip -d php-4_3_0_tar.gz on the linux. The system show the following error. gzip: php-4_3_0_tar.gz: not in gzip format How can I uncompress this file. __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Post your free ad now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to uncompress PHP
On Sat, 2003-02-08 at 21:26, 林 恵群 wrote: Hi, I am Lin. When I execute a command gzip -d php-4_3_0_tar.gz on the linux. The system show the following error. gzip: php-4_3_0_tar.gz: not in gzip format How can I uncompress this file. tar -zxvf php-4_3_0_tar.gz -- __ / \\ @ __ __@ Adolfo Bello [EMAIL PROTECTED] / // // /\ / \\ // \ // Bello Ingenieria S.A, ICQ: 65910258 / \\ // / \\ / // // / //cel: +58 416 609-6213 /___// // / _/ \__\\ //__/ // fax: +58 212 952-6797 www.bisapi.com //pager: www.tun-tun.com (# 609-6213) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] any windows php developers out here?
In GNU/Linux, chkconfig --level 35 httpd off Wow man, that just SCREAMS apache off! How intuitive Linux is... - Vic Thanks, I'll try it. But, what will that turn off? I have apache 1.X and apache 2.X on red hat? I want to use either or, whichever works with the php 4.3 on red hat. So ... what do I choose? How do I make the system use only one of them, how do I erase the other one? -Original Message- From: Adolfo Bello [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 08, 2003 7:31 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] any windows php developers out here? On Sat, 2003-02-08 at 20:18, Victor wrote: How do I disable apache 2.0? In Windows, go to service-apache-manual start In GNU/Linux, chkconfig --level 35 httpd off -- __ / \\ @ __ __@ Adolfo Bello [EMAIL PROTECTED] / // // /\ / \\ // \ // Bello Ingenieria S.A, ICQ: 65910258 / \\ // / \\ / // // / //cel: +58 416 609-6213 /___// // / _/ \__\\ //__/ // fax: +58 212 952-6797 www.bisapi.com //pager: www.tun-tun.com (# 609-6213) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Post your free ad now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Why does this happen?
Maybe you should rename them differently/ or make then into an array? -Original Message- From: CF High [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 08, 2003 10:52 PM To: [EMAIL PROTECTED] Subject: [PHP] Why does this happen? Hey all. Got a problem with I'm sure a simple solution:: In this test form when I submit and insert into my db, only the last select field get entered; i.e. in this case the day value of 25. form name=form1 method=post action= Year select name=date onSelect=return check_submit() option selected value=20022002/option /select Month select name=date option selected value=1212/option /select Day select name=date option selected value=2525/option /select input type=submit name=textfield /form Why does this happen? In Cold Fusion I'm able to refer to the three selects as #date# and it returns 20021225 as expected. Any ideas? Thanks, --Noah -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Post your free ad now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Why does this happen?
Got a problem with I'm sure a simple solution:: In this test form when I submit and insert into my db, only the last select field get entered; i.e. in this case the day value of 25. form name=form1 method=post action= Year select name=date onSelect=return check_submit() option selected value=20022002/option /select Month select name=date option selected value=1212/option /select Day select name=date option selected value=2525/option /select input type=submit name=textfield /form All of your form elements have the same name! What do you expect to happen? If you have this in PHP: $date = 1; $date = 2; $date = 3; What value do you think $date has now?? ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] any windows php developers out here?
On Sat, 2003-02-08 at 21:41, Victor wrote: In GNU/Linux, chkconfig --level 35 httpd off Wow man, that just SCREAMS apache off! How intuitive Linux is... - Vic Thanks, I'll try it. But, what will that turn off? I have apache 1.X and apache 2.X on red hat? I want to use either or, whichever works with the php 4.3 on red hat. So ... what do I choose? How do I make the system use only one of them, how do I erase the other one? In Windows and Linux the service is named httpd, it's not my fault. Well, now you have two Apache in your and you want just one of them to come up when you boot your machine. Apache 1.3.x is usually installed in /usr/share/httpd and is started with a script in /etc/rc.d/init.d called httpd. Apache 2.0.x is installed by default in /usr/local/apache2 and the script to start/stop the service is called apachectl and is located in /usr/local/apache2/bin. If you want to leave the first one that you installed, just do nothing. On the other hand, if you want to start the second one, then rename /etc/rc.d/init.d/httpd to something you want and create a symlink pointing to the one you want to start. Example: ln -s /usr/local/apache2/bin/apachectl /etc/rc.d/init.d/httpd Now: chkconfig --level 35 httpd on In this case you don't need to turn off the other. It will never get started because there is no script in /etc/rc.d/init.d to start it. Hope this help. -- __ / \\ @ __ __@ Adolfo Bello [EMAIL PROTECTED] / // // /\ / \\ // \ // Bello Ingenieria S.A, ICQ: 65910258 / \\ // / \\ / // // / //cel: +58 416 609-6213 /___// // / _/ \__\\ //__/ // fax: +58 212 952-6797 www.bisapi.com //pager: www.tun-tun.com (# 609-6213) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] any windows php developers out here?
So I guess I al looking to finding out what I need to configure IIS to to get the ISAPI module to work, etc. 1. Unzip the php .zip file to C:\php\ 2. Copy c:\php\sapi\php4isapi.dll to c:\php\php4isapi.dll 3. Ensure the user IIS runs as, generally IUSR_computer_name, has read permissions to C:\php\ and all subdirectories. 4. Follow directions as in the manual 5. Shut down IIS (net stop iisadmin) 6. Open up IIS control panel 7. Add ISAPI filter pointing to c:\php\php4isapi.dll 8. Add application mapping pointing to c:\php\php4isapi.dll 9. Start up IIS (net start w3svc) That's it... ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to remove only the last character?
This one time, at band camp, Douglas Douglas [EMAIL PROTECTED] wrote: Good day. Is there any PHP function that removes only the last character of a string and returns the new string? $new = substr($string, 0, -1); Kevin -- __ (_ \ _) ) | / / _ ) / _ | / ___) / _ ) | | ( (/ / ( ( | |( (___ ( (/ / |_| \) \_||_| \) \) Kevin Waterson Port Macquarie, Australia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] fopen problem
I'm having trouble with a basic file write and can't figure out why. It must have something to do with the program the code is in because if I run that same code as a separate program, as the same user, and on the same directory, it works fine. The program is listening on a port with: $fp0 = fopen(php://stdin,r); while (!feof($fp0)){ and writing to stdout, successfully, using: $fp1 = fopen(php://stdout,w); fputs($fp1,$response.\r\n); fclose($fp1); But, the file open is failing. Is there any way to get more detail on why fopen is failing? Or, any ideas what could be going on in the rest of my program that could affect this? Thanks, if ($fp = fopen($body_file,w)): fputs($fp,$body,strlen($body)); @fclose($fp); else: echo Failed; endif; - Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now
php-general Digest 9 Feb 2003 03:04:49 -0000 Issue 1872
php-general Digest 9 Feb 2003 03:04:49 - Issue 1872 Topics (messages 134873 through 134932): Re: Globals off and passing data 134873 by: Jason Wong Single vs. Multiple DBs || Which way to go? 134874 by: CF High 134875 by: John W. Holmes 134876 by: CF High need help with preg_match 134877 by: joe 134895 by: Chris Hayes 134902 by: joe 134908 by: John W. Holmes Permenant Page Generation 134878 by: Mecca 134880 by: Mecca 134882 by: Jason Sheets 134910 by: John W. Holmes Problems with SQL queries in PHP script 134879 by: Mike Hilty 134881 by: Justin Garrett Attaining NTLM information from IE browsers. 134883 by: Marriner, Bruce W. 134888 by: Danny Shepherd Downloading File rather then Executing 134884 by: Stephen Craton 134886 by: Jason Wong 134887 by: Stephen Craton html tags 134885 by: Erich C. Beyrent problems with 'exec' in 4.3 134889 by: Gav Another Prob: MySQL Passwords 134890 by: Stephen Craton Alternating Row Colors in PHP 134891 by: CF High 134892 by: olinux 134893 by: Chris Hayes 134896 by: CF High 134919 by: Brian V Bonini Problem When Linking Array Element To Itself 134894 by: Guru Geek 134897 by: Chris Hayes Output mmdd formatted date || 20030131 to FridayJanuary 31, 2003 134898 by: CF High 134899 by: Michael Geier 134900 by: CF High 134909 by: John W. Holmes 134917 by: CF High 134922 by: John W. Holmes returning results of cURL POST 134901 by: Lowell Allen 134904 by: Lowell Allen Re: 3 tier web development 134903 by: Jonathan Chum any windows php developers out here? 134905 by: Victor 134906 by: John W. Holmes 134907 by: Jason Sheets 134915 by: Victor 134916 by: Victor 134920 by: Adolfo Bello 134926 by: Victor 134929 by: Adolfo Bello 134930 by: John W. Holmes question about quote and double-quoted strings 134911 by: Duncan 134913 by: Justin Garrett Test 134912 by: John Nichel MIME Decoding Class 134914 by: Jonathan Chum 134918 by: Hatem Ben Why does this happen? 134921 by: CF High 134927 by: Victor 134928 by: John W. Holmes How to uncompress PHP 134923 by: $BNS(B $B7C72(B 134924 by: Victor 134925 by: Adolfo Bello Re: How to remove only the last character? 134931 by: Kevin Waterson fopen problem 134932 by: Jeff Schwartz 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--- On Sunday 09 February 2003 07:59, Paul wrote: I'm opening a socket to the remote machine and using post to send the data. But please enlighten me, what is the usual method of accessing a remote database? One usually use stuff like mysql_connect() and friends to connect to databases. If you're using 'post' (as in HTTP POST) then aren't you in fact accessing a webserver which returns data from a database as opposed to accessing the database directly? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* If it heals good, say it. */ ---End Message--- ---BeginMessage--- Hey all. I'm attempting to organize a sport report site into working order. We've got approximately 100 tables, and I'm unsure whether to break the info up by sport (i.e. baseball, basketball, hockey, etc.) or to lump all the tables in one db and prefix tables by their sport name (e.g. bk_scoring = basketball scoring table). On the surface, it would seem easier to use multiple dbs, but then again, common tables, such as schools and coach_info would have to be duplicated in each db. Any ideas/suggestions much appreciated, --Noah -- ---End Message--- ---BeginMessage--- I'm attempting to organize a sport report site into working order. We've got approximately 100 tables, and I'm unsure whether to break the info up by sport (i.e. baseball, basketball, hockey, etc.) or to lump all the tables in one db and prefix tables by their sport name (e.g. bk_scoring = basketball scoring table). How about just a scoring table that has a column on whether it's Basketball, Hockey, Basket-Weaving, etc? How similar are the scoring tables between sports? If the tables for each sport are the same, then keep them in one database
[PHP] Class Interfaces
Hello, I have a question.. Does PHP have support for Class Interfaces declaration? What in Java would be: public interface MyInterface { final String aString = Str; final String oString = String; void aFunction(String inter, double face); } ? If not, how can I do this?.. Thanks a lot. Laborda.- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to uncompress PHP
Lin -- ...and then ?$BNS?(B ?$B7C72?(B said... % % Hi, I am Lin. Hello! % % When I execute a command % % gzip -d php-4_3_0_tar.gz % % on the linux. The system show the following error. % % gzip: php-4_3_0_tar.gz: not in gzip format % % How can I uncompress this file. Sounds like it isn't compressed, no matter what the extension says. What does file php-4_3_0_tar.gz tell you? And what if you just run tar on it, without any z flag? HTH HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg96281/pgp0.pgp Description: PGP signature
[PHP] Data Structures
Hello, Does anyone know where can I find information about data structures implemented in PHP. I need to find something about Linked Lists, implemented in PHP.. If anyone has any info, I'd appreciate it. I've tried to google it out but I can't find anything. Thanks. Laborda.- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why does this happen?
Because all of your field names are overwriting each other until the last one wins. name=date This needs to be different for each field so PHP can assign that name as the variable. HTH, Jason k Larson CF High wrote: Hey all. Got a problem with I'm sure a simple solution:: In this test form when I submit and insert into my db, only the last select field get entered; i.e. in this case the day value of 25. form name=form1 method=post action= Year select name=date onSelect=return check_submit() option selected value=20022002/option /select Month select name=date option selected value=1212/option /select Day select name=date option selected value=2525/option /select input type=submit name=textfield /form Why does this happen? In Cold Fusion I'm able to refer to the three selects as #date# and it returns 20021225 as expected. Any ideas? Thanks, --Noah -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] how to move database from one server to another
hi... couldnt find anything on the list archive about this (maybe i missed it but my internet explorer crashed before i could find it_) how do you copy a database from a server over to another.. do all i need to do is copy the tables over to the sql server after i make the db? or is it more involved than that.. tnx --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Data Structures
You'd create a linked list in PHP just like you would in most languages, however IMHO it's best just to stick with PHP arrays. They grow dynamically and are so easy to work with. There is an ADT extension scheduled for PHP5 http://www.php.net/~sterling/adt/ Justin Garrett Laborda [EMAIL PROTECTED] wrote in message 007501c2cfed$777f1090$ad629c40@galaxy">news:007501c2cfed$777f1090$ad629c40@galaxy... Hello, Does anyone know where can I find information about data structures implemented in PHP. I need to find something about Linked Lists, implemented in PHP.. If anyone has any info, I'd appreciate it. I've tried to google it out but I can't find anything. Thanks. Laborda.- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to move database from one server to another
This one time, at band camp, Sunfire [EMAIL PROTECTED] wrote: how do you copy a database from a server over to another.. do all i need to do is copy the tables over to the sql server after i make the db? or is it more involved than that.. assuming you are using MySQL mysqldump [dbname] dbname.sql -u [db_username] -p This will give you a file called dbname.sql. On the second machine you use this file to create the second db... mysqladmin create db_two -u [db2_username] -p mysql db_two dbname.sql -u [db_two] -p hope this helps Kevin -- __ (_ \ _) ) | / / _ ) / _ | / ___) / _ ) | | ( (/ / ( ( | |( (___ ( (/ / |_| \) \_||_| \) \) Kevin Waterson Port Macquarie, Australia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Class Interfaces
Nope. You're stuck with straight single inheritance for now. Justin Garrett Laborda [EMAIL PROTECTED] wrote in message 005201c2cfe9$47c704b0$ad629c40@galaxy">news:005201c2cfe9$47c704b0$ad629c40@galaxy... Hello, I have a question.. Does PHP have support for Class Interfaces declaration? What in Java would be: public interface MyInterface { final String aString = Str; final String oString = String; void aFunction(String inter, double face); } ? If not, how can I do this?.. Thanks a lot. Laborda.- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] incromenting $counter in a whloop
hi.. was wondering how you would incroment $counter in a while loop.. i want to print it out next to each record for a record counter on a web page... --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] incromenting $counter in a whloop
On Sunday 09 February 2003 13:37, Sunfire wrote: hi.. was wondering how you would incroment $counter in a while loop.. i want to print it out next to each record for a record counter on a web page... manual Language reference Expressions That should give you enough inspiration. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Schizophrenia beats being alone. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] incromenting $counter in a whloop
was wondering how you would incroment $counter in a while loop.. i want to print it out next to each record for a record counter on a web page... while(whatever) { $counter++; echo You are on loop #$counter; } ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] multiple file upload, yet again
Hi, all -- I realize that this has probably been beaten to death, and I've watched with some excitement the recent crop of discussions of multiple file uploads, but only to be disappointed. I've read in detail the archives and seen countless statements that one cannot upload multiple files in one selection, requiring instead that you have multiple input boxes and then a single submit button if you want. I've also see, however, a few mentions of a script or a class that *do* allow you to select multiple files in the browse window and make reference to hotmail multiple attachment uploads. Does anyone know how to do this? I would like for my users to be able to select their files in one swell foop, perhaps even all in the directory, rather than having to click repeatedly for each file to upload. I even tried making myself a hotmail account so I could send myself mail and try to upload multiple files and then look at the HTML source :-) but the server had some problem or other and I couldn't get set up. Well, I didn't really want an account anyway. TIA HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg96291/pgp0.pgp Description: PGP signature