Re: [PHP] mysql_connect does not connect

2004-09-13 Thread Jason Davidson
Also, a google on the error returns hundreds of results.. http://www.google.ca/search?hl=en&ie=UTF-8&q=Can%27t+connect+to+++MySQL+server+on+%27localhost%27+%2810061%29&btnG=Search&meta= Jason "Jason Davidson" <[EMAIL PROTECTED]> wrote: > > Windows XP Firewall, or any other firewall for that

Re: [PHP] mysql_connect does not connect

2004-09-13 Thread Jason Davidson
Windows XP Firewall, or any other firewall for that matter must be off. Jason "Sam Hobbs" <[EMAIL PROTECTED]> wrote: > > I have: > PHP Version 5.0.1 > MySQL 5.0.1 > Apache 2.0.48 > Winows XP Pro SP2 > > MySQL is working fine as best as I can see; I have tried the various samples

[PHP] mysql_connect does not connect

2004-09-13 Thread Sam Hobbs
I have: PHP Version 5.0.1 MySQL 5.0.1 Apache 2.0.48 Winows XP Pro SP2 MySQL is working fine as best as I can see; I have tried the various samples in the MySQL manual and I have executed the myTest sample provided with MySQL. They all work. However I can't get mysql_connect to w

Re: [PHP] small query prob in Mysql

2004-09-13 Thread Curt Zirzow
* Thus wrote Sagar C Nannapaneni: > Hi everybody, > > I'm having a database named "items", inthat > one field name is "itemname" and the contents of > that field is as follows > > Monitor 15" - LG > Monitor 17" - Samsung > Keyboard - TVS > Monitor 15" - Samsung > Mouse - Genius > Keyboard -

[PHP] small query prob in Mysql

2004-09-13 Thread Sagar C Nannapaneni
Hi everybody, I'm having a database named "items", inthat one field name is "itemname" and the contents of that field is as follows Monitor 15" - LG Monitor 17" - Samsung Keyboard - TVS Monitor 15" - Samsung Mouse - Genius Keyboard - Microsoft The first part is the component name a

Re: [PHP] usage stats

2004-09-13 Thread Chris Shiflett
--- Victor_Saldaña_D. <[EMAIL PROTECTED]> wrote: > i need to found usage stats for a paper in my work. > > i found some stats, but the method is not very strong. > > any link please You want a combination of this: http://news.netcraft.com/archives/web_server_survey.html and this: http://www.s

[PHP] Re: performance hit using imagecreatetruecolor

2004-09-13 Thread Manuel Lemos
Hello, On 09/14/2004 12:22 AM, Kevin Coyner wrote: I'm working on a website where I'd like to display a thumbnail from a repository of jpg's of normal (@ 800x600 px) size. Each time a user comes to this page, I'd like to show a new thumbnail from a different image in the repository. Obviously I co

[PHP] performance hit using imagecreatetruecolor

2004-09-13 Thread Kevin Coyner
I'm working on a website where I'd like to display a thumbnail from a repository of jpg's of normal (@ 800x600 px) size. Each time a user comes to this page, I'd like to show a new thumbnail from a different image in the repository. Obviously I could simple resize all the jpg's to my desired siz

Re: [PHP] Re: image size?

2004-09-13 Thread Ryan W Sims
Let me explain more fully: I call a script like this: The script figures out if the image named in $_GET['file'] is portrait or landscape, and creates a thumbnail of the same orientation. I would like to get the x and y values of the image out of this script somehow, so that I can specify the hei

Re: [PHP] line breaks in email text messages

2004-09-13 Thread Michael Collins
At 9:11 AM +0800 9/14/04, Michael Collins wrote: How do I preserve line breaks in the body of an email message? Nevermind got it figured out. sorry for the extra bandwidth -- Michael __ ||| Michael Collins ||| Kuwago Inc ||| Singapore and Seattle USA -- PHP General Mailing List (http://www.php.net

[PHP] line breaks in email text messages

2004-09-13 Thread Michael Collins
How do I preserve line breaks in the body of an email message? The email message is plain text and I simply want to have a return included between each element entered into a form. I have used \n or \r\n (since this is a Windows server) to no avail. The email message I get back has all the data

[PHP] Survey on Open Source

2004-09-13 Thread Mike Chan
Dear all, I am conducting a survey on open source software. This is for my academic coursework and dissertation. It will be great to have your support and participation in this survey. This survey has two separate questionnaires, focusing on the following areas: 1) OSS development (Developers

RE: [PHP] extended class question

2004-09-13 Thread Ed Lazor
> Because test's var1 is private. > > test->var1 isn't accessible by class testing, so the assignment you're > doing in testing's constructor is assigning "Pizza Delivery" to > testing->var1 instead. > > When you call $test2->get_var1() you're calling the parent's get_var1() > method, which print

Re: [PHP] Regular Expression: Markup Code

2004-09-13 Thread Tom Rogers
Hi, Tuesday, September 14, 2004, 6:04:44 AM, you wrote: r> Hello, would someone please help me with my regular expressions? They are so r> complex! r> Here is what I need to do. I have a string with contents similar to the r> following: r> r>(a bunch of markup code) r> r>

Re: [PHP] extended class question

2004-09-13 Thread Rick Fletcher
Ed Lazor wrote: How come the output to this script is "World Trade Center" instead of "Pizza Delivery"? Thanks, Ed class test { private $var1; function __construct() { $this->var1 = "World Tra

Re: [PHP] extended class question

2004-09-13 Thread Curt Zirzow
* Thus wrote Ed Lazor: > How come the output to this script is "World Trade Center" instead of "Pizza > Delivery"? > > Thanks, > > Ed > > > > > class test { > private $var1; defines 'test' class to only have access. >

[PHP] Re: extended class question

2004-09-13 Thread Greg Beaver
Hello again Ed, This is a tricky thing. When you define a variable as being private, it literally becomes unavailable to child classes, and exists only as the var1 variable in objects of class test. To prove this, try: a; } function seta($a) { $this->a = $a; } } class b

Re: [PHP] Weird numbers around HTTP response body

2004-09-13 Thread Curt Zirzow
* Thus wrote [EMAIL PROTECTED]: > > And I monitor the HTTP response coming from the server (apache), it > looks like this: > > HTTP/1.1 200 OK > Transfer-Encoding: chunked > > 7 > testing > 0 > Thats http/1.1 chunked encoding: 1 t 4 esti 2 ng 0 client should recognized the chunked encoding

Re: [PHP] Weird numbers around HTTP response body

2004-09-13 Thread Marek Kilimajer
[EMAIL PROTECTED] wrote: I noticed some numbers mixed with the response generated by my PHP code, and I can't figure out what's causing it. I've dumbed my PHP script down to just this (what could be simpler?): And I monitor the HTTP response coming from the server (apache), it looks like this: HT

RE: [PHP] Re: image size?

2004-09-13 Thread Ed Lazor
I think you'll have to use the imagex and imagey functions to get the dimensions of the thumbnail in order to calculate the size. > -Original Message- > What if the values for x and y are not known? I have a function that > returns a thumbnail of a larger image; it calculates the size of

[PHP] Regular Expression: Markup Code

2004-09-13 Thread [ rswfire ]
Hello, would someone please help me with my regular expressions? They are so complex! Here is what I need to do. I have a string with contents similar to the following: (a bunch of markup code) (a bunch of markup code) (a bunch of markup cod

Re: [PHP] Re: MSSQL, PHP and Linux

2004-09-13 Thread John Nichel
Greg Donald wrote: Just curious here.. Why are you hosting with someone who is using Fedora in the first place? Hope you're not paying for that. Fedora is a test platform for RedHat's non-free commercial distro. By it's very nature it will be broken. Quoted from: http://www.redhat.com/software

Re: [PHP] php.net code samples grey boxes

2004-09-13 Thread Curt Zirzow
* Thus wrote Greg Donald: > Is it just me or are the styles for the grey code sample boxes on > php.net messed up? I can't see any of the code, it's just solid grey > boxes from here. I am trying with Mozilla 1.6-5 and Firefox 0.8 on > Debian sarge. Anyone else seeing this issue? The copy of th

[PHP] extended class question

2004-09-13 Thread Ed Lazor
How come the output to this script is "World Trade Center" instead of "Pizza Delivery"? Thanks, Ed var1 = "World Trade Center"; } function get_var1() { return $this->var1; }

Re: [PHP] usage stats

2004-09-13 Thread Greg Donald
On Mon, 13 Sep 2004 15:29:20 -0400, Victor Saldaña D. <[EMAIL PROTECTED]> wrote: > i need to found usage stats for a paper in my work. > > i found some stats, but the method is not very strong. > > any link please I use it, and a bunch of guys named John use it. That's like 3 or 4 of us at leas

[PHP] Re: Weird numbers around HTTP response body

2004-09-13 Thread Manuel Lemos
Hello, On 09/13/2004 05:21 PM, [EMAIL PROTECTED] wrote: I noticed some numbers mixed with the response generated by my PHP code, and I can't figure out what's causing it. I've dumbed my PHP script down to just this (what could be simpler?): And I monitor the HTTP response coming from the server (

Re: [PHP] php.net code samples grey boxes

2004-09-13 Thread Greg Donald
On Mon, 13 Sep 2004 15:50:59 -0400, John Holmes <[EMAIL PROTECTED]> wrote: > Drugs are bad, mmmkay? Usually drugs produce color, not take it away. *shrug* I think I got some bad updates this morning via apt-get. I'm forcing a specific proportional font. I can now see the colorful php source co

[PHP] Weird numbers around HTTP response body

2004-09-13 Thread tmp1000
I noticed some numbers mixed with the response generated by my PHP code, and I can't figure out what's causing it. I've dumbed my PHP script down to just this (what could be simpler?): And I monitor the HTTP response coming from the server (apache), it looks like this: HTTP/1.1 200 OK Date: Mo

Re: [PHP] Re: image size?

2004-09-13 Thread Ryan W Sims
What if the values for x and y are not known? I have a function that returns a thumbnail of a larger image; it calculates the size of the created image based on the dimensions of the original. Paul Birnstihl wrote: Ed Lazor wrote: Is there a way to get the size of an image created using the imagec

Re: [PHP] Re: MSSQL, PHP and Linux

2004-09-13 Thread blackwater dev
Nope, not paying for it. I think it is just a trial...he has tried for a few weeks to get the freetds library to work with redhat 9 with no luck so I think he just now wants to try fedora for the heck of it. We have no idea as to why it won't work with Red Hat 9...must me missing a small step or

Re: [PHP] Re: MSSQL, PHP and Linux

2004-09-13 Thread Greg Donald
On Mon, 13 Sep 2004 06:33:15 -1200, blackwater dev <[EMAIL PROTECTED]> wrote: > Still no luck with thismy host has asked: > > if someone has a (fedora core 2) RPM for us to install that has > freetds support built in? > > Anyone have anything like this?? Just curious here.. Why are you hos

Re: [PHP] php.net code samples grey boxes

2004-09-13 Thread John Holmes
From: "Greg Donald" <[EMAIL PROTECTED]> Is it just me or are the styles for the grey code sample boxes on php.net messed up? I can't see any of the code, it's just solid grey boxes from here. I am trying with Mozilla 1.6-5 and Firefox 0.8 on Debian sarge. Anyone else seeing this issue? The copy

RE: [PHP] php.net code samples grey boxes

2004-09-13 Thread Jay Blanchard
[snip] Is it just me or are the styles for the grey code sample boxes on php.net messed up? I can't see any of the code, it's just solid grey boxes from here. I am trying with Mozilla 1.6-5 and Firefox 0.8 on Debian sarge. Anyone else seeing this issue? The copy of the PHP manual I downloaded a

[PHP] usage stats

2004-09-13 Thread Victor Saldaña D.
hi people, i need to found usage stats for a paper in my work. i found some stats, but the method is not very strong. any link please -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Convert textarea post data from plain text to html using php..how?

2004-09-13 Thread John Holmes
From: "M. Sokolewicz" <[EMAIL PROTECTED]> 1. nl2br($posteddata) - This converts all the \r\n's to 's so that it comes out with the same carriage returns as the person who inputed it gave it It doesn't change \r\n to , it only changes \n to It doesn't change anything, actually. It just inserts the

Re: [PHP] convert degrees to heading

2004-09-13 Thread Jason Wong
On Tuesday 14 September 2004 02:18, Gryffyn, Trevor wrote: > In some other languages, you could put your range of values in the "case" > statements, but not PHP I guess. switch(true) { case (expr1) : //do something; break; case (expr2) : //do something else;

RE: [PHP] convert degrees to heading

2004-09-13 Thread Jay Blanchard
[snip] The cleanest looking multiple "if" scenario is to use a "Switch" statement. Unfortunately I don't believe PHP's "switch" will do varied conditions, only equality statements: $j = 5; switch ($j) { case "< 6": echo "first"; break; case <6: echo "second"; break; case 5

RE: [PHP] convert degrees to heading

2004-09-13 Thread Gryffyn, Trevor
Nice! I didn't know you could do that with switch. I was wondering why conditionals were left out of PHP's switch statement, but hoped someone would prove me wrong. Thanks John! Very helpful! -TG > -Original Message- > From: John Holmes [mailto:[EMAIL PROTECTED] > Sent: Monday, Se

Re: [PHP] convert degrees to heading

2004-09-13 Thread John Holmes
I have to write a little function to convert a direction from degrees to a compass -type heading. 0 = West. 90 = North. E.g.: Something like this... it'll account for >360 degrees, too. No different that a bunch of IF statements, though... ---John Holmes... -- PHP General Mailing List (http://

Re: [PHP] Re: whois with php

2004-09-13 Thread Paul Waring
> If you have other suggestions, please tell us! Lots of people have written classes/functions to see whether domain names are available for pretty much every top level domain and country code. One that I've used in the past is: http://phpclasses.vextron.com/browse/package/360.html there are sev

[PHP] Re: php.net code samples grey boxes

2004-09-13 Thread M. Sokolewicz
Greg Donald wrote: Is it just me or are the styles for the grey code sample boxes on php.net messed up? I can't see any of the code, it's just solid grey boxes from here. I am trying with Mozilla 1.6-5 and Firefox 0.8 on Debian sarge. Anyone else seeing this issue? The copy of the PHP manual I

Re: [PHP] php4 and php5 on the same apache server

2004-09-13 Thread Comex
It is possible if one is CGI. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: whois with php

2004-09-13 Thread Greg Donald
On Mon, 13 Sep 2004 12:29:08 -0400, xm <[EMAIL PROTECTED]> wrote: > > However it does not work with biz, org, info or name since all > unavailable > > domains (the ones that are not yet registered) are pointing automatically > to > > some registrar. > > If you have other suggestions, please tell

RE: [PHP] matching search terms

2004-09-13 Thread Jay Blanchard
[snip] I am hoping that there is some internet resource [/snip] Which begs the question, have you STFW? http://www.google.com/search?q=search+function&hl=en&lr=&ie=UTF-8&start= 10&sa=N -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Outputting HTML with PHP - Buffer Problem?

2004-09-13 Thread Curt Zirzow
* Thus wrote M. Sokolewicz: > Nick Wilson wrote: > >Hi all, > > > >Say i have a php script like this: > > > > > print(html_head()); > > // do loads of time taking stuff > > print(html_footer()); > >?> > > > >How come I dont see the html header (it's just a function that returns a > >string with

[PHP] php.net code samples grey boxes

2004-09-13 Thread Greg Donald
Is it just me or are the styles for the grey code sample boxes on php.net messed up? I can't see any of the code, it's just solid grey boxes from here. I am trying with Mozilla 1.6-5 and Firefox 0.8 on Debian sarge. Anyone else seeing this issue? The copy of the PHP manual I downloaded a couple

Re: [PHP] CSS not picked up

2004-09-13 Thread Curt Zirzow
* Thus wrote Jeff Swanberg: > I have the following in my CSS (loaded on the main site page): > > /* FOOTER */ > ... > > picked up. What should I look for?? A book on writing proper css. Curt -- The above comments may offend you. flame at will. -- PHP General Mailing List (http://www.php.net

Re: [PHP] Re: MSSQL, PHP and Linux

2004-09-13 Thread blackwater dev
Still no luck with thismy host has asked: if someone has a (fedora core 2) RPM for us to install that has freetds support built in? Anyone have anything like this?? Thanks! On Thu, 02 Sep 2004 07:45:00 -0700, Jon Bertsch <[EMAIL PROTECTED]> wrote: > > I didn't see it mentioned but if you

Re: [PHP] Convert textarea post data from plain text to html using php..how?

2004-09-13 Thread M. Sokolewicz
Trevor Gryffyn wrote: Two options: 1. nl2br($posteddata) - This converts all the \r\n's to 's so that it comes out with the same carriage returns as the person who inputed it gave it It doesn't change \r\n to , it only changes \n to 2. Use HTML "" tabs to do the same thing. I think that's the tric

RE: [PHP] Convert textarea post data from plain text to html using php..how?

2004-09-13 Thread Gryffyn, Trevor
Two options: 1. nl2br($posteddata) - This converts all the \r\n's to 's so that it comes out with the same carriage returns as the person who inputed it gave it 2. Use HTML "" tabs to do the same thing. I think that's the trickiest thing about using textarea to input then regurgitate the data.

RE: [PHP] convert degrees to heading

2004-09-13 Thread Gryffyn, Trevor
The cleanest looking multiple "if" scenario is to use a "Switch" statement. Unfortunately I don't believe PHP's "switch" will do varied conditions, only equality statements: $j = 5; switch ($j) { case "< 6": echo "first"; break; case <6: echo "second"; break; case 5: e

Re: [PHP] Class Instance Inheritance

2004-09-13 Thread John Holmes
From: "Gerard Samuel" <[EMAIL PROTECTED]> Is it possible for a class to extend the state of its parent class? In the example provided, I was hoping for the statement to say -> "I wish 10 equals to 10" If there is a solution, I would like it to work with php 4+ Thanks - class foo { var $foo

RE: [PHP] Can I name a session variable using another variable?

2004-09-13 Thread Ed Lazor
Here's another option as well, in case it helps out: $var1 = "Pizza"; $var2 = "var1"; $var3 = $$var2; print "var3 = $var3"; Output: var3 = Pizza > -Original Message- > Ok, assuming everything's working correctly except for the use of > $prevtime in the SESSION, then here's one answer

RE: [PHP] Communicate with Outlook

2004-09-13 Thread Gryffyn, Trevor
If you have an Outlook client running on the same machine as PHP, you should be able to use COM calls to access the data. Here's MS's Outlook Object Model site for "Outlook Item Objects" including MeetingItem: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/off2000 /html/olmscOutl

Re: [PHP] php4 and php5 on the same apache server

2004-09-13 Thread Erwin Kerk
Jacob Friis Larsen wrote: How can I run both php4 and php5 on the same apache server? Could I do it like this: AddType application/x-httpd-php .php AddType application/x-httpd-php5 .php5 And somehow tell php5 to use application/x-httpd-php5 The approach I use is as follows: On port 80 I run an Apac

RE: [PHP] Class Instance Inheritance

2004-09-13 Thread Ed Lazor
Here's one way, but this may not be completely what you want because the value of variable foo doesn't change. -Ed Class foo { Static $foo; Function foo() { $this->foo = 10; } } > -Original Message- > From: Gerard Samuel [mailto:[EMAIL PROTECT

Re: [PHP] if syntax using multiple conditions

2004-09-13 Thread John Nichel
Brian Anderson wrote: What is the proper syndax in an if statement for containing multiple conditions? example: if ( condition1 && condition2 ) { dothis; } if ( condition1 && (condition2 || condition3) ) { dothis; } Both are valid. First example will validate if both condition1 and condi

RE: [PHP] Clear HTTP POST value

2004-09-13 Thread Gryffyn, Trevor
I don't see why that wouldn't work. It's not in a conditional or something where the "unset" command isn't being executed? If that fails still, maybe try: $_POST["var"] = ""; -TG > -Original Message- > From: Nicklas Bondesson [mailto:[EMAIL PROTECTED] > Sent: Monday, August 23, 2004 5

[PHP] matching search terms

2004-09-13 Thread Jed R. Brubaker
Hi all. I was wondering if any of you have experience with searching through a database for user provided search terms. I was hoping that maybe I could get some insight into how to better approach what I am doing. Are there any great articles or example classes that I could look at? Please let

Re: [PHP] Problem creating a date before 1970 on Fedora

2004-09-13 Thread Greg Donald
On Mon, 13 Sep 2004 19:03:09 +0200, Wouter van Vliet <[EMAIL PROTECTED]> wrote: > Howdy, > > I would assume this to be a common problem, but as I wrote to this > list myself a couple of days ago I was only aware of it's existence on > windows systems. Here's some sample code > > 12

[PHP] Re: CSS not picked up

2004-09-13 Thread Gerben
probably a caching problem, but try looking for spelling errors (use W3C checker) PS this is a PHP list not CSS "Jeff Swanberg" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I have the following in my CSS (loaded on the main site page): > > /* FOOTER */ > > .footer { >f

Re: [PHP] ftp_nlist()

2004-09-13 Thread Curt Zirzow
* Thus wrote Karol Krizka: > Hello, > I have the following class for ftp: > > -- class FTP { > > function get_files($dir="/") { > ftp_chdir($this->connection,$dir); > $array=ftp_nlist($this->connection,ftp_pwd($this->connection)); > var_dump($array); > } > } > > Whe

RE: [PHP] Can I name a session variable using another variable?

2004-09-13 Thread Gryffyn, Trevor
Ok, assuming everything's working correctly except for the use of $prevtime in the SESSION, then here's one answer: Yes, you can name a session the way you described. If you're having trouble with doing the concatenation of values inside $_SESSION, then try combining them outside: $roomname="sam

Re: [PHP] Upgrade from 4.3.6 to 5; strategy

2004-09-13 Thread Curt Zirzow
* Thus wrote [EMAIL PROTECTED]: > Anyone have any good advice for an upgrade strategy from php4.3.6 to > php5.0.1? I have a MAC OSX 10.3.5 system that I use for my test machine and > an Open BSD system for my production machine. The production machine is > also semi-managed hosting system (virtua

[PHP] Class Instance Inheritance

2004-09-13 Thread Gerard Samuel
Is it possible for a class to extend the state of its parent class? In the example provided, I was hoping for the statement to say -> "I wish 10 equals to 10" If there is a solution, I would like it to work with php 4+ Thanks - class foo { var $foo = 0; } $foo = new foo; $foo->foo = 10; cla

[PHP] Re: php4 and php5 on the same apache server

2004-09-13 Thread Christian Jul Jensen
[EMAIL PROTECTED] (Jacob Friis Larsen) writes: > How can I run both php4 and php5 on the same apache server? You can't, the two modules are incompatible. What you can do, is to run two instances of the webserver on two different ports. This article describe the idea pretty well. http://www.schli

[PHP] Re: whois with php

2004-09-13 Thread xm
> However it does not work with biz, org, info or name since all unavailable > domains (the ones that are not yet registered) are pointing automatically to > some registrar. Ok, I found one way around, I simply use exec('host $domain'), which returns a string that is very simple to parse to find

[PHP] applying search terms

2004-09-13 Thread Jed R. Brubaker
Hi all. I was wondering if any of you have experience with searching through a database for user provided search terms. I was hoping that maybe I could get some insight into how to better approach what I am doing. Are there any great articles or example classes that I could look at? Please let me

[PHP] Problem creating a date before 1970 on Fedora

2004-09-13 Thread Wouter van Vliet
Howdy, I would assume this to be a common problem, but as I wrote to this list myself a couple of days ago I was only aware of it's existence on windows systems. Here's some sample code 1 And this is it's output: -1: Thu, 1 Jan 1970 00:59:59 +0100 -3662: Wed, 31 Dec 1969 23:58:58 +0100

Re: [PHP] if syntax using multiple conditions

2004-09-13 Thread Greg Donald
On Mon, 13 Sep 2004 11:32:00 -0500, Brian Anderson <[EMAIL PROTECTED]> wrote: > What is the proper syndax in an if statement for containing multiple conditions? > > example: > > if ( condition1 && condition2 ) { > > dothis; > } > > if ( condition1 && (condition2 || condition3) ) { > >

Re: [PHP] if syntax using multiple conditions

2004-09-13 Thread raditha dissanayake
Brian Anderson wrote: What is the proper syndax in an if statement for containing multiple conditions? both examples you have given are valid but their logic is slightly different. example: if ( condition1 && condition2 ) { dothis; } if ( condition1 && (condition2 || condition3) ) { doth

[PHP] if syntax using multiple conditions

2004-09-13 Thread Brian Anderson
What is the proper syndax in an if statement for containing multiple conditions? example: if ( condition1 && condition2 ) { dothis; } if ( condition1 && (condition2 || condition3) ) { dothis; } I am trying to translate this from asp to php: If WhichAction = 7 And (InStr(filename, "\

Re: [PHP] dynamical class variable definition

2004-09-13 Thread Greg Donald
On Mon, 13 Sep 2004 19:06:20 +0300, Mario Lopez <[EMAIL PROTECTED]> wrote: > Oh Thanks, > I thought that only those variables that are defined with VAR > will be accessible and trieted as class variables Nope, it'll work: #!/usr/bin/php $v){ $obj->$k = $array[$k]; } } class Obj { var $x

[PHP] database content searching

2004-09-13 Thread Jed R. Brubaker
Hi all. I was wondering if any of you have experience with searching through a database for user provided search terms. I was hoping that maybe I could get some insight into how to better approach what I am doing. Are there any great articles or example classes that I could look at? Please let me

Re: [PHP] URL encode/decode problem

2004-09-13 Thread Rosen
The sending form works with JavaScript. When enter on some field combination "+ " plus sign and space - JScript encode it - I see it with alert - "%2B%20" , but when new window opens on url bar shows "+%20" - thath means space only. "Greg Donald" <[EMAIL PROTECTED]> wrote in message news:[EMAIL P

Re: [PHP] dynamical class variable definition

2004-09-13 Thread Mario Lopez
Oh Thanks, I thought that only those variables that are defined with VAR will be accessible and trieted as class variables Mario -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] URL encode/decode problem

2004-09-13 Thread Greg Donald
On Mon, 13 Sep 2004 18:35:58 +0300, Rosen <[EMAIL PROTECTED]> wrote: > I changed the JScript to encode data not as unicode - now it code data as > "%20%2B%20". > But when I get data with $_REQUEST["var"] - I loose symbol "+" - with code > "%2B". Can you change it back before you decode it? Maybe

Re: [PHP] dynamical class variable definition

2004-09-13 Thread Greg Donald
On Mon, 13 Sep 2004 18:26:56 +0300, Mario Lopez <[EMAIL PROTECTED]> wrote: > Hi, > > I have a class, but the problem is that > its variables need to be defined dynamically. > > example: > > class class_myclass{ > var $variable1; > var $variable2; > var $variable3; > ... > var $variableN

Re: [PHP] multi dimension array

2004-09-13 Thread Greg Donald
On Mon, 13 Sep 2004 08:04:41 -0700 (PDT), Dan McCullough <[EMAIL PROTECTED]> wrote: > $sql = "SELECT dealer.dealerid as ddealerid, dealer.company as company, dealer.name > as name, > dealer.surname as surname, dealer.email as email, dealer.contactday as contactday, > orders.orderid > as oorderid

Re: [PHP] URL encode/decode problem

2004-09-13 Thread Rosen
I changed the JScript to encode data not as unicode - now it code data as "%20%2B%20". But when I get data with $_REQUEST["var"] - I loose symbol "+" - with code "%2B". "Greg Donald" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Mon, 13 Sep 2004 17:21:48 +0300, Rosen <[EMAIL

[PHP] dynamical class variable definition

2004-09-13 Thread Mario Lopez
Hi, I have a class, but the problem is that its variables need to be defined dynamically. example: class class_myclass{ var $variable1; var $variable2; var $variable3; ... var $variableN how to initialize these $variableN class variables from a global array which contains the variable

Re: [PHP] multi dimension array

2004-09-13 Thread Dan McCullough
okay I am working with this now. what I am seeing is that any information that I want to pull is not coming. $sql = "SELECT dealer.dealerid as ddealerid, dealer.company as company, dealer.name as name, dealer.surname as surname, dealer.email as email, dealer.contactday as contactday, orders.orde

Re: [PHP] PHP include before or after Apache SSI?

2004-09-13 Thread Jim Grill
> In which order do the two execute? I'm trying to work out the best way > to integrate PHP backend code with an HTML interface in the cleanest > way possible - I don't really want to copy & paste the PHP into the > HTML because it will make maintaining both the PHP & the HTML more > complicat

Re: [PHP] php|works in Toronto - anyone going?

2004-09-13 Thread John Holmes
From: "John Nichel" <[EMAIL PROTECTED]> But I won't go see Chris' talk...I mean, if he knew enough about security, he'd write a book or something, right? :) lol that's a great idea! ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/u

[PHP] PHP include before or after Apache SSI?

2004-09-13 Thread Andrew W
In which order do the two execute? I'm trying to work out the best way to integrate PHP backend code with an HTML interface in the cleanest way possible - I don't really want to copy & paste the PHP into the HTML because it will make maintaining both the PHP & the HTML more complicated. What

Re: [PHP] URL encode/decode problem

2004-09-13 Thread Greg Donald
On Mon, 13 Sep 2004 17:21:48 +0300, Rosen <[EMAIL PROTECTED]> wrote: > It will not work - Javascript function "escape()" return string as unicode > data - something like "%u0431%u043E%u044F". Well, normally I'd say urldecode() but I don't think it handles unicode, so you may wanna check out the mu

[PHP] whois with php

2004-09-13 Thread xm
Hi there, I'm trying to make a simple tool that make a simple check for the availability of a domain name in a certain top-level domain. I use gethostbyname and if it fails, it means the domain is probably not registered. It works great for domains.COM, domains.NET, domains.CA and all domains.[

Re: [PHP] php|works in Toronto - anyone going?

2004-09-13 Thread John Nichel
Jay Blanchard wrote: [snip] I'm giving a talk on PHP session security, so I'll be there. If anyone from the list is coming, please drop by and say hi. [/snip] I'd love to be there for that, but the company wouldn't help with expenses. Seems a lot of companies are dropping or eliminating their 'trai

Re: [PHP] multi dimension array

2004-09-13 Thread Greg Donald
On Mon, 13 Sep 2004 07:14:31 -0700 (PDT), Dan McCullough <[EMAIL PROTECTED]> wrote: > here is the code. > > $sql = "select * from dealer, orders where orders.status='10' and > orders.dealerid = If you want to associate the orders with the dealer, you probably want to do a LEFT JOIN with the relev

Re: [PHP] URL encode/decode problem

2004-09-13 Thread Rosen
It will not work - Javascript function "escape()" return string as unicode data - something like "%u0431%u043E%u044F". And I don't know how to "decode" these data as "normal" chars. "Greg Donald" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Mon, 13 Sep 2004 16:51:59 +0300, R

Re: [PHP] multi dimension array

2004-09-13 Thread Dan McCullough
here is the code. ++ // end headers //$sql = "SELECT * from orders WHERE status='10' and dealerid >= '1'"; $sql = "select * from dealer, orders where orders.status='10' and orders.dealerid = dealer.dealerid order

Re: [PHP] URL encode/decode problem

2004-09-13 Thread Greg Donald
On Mon, 13 Sep 2004 16:51:59 +0300, Rosen <[EMAIL PROTECTED]> wrote: > I have follow problem: One form whitch send some text fields to my PHP > script. But before send data, the form makes > javascript command "escape" for text fields. The text fields may contain > characters "+", quotes, etc. > Th

[PHP] URL encode/decode problem

2004-09-13 Thread Rosen
Hi, I have follow problem: One form whitch send some text fields to my PHP script. But before send data, the form makes javascript command "escape" for text fields. The text fields may contain characters "+", quotes, etc. The form post data with "GET" method. And then I can't get correctly posted d

Re: [PHP] Delete Line from File?

2004-09-13 Thread Nick Wilson
* and then John Holmes declared > >Whats the easiest/best way to do that with php? > >just replace the line with ''? > > Yes, basically. You have to read the file, replace the part you don't want > with an empty string and then re-write the file. If the file is small and > you're using file

Re: [PHP] Re: Evaluating form posts

2004-09-13 Thread PHP Mailing list account
Thanks to you all, I decided to turn that stuff off since the stripslashes function returned not exactly the same I get when it's turned off. On Sun, Sep 12, 2004 at 11:44:40PM -0700, Chris Shiflett wrote: > --- Alexander Kleshchevnikov <[EMAIL PROTECTED]> wrote: > > You should chech for configu

Re: [PHP] group queries result

2004-09-13 Thread raditha dissanayake
This is off topic and please don't send multiple copies of the same message. -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload -

Re: [PHP] php4 and php5 on the same apache server

2004-09-13 Thread Bostjan Skufca @ domenca.com
Hello Jacob, i've been trying to achieve the very same result but without success. I tried even modifying sources of sapi/apache2(handler|filter)/sapi_apache2.c and relatives but without success. Mime type can be modified without any problem and it compiles fine but then when I tried to parse P

Re: [PHP] Delete Line from File?

2004-09-13 Thread John Holmes
From: "Nick Wilson" <[EMAIL PROTECTED]> Whats the easiest/best way to do that with php? just replace the line with ''? Yes, basically. You have to read the file, replace the part you don't want with an empty string and then re-write the file. If the file is small and you're using file() to read i

[PHP] php4 and php5 on the same apache server

2004-09-13 Thread Jacob Friis Larsen
How can I run both php4 and php5 on the same apache server? Could I do it like this: AddType application/x-httpd-php .php AddType application/x-httpd-php5 .php5 And somehow tell php5 to use application/x-httpd-php5 -- Best regards, Jacob Friis Larsen www.webcom.dk | www.journster.com -- PHP General

Re: [PHP] php|works in Toronto - anyone going?

2004-09-13 Thread Aaron Gould
Chris Shiflett wrote: I'm giving a talk on PHP session security, so I'll be there. If anyone from the list is coming, please drop by and say hi. I've already got your session picked for that time slot. It'll be interesting to finally see some faces to go along with the names I've only seen on the

  1   2   >