RE: [PHP] Re: Tracking shipments UPS, FEDEX, etc...
I've searcded PHPBuilder.com, zend.com, hotscripts.com, and php.net... can't find anything -Original Message- From: _lallous [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 06, 2001 2:31 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: Tracking shipments UPS, FEDEX, etc... I think i remember seeing a related topic on PHPBuilder.com Joe Sheble ) [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... has anybody written any routines or functions they'd care to share for parsing the tracking information out of UPS, FEDEX, or other shipping carriers tracking pages? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Problem with PHP_SELF
I couldn't help but frown at this message... This is typical of this and hundreds of other lists... instead of learning the language, people just jump in, try to write code, and then when something doesn't work, it's the language's fault... It absolutely amazes me that such a huge number of people don't bother reading the manual or even attempt learning the basics... global variables have to be declared in functions. It's a basic fact, and should've been learned before even attempting a line of code... -Original Message- From: David Otton [mailto:[EMAIL PROTECTED]] Sent: Monday, September 03, 2001 3:21 PM To: David Otton Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Problem with PHP_SELF On Mon, 03 Sep 2001 15:11:04 -0700, you wrote: Following up my own post (in case someone finds this in the archives): Is there any situation where such variables would be available to phpinfo(), but not the rest of the script? You can't see $PHP_SELF within a function until you declare it global. This language really frustrates me sometimes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] local time v.s. server time
Thanx James for your answers... perhaps I'm missing a piece of the puzzle, but here is how I corrected or fixed it. In my included file that gets included in every app and every page, I placed: putenv( TZ=America/Phoenix ); and all my dates are now local time. SO saving to a mySQL database now I merely pass in: $now = date( Y-m-d H:i:s ); $result = mysql_query( INSERT INTO table ( datetime ) values( '$now' ), $dbConn ); If I ever distribute this app (doubtful) I'll include a fairly extensive listing of timezones so the putenv() could be appropriately changed... the list I found and would most likely include is here: http://www.theprojects.org/dev/zone.txt -Original Message- From: James, Yz [mailto:[EMAIL PROTECTED]] Sent: Saturday, August 25, 2001 8:11 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] local time v.s. server time Hi Joe, GMT isn't affected by daylight savings (altough in the UK we are using British Summer Time at the moment, which is GMT +1), so that's the constant you can work from if you're not experiencing daylight savings schemes where you are. I have written out an example for you below. We get the Y-m-d H:i:s format of time using gmdate() (which Mysql likes). We convert that lot to a timestamp. The function I've created takes two arguments: whether to add or take time from the timestamp that is generated, and the offset in hours. So, to emulate what Mysql's now() function does, you can do something like this ? $now = GenerateOffset(-, 6); // takes off 6 hours. $query = @mysql_query(INSERT INTO table (datetime) VALUES ('$now'), $connection); ? And you should get correct datetime formats for your timezone into your table (providing you have put your correct offset from GMT). ? function GenerateOffset($plusminus, $offset) { $datetime = gmdate(Y-m-d H:i:s); list($date, $time) = explode( , $datetime); list($year, $month, $day) = explode(-, $date); list($hour, $minute, $second) = explode(:, $time); $timestamp = mktime($hour, $minute, $second, $month, $year, $day); if ($plusminus == +) { $newtime = $timestamp + (3600 * $offset); } else { $newtime = $timestamp - (3600 * $offset); } $newdate = date(Y-m-d H:i:s, $newtime); return $newdate; } ? Hope this helps. James Joe Sheble ) [EMAIL PROTECTED] wrote in message Alas, I don't have this luxury since it's not my server, but one that is hosted with a web hosting provider. They control the setup and configuration of the machines... since it's a shared server I doubt I'll convince them to set the timezone to my location, thus throwing everyone else on the same server out of whack... I can use the putenv() function though for use in PHP and then when saving the date and time into mySQL actually use the PHP date and time functions instead of the mySQL Now() function... Where would I find the TZ codes to use for my area? thanx -Original Message- From: Don Read [mailto:[EMAIL PROTECTED]] Sent: Friday, August 24, 2001 8:39 PM To: Joe Sheble (Wizaerd) Cc: General PHP List Subject: RE: [PHP] local time v.s. server time On 25-Aug-2001 Joe Sheble \(Wizaerd\) wrote: My website is hosted with a provider, and there is a three hour difference in timezones, so when saving date and times to the database, they reflect the server time and not my own local time. The clincher is I know I could do some time math and just substract 3 hours, but I live in Arizona, so we do not go through daylight savings time. So right now it's a three hour difference, but when the time change happens, I'll only be two hours behind. Because of this, what is the best method to get my local date and time entered into the database instead of the server date and time?? In my case the server is in Atlanta, but I have to sync with my credit-card processor on the left coast. So first i start the database (MySQL) on Pacific time with: - TZ=PST8PDT export TZ /usr/local/bin/safe_mysqld --user=mysql /dev/null To make PHP date/time functions jive, during initialization: putenv('TZ=PST8PDT'); // Server on Pacific time No matter that i'm in Texas (CST), everything is now reported on Pac time. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
[PHP] local time v.s. server time
My website is hosted with a provider, and there is a three hour difference in timezones, so when saving date and times to the database, they reflect the server time and not my own local time. The clincher is I know I could do some time math and just substract 3 hours, but I live in Arizona, so we do not go through daylight savings time. So right now it's a three hour difference, but when the time change happens, I'll only be two hours behind. Because of this, what is the best method to get my local date and time entered into the database instead of the server date and time?? Thanx... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] local time v.s. server time
Alas, I don't have this luxury since it's not my server, but one that is hosted with a web hosting provider. They control the setup and configuration of the machines... since it's a shared server I doubt I'll convince them to set the timezone to my location, thus throwing everyone else on the same server out of whack... I can use the putenv() function though for use in PHP and then when saving the date and time into mySQL actually use the PHP date and time functions instead of the mySQL Now() function... Where would I find the TZ codes to use for my area? thanx -Original Message- From: Don Read [mailto:[EMAIL PROTECTED]] Sent: Friday, August 24, 2001 8:39 PM To: Joe Sheble (Wizaerd) Cc: General PHP List Subject: RE: [PHP] local time v.s. server time On 25-Aug-2001 Joe Sheble \(Wizaerd\) wrote: My website is hosted with a provider, and there is a three hour difference in timezones, so when saving date and times to the database, they reflect the server time and not my own local time. The clincher is I know I could do some time math and just substract 3 hours, but I live in Arizona, so we do not go through daylight savings time. So right now it's a three hour difference, but when the time change happens, I'll only be two hours behind. Because of this, what is the best method to get my local date and time entered into the database instead of the server date and time?? In my case the server is in Atlanta, but I have to sync with my credit-card processor on the left coast. So first i start the database (MySQL) on Pacific time with: - TZ=PST8PDT export TZ /usr/local/bin/safe_mysqld --user=mysql /dev/null To make PHP date/time functions jive, during initialization: putenv('TZ=PST8PDT'); // Server on Pacific time No matter that i'm in Texas (CST), everything is now reported on Pac time. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] class variables and methods
But when designing classes, isn't it normal to have private and public variables or properties. Granted my OOP experience is very limited, having access to OOP development in CA-Visual Objects, Clipper, VB, and ASP. But it was normal to have a series of public properties one could access directly and then properties that could only be access by the class itself. Of course in VB and ASP these were defined with Get, Let and Set methods, but you could still access them directly. You could also design properties that were read only as well. Perhaps this is because of operator overloading?? -Original Message- From: Tom Carter [mailto:[EMAIL PROTECTED]] Sent: Sunday, August 19, 2001 2:19 AM To: Andrew Libby; Joe Sheble (Wizaerd) Cc: General PHP List Subject: Re: [PHP] class variables and methods There was a long discussion on this in a java forum I am part of, the product of which was basically this... 1. All variables in a class are best left to be private (not sure PHP has this, but the programmer can work the principle in mind.. that is only the class can access them). 2. Generic variable access/store methods should be avoided - the principle is that the internal variable can change name etc. without the external interface having to worry about it. 3. Method to set/fetch each variable - it may seem a counter intuitive way of doing it, especially when it is possible to do something nice like the set method below. This seems a very un-web way.. and this is where a difference comes in. Web is not inherently OO, and a lot of the practices of web programmers are at conflict with more traditional apps programmers. Web tends to go for speed and simplicity, rather than good design etc. 4. Some situations could theoretically arise where it is necessary to set an unknown amount of variables within a class, however it would be far more sensible to put these into an array. In summary, in good OOP you should have a method for every get/set operation on variables that is required, using arrays as appropiate. Going back to the original point on whether or not to access the variable directly or build a set function in, they are both as bad as each other, just about. They both access variables directly and require the outside program to have knowledge of variable names etc. and it doesn't allow for checking for correct values being set ( a useful thin with the above method) Hope this helps, let me know if I can provide any more advice. Tom - Original Message - From: Andrew Libby [EMAIL PROTECTED] To: Joe Sheble (Wizaerd) [EMAIL PROTECTED] Cc: General PHP List [EMAIL PROTECTED] Sent: Sunday, August 19, 2001 3:34 AM Subject: Re: [PHP] class variables and methods Joe, There are varying opinions on this issue. The argument for methods is that it hides the internal structure of your class. This is always a good thing. This means that the internals of the class can be changed, but the user interface (the user is the programmer here) does not change. So this alternative implementation of someclass class someclass var $data = false; function set($key,$val) { $this-data[$key] = $val; } } is no different the the calling code. In general, I tend to have an accessor/mutator method for each 'property' that I would like to provide access to. I'd have a method for each $key that I want to support (this may not apply in your case). class someclass var $name = false; var $age = false; function name() if(func_num_args()) $this-name = func_get_arg(0); return $this-name; } function age() if(func_num_args()) $this-age= func_get_arg(0); return $this-age; } } Now, this gets a big annoying to code since the lions share of my classes have the name method implementations. I've been hunting for a way to create methods dynamically, but I've only found one. To create class definitions on the fly and eval() them. This works great when you've got a huge number of properties (class/instance vars). I'll construct a static method on the class that processes examines the class vars (get_class_vars()) and defines a class extending my implementation. The sub class has the methods implemented for accessing/mutating the properties I'd like to have methods for. If anyone knows of a means to do this to an existing class (say using create_function() or something), I'd love to hear about it. Andy On Sat, Aug 18, 2001 at 07:09:08PM -0700, Joe Sheble (Wizaerd) wrote: I've been doing some reading up on OOP in PHP, and looking at some of the classes available on the web, and I've got what is probably a stupid question. I've seen this many many times.. class someclass { var $somevar = someval; function set( $key, $val ) { $this-$key = $val; } } $myClass
[PHP] class variables and methods
I've been doing some reading up on OOP in PHP, and looking at some of the classes available on the web, and I've got what is probably a stupid question. I've seen this many many times.. class someclass { var $somevar = someval; function set( $key, $val ) { $this-$key = $val; } } $myClass = new someclass; $myClass-set( somevar, someotherval ); why write a set method when you can just as easily call $myClass-somevar = someotherval; Is there a reason for this? Also, alot of the different table classes (an OOP approach to HTML tables) stores the data in arrays, but at what point is it too much to store into an array? Say you have a forum and the text entered for a single respone could be quite lengthy, much less for 100 replies... wouldn't that be a bit much to store into an array? I know it depends on the system resources, but is there a practical limit that people follow? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] different PHP platforms
I've been using PHP on Linux for about 2 years now, and have absolutely loved it. However, I've recently accepted a full time position developing icky ASP pages, and still use PHP on my own sites. I was wondering about using PHP on WIndows and IIS 5.0. Could somebody using the Windows version of PHP on IIS (preferably the ISAPI version) drop me a line and let me know how you like it? How is it different from the Linux vesion? How is it's COM support? Anything I should look out for? Thanx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] regular expressions and mySQL
I know this would probably be better placed on the mySQL mailing list, but alas I do not subscribe to it and am hesitant to do so to ask one question. Enough PHP users use mySQL that perhaps the answer could be found here. In searching through a text field in a mySQL database, I would like to search for a keyword and return that record as a resultset, obvious no? However, I do not want the search to return true if the search word or phrase falls within an HTML tag contained within the text. The field in question will contain some basic HTML tags but I don't want them searched, just the freeform text. What would be the best approach? I'm not all that well versed in regular expressions, well let's face it, I probably couldn't put a regular expression together if my life depended on it, and any assistance would be greatly appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] regular expression database searches
I know this would probably be better placed on the mySQL mailing list, but alas I do not subscribe to it and am hesitant to do so to ask one question. Enough PHP users use mySQL that perhaps the answer could be found here. In searching through a text field in a mySQL database, I would like to search for a keyword and return that record as a resultset, obvious no? However, I do not want the search to return true if the search word or phrase falls within an HTML tag contained within the text. The field in question will contain some basic HTML tags but I don't want them searched, just the freeform text. what would be the best approach? I'm not all that well versed in regular expressions, well let's face it, I probably couldn't put a regular expression together if my life depended on it, and any assistance would be greatly appreciated. Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, PHP/mySQL ColdFusion/MSSQL http://www.wizaerd.com = The Canvas Expert Online The #1 Resource For Canvas Information http://www.TheCanvasExpert.com = -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Any plans on fixing performance of file Upload?
And how exactly is this the fault of PHP? It's the browser doing the actual upload, all PHP does is receive the file after the browser has uploaded it, sending the name to the script so it knows where it is At 04:25 PM 5/2/01 -0400, Jason Lam wrote: I am wondering if there are any plans to fix the file upload performance problem. Try uploading a 200M file by post to a PHP script, you'll notice how slow it is. Even having enough RAM doesn't seems to help very much. Jason Lam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] why isn't get_browser() not working?
You have a browsecap.ini file and it is in the correct location? At 11:04 AM 4/30/01 -0700, elias wrote: hello. i'm trying to detect what browser version is there...i'm using get_browser() as it was documented: $t = get_browser(); var_dump($t); and all i can get like output is: bool(false) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] count() problem :D
Alias the count() $query = select count(fld_gender) s sumField from tbl_survey; $result = mysql_query( $query, $dbConnection ); $aRow = mysql_fetch_array( $result ); print( $aRow[sumField] ); Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, ColdFusion, PHP, and mySQL http://www.wizaerd.com = -Original Message- From: Chris Adams [mailto:[EMAIL PROTECTED]] Sent: Friday, April 27, 2001 9:31 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] count() problem :D On 27 Apr 2001 19:50:04 -0700, Chris Schneck [EMAIL PROTECTED] wrote: anywho, im having problems getting data out of the count() function i've implemented, could anyone lend a hand? $query = select count(fld_gender) from tbl_survey; how exactly is it that you output data retrieved from a count() implementation? The same way you retrieve data from any other query - SQL functions like count() or sum() return data in the same fashion as normal, non-computed data. As an example: $foo = mysql_query(select count(*) from table); echo Number of records in table: . mysql_result($foo, 0); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] List Files
exec( "ls -1 help*.*", $arFiles ); foreach( $arFiles as $cFile ) { print( $cFile ); } At 08:44 AM 4/19/01 -0400, Matthew Luchak wrote: $path='/root/helpfiles/'; $dir_handle = opendir($path); while ($file = readdir($dir_handle)) { if ((ereg("help",$file)){ INCLUDE "$path$file"; OR echo 'A HREF=".$path$file.'"'.$file.'/A } } Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 19, 2001 8:25 AM To: [EMAIL PROTECTED] Subject: [PHP] List Files Hi, Does anyone know how I can list all the files begining with help in one of my pages. So I have a dir which has various files, like so: help_me.php help_you.php help_us.php Is there some command I can use to select all the files and then print them out? TIA Ade -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] how to scale down image using ImageMagick?
I use ImageMagik all the time for thumbnail creations... this doesn't resize the image, it creates a new image, a thumbnail... but the principle is the same $cWidth = 175; $picture_src = "fullSize/somepic.jpg"; $thumb_dest = "fthumbNail/somepic.jpg"; $aImageInfo = getimagesize( $picture_src ); if( $aImageInfo[0] $cWidth ) { exec("convert -geometry $cWidth -colors 256 -colorspace yuv $picture_src $thumb_dest" ); } At 08:59 AM 4/19/01 -0400, Noah Spitzer-Williams wrote: Is there a way to install the GD library on windows nt systems? i can't get this thing to not scale it if its smaller than a certain width ""Steve Werby"" [EMAIL PROTECTED] wrote in message 00ae01c0c848$8a802bb0$6501a8c0@workstation7">news:00ae01c0c848$8a802bb0$6501a8c0@workstation7... "Noah Spitzer-Williams" [EMAIL PROTECTED] wrote: I have a bunch of pictures all in ranging filesizes and dimensions. I want to resize the ones that over 175 pixels wide to a 175 pixel wide picture however i want the height to scale down (ie. i dont want a really thin picture, i just want it to be what it would be if it were resized). i have this but i cant figure out how to just scale down the width: c:\progra~1\imagem~1\mogrify.exe -geometry 175x30! picture.jpeg the '!' forces those sizes to be used but obvoiusly i dont want the height to be 30. i want it to be whatever it should be so the picture doesnt look flattened. I believe imagemagick has an option where you can specify a single dimension (x or y) and it will set that dimension accordingly and automatically scale the other dimension. This should be covered in the manual pages or --help output of the program. -- -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Which is better coding style...
egads... it distracts me to no end to see an if-else block broken up that way... to me seeing if( some expression ) { some action } else { some other action } is the most normal thing in the world. Same goes for the { at the end of the expression, such as for( ... ) { } while( ... ) { } function SomeFunc() { } That's how I've written all my C, C++, JavaScript, ColdFusion CFSCRIPT, and now PHP. Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, ColdFusion, PHP, and mySQL http://www.wizaerd.com = -Original Message- From: ..s.c.o.t.t.. [gts] [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 19, 2001 2:05 PM To: Php-General Subject: RE: [PHP] Which is better coding style... OOooo... it drives me nuts when i see beginning brackets on seperate lines ;) i like to start brackets on the same line as the statement and finish them on a line of their own. if (...) { } else { } (it drives me nuts to see "} else {" also) -Original Message- From: Sander Pilon [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 19, 2001 4:32 PM To: 'Php-General' Subject: RE: [PHP] Which is better coding style... Definitely the second style :) (If we were talking about C(++) then the first would have even been forbidden by my companies coding standard as well as several coding standards of other companies I worked for.) The reason is this - a function has one entrypoint (duh) and one exitpoint. Jumping out of a function somewhere in the middle leads to unmaintainable code, and bugs when extending that function and that return is overlooked. But, as with the indenting and bracket placing, it is a matter of religion. They would have to torture me for three weeks to get me to place the brackets like you did in your example :) function blah() { $retval = ""; switch( $bob ) { case 1: $retval = "this"; break; case 2: $retval = "that"; break; default: $retval = "other"; break; } return $retval; } -Original Message- From: ..s.c.o.t.t.. [gts] [mailto:[EMAIL PROTECTED]] Sent: 19 April 2001 21:31 To: Php-General Subject: RE: [PHP] Which is better coding style... i say the first style. unneeded variables and other thingies just obscure things and make it harder to maintain. -Original Message- From: Boget, Chris [mailto:[EMAIL PROTECTED]] Subject: [PHP] Which is better coding style... Which is better? function blah() { switch( $bob ) { case 1: return "this"; case 2: return "that"; default: return "other"; } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] a different type of mail problem
I am using the following function to send out emails via PHP: function SendEMail( $to, $subject, $body ) { $additionalHeaders = "MIME-Version: 1.0\n"; $additionalHeaders .= "Content-type: text/html; charset=\"iso-8859-1\"\n"; $additionalHeaders .= "Content-Transfer-Encoding: 7bit\n"; $additionalHeaders .= "Return-path:[EMAIL PROTECTED]\n"; $additionalHeaders .= "Reply-To:[EMAIL PROTECTED]\n"; $additionalHeaders .= "Sender:[EMAIL PROTECTED]\n"; mail( $to, $subject, $body, "From: [EMAIL PROTECTED]\n" . $additionalHeaders ); } This way I get consistent headers... However, when I actually get the emails here are the headers I get: Envelope-to: [EMAIL PROTECTED] Delivery-date: Wed, 18 Apr 2001 12:49:29 -0400 Received: from nobody by artemis.jtlnet.com with local (Exim 3.20 #1) id 14pv8z-0004VT-00 for [EMAIL PROTECTED]; Wed, 18 Apr 2001 12:49:29 -0400 To: [EMAIL PROTECTED] Subject: [TCE] - Confirmation Required From: [EMAIL PROTECTED] MIME-Version: 1.0 Content-type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Reply-To: [EMAIL PROTECTED] Message-Id: [EMAIL PROTECTED] Sender: Nobody [EMAIL PROTECTED] Date: Wed, 18 Apr 2001 12:49:29 -0400 Notice the Sender element does not reflect what I've sent, showing Nobody instead. My hosting provider states it's because their upstream demanded them to set it up this way to prevent spam emails... Is this accurate? If not, what can I tell my ISP to change how emails are sent out? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Speed of MySQL connections - Socket vs. Non-Socket
Please read again what I wrote OK. In a mysql_connect() it is possible to specify a path to the socket which should be used for communicating with MySQL. Yes. [string hostname [:port] [:/path/to/socket] It's not a question. It is a statement prefecaing the real question, which was is connecting directly to a socket faster. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Date formatting
Something I almost always do when pulling dates from a mySQL table is format the date column in the query itself using the mySQL function DATE_FORMAT()... At 01:13 PM 4/6/01 +0100, Matt Davis wrote: Hi I am trying to format a date extracted from my DB. I have run my query and then have used the following to get my row data while ($row = mysql_fetch_array($sql_result)) { $title = $row["message_title"]; $message = $row["message"]; $event = $row["date_of_event"]; $shortevent = date ("D j M", $event); I am trying to take $event and make it diplay like this "FRI 06 APR" using the date function. Although $event outputs like this "2001-04-06 00:00:00" $shortevent outputs "Thu 1 Jan" which is unix epoch date. Does anybody know what I am doiing wrong its probably something really simple but I cant see what. Matt. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Help w/Error Message
In your query you have compid specified twice. If this field is named the same in two seperate tables, preface your fieldnames with the table names... $sql="SELECT fname, lname, users.compid, status, dept, room, bldg, phone, ticket_num, tickets.compid, date_rpt, request_type, hardware, model, dci, dci_num,software_type, software_pkg, problem, comments, entered_by FROM users, tickets WHERE users.compid = tickets.compid ORDER BY lname"; At 10:04 AM 4/6/01 -0400, Toni Barskile wrote: Hi: Can someone please explain the following error message? ERROR 1052: Column: 'compid' in field list is ambiguous Here's my mySQL statement: $sql="SELECT fname, lname, compid, status, dept, room, bldg, phone, ticket_num, compid, date_rpt, request_type, hardware, model, dci, dci_num,software_type, software_pkg, problem, comments, entered_by FROM users, tickets WHERE users.compid = tickets.compid ORDER BY lname"; Thanks in Advance Toni _ Get your FREE download of MSN Explorer at http://explorer.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] scramble the code
This isn't quite accurate. WHen a form's method is set to "GET" (which BTW is the form's default method) the variables and their values are passed along the URL. If your form's method is set to "POST" then nothing should get passed along on the URL. If you see all your data in the URL, you're not using a POST method or the forms action is specified as a url with parameters. At 09:06 AM 4/5/01 -0400, Scott Fletcher wrote: For the data in the "post", when the user type in the data and press the submit button, the data is then carry over to the nextpage.html. In the URL bar, I can clearly see the data, so is there to scramble hte data where anyone won't see it in the URL box at the top of the web browser? Thanks, Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] scramble the code
well then yours must be the special super duper browser that doesn't work the same as most browsers. In my browsers (IE5, IE5.5, NS4.67, NS6, Opera 5) GET passes variables in the URL, and POST does not. That's the reason there are two different methods, and why POST is the reccommended methods. But in your special browser, they must be reveresed because... well... er I can't think of any good reason to reverse these in your special browser... At 10:10 AM 4/5/01 -0400, Scott Fletcher wrote: Well, mine does! Scott ""Joe Sheble (Wizaerd)"" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... This isn't quite accurate. WHen a form's method is set to "GET" (which BTW is the form's default method) the variables and their values are passed along the URL. If your form's method is set to "POST" then nothing should get passed along on the URL. If you see all your data in the URL, you're not using a POST method or the forms action is specified as a url with parameters. At 09:06 AM 4/5/01 -0400, Scott Fletcher wrote: For the data in the "post", when the user type in the data and press the submit button, the data is then carry over to the nextpage.html. In the URL bar, I can clearly see the data, so is there to scramble hte data where anyone won't see it in the URL box at the top of the web browser? Thanks, Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Item in two db tables
I'm not 100% certain about this, but I believe you want to look at using a LEFT OUTER JOIN At 11:37 AM 4/4/01 -0400, bill wrote: If I want to find a list of items in one table whose id does not appear in another table, can that be done in one query? I can only figure it out if I use two queries. $result=mysql_query("SELECT id,item FROM table1"); while ($row=mysql_fetch_array($result)) { $thisid=$row["id"]; $thisitem=$row["item"]; $ckresult=mysql_query("SELECT id FROM table2 WHERE id=$thisid"); if (!mysql_num_rows($ckresult)) { echo "$thisitem using id $thisid is in table 1 but does not appear in table 2BR"; } // end if } // end while kind regards, bill hollett -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] This PHP list
Typically I would never respond to this type of thread discussion, but it's one that gives me a great amount of frustration from time to time. I think this level of frustration stems from the fact that a lot of these 'newbie' questions are even more basic than a PHP newbie should be asking. Things that should be fairly evident to anyone who's done any level of development. The problem is we get people who don't know a lick about programming methodologies, logicical contructs, variables, or any general programming knowledge. I would never dream of asking "How do I edit data in a database?" Or "How do I display records from a database?" These are the types of things you should be familiar with beforehand. It's almost as if someone woke up one morning and decided Geee, I think I'll write a web application. It shouldn't matter that I've never programmed anything ever before, it's the web, anybody could do it...' Databases? nah, I don't need to know anything about databases, I'll just write the code...' And it's not as if this is the only available resource. I downloaded and studied bits of code from everywhere when I decided to learn PHP. I read every article on Zend.com and phpBuilder.com... I bought a PHP book and a mySQL book... I actually took time out to 'learn' the language... and now I write PHP fairly fluently... I rarely ask questions here, but keep the emails to pick up a tip or two. Overall I love this list, but as I've said before, it is a bit frustrating as well At 05:02 PM 3/29/01 +1000, Peter Houchin wrote: Being a newbie, and as i'm sure is the case with alot of other newbies, one that doesn't have a lot of programming back ground, ask stupid questions to this list because for some things that you find easy others, like my self, don't know what to look for in the manual ... so we ask it here... now if it wasn't for the more knowledgeable people on this list, I like many others, would be stuck with out any where to go .. So thanks to those of you that don't complain and crack the s#$@s when newbie become repetitive. Peter -Original Message- From: Ian Harris [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 29, 2001 4:36 PM To: [EMAIL PROTECTED] Subject: [PHP] This PHP list I was hoping that this PHP list would be of people developing with PHP, who have reached some level of familiarity with the product and when they have had a fair go at solving a problem, they then posted it to the list. For example, we have a problem in our code where the last object in an array of objects sometimes vanishes into thin air depending on whether you comment-out a block of unrelated code further up the script. Unfortunately, this list is full of people with questions like "I want to access a database with PHP. Can someone please send me the source code". Does anyone know of any other PHP lists that are more suited to non-trivial, expert-related discussions? If there aren't any around, I'll start one on Yahoogroups or some other similar service. regards Ian. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] This PHP list
I wouldn't expect a programmer to walk in off the street and try to do graphic design without having any concept of graphic design. I wouldn't expect a mechanic to walk into the kitchen and expect to build a souffle. I wouldn't expect a gardner to walk in and perform brain surgery. And I wouldn't expect an artist to walk in and start writing code. If somebody wants to learn how to code, then 'learn' how to do code. Read tutorials, read manuals, etc... At 10:38 AM 3/29/01 -0500, John Almberg wrote: True, but you have to remember that a lot of 'newbies' are actually superb graphic designers with a lot of experience developing static websites. They are grappling with new demands from their customers for more dynamic features. If they don't quite grasp the difficulty of what they are trying to do, you can't blame them for trying to meet their customer's needs. I know this, because I am working with a number of web designers who have a hell of a lot more experience than I do with web sites, but they don't have the programming background. Putting the shoe on the other foot, I could mess with Photoshop for a hundred years and never get good at designing graphics. So I have a lot of respect for what these guys do. Personally, I think it's a great symbiotic relationship: programmers and graphics designers. Both creative, but in entirely different ways. I do agree that designers with paying gigs would do better to farm out the programming stuff to a real programmer, but that's something that they need to learn on their own, perhaps. Meanwhile, it doesn't hurt to answer a dumb question or two, even if the answer has to be a respectful "you don't know how big a question that is!" Just my opinion. John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] search safe URLs
thanx, I'll be looking these over vigarously... At 05:11 PM 3/27/01 +, Philip Olson wrote: Check out this post : http://marc.theaimsgroup.com/?l=php-generalm=98555149708325 The first two tutorials should help. Btw, no reconfigurations are required. Regards, Philip On Tue, 27 Mar 2001, Joe Sheble aka Wizaerd wrote: In order to use URLs without ? and , there has to be some re-configuration in Apache, correct? So somebody who didn't have access to httpd.conf couldn't use this methodology? Or if this is completely incorrect, where can I find more info on implementing it strictly in PHP? Joseph E. Sheble [EMAIL PROTECTED] Wizaerd's Realm http://www.wizaerd.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Is this possible? PHP + Javascript
in the onCLick event of the checkbox call a javascript function. In that function use a window.open() method to open aother browser window, using the open() methods various properties to control how that browser window looks and feels. For the URL for that browser window, make it a PHP script passing an ID. That script would run against the server and database, returning the results in whatever HTML format you include in that browser window. Works similiar to a popup but allows you to run a dynamic script instead of loading up on javascript arrays or variables when the page loads. Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, ColdFusion, PHP, and mySQL http://www.wizaerd.com = -Original Message- From: Reuben D Budiardja [mailto:[EMAIL PROTECTED]] Sent: Monday, March 26, 2001 4:29 PM To: Michael Champagne; PHP General Mailing List Subject: Re: [PHP] Is this possible? PHP + Javascript At 05:11 PM 3/26/01 -0600, Michael Champagne wrote: I have a huge database-driven list of clients with a checkbox next to each one. When I check one of these clients, I'm wanting one of those small javascript boxes to pop up and display the contacts for this client (another database lookup) and allow me to select one via a radio button. I figured I could do this via the checkbox's onclick event, but I'm not completely sure how. How do I bring up the box and display database information within? Any help is GREATLY appreciated. What I did for something like this was: I donwloaded all the information that I'm (probably) going to use and store it in variables/arrays, but I don't display them. Only after an event happened, like onClick, I display the relevant information using javascript, since javascript can access a php variable. I don't if this can work for your problem. But the idea basically is download everything first from server side, and display what is necessary from client side. That way you minimizing the reload/refresh, which take painfully long time for some of the clients. Hope that helps Reuben D. Budiardja Reuben D. Budiardja Web Database Application Programmer / Analyst Devcorps, ITS Goshen College, IN 46526 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] limiting .htaccess reach
I'm using an .htaccess file to auto_append and auto_prepend files within a specific directory, and it works great. Unfortunaltely if I create a new sub-directory that doesn't have it's own .htaccess file, it too tries to use the auto_append and auto_prepend values of the .htaccess file from the parent directory. In this subdirectory, I don't want anything appended or prepended to my php scripts. SO what I always end up doing is creating a new .htaccess file in this subdirectory and create and empty file and use this filename and path in that new .htaccess file. Over all, it's a bit of a PITA... so is there a way to override the auto_append and auto_prepend from an .htaccess file in a parent directory without having to go through all this every time I create a new directory? Joseph E. Sheble [EMAIL PROTECTED] Wizaerd's Realm http://www.wizaerd.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] include virtual, file or exec cgi?
virtual (PHP 3, PHP 4 ) Perform an Apache sub-request int virtual (string filename) Virtual() is an Apache-specific function which is equivalent to !–#include virtual...– in mod_include. It performs an Apache sub-request. It is useful for including CGI scripts or .shtml files, or anything else that you would parse through Apache. Note that for a CGI script, the script must generate valid CGI headers. At the minimum that means it must generate a Content-type header. For PHP files, you need to use include() or require(); virtual() cannot be used to include a document which is itself a PHP file. At 04:50 PM 3/21/01 -0300, Christian Dechery wrote: When I first started playing with PHP I had been using SSI's. I tried to find a way that I could get a file that contained SSI's and php to be parsed, but I haven't seen it done. In Apache it seems like it would be as easy as adding a handler that parses shtml files as php files, but that causes the SSI and/or the PHP parser not to run. so... what you're saying is that I can't have a PHP file #--include--'ed in a regular server parsed html file? it doesn't work? I can have included C and Perl stuff but not PHP? Well I gotta tell ya, that sucks! :( . [ Christian Dechery ] . Webdeveloper @ T Na Mesa! . Listmaster @ Gaita-L . http://www.tanamesa.com.br -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] get filename?
excuse my ignorance here, but is this a configurable options? Anytime I use $PHP_SELF, it strictly the directory and filename.. for example say I have a forum running at www.somedomain.com/forum/index?Message=12 my $PHP_SELF strictly gives me /forum/index.php. I know this for a fact because I use a hybrid of the CF coding style of fusebox, and all my form actions are set to $PHP_SELF and the $QUERY_STRING info is never appended to it... At 09:05 AM 3/20/01 -0800, Data Driven Design wrote: $PHP_SELF will be the filename including $QUERY_STRING and $PATH_INFO variables, $SCRIPT_NAME should be just the filename. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 20, 2001 5:19 AM Subject: [PHP] get filename? Hi Whats the best method to get the filename of the file I am using. E.G if the file is called tom_woz_here.php and would I go about stickin that into $FileName= ??? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] cf to php
the PHP equivalent is isset() if( !isset( $url_Page )) At 03:09 AM 3/19/01 -0500, Jack Dempsey wrote: What exactly does that do chris? If you're trying to check and see if there's a file on the server, then you could do something with readdir, is_file, etc...if you want to post what that actually tests for then i might be able to help more jack -Original Message- From: chris herring [mailto:[EMAIL PROTECTED]] Sent: Monday, March 19, 2001 3:00 AM To: [EMAIL PROTECTED] Subject: [PHP] cf to php is there a php equivalent for this little tidbit from a friend's cf script? here it is: cfif NOT ISDEFINED("url.page") -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Can you recommend an ISP with the following?
I've found http://www.jtlnet.com to be very good and especially responsive... At 09:09 AM 3/19/01 +, Matt Williams wrote: *PHP4 *MySQL *Telnet access *Decent Support *Preferably a Cobalt server (or one with a VERY good Web-based administrator, most other types of Web administrators I've seen have been clunky and a PITA) *Pretty Cheap www.blueboxwebhosting.com especially good for support M@ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Linux/Apache/PHP Windows/IIS/ColdFusion
At 09:36 AM 3/14/01 -0500, Michael Kimsal wrote: What they've got now is completely fine - why necessarily change it? As you've stated, there are many reasons why changing would be a good thing, but mostly it's a manager (a higher up executive level mucky-muck) throwing out 'Hey what about this linux thingie..." and our IT Director (whom I often refer to as FDH for f*ckin d*ck head) saying we'll get right on it... OK OK - I know many of the reasons why, but moving to another platform, you will most likely 'lose' that 'advanced authentication'. Oo. To gain the flexibility and stability of PHP on Linux/Apache, everyone in the company will have to learn to remember their name and password. If management thinks that's too difficult for people (a distinct possibilty, especially if you have thousands of people) you'll be better off staying where you are. You could go CGI PHP on NT, which might be a compromise, but you lose the raw speed advantage PHP as an Apache module has. Yes, the company has deemed this to be too difficult for our employees to remember. What about security on a machine? Last intranet I was at in a large company, just because we were logged into the network on a machine didn't give us automatic access to the intranet - people moved around too much. You still needed to present your name and password for the intranet - and everything there was NT/IIS/ASP and ColdFusion. Nope, there is no other security other than the Advanced Authentication. The security is not tied to any specific machine but a network login. So as soon as they login to any machine, their username and password is automatically passed to the browser and the advanced authentication takes place. Now this if they access the intranet internally through our network. There is also a basic authentication piece to access the intranet externally through the internet but requires a domain name, username and password. The management feels this is acceptable because there are very few (VERY few) people accessing the intranet this way. "Joe Sheble (Wizaerd)" wrote: Currently in-house our intranet is made up of Windows NT, IIS, and ColdFusion. We've also settled on MS IE as our standard browser, and use advanced authentication for logging into the intranet. This provides employees with one click access to the intranet without having to manually and physically login. We've been tossing around the idea of switching our Intranet to Linux, Apache and PHP but we would then lose that Advanced Atuthentication process, no? And to even complicate it even a bit more, if accessing the intranet internally through the network (a combination of Novell and NT) nobody should be forced to login (it being an automatic process) but if they access the intranet externally though the internet they have to be prompted for their normal network login information. Are my managers smoking crack, or do the advanced developers here think this is do-able? And if so, where could I find more information on setting this all up? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Formatting Dates
You could use the mySQL function DATE_FORMAT() in your query string.. SELECT DATE_FORMAT( DateAdded, '%m/%d/%Y' ) as d_Added FROM myDB At 12:52 PM 1/8/01 -0500, stas wrote: Hello, How can I format a date stored in the database in a Date field. It's in this format: -mm-dd I understand that date() function only works for current system date/time. I am looking for something like this: dateformat($date, "mask"), sort of like the one in ColdFusion. Thanks much! stas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] populate select box with contents of a file?
?php $handle=opendir('.'); echo "select name=image_url"; while (false!==($file = readdir($handle))) { // new code here $cExt = explode( ".", $file ); // and here if ($file != "." $file != ".." ( strtolower( $cExt[1] ) == "jpg" ) { echo "option "; echo "value=".$file.""; echo $file; echo "/option\n\r"; } } echo "/select"; closedir($handle); ? At 10:04 AM 3/8/01 -0800, Jerry Lake wrote: Ok, I am using this modified code from the manual. It works great, but how do I modify it further to only show .jpg files ? snip ?php $handle=opendir('.'); echo "select name=image_url"; while (false!==($file = readdir($handle))) { if ($file != "." $file != "..") { echo "option "; echo "value=".$file.""; echo $file; echo "/option\n\r"; } } echo "/select"; closedir($handle); ? /snip Jerry Lake- [EMAIL PROTECTED] Web Designer Europa Communications - http://www.europa.com Pacifier Online - http://www.pacifier.com -Original Message- From: Sean R. Bright [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 07, 2001 4:50 PM To: 'Jerry Lake'; 'Henrik Hansen'; 'php general' Subject: RE: [PHP] populate select box with contents of a file? Take a look at dir() and readdir(). Those along with echo() should help you out. Sean -Original Message- From: Jerry Lake [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 07, 2001 7:40 PM To: Henrik Hansen; php general Subject: [PHP] populate select box with contents of a file? I would like to be able to populate the options of a select box with the contents of my images directory online so I can select the image I want to go with the form I am filling out. what functions do I need to look into to figure this one out? Jerry Lake- [EMAIL PROTECTED] Web Designer Europa Communications - http://www.europa.com Pacifier Online - http://www.pacifier.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Stumped Newbie: Can't get results in db query even though everything checks - what am I missing?
I'd start by adding the mysql_error() function in your die() statement... $result = mysql_query($sql,$connection) or die ("Couldn't get results: " . mysql_error()); it might give more information to help you find the problem... At 10:15 AM 3/8/01 -0800, Nicole Lallande wrote: Greetings, I keep getting the message that I cannot get results. I have a simple user authentication code that uses a mysql database to authenticate from. Initially I had the code working when I had the mysql_connect variables in the code itself. When I moved the connection variables to an include file and then called them as variables, it was necessary to change the variable names in the database (both were initially $username, $password). Now, while I have the connection and opening the db correct I can't get results. Here is my code: require("connect.inc.php"); $connection = mysql_connect("$hostname","$username","$password") or die ("Unable to connect to database."); echo "I'm connected.br"; **__A-OK here mysql_select_db("dnaUsers") or die ("Unable to select database."); echo "I've opened the dnaUsers db.br"; echo "$ruser, $rpassbr"; //this is from the html login form **__Yup, no problem so far - // Formulate the query $sql = "SELECT rep_name FROM reps WHERE username='$ruser' and password='$rpass'"; // Execute the query and put the results in $result $result = mysql_query($sql,$connection) or die ("Couldn't get results."); **__Here it is - crash and burn - the database name is correct, the fields are correct, the username and password are in the db and have been input correctly and are even being passed from the form correctly. I have checked the names of all the fields to ensure they match the variables in the query, checked that the values in the fields are correct - (yes, I have checked that they match.) I have searched the archives but the hard thing about the archives is formulating the question in a way that will yield an answer. Sorry if this has been asked before. TIA, Nicole -- Nicole Lallande [EMAIL PROTECTED] 760.753.6766 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] 2 questions about performance...
Is it in-efficient to use shuffle()? I have a simple 6 element array with 6 strings (URLs to images) and I'm using shuffle() to display all of them in random order upon each page load. The images take a long time (of course is relative, it's mere seconds) but when I remove the call to shuffle, they appear much much faster... Also, is there an efficient number or limit of queries one should call in a singular PHP page? On average, I'll make 7-10 seperate queries to display a page (a graphics related portal and content management system)... I have a singular database connection (with mysql_pconnect()) and use that same connection throughout the script. Sometimes it appears to load quickly, than other times it doesn't, and I'm afraid that as more and more content get put into the databases, the slower it will perform. user authentication navigation (link definitions) form dropdowns (dynamic selects) banner rotation (2 sets, big and small) activity tracker headline or story retrieval comments Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, ColdFusion, PHP, and mySQL http://www.wizaerd.com = -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] How big is too big?
Is there a practical limit one should make on a php file to be included? I'm putting all my global variable declarations and function defintitions into one file to be included across the site. I had thought about splitting them different files based on functionality, but then I thought it would be easier to maintain one singular file broken down into sections. But I don't want to overtax anything... so what would be a good size limit on included files? On the same note, is there a practical limit to how much code should be used within an eval() call? Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, ColdFusion, PHP, and mySQL http://www.wizaerd.com = -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] How big is too big?
Is there a practical limit one should make on a php file to be included? I'm putting all my global variable declarations and function defintitions into one file to be included across the site. I had thought about splitting them different files based on functionality, but then I thought it would be easier to maintain one singular file broken down into sections. But I don't want to overtax anything... so what would be a good size limit on included files? Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, ColdFusion, PHP, and mySQL http://www.wizaerd.com = -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] redirect if sql = nothing
by checking the return value of mysql_num_rows() At 04:32 PM 2/20/01 +, Matt Davis wrote: If my SQL returns no results then i want to redirect to a page saying no results etc but if results are found then I want it to continue on down the script how would i do this. Matt. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Variable stores incomplete values...
Your question encompasses two parts... the subject says these variables are storing incomplete values and later in the email you state mySQL isn't maintaining the formatting of your data. The first part is possible because your mySQL database field may not be declared big enough to actually hold the data. AFAIK there is no limit on actual variable size, as long as the server has enough memory, it should be fine. Your second question about formatting... well the answer is the formatting is most likely in the database, but when you retrieve it and siaplay it ina browser, well the browser doesn't understand anything other than HTML. So carriage returns, line feeds, tabs, etc... never get displayed. If you want the formatting to be kept in the browser, convert the data. A good starting place is nl2br() At 02:22 AM 2/19/01 -0600, Richard Lynch wrote: $variable = This is the data.This is the data.This is the data.This is the dataThis is the dataThis is the dataThis is the dataThis is the dataThis is the dataThis is the dataThis is the data This is the dataThis is the dataThis is the data This is the; da;taThi's is the dataThis is the dataThis is the data This is the dataThis is the dataThis is the dataThis is the data I mean to say taht it is kidof formatted with REturn character, space characters, ', ; and a lot many characters... Now my question is that. If I store the variable in MYSQL dataabse under a particular filed TYPe varchar or TEXT. It doesn't bring up the same kind of format like it was when it was stored.. Is there any way I can get the same output like I stored it.? Use http://php.net/addslashes maybe... If it's varchar(XX) and your string is longer than XX, you will lose the end of the string. If you're not sure how long it might be, just use TEXT in MySQL. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Dir? Can I get a dir listing of the current dir my php file is in?
Another solutions is: $script_name = getenv("PATH_TRANSLATED"); $dir_name = dirname($script_name); // $arFiles will be an array of filenames exec( "ls -1 $dirname", $arFiles ) foreach( $arFiles as $cFile ) { print( $cFile ); } Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, ColdFusion, PHP, and mySQL http://www.wizaerd.com = -Original Message- From: Ifrim Sorin [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 17, 2001 5:46 AM To: Brandon Orther; PHP User Group Subject: Re: [PHP] Dir? Can I get a dir listing of the current dir my php file is in? Hi, You could try this: $script_name = getenv("PATH_TRANSLATED"); $dir_name = dirname($script_name); $d = dir($dir_name); $i = 0; while ($file = $d-read()) $file_array[i] = $file ; } HTH Sorin Ifrim - Original Message - From: Brandon Orther [EMAIL PROTECTED] To: PHP User Group [EMAIL PROTECTED] Sent: Saturday, February 17, 2001 5:03 AM Subject: [PHP] Dir? Can I get a dir listing of the current dir my php file is in? Hello, I am looking for a way to get a dir listing of the current dir my phpscript is in and putting it into an array. Does anyone have a quick way to do this? Thank you, Brandon Orther WebIntellects Design/Development Manager [EMAIL PROTECTED] 800-994-6364 www.webintellects.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] displaying more than one result
it's be a bit more helpful if we can see the code you're using to display your results... At 02:15 PM 2/16/01 +, Matt Davis wrote: I have a php script which runs a query and then outputs the results in to html. The html should repeat itself depending on the number of results. i.e to produce search results. I know that my current query should return 5 results however it is only show the last one. Is there something I need to do to show all my results. Matt. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How to make text BOLD
what exactly do you mean by it doesn't work... print( "Bsome test/B" ); it's always worked for me... At 09:31 AM 2/16/01 -0600, Nguyen, David M wrote: I want to make my text BOLD using either STRONG/STRONG or B/B but it did not work with PHP. Can someone please advise why not or if there is another way to do it. Thanks, David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] display mor than one result.
you're looping through the all database records, assigning the values to variables, but then you never output the variables until after you exit your while() loop. This is incorrect. Time to read up on database handling in PHP... // psuedo-code $queryResults = mysql_query( $query, $db ); while( $row = mysql_fetch_array( $queryResults )) { $someVar1 = $row["FieldOne"]; $someVar2 = $row["FieldTwo"]; $someVar3 = $row["FieldThree"]; print( $someVar1 . " - " . $someVar2 . " - " . someVar3 . "BR" ); } At 05:18 PM 2/16/01 +, Matt Davis wrote: Can Anybody help with this code it is currently only listing the very last entry record in my db however i want it to list however many the query finds can anybody see what I am doing wrong. thanks Matt. ?php //connect $connection = mysql_connect("localhost","***","***") or die ("Couldn't connect to server."); //select db $db = mysql_select_db ("business", $connection) or die ("Couldn't select database."); //create sql statement $sql = "select Business_Name,Address_Line_1,Address_Line_2,Address_Line_3,Address_Line_4,Ad dress_Line_5,Address_Line_6,Contact_Person,Telephone,Fax,Mobile,E_Mail,Link, URL,Trading_Details from Main"; //execute sql query and get results $sql_result = mysql_query($sql) or die ("Couldn't execute query."); ? HEAD TITLE Business Search /TITLE /HEAD BODY LEFTMARGIN="0" TOPMARGIN="0" ALINK="#b567fb" LINK="#00" VLINK="#c0c0c0" ?php /*results variables for data to be displayed*/ while ($row = mysql_fetch_array($sql_result)) { $businessname = $row["Business_Name"]; $addressline1 = $row["Address_Line_1"]; $addressline2 = $row["Address_Line_2"]; $addressline3 = $row["Address_Line_3"]; $addressline4 = $row["Address_Line_4"]; $addressline5 = $row["Address_Line_5"]; $addressline6 = $row["Address_Line_6"]; $contactperson = $row["Contact_Person"]; $telephone = $row["Telephone"]; $fax = $row["Fax"]; $mobile = $row["Mobile"]; $email = $row["E_Mail"]; $link = $row["Link"]; $url = $row["URL"]; $tradingdetails = $row["Trading_Details"]; } //deal with website if ($url != '') { $me="A HREF=\"http://".$url."\" TARGET='_blank'IMG BORDER=\"0\" SRC=\"website.gif\"/A"; } else { $me=" "; } // end of deal website ? CENTER TABLE BACKGROUND="../../images/misc/ryw_background_top.gif" BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%" TR TD ALIGN="center" FONT COLOR="#ff" FACE="verdana, arial, century gothic" SIZE="1" /FONT /TD /TR /TABLE BR TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="500" TR TD ALIGN="center" FONT FACE="verdana" SIZE="1" COLOR="#00" FONT SIZE="2" B Business Search Results /B /FONT BR B You Searched for FONT COLOR="#ff9933" Consultancy /FONT in FONT COLOR="#ff9933" Bassingbourn /FONT, here are the results... /B /FONT /TD /TR /TABLE BR !--start of search results-- TABLE BACKGROUND='ryw_background_top.gif' BORDER='0' CELLPADDING='1' CELLSPACING='0' WIDTH='100%' TR TD ALIGN='center' FONT COLOR='#ff' FACE='verdana, arial, century gothic' SIZE='2' B ? echo "$businessname" ? /B /FONT /TD /TR /TABLE BR TABLE BORDER='0' CELLPADDING='0' CELLSPACING='0' WIDTH='500' TR TD ALIGN='center' VALIGN='top' FONT COLOR='#00' FACE='verdana, arial, century gothic' SIZE='1' B ? echo "$tradingdetails" ? /B /FONT /TD /TR /TABLE BR TABLE BORDER='0' CELLPADDING='0' CELLSPACING='0' WIDTH='500' TR TD ALIGN='center' VALIGN='top' WIDTH='34%' FONT COLOR='#00' FACE='verdana, arial, century gothic' SIZE='1' B Address /B BR ? echo "$addressline1" ? BR ? echo "$addressline2" ? BR ? echo "$addressline3" ? BR ? echo "$addressline4" ?
RE: [PHP] MySQL COUNT Won't Work
I do lots and lots of count()'s in PHP and have never had any problems... of course, I do it a bit differently than you did.. // I always have these in a top level include $UserName = "noneYa"; $Password = "yeahRight"; $myDatabase = "uhhuh"; $dbConn = mysql_connect( "localhost", $UserName, $Password ) or die( "Cannot Connect To Database Server" ); mysql_select_db( $myDatabase ) or die( "Unable To Connect To Database: " . $myDatabase ); // up to here // then I always make sure the file is included at the top of my page, and then call this query like this... $qQuery = "SELECT Count(*) as nTotal FROM someDB"; $rQuery = mysql_query( $qQuery, $dbConn ); $qrQuery = mysql_fetch_array( $rQuery ); print( $qrQuery["nTotal"] ); At 11:37 AM 2/16/01 -0600, Jeff Oien wrote: That's not it. Get: Warning: Supplied argument is not a valid MySQL-Link resource in count.php3 on line 14 Jeff Oien Shouldn't that be $result = mysql_query($sql,$db) or die("Couldn't execute query."); So you're querying the database, and not the connection? HTH Jon -Original Message- From: Jeff Oien [mailto:[EMAIL PROTECTED]] Sent: 16 February 2001 17:27 To: PHP Subject: [PHP] MySQL COUNT Won't Work I'm totally stuck on this code. I get the error "Couldn't execute query." so I know where it's failing but can't figure out what's wrong. I have a database with 'title' as one of the fields. Based on code in PHP Fast and Easy. Jeff Oien ?php $db_name = "Music"; $table_name = "music"; $connection = mysql_connect("localhost", "", "") or die("Couldn't connect."); $db = mysql_select_db($db_name, $connection) or die("Couldn't select database."); $sql = "SELECT COUNT (title) FROM music"; $result = mysql_query($sql,$connection) or die("Couldn't execute query."); //error from here $count = mysql_result($result,0,"count(title)"); echo "$count"; ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] input type=file
to put it simply, you can't... but you could put an input type of text with a link or a button next to it manually, and then on the onClick of either this button or link open a secondary window running a PHP script that reads a particular directory structure with full navigation support. Then when the user clicks a filename, place that into the input in the first window and close the secondary window. However, this would require JavaScript and a full recursive directory browser script in PHP. I have something similiar to this in a content manager script I've written, but it doesn't check other directories. It picks an image from an /ImageLibrary/ directory, allowing the user to preview an image, upload new images, delete images, rename images, but most importantly pick a filename. Then it populates a field in the content manager screen for saving to a database. Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, ColdFusion, PHP, and mySQL http://www.wizaerd.com = -Original Message- From: Jerry Lake [mailto:[EMAIL PROTECTED]] Sent: Friday, February 16, 2001 4:57 PM To: [EMAIL PROTECTED] Subject: [PHP] input type=file this doesn't relate directly to PHP, but it will when I am done. How can I create a file input that reads from a directory on the server instead of the users machine Jerry Lake- [EMAIL PROTECTED] Web Designer Europa Communications - http://www.europa.com Pacifier Online - http://www.pacifier.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] input type=file
that would be one option... however, if you're going to let them navigate through different directories, it would be a bit tougher in a dropdown... but if all you need is to display a list of files to them, then that would work great Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, ColdFusion, PHP, and mySQL http://www.wizaerd.com = -Original Message- From: Jerry Lake [mailto:[EMAIL PROTECTED]] Sent: Friday, February 16, 2001 5:16 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] input type=file so then maybe, if I understand it correctly (which may or may not be true) I could read the contents or a directory and populate a dropdown list...? Jerry Lake- [EMAIL PROTECTED] Web Designer Europa Communications - http://www.europa.com Pacifier Online - http://www.pacifier.com -Original Message- From: Joe Sheble (Wizaerd) [mailto:[EMAIL PROTECTED]] Sent: Friday, February 16, 2001 4:16 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] input type=file to put it simply, you can't... but you could put an input type of text with a link or a button next to it manually, and then on the onClick of either this button or link open a secondary window running a PHP script that reads a particular directory structure with full navigation support. Then when the user clicks a filename, place that into the input in the first window and close the secondary window. However, this would require JavaScript and a full recursive directory browser script in PHP. I have something similiar to this in a content manager script I've written, but it doesn't check other directories. It picks an image from an /ImageLibrary/ directory, allowing the user to preview an image, upload new images, delete images, rename images, but most importantly pick a filename. Then it populates a field in the content manager screen for saving to a database. Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, ColdFusion, PHP, and mySQL http://www.wizaerd.com = -Original Message- From: Jerry Lake [mailto:[EMAIL PROTECTED]] Sent: Friday, February 16, 2001 4:57 PM To: [EMAIL PROTECTED] Subject: [PHP] input type=file this doesn't relate directly to PHP, but it will when I am done. How can I create a file input that reads from a directory on the server instead of the users machine Jerry Lake- [EMAIL PROTECTED] Web Designer Europa Communications - http://www.europa.com Pacifier Online - http://www.pacifier.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] unstable execution of mysql_db_query($db, $myQuery)
try using mysql_query( $qQuery, $dbConnection ); At 10:32 AM 2/15/01 -0600, Zhu George-CZZ010 wrote: I am using MySQL 3.22.32 and PHP 4.01PL2, but it seems that mysql_db_query($db, $myQuery) is not quite stable, actually, in my code, it is like mysql_db_query($db, $myQuery) or die "Something wrong during query"); 1 out of 15 (the same query), it will "die". Does anyone have any suggestion? Thanks, George -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How to inverse the date sorting
add a DESC to your order by clause... fairly simple SQL syntax, could be picked up from a myriad of SQL references and manuals $sql = "select * from table_name WHERE TO_DAYS(NOW()) - TO_DAYS(date) = 21 order by date DESC"; At 12:14 PM 2/15/01 -0500, Malouin Design Graphique wrote: Hello, Anybody here would know, how I could inverse the date sorting or ordering? This script below gives me for example: 2001-01-01 2001-01-15 2001-01-31 and so on... when I wish it would gives me: 2001-01-31 2001-01-15 2001-01-01 and so on... - ?php $db = mysql_connect("servername.com", "root", "password"); mysql_select_db("stats", $db); $sql = "select * from table_name WHERE TO_DAYS(NOW()) - TO_DAYS(date) = 21 order by 'date'"; $result = mysql_query( $sql ); while ( $row = mysql_fetch_array( $result ) ) { echo "trtdspan class=\"size1\"b$row[date]/bbrimg src=\"$row[indice_url]\"br$row[indice]hr noshade size=\"1\"/span/td/tr\n"; } ? - Thanks again for your help. Merci beaucoup, Yves -- Malouin Design Graphique http://www.malouin.qc.ca Qubec (Qubec) CANADA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] recommended PHP/MySQL host
Well I don't know about anyone else's experience, but I've been using JTL Networks (http://www.jtlnet.com) for almost 6 months. Granted, that's not a lot of time, but I've been fairly impressed with them. Reasonable rates, a great support staff, and a lot of flexibility... Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, ColdFusion, PHP, and mySQL http://www.wizaerd.com = -Original Message- From: Freemail [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 14, 2001 8:56 PM To: [EMAIL PROTECTED] Subject: [PHP] recommended PHP/MySQL host Could anyone recommend a reasonably priced (preferably below USD 100 a month) host that provides PHP4 and MySQL? What are your experiences with the host that you are recommeding? Thanks in advance. - Andres Montiel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] OOP in web development
I've been using PHP for over a year now and have been successfully running three different websites developed with PHP, but I've never done anything with classes or objects. Even when returning data from a mySQL database, I use mysql_fetch_array() instead of mysql_fetch_object(). What am I missing by not using objects and classes, other than reusability? What are the real benefits to using OOPs in PHP? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Fwd: Re: [PHP] OOP in web development
At 03:11 PM 2/13/01 -0500, you wrote: I find the ability to write something once (say a mysql_connect(); statement) and be able to run it on any page just with $db-connect(); is pretty cool. While that may not seem cool, if you some day change a a PHP statement that exists on many pages, this lets you change it in one place, instead of having to copy it to dozens of other places. Also, what happens if you change your database password and now need to change a bunch of pages to have the new password? Problem solved in OOP, because the vars are all in the same file. problem solved by building modular INC (or include) file... all the vars are in one file, and are included at the top of every other file, just as a class file would have to be. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] RegEx and URLs
Either I missed the answer on the mailing list, or it was accidentally skipped, so I'll re-ask... I have a bit of text ( a TEXT field in mySQL ) and there may or may not be URLs in this text. (These URLs are defined as anything starting with http://, mailto:, or www.). Some of these URLs may or may not be already contained with an HTML A HREF tag. I need a regular expression that'll find these URLs and convert them to valid A HREF tags while leaving those URLs that are already in appropriate tags alone. Can anybody offer any assitance on this? I'm afraid I'm a bit weak in the regex areas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] neat html output
Write yourself a function that handles it yourself and include it in every page... something such as: function println( $cTextToPrint ) { print( $cTextToPrint . "BR" ); } then in your pages just use println() everywhere... At 08:29 AM 1/31/01 -0600, Mark wrote: I'd like my html output to be neatly written, including newlines is helpful but does anyone know of a better way to output newlines than appending ."\n"; to every echo statement. -Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] neat html output
oops, that function declaration should look like: function println( $cTextToPrint ) { print( $cTextToPrint . chr(13) ); } At 07:40 AM 1/31/01 -0700, Joe Sheble (Wizaerd) wrote: Write yourself a function that handles it yourself and include it in every page... something such as: function println( $cTextToPrint ) { print( $cTextToPrint . "BR" ); } then in your pages just use println() everywhere... At 08:29 AM 1/31/01 -0600, Mark wrote: I'd like my html output to be neatly written, including newlines is helpful but does anyone know of a better way to output newlines than appending ."\n"; to every echo statement. -Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] RegEx and URLs
I have some text that may or may not contain valid URLs (anything starting with an http:// or a mailto:). Some of these URLs may or may not be contained within a valid A HREF tag. Could somebody help me out with a regex that would find all the URLs that are not already contained in an A HREF tag and convert them to one? The URLs could fall anywhere within the text. thanx! Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, ColdFusion, PHP, and mySQL http://www.wizaerd.com = -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] RegEx and URLs
I have some text that may or may not contain valid URLs (anything starting with an http:// or a mailto:). Some of these URLs may or may not be contained within a valid A HREF tag. Could somebody help me out with a regex that would find all the URLs that are not already contained in an A HREF tag and convert them to one? The URLs could fall anywhere within the text. thanx! Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, ColdFusion, PHP, and mySQL http://www.wizaerd.com = -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] RE: confused about eval()
I don't know if anybody is curious or not, but I found my own problem... I changed the following code: $cVar = addslashes( $qrNews[$cContentField . "Text"] ); eval( "? " . $cVar . " ?" ); to: $cVar = $qrNews[$cContentField . "Text"]; eval( $cVar ); SO basically I removed the addslashes() (which I thought were necessary since the code snippet had quotes in them) and the ? and ? from the eval funciton call, and it works as expected Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, ColdFusion, PHP, and mySQL http://www.wizaerd.com ===== -Original Message- From: Joe Sheble (Wizaerd) [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 28, 2001 12:44 PM To: General PHP List Subject: confused about eval() I have searched the archives, php.net and zend.com, and cannot seem to come up with an answer as to why this isn't woking... I have the following code snippet stored in a database, and I'm trying to eval it with this line of code: $cVar = addslashes( $qrNews[$cContentField . "Text"] ); eval( "? " . $cVar . " ?" ); I've tried: eval( $cVar . " ?" ); eval( "? " . $cVar ); and I cannot get the code snippet to actually evaluate... here's the output I actually do get: TCE's Canvas Chat (Java Applet) if( !( $myFile = en( \"http://wizaerd.com/cgi-sys/mchat.cgi?channel=wizaerd.com\", \"r\" ))) { print( \"Cannot be opened\" ); exit; } while( !feof( $myFile )) { $myLine = fgets( $myFile, 255 ); print( $myLine . \" \" ); } fclose( $myFile ); Parse error: parse error in Unknown on line 0 the code in the database is correct cuz I can drop it into a PHP page and it runs as expected... Could somebody give me a hand with this? Thanx --- code as is in database --- if( !( $myFile = fopen( "http://wizaerd.com/cgi-sys/mchat.cgi?channel=wizaerd.com", "r" ))) { print( "Cannot be opened" ); exit; } while( !feof( $myFile )) { $myLine = fgets( $myFile, 255 ); print( $myLine . "BR" ); } fclose( $myFile ); Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, ColdFusion, PHP, and mySQL http://www.wizaerd.com = -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] LOOKING FOR CODE LOCATION IN PHP SOURCE....
I don't believe this is a PHP function, but rather a function of the browser if using the INPUT TYPE="file" Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, ColdFusion, PHP, and mySQL http://www.wizaerd.com = -Original Message- From: Tim Meader [mailto:[EMAIL PROTECTED]] Sent: Monday, January 29, 2001 8:36 AM To: [EMAIL PROTECTED] Subject: [PHP] LOOKING FOR CODE LOCATION IN PHP SOURCE Hey all, I've come to the realization that if I intend to be able to write a file to disk AS it's being uploaded via http, I will need to modify the PHP source directly. Just wondering, anyone know in what source file I should be looking for the HTTP UPLOAD handling code, I've looked through quite a few files in the /ext/standard source directory, to no avail yet. Thank you in advance to any and all for your help Tim Meader [EMAIL PROTECTED] ACS Government Solutions Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP/MySQL question
// loops through the entire recordset while( $qrResults = mysql_fetch_array( $rQuery )) { print( $qrResults["SomeField"] } // reset the recordpointer to the first record mysql_data_seek( $rQuery, 0 ); Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, ColdFusion, PHP, and mySQL http://www.wizaerd.com = -Original Message- From: Julia A . Case [mailto:[EMAIL PROTECTED]] Sent: Monday, January 29, 2001 4:15 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP/MySQL question Is it possible to move through an array that is returned as a recordset and then move back to the beginning of the array. Julia -- [ Julia Anne Case ] [Ships are safe inside the harbor, ] [Programmer at large] [ but is that what ships are really for.] [ Admining Linux ] [ To thine own self be true. ] [ Windows/WindowsNT ] [ Fair is where you take your cows to be judged. ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] functions????
your function declarations must appear before you actually call them. code ... ? function pf() { echo "profile"; } function pal_edit() { echo "pal"; } switch ($action) { case "pf": profile(); break; case "pal": pal_edit(); break; } ? Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, ColdFusion, PHP, and mySQL http://www.wizaerd.com = -Original Message- From: Kumanan [mailto:[EMAIL PROTECTED]] Sent: Saturday, January 27, 2001 4:29 PM To: [EMAIL PROTECTED] Subject: [PHP] functions Hi, i got problem with functions when i call the files with url//filename.php?action=pal all the time it says Fatal error: Call to unsupported or undefined function pal_edit() in /cfiles/memberlink.php on line 7 code ... ? switch ($action) { case "pf": profile(); break; case "pal": pal_edit(); break; } function pf() { echo "profile"; } function pal_edit() { echo "pal"; } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] strange PHP/MySQL problem
Is it possible that the name field isn't lon enough to contain the full value so is being truncated whereas the description field is long enough... Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, ColdFusion, PHP, and mySQL http://www.wizaerd.com = -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Saturday, January 27, 2001 9:06 PM To: [EMAIL PROTECTED] Subject: [PHP] strange PHP/MySQL problem if you goto http://downloads.moddingcentral.com/add.php you will see a simple form this form takes the info and a PHP script processes it and places it into a mysql table. now the problem if i put Cynical Saint's Video Tutorial in the name it will display Cynical Saint\ in the dbase (also seen @ downloads.moddingcentral.com) but if you place it in the description it is fine.. here is my sql query $rst = mysql_query("INSERT INTO tablename(id, game, section, name, size, description, dllink, creator, creatoremail, date, website, score, downloads) VALUES ('$id', '$game', '$section', '$modname', '$size', '$description', '$dllink', '$creator', '$creatoremail', now(), '$website', '0', '0') ") or die(mysql_error()); Whats wrong with this? its driving me nuts! - Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]