RE: [PHP-WIN] php web host
www.f2s.com -Original Message- From: Fritz Mesedilla [mailto:[EMAIL PROTECTED]] Sent: 11 July 2001 10:11 To: [EMAIL PROTECTED] Subject: [PHP-WIN] php web host hi! can you please suggest any free php web host? thanks. Fritz Mesedilla Systems Administrator Summit Interactive, Inc. FHM | Seventeen | Candy | Cosmopolitan | Preview | Good Housekeeping femalenetwork.com | candymag.com | fhm.com.ph | cosmo.com.ph Palm Pilot Software: TVSked - Download from the link below http://mesedilla.tripod.com +Basta Ikaw Lord > -Original Message- > From: Mad Nas [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 11, 2001 4:56 PM > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] How use SSL in php ? > > > Hello > 1) How use SSL in php ? > 2) How encrypt parameters between and CGI program? > 3) How can share variable ( for example UserID and Password ) between CGI > Programs ? > 4) How can used variable ( for example UserID and Password ) between Web > Pages ? > > Thanks for answer > > Mad Nas > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] WordWrap Web Development Limited t +44 (0) 131 555 3535 f +44 (0) 870 135 3656 m +44 (0) 7768 626588 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-WIN] New to PHP, Please Assist
php is a scripting language which runs on the server, prior to delivery of the page to the client browser. Javascript is a client-side scripting language which runs on the client machine after delivery of the page to the browser. You can use php to write the Javascript which will be executed by the client machine and that's all. HTH Tony -Original Message- From: matt [mailto:[EMAIL PROTECTED]] Sent: 03 August 2001 23:17 To: [EMAIL PROTECTED] Subject: [PHP-WIN] New to PHP, Please Assist How can I make php call a javascript function? Is this even possible? Thanks in advance! -matt (cs student) -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] WordWrap Web Development Limited t +44 (0) 131 555 3535 f +44 (0) 870 135 3656 m +44 (0) 7768 626588 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-WIN] $PHP_SELF incorrect contents
Running PHP 3.0.16 under Win2k and am having a problem with $PHP_SELF I've never seen before. As an example, the correct path for the current page (as shown by $SCRIPT_PATH) is: /calls the full current page is: /calls/index.php but if I use $PHP_SELF within that page it returns (ie. if used as an href within the page itself) /calls/index.php/calls Which means of course that I'm having big trouble navigating anywhere! Server is Xitami - all was okay under Win98 in past. Anyone any ideas? I tried PHP4.0.6 but all's I get are blank pages returned (PHP.EXE is def being loaded when called and straight HTML is returned okay) but that's another problem. I've seen this reported before but no solutions I can find. Tony -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-WIN] Mail and NT
If it's on the same box, have you tried just 'localhost' ? -Original Message- From: Joseph Koenig [mailto:[EMAIL PROTECTED]] Sent: 24 October 2001 16:54 To: [EMAIL PROTECTED] Subject: [PHP-WIN] Mail and NT Hi, I'm developing a site on a NT box (I'm much more familiar with unix) and am unable to get mail to send on NT. I've edited the php.ini file so that SMTP = gatekeeper, which is the name of the server. That's all I saw in the manual and archives that would need to be changed. They have Exchange running on that server. is it possible exchange is running as a name other than 'gatekeeper', even though that's the name of the server? Their admin says it is running as gatekeeper, but I'd like to ensure that it really is. How do I check that, and if that's fine, what else should I look at to get this working? Please CC me as I am not on the win list. Thanks a lot, Joe -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] WordWrap Web Development Limited t +44 (0) 131 555 3535 f +44 (0) 870 135 3656 m +44 (0) 7768 626588 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-WIN] variables in URL
How do I construct a URL to pass more than one variable to a php page? main.php?sectionName=home works fine for one variable, how do I pass more than one? Many thanks Tony WordWrap Web Development Limited t +44 (0) 131 555 3535 f +44 (0) 870 135 3656 m +44 (0) 7768 626588 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-WIN] variables in URL
Thanks, I knew it was simple but it isn't easy to find in the php manual ! WordWrap Web Development Limited t +44 (0) 131 555 3535 f +44 (0) 870 135 3656 m +44 (0) 7768 626588 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-WIN] Webpath vs Absolute Path
Hello List, I'm running an IIS 5.0 server on Windows 2000 box and have PHP Version 4.3.2 with 512 Megs Ram. I am using the CGI mode. It's a webserver running about 26 Virtual Domains. All Domains are running PHP and have php scripts. Something recently has happened and I'm not sure why. I am hoping someone on this list can help me. All of these sites have been running for over 6 months or longer. Just today a new problem pop'd up, I noticed some of my sites were timing out and php failing to execute; I could not think of anything similiar about the sites that were timing out. Out of the 26 virtual domains, about 7 were timing out. After much much much debugging I could only find one thing similiar; Instead of using an absolute o/s path: IE: These were using a webpath: IE: http://www.test.com/test.php";);?> I changed his webpath calls to use an absolute path and boom, the sites are working again Perfectly. Now I prefer and usually always us an absolute o/s path, but we have another php developer who doesn't. Again these sites had been running correctly for over 6 months and now all of a sudden stopped. What could have caused these websites to stop allowing a webpath? Why would it all of a sudden stop working? Tony Devlin V. President / CTO Airewaves Broadband 69 Robert Smalls Prkwy. Suite 4B Beaufort, SC 29902 [EMAIL PROTECTED] http://www.airewaves.com <http://www.airewaves.com/> tel: fax: mobile: (843) 379-2473 (800) 861-6301 (678) 480-4959
[PHP-WIN] How to create an instal file?
Does anyone have a good reference on how I can create an install file, that based on a form that the client fills out will create a database, setup the default settings, adjust the database with the fields entered by client. Including creating the table and changing all database information to the information supplied by the client? I know a good example is PHPBB2, however I can't seem to disemble their install structure. I'm just looking for a good tutorial or reference or maybe someone can point me to a book that explicitly talks about how to do such a task. Thanks, Tony
[PHP-WIN] MySQL query to generate Array
How do you setup a mysql query to generate an array? I want to take URL and URLName from a database and use it to create an array called links. I know how to do the array and the mysql seperately, I don't know how to make the results of the mysql become the key=>value pairs in the array. Any help is appreciated --Tony
RE: [PHP-WIN] MySQL query to generate Array
Something of that sort. What I'm trying to do is dynamically create links on a site. [Home] [Page1] [Page2] etc. The array would look something like array("Home" => "index.php", "Page1" => "Page1.php"); The site is dynamically created. The user is able to create and edit new pages and thus add new links to the link list. I suppose I could do it without an array, but I figured an array would allow for much cleaner code. Ideas? --Tony -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, March 22, 2004 11:58 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP-WIN] MySQL query to generate Array Are you trying to create a breadcrumb trial? Tryst -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] MySQL Limit Question
How can I setup a query to select from a database ONLY the last 5 inserted rows. OR atleast the last 5 starting from this date back, but only select the last 5 in order. If anyone has any suggestions I'd appreciate them. Thanks, Tony
RE: [PHP-WIN] quotes in mysql
You can use addslashes .. which would be $check = addslashes($check); Then when you extract the information from the database to be displayed you want to you would need to stripslashes as such $check = stripslashes($check); It's typically a good idea to always add/strip slashes on any field where you think a ' or " might be used. Tony Devlin V. President / CTO Airewaves Broadband 69 Robert Smalls Prkwy. Suite 4B Beaufort, SC 29902 [EMAIL PROTECTED] http://www.airewaves.com tel: (843) 379-2473 fax: (800) 861-6301 mobile: (678) 480-4959 -Original Message- From: Sudeep Sarath [mailto:[EMAIL PROTECTED] Sent: Friday, April 02, 2004 3:16 AM To: Php-windows mailing list Subject: [PHP-WIN] quotes in mysql Hi friends, I have a 'textarea' in my php page and i need to put the details typed in that textarea box to my MySQL database. The content in the textarea box is(for example) : I'm a good boy. and insert string is: insert into table_name (describe) values('" . $check . "') where check is the variable that stores the POST data of textarea. Also the field "describe" is of a text datatype. what happens is that i can't take the content string to the database. B'cause it contains I'm (a single quote in between I and m) which confuses mySql that string terminates after I. Is there any solution for this problem as we cannot tell the users "dont put quotes in textarea". SuDeEp... Win an evening with the Indian cricket captain: Yahoo! India Promos. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-WIN] Date Format in MySQL
Disclaimers are not legally binding in email, so I have no idea why people feel the need to include them. The reason why disclaimers are not legally binding in email is because the recipient has no way to read the disclaimer and reject the email prior to reading the message, it would be like forcing them to agree to anything you write in email just because they "read" that email. The disclaimer must precept the message and must allow for the recipient to be able to reject the disclaimer and the message without risk of reading the intended message which is inferred by the disclaimer. Although it can be argued how software installs before displaying a disclaimer but the sad truth is that if anyone wanted to claim no fault acceptance of the disclaimer, they could. Which is why new online games now require you to accept their disclaimers and ToS everytime you play and it precepts the ability to actually play the game, If you disagree to either it exits the program, which is the way the disclaimer laws were written. Now lets go even further and just make a logical statement, How can you control whether the intended user has recieved the email and if not, what the non-intended user does with that information? Exactly you can't and fault of misdirected email fails squarly on the shoulders of the sender, not the recipient. I can see that Svensson, just as I am, is tired of recieving this spam at the end of messages by these people. Soon they have to realize that their disclaimers hold no water and no legal protection. Tony DISCLAIMER: By reading this email you agree that "All Your Base R Belong To Me". **Just some humor and hopefully some legal insight on disclaimers** -Original Message- From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 18, 2004 8:22 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-WIN] Date Format in MySQL DISCLAIMER: By sending any electronically information to Mr. B.A.T. Svensson' mailbox the sender agrees that, regardless content, attachments, intended recipient, disclaimers, human error, stupidity, plain ignorance or any other legal claims or matter, that B.A.T. Svensson is to be consider the exclusive owner of any electronically information sent to him. Under no circumstance can the sender claim ownership or influence of the actions Mr. Svensson may or may not take about the information. Mr.Svensson have received. The information in this e-mail or attachments thereto is > > _ > DISCLAIMER: This e-mail contains information some or all of which may be > legally privileged. It is for the intended recipient only. If an addressing > or transmission error has misdirected this e-mail, please notify the author > by replying to this e-mail. If you are not the intended recipient you must > not use, disclose, distribute, copy, print, or rely on this e-mail. > > > > Disclaimer > This e-mail transmission contains confidential information, > which is the property of the sender. > The information in this e-mail or attachments thereto is > intended for the attention and use only of the addressee. > Should you have received this e-mail in error, please delete > and destroy it and any attachments thereto immediately. > Under no circumstances will the Cape Technikon or the sender > of this e-mail be liable to any party for any direct, indirect, > special or other consequential damages for any use of this e-mail. > For the detailed e-mail disclaimer please refer to > http://www.ctech.ac.za/polic or call +27 (0)21 460 3911 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] configuration mime type problem
Hi, hoping someone can point me to the correct part of the FAQ or otherwise help me solve this. Installed the PHP binaries as per the instructions, and configured the httpd.conf for apache 1.3, once i restarted apache, I tested with the standard hello.php page indicated on the tutorial. The browsers, both IE and mozilla do not recognise the .php mime type or file extention and are attempting to download the file rather than render the page. I'm pretty sure I followed the install instructions to the letter, but maybe i srewed something up. Thanks for any insight. Find what you are looking for with the Lycos Yellow Pages http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Re: configuration mime type problem
Thanks Dave, I tried this, and am now getting a slightly different error message, 'you don't have permission to access /hello.php on this server. Is there some permission settings I should be aware of? thanks for the info. -- - Original Message - DATE: Fri, 28 May 2004 15:03:09 From: Dave Grijalva <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Cc: >try forcing an html header: >header('Conent-Type: TEXT/HTML'); > >you want apache to recognize .php, but the browser should still see it >as html (or xml or whatever format you want to use). > >-dave > >Tony Moore wrote: >> Hi, hoping someone can point me to the >> correct part of the FAQ or otherwise help me solve this. >> >> Installed the PHP binaries as per the instructions, and configured the httpd.conf >> for apache 1.3, >> >> once i restarted apache, I tested with the standard hello.php page indicated on the >> tutorial. >> >> The browsers, both IE and mozilla do not recognise the .php mime type or file >> extention and are attempting to download the file rather than render the page. >> I'm pretty sure I followed the install instructions to the letter, but maybe i >> srewed something up. >> >> Thanks for any insight. >> >> >> >> Find what you are looking for with the Lycos Yellow Pages >> http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10 > >-- >PHP Windows Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > > Find what you are looking for with the Lycos Yellow Pages http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Re: configuration mime type problem
Hi, yes I have, when i start up apache from the command line, it says that apache 1.3.27 and php 4.3.6 are running. I added the mime type directives to httpd.conf yes. The error i am getting right now, is no longer trying to download the file instead of rendering the page, the error message I'm getting right now says, "you do not have permission to access /hello.php on this server. This is running on my desktop win98 machine. What might it be? Thanks. -- - Original Message - DATE: Fri, 28 May 2004 21:15:06 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: >There is obviously an error with you Apache configuration as the server is >not recognising the file type, and thus is trying to download it. >Have you inserted the Mime-type in the Apache httpd config file? >Tryst > Find what you are looking for with the Lycos Yellow Pages http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] Question concerning SWITCH and Comparisons
If my understanding of SWITCH is correct, it stops at the first case that matches the result, correct? So then.. If I have a switch as such; switch($qty){ case ($qty < 1600): //$qty is less than 1600 do something break; case ($qty < 2400): //$qty is less than 2400 do something break; case ($qty >= 2400); //$qty is greater than or equal to 2400 do something break; default: do something break; } Then assuming $qty = 800, it should stop at the first case? right? a $qty of 1601 should stop at the second case? and a qty of greater than or equal to 2400 should stop at the last case? Am I correct with my switch statement then? My desired result is; If quantity is less than 1600 set price = whatever; or if quantity is equal to 1600 and less than 2400 set price = whatever, or finally if quantity is equal to or greater than 2400 set price = whatever. I'm having difficulties for whatever reason to come up with a proper comparison for the switch to work as described. Can someone help me iron out this small problem? Much thanks for the help, Tony D.
RE: [PHP-WIN] Question concerning SWITCH and Comparisons
I wanna thank everyone for helping me. It seems I had it right was only conceptually making it more complex than it needed to be. BTW the code I wrote down I did as an example here, not one that I actually wrote and tested -- I was trying to conceptually design the switch statement before I began coding to make sure that what I was thinking was correct. After trying to think too indept and not coming up with my own definitive answer I decide to post my thoughts and ask suggestion here. I greatly appreciate the community and it's support. Thanks, Tony D. -Original Message- From: Alejandro César Garrammone [mailto:[EMAIL PROTECTED] Sent: Thursday, November 11, 2004 2:55 PM To: [EMAIL PROTECTED]; Php-Windows Subject: Re: [PHP-WIN] Question concerning SWITCH and Comparisons I think this may work...but doing some debbuging I suggest: case ($qty>=1600 and $qty< 2400): //$qty is less than 2400 and I modified the semi-colon of this part of code: case ($qty >= 2400): //$qty is greater than or equal to 2400 I tried your code and It works! Hope this helps, Alex - Original Message ----- From: "Tony Devlin" <[EMAIL PROTECTED]> To: "Php-Windows" <[EMAIL PROTECTED]> Sent: Thursday, November 11, 2004 2:35 PM Subject: [PHP-WIN] Question concerning SWITCH and Comparisons > If my understanding of SWITCH is correct, it stops at the first case > that > matches the result, correct? > > So then.. If I have a switch as such; > > switch($qty){ > > case ($qty < 1600): //$qty is less than 1600 > do something > break; > > case ($qty < 2400): //$qty is less than 2400 > do something > break; > > case ($qty >= 2400); //$qty is greater than or equal to 2400 > do something > break; > > default: > do something > break; > } > > Then assuming $qty = 800, it should stop at the first case? right? > > a $qty of 1601 should stop at the second case? > > and a qty of greater than or equal to 2400 should stop at the last case? > > Am I correct with my switch statement then? > > My desired result is; > > If quantity is less than 1600 set price = whatever; > or if quantity is equal to 1600 and less than 2400 set price = whatever, > or finally if quantity is equal to or greater than 2400 set price = > whatever. > > I'm having difficulties for whatever reason to come up with a proper > comparison > for the switch to work as described. Can someone help me iron out this > small problem? > > > Much thanks for the help, > > Tony D. > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] GD Image Resizing on the fly.
Hello Everyone, I am looking for a script or guidance in where to look to figure out how to create a php script that resizes an image on the fly when it is called with some variables. To further detail, I have a shopping cart I am creating for a client -- the client has the ability to upload images, instead of creating a very complex script when he uploads the file, I figured on the shopping cart page I could grab the original file and then resize it to display a thumbnail based on 2 variables being sent W,H (Width, Height). The products are stored in a database along with the image path. I need it to display in the middle of a page so a "header( 'Content-type: image/jpeg' );" won't work for obvious reasons (header already sent). Also it will have to distinquish between Gif and Jpeg (not a problem, just preg-match the extension). I know the exact sizes that we want the shopping cart images to be. Anyone have any ideas? If you need more information just ask. Thanks everyone -- this is such a great community! Tony Devlin
[PHP-WIN] How can I?
First off, I wanna thank everyone who helped me with the GD image issue. I have fixed the problem and appreciate the responses. Onto the real question. I'm trying to make a switch statement that switches a header file based upon what folder you are in... An example: Let's say I have 3 folders with some files inside. /company/ --> index.php --> contact.php /customer/ --> index.php --> profile.php /tips/ --> index.php Basically instead of building a huge switch with EVERY full path file name included, I want to just make a switch based on folder, then every file inside that folder will have the switch applied to it. I am sure this is possible, anyone have any ideas about how to do this? Greatly appreciated, Tony Devlin
RE: [PHP-WIN] How can I?
The reasoning for this is so that I can apply different stylesheets and formatting to different pages inside a specific site. The entire site is dynamic and changeable, they can add pages/subtract pages, etc.. so the layout information needs to be controlled on the header page, the only static/untouchable page. Let's say everything in compayn folder is blue text, but I want everything in the customer folder to be green text. How do you control that when you have dynamic pages? .. easy you find a way to establish what your path is, check it against known paths, if it exists use a certain stylesheet. There may be an easier way to do this than switches, but I have yet to find one. Tony -Original Message- From: Gryffyn, Trevor [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 11:11 AM To: Php-Windows Cc: [EMAIL PROTECTED] Subject: RE: [PHP-WIN] How can I? I'm not quite sure what you're asking for here, but let me take a shot: Do you want the scripts in, say, your index.php's to know what folder they're in and act accordingly? So you'd essentially have exactly the same index.php in every folder, but they would do different things depending on if they were in /company/ or in /customer/ or in /tips/? If so, you could get the SCRIPT_NAME from the server variables, then use the dirname() function and some parsing to get the last directory name in the path. But that seems to lead to the "too many SWITCH statements" thing that you're trying to avoid. Maybe if you could clarify what you're trying to do, it might help us determine the best course of action. -TG > -Original Message- > From: Tony Devlin [mailto:[EMAIL PROTECTED] > Sent: Monday, November 22, 2004 9:20 AM > > Onto the real question. I'm trying to make a switch > statement that switches a header file based upon > what folder you are in... > > An example: > > Let's say I have 3 folders with some files inside. > > /company/ > --> index.php > --> contact.php > > /customer/ > --> index.php > --> profile.php > > /tips/ > --> index.php > > > Basically instead of building a huge switch with EVERY full > path file name included, I want to just make a switch based > on folder, then every file inside that folder will have > the switch applied to it. I am sure this is > possible, anyone have any ideas about how to do this? > > Greatly appreciated, > > Tony Devlin > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-WIN] How can I?
Well it's not "just" stylesheet changes. We have links that are different for the different folders. For example we have a left navigation bar, those links displayed there will change based on the directory, as well as a couple H1 tags that display some basic info that differs directory to directory. It's awhole lot easier to have all this in one file and then switch the output based on the directory location, then it is to have seperate files for each, not to mention in an dynamic page where everything on that page is changeable, how do you add the proper link to that stylesheet or function page? .. Sure you could fopen the page after it's been created and then fwrite the link in, but you'd still need a switch to know what link to fwrite in and opening sockets like that is just an invite to trouble. Atleast thats my opinion on the matter. Remember they can create pages on the fly, and these people who create the pages are how do we say, HTML challenged? I think thats the politically correct term. Thanks, Tony D. -Original Message- From: Gryffyn, Trevor [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 11:48 AM To: Php-Windows Cc: [EMAIL PROTECTED] Subject: RE: [PHP-WIN] How can I? I think you're over-thinking this one or maybe doing it the hard way. If everything in a particular folder is always going to have the same theme, then just put the stylesheet in that folder and references it in the HTML you output. "localstyle.css" Something like that. If you want to be able to have 'themes', then dynically alter the filename vial PHP: "$themename-localstyle.css" You could do the same thing with getting the directory name and using that like you'd use a $themename. Anyway, that's what I'd do instead of worrying about switch statements and all. Would that work for what you're trying to do? -TG > -Original Message- > From: Tony Devlin [mailto:[EMAIL PROTECTED] > Sent: Monday, November 22, 2004 11:20 AM > To: Php-Windows > Subject: RE: [PHP-WIN] How can I? > > > The reasoning for this is so that I can apply different > stylesheets and > formatting to different pages inside a specific site. The > entire site is > dynamic and changeable, they can add pages/subtract pages, > etc.. so the > layout information needs to be controlled on the header page, the only > static/untouchable page. > > Let's say everything in compayn folder is blue text, but I > want everything > in the customer folder to be green text. How do you control > that when you > have dynamic pages? .. easy you find a way to establish what > your path is, > check it against known paths, if it exists use a certain > stylesheet. There > may be an easier way to do this than switches, but I have yet > to find one. > > Tony > > > -Original Message- > From: Gryffyn, Trevor [mailto:[EMAIL PROTECTED] > Sent: Monday, November 22, 2004 11:11 AM > To: Php-Windows > Cc: [EMAIL PROTECTED] > Subject: RE: [PHP-WIN] How can I? > > > I'm not quite sure what you're asking for here, but let me > take a shot: > > Do you want the scripts in, say, your index.php's to know what folder > they're in and act accordingly? > > So you'd essentially have exactly the same index.php in every folder, > but they would do different things depending on if they were in > /company/ or in /customer/ or in /tips/? > > If so, you could get the SCRIPT_NAME from the server > variables, then use > the dirname() function and some parsing to get the last directory name > in the path. But that seems to lead to the "too many SWITCH > statements" > thing that you're trying to avoid. > > Maybe if you could clarify what you're trying to do, it might help us > determine the best course of action. > > -TG > > > -Original Message- > > From: Tony Devlin [mailto:[EMAIL PROTECTED] > > Sent: Monday, November 22, 2004 9:20 AM > > > > Onto the real question. I'm trying to make a switch > > statement that switches a header file based upon > > what folder you are in... > > > > An example: > > > > Let's say I have 3 folders with some files inside. > > > > /company/ > > --> index.php > > --> contact.php > > > > /customer/ > > --> index.php > > --> profile.php > > > > /tips/ > > --> index.php > > > > > > Basically instead of building a huge switch with EVERY full > > path file name included, I want to just make a switch based > > on folder, then every file inside that folder will have > > the switch applied to it. I am sure this is > > possible, anyone have any ideas about how to do this? > > > > Greatly appreciated, > > > > Tony Devlin > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] Category/SubCategory
Hello to all my fellow PHP friends, I'm embarking on yet another trecherous adventure. This time Categories, Sub-Categories and Sub-Sub Categories.. This is for a shopping cart module where the admin can create categories, sub-categories, and sub-sub categories and then place in a certain sub-sub category. This is a two fold question, first I will draw an example display of what I am trying to accomplish. Example: Main Category | ---> Sub Category | ---> Sub-Sub Category | ---> Product Main Category2 | ---> Sub Category2 | ---> Sub-Sub Category2 | ---> Product2 Question 1: Admin needs to be able to create new sub categories and assign them to a main category and be able to create a sub-sub category to assign to a sub category and then a product to assign to a sub-sub category. When adding a new product the admin needs to select a main category which then creates a dropdown box for a subcategory, which then (IF admin chooses) create a dropdown box for a sub-sub category. Any ideas on how to create a function to handle this? I've seen lots of unstable javascript code to do this (not to mention difficult to manage) Question 2: When displaying the category/sub/sub-sub category listing to the viewers, whats the best way to handle the output? Thanks in advance for all your help, Tony Devlin
RE: [PHP-WIN] Presenting code snipetts in standard PHP colours
PHP's website (http://www.php.net) has a great solution to displaying source code. If you view the source code on their site you can see how they do it. It's just a basic function to loop through the text and place in code to highlight in various places. In fact here is that portion of code: function highlight_php($code, $return = FALSE) { // Using OB, as highlight_string() only supports // returning the result from 4.2.0 ob_start(); highlight_string($code); $highlighted = ob_get_contents(); ob_end_clean(); // This should eventually be a php_syntax_check() call when we move to PHP5 // But use this ugly hack for now to avoid code snippets with bad syntax screwing up the highlighter if(strstr($highlighted,"include/layout.inc")) $highlighted = "".htmlentities($code).""; // Fix output to use CSS classes and wrap well $highlighted = '' . str_replace( array( ' ', '', '', "\n ", ' ' ), array( ' ', "\n", '', "\n ", ' ' ), $highlighted ) . ''; if ($return) { return $highlighted; } else { echo $highlighted; } } This is how they called that function: highlight_php(join("", file($page_name))); Original Message- From: Ross Honniball [mailto:[EMAIL PROTECTED] Sent: Thursday, December 09, 2004 6:42 AM To: php windows Subject: [PHP-WIN] Presenting code snipetts in standard PHP colours Hi all, What is the easiest way to get a web page to list source code with standard colour high-lighting (as used in my php_manual_el.CHM file and as you see on various php web pages about the place). Is there a class or a function or something that anyone knows of? Thanks ... Ross . . Ross Honniball. JCU Bookshop Cairns, Qld, Australia. . -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] Searching for UPS tool
Hello List, Does anyone have or know where I can find a functional UPS shipping tool? I have found tons for their old ups tool (which no longer function), they have since switched to an XML version and my attempts have been futile, including trying to find someone elses working version. So my request is do any of you have a working UPS shipping calculator or do you know where I can find one? Thanks, Tony
RE: [PHP-WIN] Re: Searching for UPS tool
Thanks for the ignorant reply. I'll assume that you hastidely read the email and didn't see the part where I said "I have searched". They have Jscript examples, but I can't decipher that spanglish. Their documentation, although very bloated, gives no real answers to anyof my needed questions. My particular problem is the XML interface using PHP, and yes I've scoured and read the PHP manual on XML. Is it so hard to think someone did search before asking? I've scanned over 300 googled websites for answers to this problem and have found none. All that I have found were outdated examples. Good day to you, Sir Tony -Original Message- From: Jason Barnett [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 04, 2005 9:11 AM To: php-windows@lists.php.net Subject: [PHP-WIN] Re: Searching for UPS tool Didn't you already search their site and find the answer? It is *very* infuriating when people refuse to help themselves! Because I can guarantee that if you search the UPS site you will find the answer. -- Teach a person to fish... Ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html PHP Manual: http://php.net/manual/ php-general archives: http://marc.theaimsgroup.com/?l=php-general&w=2 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-WIN] RE: [PHP] php editor
I use HTML-Kit or Ultra Edit (depending on which machine I am developing on). HTML-Kit can be found here (http://www.chami.com/html-kit/), It's like wordpad with steriods (color coding, plug in ability (however I have not tried any), line highlighting, other helpful tools). Tony Devlin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, January 13, 2005 4:55 PM To: php-windows@lists.php.net Cc: [EMAIL PROTECTED] Subject: [PHP-WIN] RE: [PHP] php editor It's true that googling would produce a list of PHP-happy editors, but the intended question seems to be more along the lines of "What does everyone like? Use? Prefer?" That's not something that's always found on lists you'd get off of google. Helpful responses aren't always ones that are technically correct. -TG = = = Original message = = = "Know any goog ones?" funny you should mention goog.. if you google'd "php editor" youd have your answer by now.. cheers phpninja -Original Message- From: William Stokes [mailto:[EMAIL PROTECTED] Sent: Thursday, January 13, 2005 8:02 AM To: php-general@lists.php.net Subject: [PHP] php editor Hello, I'm quite new with writing php code. I was considering of using some kind of php editor program to help with the syntax. Know any goog ones? Thanks -Will ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Re: Cookie Problems on Localhost
is your browser blocking the cookie? "Joseph L. Mueller" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Luis Moreira wrote: > > > You can always try to set a cookie, but wether the browser allows it > > or not, it's a whole different ball game. > > I believe your problem lies here. > > > > Anyway, the two scripts I attach, I have just tried, and the cookie > > was set by the first, WITH A MESSAGE FROM THE BROWSER ASKING IF I > > ALLOWED IT. > > The second script read the cookie, no problem. > > > > > > Hope this helps. > > > > Luis > > > > Mikey wrote: > > > >>> That still leaves the problem of how to test cookies and sessions on > >>> a local system. > >>> > >> > >> > >> Don't know if this will work, but have you tried setting an entry in > >> your > >> hosts file (C:\WINDOWS or C:\WINNT\system32\drivers\etc) for your > >> machine > >> name that points to 127.0.0.1? > >> > >> Eg: > >> 127.0.0.1mymachine > >> > >> HTH, > >> > >> Mikey > >> > >> > >> > Luis, > Thanks for sending the script to my e-mail account. I tried them but no > cookie was set. All I got rom the r_print was "Array {}". > > -- > Joseph L. Mueller -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] A setcookie related question
Hi There, I am a beginner PHP developer and I have a very simple, perhaps silly, question: I am trying to use the setcookie function in a PHP script and I seem to be struggling with the "domain" parameter. Here is situation: //set authorization cookie setcookie("auth", "1", 0, "/", "yourdomain.com", 0); Instead of the "yourdomain.com" string in this function call I am suppose to use my own domain name, but I do not have a WEB site yet. As a result I am using localhost at the moment. I have tried several values with no success. Since I am running these scripts on my local PC using "i.e. localhost", what should I set this value to? I have tried the following combinations with no avail: setcookie("auth", "1", 0, "/", "localhost", 0); setcookie("auth", "1", 0, "/", "localhost:8080", 0); (I a running Apache HTTP Server 2.0.54 on port 8080) setcookie("auth", "1", 0, "/", "127.0.0.1", 0); setcookie("auth", "1", 0, "/", ".oc.cox.net", 0); (this is what my IPCONFIG returns as my "connection-specific DNS Suffix".) Any help would be greatly appreciated. Regards, Tony Aldemir
[PHP-WIN] How to copy from windows clipboard using PHP
Hi There, Would anyone know how to copy an image/screen shot from the Windows's CLIPBOARD? I am trying to capture the clipboard content (image) populated by the use of the PrintScreen button on the standard keyboard and storing it in a MySQL database table field along with a key field. I then would be interested in fetching it later to display and/or print upon users' request. Has anyone developed such capability before? Regards, Tony Aldemir
[PHP-WIN] I Can't connect to MySql using ADODB
Hi There, I am trying to connect to MySQL using ADODB library for PHP using the following code with no success. What am I doing wrong? debug = true; $db->Connect('localhost', 'tony', 'mypassword', 'test'); $rs = $db->Execute('select * from users'); print ""; print_r($rs->GetRows()); print ""; ?> Notes: 1) After unzipping the downloaded ADODB file into a directory, I copied the adodb.inc.php file by itself into my c:\PHP directory. The ADODB documentation says "Unpack all the files into a directory accessible by your webserver". What does this mean? Is there a setting somewhere in the Apache Server that I need to tweak (e.g. some sort of setting in the httpd.conf)? 2) By the way, I CAN connect to MySQL using PHP directly (i.e. without the use of ADODB) just fine and work with the 'test' database's 'users' table. Any help will be greatly appreciated. Regards, Tony -Original Message- From: Mark Rees [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 13, 2005 7:18 AM To: php-windows@lists.php.net Subject: Re: [PHP-WIN] Re: mssql equivalents to mysql_errno & mysql_error Thanks for your advice. ADODB link http://adodb.sourceforge.net/ Please use reply all to send your message to the list - in my experience is better to use an abstraction layer library like adodb this will allow you to switch database in the future, besides that provides error control and debug options and it is extremly easy to develop with. Luck! I have looked in the online manual but am not able to find the equivalent functions in mssql of mysql_errno() & mysql_error(). I am in the unfortunate position of having to develop using an existing MSSQL database. There aren't any as far as I know. I think the best you can do is test for the existence of whatever you are looking for (connection, result set etc) at each stage and do something graceful. Not much use for debugging though. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] FrontPage or something else?
Hi There, I am trying to decide what software to use along with PHP so that I can create a decent looking/rich WEB enabled and database aware application for my end-users. It seems that trying to develop rather sophisticated/user friendly and rich WEB pages using raw html code intermingled with PHP code would be practically prohibitive due to its labor intensity. Plus you have to know all that html jazz to make your pages look rich and professional. Long story short, I went to Microsoft's WEB site to see if I can use FrontPage2003 in conjunction with PHP. The answer is "YES", after making some config. Changes to FrontPage (e.g. disabling ASP.NET capabilities of FP, etc.). However, Microsoft was also very quick to turn around and suggest I the same article that ASP.NET may be a much better direction to go in order to develop database aware WEB site capabilities/apps. That are also rich and professional looking. I felt rather disappointed, after thinking that I finally found a very cost effective way to develop WEB enabled apps. (i.e. PHP + Apache + MySQL), I am not sure anymore. I am also concerned about making my WEB app. multi DB capable. That brought in the ADODB libs., and I am yet to successfully connect to MySQL DB using ADODB (i.e. adodb.inc.php), but that is another subject to discuss. The bottom line question I have is this: What is recommended by the PHP gurus, who have been successfully using PHP for quite a while? What software tool(s) is suggested to build function rich, database capable, robust WEB applications that are also intuitive and user friendly due to their presentation layer being strong and rich (e.g. forms, etc.)? Sorry for the length of this email, but I believe this is an important decision to make before I start investing my blood and tears into an application that hopefully will live relatively long life instead of becoming obsolete in a couple of years. Any suggestions or guidance would be greatly appreciated. Kind Regards, Tony Aldemir -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] Visibility of the root in an APACHE setting
A rookie question: Whenever I download and unzip any PHP related solution, the term "unzip it to your web server's document root" is used. I am using APACHE and my doc root is the default "C:\Program Files\Apache Group\Apache2\htdocs". Now if I put all of the PHP code I develop as well as I download into a single directory, I will have a major file soup soon, which can't be good. I am sure there is a way to organize my files under the root in different folders or somewhere else and still have them visible to the APACHE server. What is the trick here? Any help will be greatly appreciated. Regards, Tony -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] browscap.ini
hey guys found this message on the web by using google. >From all that I know, 'browscap.ini' is to be placed in "'drive':\windows\system\inetsrv" and referred to as such under the [browscap] caption of the php.ini file. Hope this helps. GKE "Hassan Shaikh" wrote in message news:E-mail Protected... | Hi All, | | I am getting *Cannot open 'c:\PHP\extra\browscap.ini' for reading* on a | Windows 2003/IIS setup with PHP. Can anyone help out? Seems like a | pretty known error coz many links were found while Googling. | | Thanks. | | | Hassan If this person needs help I can do that as mine is working fine I can help with the config of php.ini to make thos work right as my system is the same. Tony...
[PHP-WIN] Can php execute separte .net file
Hey guys wondering a php can execute again a asp.net file like myfile.aspx? Thanks guys. Tony...
[PHP-WIN] php isapi filter 5.2 problem
Hey guys just installed the latest php 5.2 I want to use this as Isapi filter but I keep getting 404 error on any php page. I have looked at documentation and searched Google cannot get a straight answer. Any suggestions as what I need to do? Tony...