Re: [PHP] How to send POST info without a form?

2002-10-02 Thread Philippe Saladin
> How can I submit POST information to a php file without using an HTML form? You would try this function (from Rasmus Lerdorf) function PostToHost($host, $path, $data_to_send) { $fp = fsockopen($host,80); fputs($fp, "POST $path HTTP/1.1\n"); fputs($fp, "Host: $host\n"); fputs($fp, "Content

[PHP] dba_open () help

2002-10-02 Thread Charlie
I am hoping someone can please help me. I belong to a large online game, which hosts several sub games. Each sub games has been assigned a certain amount of space with which to put up a website. The site itself is running with php enabled but mysql is limited for security reasons. So I have be

RE: [PHP] Trouble with understanding arrays

2002-10-02 Thread Andy Crain
It looks like your problem is simply in the debug line, where you echo print_r(array_values($TickersCurrent)); You shouldn't call array_values() before print_r(), since array_values generates an indexed array of only the values (quotes), not the keys (tickers), of the supplied array, essentially t

[PHP] using fopen() to download remote files

2002-10-02 Thread Rusty Small
I have written a script in which the main purpose is to download html pages from multiple web servers. I'm using the fopen() function to download these pages. I would like to be able to download only the source (text) and no binary data as this would greatly improve the speed of my script. I've

[PHP] How do you strip Header Info from displaying on your browser?

2002-10-02 Thread Phil Powell
If you go to http://valsignalandet.com/feedback.php you can get a clearer indication of what I am trying to get rid of. Following is my function using to produce the stuff up there, which I don't want, instead, I either want cookie-driven information or nothing (if no cookie is set): function

[PHP] Re: Incrementing the value

2002-10-02 Thread Jason Young
Try $hid++; This automatically increments by one, its just much easier to deal with than +1 .. besides, it wouldn't work on my Win32 platform, either. --Jason Uma Shankari T. wrote: > Hello , > >border="0"> > > While clicking this link the $hid value get incremented and fetch the value

Re: [PHP] Incrementing the value

2002-10-02 Thread Paul Nicholson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, I've helped you as far as I can without actually seeing the rest of the script to check if that value gets overridden somewhere else. - From the sample you are giving us everything looks ok *if* register_globals is on(and you say that it is). H

[PHP] Incrementing the value

2002-10-02 Thread Uma Shankari T.
Hello , While clicking this link the $hid value get incremented and fetch the value from the database according to that..the same thing is working in linux platform and it is not working for the windows platform..the value is not getting increment..Can anyone please tell me how to go abo

Re: [PHP] Global variables

2002-10-02 Thread Tom Rogers
Hi, Thursday, October 3, 2002, 6:06:52 AM, you wrote: AG> Hello, AG> how can I use global variables in my web portal? I have read the php AG> documentation, but it works only in the same file. AG> I want use more global variable on many php site. AG> For example: AG> In login.php I use the code

Re: [PHP] extract domain name from a URL

2002-10-02 Thread Justin French
I think parseurl() does what you want... it's in the manual (surprise surprise!!) http://php.net/parseurl Justin on 03/10/02 5:18 AM, Joseph Szobody ([EMAIL PROTECTED]) wrote: > Folks, > > I want to keep track of referers to my site. I want to store the domain name > of the referer in a db

Re: [PHP] How can I check for variances in spelling within formtext input fields?

2002-10-02 Thread Justin French
Hi, 1. you might start by removing things which are common problems... make everything lowercase, uppercase, uppercasewords, etc etc (if not permanent, just for comparison). You may also strip out leading and trailing whitespace, multiple spaces, etc etc. You may choose to remove LTD, PTY, GMBH

Re: [PHP] counting number of records in a MySQL table; how do I get

2002-10-02 Thread Dan Koken
Or another way if you don't want a result when it's zero. $rslt = mysql_query("SELECT count(*) as cnt FROM tbl having cnt > 0"); HTH.. Have a great day.. Dan Rasmus Lerdorf wrote: > $ret = mysql_query("SELECT count(*) as foo FROM AuthNum"); > $result = mysql_fetch_array($ret); > echo $result['fo

Re: [PHP] counting number of records in a MySQL table; how do I get the result?

2002-10-02 Thread Jeff Bluemel
so why not take that resulting row, and then do an if on it to see if the value is a zero? an extra step, but it would work "John W. Holmes" <[EMAIL PROTECTED]> wrote in message 002c01c26a66$61f0e1a0$7c02a8c0@coconut">news:002c01c26a66$61f0e1a0$7c02a8c0@coconut... > > $result = mysql_query(); >

[PHP] Re: Access denied to php files in Netscape 6

2002-10-02 Thread Chris Nielsen
Forgot to mention that I have no proxy settings set for either IE or Netscape. "Chris Nielsen" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I still haven't figured this out. > > URL problems? No. The first time I tried it I copied the URL directly out of > m

[PHP] Re: Access denied to php files in Netscape 6

2002-10-02 Thread Chris Nielsen
I still haven't figured this out. URL problems? No. The first time I tried it I copied the URL directly out of my IE address bar to just check the file in Netscape quick to see how it looked. You are not authorized to view this page HTTP 401.3 - Access denied by ACL on resource Internet Informati

[PHP] Trouble with understanding arrays

2002-10-02 Thread Christopher J. Crane
I am having problems with arrays. I guess I just don't understand them all that well. I have an simple array of stock tickers. Then for each ticker I go to Yahoo to get their current price and try to push the Name of the ticker and it's value into an associative array(I think). Then I want to sort

Re: [PHP] getImageSize

2002-10-02 Thread tuxen
check the permissions on the directory the image is in as well On Wed, 2002-10-02 at 12:51, Dan McCullough wrote: > anyone know what migth cause this error. I changed the mode to 777, made sure that >is was the > correct owner.group. > getimagesize: Unable to open 'images/product/i3_berkele

Re: [PHP] MORE Problems with PHP as CGI and Flash !!!!!!!!!!

2002-10-02 Thread antis0cial d0rk
I took a course on PHP for Flash and the entire class ran into this problem. There was a problem with the Flash plug-in awhile back that was causing problems with dynamic text being loaded. Have your client download and install the most recent plug-in and that should fix the problem. - Origi

Re: [PHP] no errors ?

2002-10-02 Thread Paul Nicholson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, Is short_tags on? ~Pauly On Wednesday 02 October 2002 05:51 pm, gamin wrote: > hi, > > i'm running PHP 4.0.6 with apache on RedHat 7.2 , error_reporing is set > to default(2039) in the php.ini file : > my script is as follows : > > qwe; > > >

Re: [PHP] no errors ?

2002-10-02 Thread Jason Young
I noticed that by default, my display_errors was actually OFF, and the only way to see my errors was through Apache's error.log file I don't know if that's already been checked, but... figured I'd try to help. -Jason Gamin wrote: > Yes, > > On both my development machine and implmetation ma

Re: [PHP] Global variables

2002-10-02 Thread Peter J. Schoenster
On 2 Oct 2002 at 22:06, Anna Gyor wrote: > how can I use global variables in my web portal? I have read the php > documentation, but it works only in the same file. I want use more > global variable on many php site. > > For example: > In login.php I use the code > > $first=mysql_resul

RE: [PHP] PHP User Name on Win2000

2002-10-02 Thread John W. Holmes
If you are using IIS, then PHP runs as the IIS user, IUSR_. If your computer name is Mango, then it'd be IUSR_MANGO. ---John Holmes... > -Original Message- > From: Ionut Ciocirlan [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, October 02, 2002 2:54 PM > To: PHP List > Subject: Re: [PHP] P

RE: [PHP] Paging HOWTO for PHP n' MYSQL

2002-10-02 Thread John W. Holmes
> i've been searching for a while in google and vivisimo for docs that > treats > paging techniques for php and mysql. And so far i seek nothing. I always > get > stuck with empty documents (if you know what I mean). > > Can U give me a hand with this. If you already have a doc of this nature, >

RE: [PHP] Global variables

2002-10-02 Thread John W. Holmes
> how can I use global variables in my web portal? I have read the php > documentation, but it works only in the same file. > I want use more global variable on many php site. > > For example: > In login.php I use the code > > $first=mysql_result($result,0,"FIRST_NAME"); > > and I want

RE: [PHP] counting number of records in a MySQL table; how do I get the result?

2002-10-02 Thread John W. Holmes
> $result = mysql_query(); > if (mysql_num_rows($result) > $x) > -Kevin This won't work because a SELECT COUNT(*) query always returns a row, even if it returns zero as the value. $result = mysql_query("SELECT COUNT(*) FROM ... "); $count = mysql_result($result,0); ---John Holmes... > - Or

Re: [PHP] Inheritance and a class function: on what class was it called?

2002-10-02 Thread Nick Eby
which is what I suspected... thanks for confirming. and yes, the call is disconnected from any class _instance_, but not from any class. as you said before, PHP has some OO differences from java, etc, and this is one of them... if you had static members, then methods called statically would have

Re: [PHP] Inheritance and a class function: on what class was it called?

2002-10-02 Thread Debbie Dyer
Without them being defined in some special way? I am very surprised that after 7 years of OOP I dont know that but I will check it out tomorrow. Debbie - Original Message - From: "Rasmus Lerdorf" <[EMAIL PROTECTED]> To: "Nick Eby" <[EMAIL PROTECTED]> Cc: "Debbie Dyer" <[EMAIL PROTECTED]

RE: [PHP] Quick question.

2002-10-02 Thread David Freeman
> I am the webmaster of the site, i pay for the server space, > is that what you mean? First up Simon, I deleted over a hundred lines of no longer relevant content from your message including things like signatures. You should probably trim messages down when you reply to them... Next up, w

Re: [PHP] Inheritance and a class function: on what class was itcalled?

2002-10-02 Thread Rasmus Lerdorf
Since static method calls are completely disconnected from any class instance asking which class the method call is from is rather meaningless, and no, I don't think there is any way to get that. -Rasmus On Wed, 2 Oct 2002, Nick Eby wrote: > PHP allows static method calls... But back to my ori

[PHP] reg exp matching/replacing

2002-10-02 Thread Jennifer Swofford
I'm getting much closer to achieving my goal here. Now, I'm missing yet one more element. Here is my code: -- $filename = "newexample.html"; $fd = fopen ($filename, "r"); $contents = fread ($fd, filesize ($filename)); preg_match_all('{\/*[A-z0-9_/-]+(.gif|.jpg)}', $contents, $matche

Re: [PHP] Inheritance and a class function: on what class was it called?

2002-10-02 Thread Nick Eby
PHP allows static method calls... But back to my original question... inside a method that has been called statically, can I determine for what class the method was called? Again, obviously the question is only applicable if there is some inheritance involved, and the child class does not declar

Re: [PHP] no errors ?

2002-10-02 Thread gamin
Yes, On both my development machine and implmetation machine i have the same error_reporting. error_reporing = 2039 (that is what phpinfo() gives me ) is equivalent to E_ALL^E_NOTICE. And still i cant seem to get any error, even on a winxp system running Apache and PHP 4.2.1 (from the php.i

[PHP] Server API

2002-10-02 Thread Alex Shi
Hi, My hosting provider still using CGI as Server API. I think this is way too much dropped behind. On my own development server I use Apache as Server API. However, maybe this could be a kind of consideration for the situation that multi-sites hosted on one server? I am thinking I'd better learn

Re: [PHP] Inheritance and a class function: on what class was itcalled?

2002-10-02 Thread Rasmus Lerdorf
> The mistake is mine not yours. I know about the :: operator I use it all the > time (but within classes parent::function() etc) - but I never realised > until now that PHP will let you use any class before instantiation (and > nearly all my PHP work uses classes). I have never even attempted to

Re: [PHP] no errors ?

2002-10-02 Thread Robert Cummings
Shot in the dark that may or may not help... Look into display_errors and log_errors. I think those are the names. They control where error output goes. Cheers, Rob. gamin wrote: > > hi, > > i'm running PHP 4.0.6 with apache on RedHat 7.2 , error_reporing is set to > default(2039) in the php

Re: [PHP] no errors ?

2002-10-02 Thread Jason Reid
Check ur php.ini, there are settings to display showing absolutly any error, warning, and message. they are probaly set to not show them. error_reporting = E_ALL & ~E_NOTICE thats what i use, only displays what i need Jason Reid [EMAIL PROTECTED] -- AC Host Canada www.achost.ca - Original

Re: [PHP] Inheritance and a class function: on what class was it called?

2002-10-02 Thread Debbie Dyer
"I probably should've used the term "static" from the beginning." <- maybe The mistake is mine not yours. I know about the :: operator I use it all the time (but within classes parent::function() etc) - but I never realised until now that PHP will let you use any class before instantiation (and n

[PHP] Some mcrypt function don't seem to work.

2002-10-02 Thread Scott Fletcher
Hi! I had PHP compiled with the "--with-mcrypt" option. So, when I use this script, PHP spit out the error " Warning: could not open encryption module" but it work fine if I use other script like "$SSL_CIPHER_USEKEYSIZE". --clip-- mcrypt_module_open(MCRYPT_TripleDES, "", MCRYPT_MODE_ECB, ""

[PHP] no errors ?

2002-10-02 Thread gamin
hi, i'm running PHP 4.0.6 with apache on RedHat 7.2 , error_reporing is set to default(2039) in the php.ini file : my script is as follows : But i dont get even a parse error or anything Any clues to what is going wrong ? thx gamin. -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] eregi_replace / preg_match_all

2002-10-02 Thread Jennifer Swofford
Extraordinarily helpful; thank you very much! Thanks to both Mike and Kevin on this. Jen > > > Why does this work: > > > > > > $contents = > > > > > eregi_replace("(\")(.(/))*[A-Z0-9_/-]+(.gif|.jpg)", > > > "\"blah.gif", $contents); > > > > > > But this does not: > > > > > > > > preg_match_all(

Fw: [PHP] Global variables

2002-10-02 Thread Kevin Stone
As far as I know there is no way to set a site-wide global from within a script. Use PHP Sessions or set a Cookie and then print the variable in any script you want by calling $_SESSION['first'] or $COOKIES['first'];. But you'll need a starting point for your visitors in order for this to work.

[PHP] MORE Problems with PHP as CGI and Flash !!!!!!!!!!

2002-10-02 Thread Rebekah Garner
Here is the URL to a project that is far as I am concerned was finished. http://www.overbrookfarm.myiglou.com It is a Flash site that uses PHP for dynamically updating text in some text fields. If I can direct you to the Stallions menu---pick a horse. A page should load that has a picture of

Re: [PHP] counting number of records in a MySQL table; how do I getthe result?

2002-10-02 Thread Rasmus Lerdorf
$ret = mysql_query("SELECT count(*) as foo FROM AuthNum"); $result = mysql_fetch_array($ret); echo $result['foo']; One of many ways... -Rasmus On Wed, 2 Oct 2002, DonPro wrote: > Hi, > > I need to do either an insert or update into a MySQL table. Insert if there > are 0 records or update if

Re: [PHP] counting number of records in a MySQL table; how do I get the result?

2002-10-02 Thread Kevin Stone
$result = mysql_query(); if (mysql_num_rows($result) > $x) -Kevin - Original Message - From: "DonPro" <[EMAIL PROTECTED]> To: "php list" <[EMAIL PROTECTED]> Sent: Wednesday, October 02, 2002 2:35 PM Subject: [PHP] counting number of records in a MySQL table; how do I get the result? > Hi

[PHP] counting number of records in a MySQL table; how do I get the result?

2002-10-02 Thread DonPro
Hi, I need to do either an insert or update into a MySQL table. Insert if there are 0 records or update if one record exist: This is my code snippet: if (mysql_query("SELECT COUNT(*) FROM AuthNum") == 0) { mysql_query("INSERT into AuthNum (FirstNum, LastNum, NextNum) VALUES (1,2,3)",$dblink

Re: [PHP] Setting date fields in mysql queries

2002-10-02 Thread Frank
Hi, it's a great tip to install PhpMyAdmin - or phpPgAdmin for PostgresSQL - this will only take you at most half an hour even for a newcomer. You can then easily test queries, see any error messages and see what result they have on tables. In this case I'd echo out the query echo $query =

[PHP] (bad file descriptor) is a BUG

2002-10-02 Thread Robert Samuel White
I was able to work around this solution by using it on a different server with a different version of PHP. I decided to do this after reviewing the search results at Google.com This is a known bug that the PHP development team has chosen to ignore, as this article clearly outlines: http://ww

[PHP] Global variables

2002-10-02 Thread Anna Gyor
Hello, how can I use global variables in my web portal? I have read the php documentation, but it works only in the same file. I want use more global variable on many php site. For example: In login.php I use the code $first=mysql_result($result,0,"FIRST_NAME"); and I want to print th

Re: [PHP] addslashes and remove slashes.

2002-10-02 Thread Rasmus Lerdorf
No, nothing has changed in recent memory with respect to this. On Wed, 2 Oct 2002, Anil Garg wrote: > Hi, > > Is it so that in php 4.2.3 we have to do both..."addslashes" and > "removeslashes" ?? coz in one of the older versions the things are goin fine > without using "removeslashes" but it do

[PHP] addslashes and remove slashes.

2002-10-02 Thread Anil Garg
Hi, Is it so that in php 4.2.3 we have to do both..."addslashes" and "removeslashes" ?? coz in one of the older versions the things are goin fine without using "removeslashes" but it doesnet seem to be the case in php4.2.2. thanx and regards anil -- PHP General Mailing List (http://www.php.n

Re: [PHP] Help with Numbers

2002-10-02 Thread Christopher J. Crane
Thank you very much, I did not know sort would work this way. Makes complete sense now though. Thansk again I will give it a shot. "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Sort the arrays and pick off the first and last elements. > > On W

Re: [PHP] Help with CHdir

2002-10-02 Thread Rasmus Lerdorf
Your code makes no sense and the error message is telling you exactly what you did wrong. opendir() returns a directory handle to be passed to readdir(). Calling chdir() on a directory handle makes no sense. You want to chdir to the same string that you passed to opendir() -Rasmus On Wed, 2 O

Re: [PHP] Paging HOWTO for PHP n' MYSQL

2002-10-02 Thread Rasmus Lerdorf
Just pass the current position from one page to the next and use a "LIMIT start,num" clause. -Rasmus On Wed, 2 Oct 2002, Francisco Vaucher wrote: > Hi people, > > i've been searching for a while in google and vivisimo for docs that treats > paging techniques for php and mysql. And so far i seek

[PHP] Help with CHdir

2002-10-02 Thread Nokar
I get this error from php when i execute this code can you help me ;) Warning: chdir() expects parameter 1 to be string, resource given in C:\\read.php on line 146 145 echo "Attachment :"; 146 $rep = opendir("C:\\xxx\\Attach\\$id\\"); 147 chdir($rep); 148 while ($zone = readdir($rep)) 149 { 1

Re: [PHP] Help with Numbers

2002-10-02 Thread Rasmus Lerdorf
Sort the arrays and pick off the first and last elements. On Wed, 2 Oct 2002, Christopher J. Crane wrote: > I am looking for a way to find the highest 5 and lowest 5 numbers within 300 > or so numbers. Here is what I have so far... > > $Tickers = array(); > $Current = array(); > > > // SQL QUERY

[PHP] Paging HOWTO for PHP n' MYSQL

2002-10-02 Thread Francisco Vaucher
Hi people, i've been searching for a while in google and vivisimo for docs that treats paging techniques for php and mysql. And so far i seek nothing. I always get stuck with empty documents (if you know what I mean). Can U give me a hand with this. If you already have a doc of this nature, or t

[PHP] Help with Numbers

2002-10-02 Thread Christopher J. Crane
I am looking for a way to find the highest 5 and lowest 5 numbers within 300 or so numbers. Here is what I have so far... $Tickers = array(); $Current = array(); // SQL QUERY TO GET TICKERS MSSQL_CONNECT($HostName,$UserName,$Password); mssql_select_db($DBName) or DIE("Table unavailable");

[PHP] BAD FILE DESCRIPTOR

2002-10-02 Thread Robert Samuel White
I keep receiving the following error when I try to use fopen() to a remote server, regardless of which server I try to connect to apparently. I've verified that allow_url_fopen is set to true, so this should be functioning properly. I'm only trying to read the contents of the file so why doesn

[PHP] Re: extract domain name from a URL

2002-10-02 Thread Joseph Szobody
Never mind. Didn't realize PHP had the parse_url function. Got it! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Setting date fields in mysql queries

2002-10-02 Thread Jay Blanchard
[snip] I have the following line in a program I'm working on: $query = "UPDATE countertable SET CurrDate = '$ndate' WHERE ID = $id" $ndate is a properly formated date read from a text field on a form on the previous page. When I run the query using mysql_query, it returns TRUE each time, but th

RE: [PHP] Setting date fields in mysql queries

2002-10-02 Thread Matt Schroebel
> From: Brad Harriger [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, October 02, 2002 3:17 PM > Subject: [PHP] Setting date fields in mysql queries > > > I have the following line in a program I'm working on: > > $query = "UPDATE countertable SET CurrDate = '$ndate' WHERE ID = $id" > > $ndate

[PHP] Setting date fields in mysql queries

2002-10-02 Thread Brad Harriger
I have the following line in a program I'm working on: $query = "UPDATE countertable SET CurrDate = '$ndate' WHERE ID = $id" $ndate is a properly formated date read from a text field on a form on the previous page. When I run the query using mysql_query, it returns TRUE each time, but the fie

[PHP] extract domain name from a URL

2002-10-02 Thread Joseph Szobody
Folks, I want to keep track of referers to my site. I want to store the domain name of the referer in a db field. I want 'just' the domain name, not the full url. So I need a snippet of code that could parse the $HTTP_REFERER, and return just the domain name. Example 1) http://www.google

Re: [PHP] Inheritance and a class function: on what class was it called?

2002-10-02 Thread Nick Eby
when you call a function with ->, you must call it on an object ($c->foo(), for example). the function is termed an "object function" when used that way. php has an operator :: that enables that same function to be called without a specific object; in this case, I'm referring to it as a "class"

Re: [PHP] PHP User Name on Win2000

2002-10-02 Thread Ionut Ciocirlan
The one that accesses the filesystem through PHP is the webserver itself, not PHP. And as your server is probably instaleld as a service, it runs under SYSTEM credentials. - Original Message - From: "[-^-!-%-" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, October 02, 2002 9

[PHP] PHP User Name on Win2000

2002-10-02 Thread [-^-!-%-
Hello everyone! On Win 2k, what is PHP's user name? Or, what username does PHP access files (on the system) as? -john =P e p i e D e s i g n s www.pepiedesigns.com Providing Solutions That Increase Productivity Web Developement. Database. Hosting. Multimedia. -- PHP General Mailing L

Re: [PHP] Math problem (222)

2002-10-02 Thread Chris Hewitt
[EMAIL PROTECTED] wrote: >errors, but it doesnt do what i want it to do - instead of returning any >three digit combo that doesnt return 222, it just prints EVERY combo whice >passes my conditional statement to weed out numbers that have digits where 2 >or more are the same. > I can't write bug-f

Re: [PHP] Inheritance and a class function: on what class was it called?

2002-10-02 Thread Debbie Dyer
I dont understand what you are saying then or what you are trying to do. How can you call C::foo() outside of a class? You access class functions externally with -> Debbie - Original Message - From: "Nick Eby" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, October 02, 2002

Re: [PHP] Inheritance and a class function: on what class was it called?

2002-10-02 Thread Nick Eby
not quite... the case I'm interested in is this, given your example: print C::foo(); which would print nothing, unfortunately, since when the function is called using the :: operator there is no $this variable. basically what I'm looking for is a replacement for get_class($this) when the functi

[PHP] Re: Math problem (222)

2002-10-02 Thread Jome
> What is wrong with it? Any help at all is greatly apreciated. Consider the differences between my code below and yours. And as far as I can see, there's no combination higher than eleven, lower than 987 which doesn't work out. Jome -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] How can I check for variances in spelling within form text input fields?

2002-10-02 Thread Chris Hewitt
Debbie Dyer wrote: >company exists already test you could remove known extensions from the input >company name - ltd, plc, etc - and replace this with a wildcard for the >check. > >- Original Message - >From: "DonPro" <[EMAIL PROTECTED]> > >>information is the company name, address, city

Re: [PHP] Inheritance and a class function: on what class was it called?

2002-10-02 Thread Debbie Dyer
I think I know what you mean. You could get it to return the name of the class. eg. class A { function foo () { return get_class($this); } } class B extends A { } class C extends A { } $a = new A(); $b = new B(); $c = new C(); print $a->foo(); print $b->foo(); print $c

[PHP] Re: Math problem (222)

2002-10-02 Thread Philip Hallstrom
Well, since it's for school I'll only point out a couple of issues... - your for loop will never test the number 987 even though it should. - add the following line rightr after you compute $numtotal: print("$numtotal = $num1 + $num2 + $num3 + $num4 + $num5 + $num6\n"); and you'll see that you

[PHP] stat failed for Resource ?

2002-10-02 Thread new.php.net
Hey folks, Whenever I try to open files via fopen i get the following message stat failed for Resource for id #1 Fopen Wrapper is turned on in php.ini What wrong? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] upgrading script from using GLOBALS

2002-10-02 Thread Nicole Lallande
Hi, I am trying to upgrade my script which currently uses globals (and register_globals=on) to turning that flag off. The online documentation on register globas has the following code recommended by users in order to register the variables: $GLOBALS["dbname"] = "dbname"; //register globals

RE: [PHP] Getting users IP address into a variable.

2002-10-02 Thread Webmaster MBTRADINGCO
Actually I'm just using it so a customer can acces a PWS that is broadcasting on its own security cameras. I have a DSL that disconnects every 8 hours, and gives dinamyc IP, so each time it connects it goes to my site, and writes down the addres, so my customer can access the report, and see what

[PHP] Math problem (222)

2002-10-02 Thread tony
For a coursework assignment I have to investigate this thing where you do the following for example: 264- Choose 3 digits that are not the same 12 - Find the sum of them. 264 246 624 642 426 462- List all the possible combinations of t

Re: [PHP] Getting users IP address into a variable.

2002-10-02 Thread Chris Hewitt
Webmaster MBTRADINGCO wrote: >I'm sure there has to be a way to verify which IP address is accessing > Don't count on it to identify users on the internet though. Regards Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Inheritance and a class function: on what class was it called?

2002-10-02 Thread Nick Eby
Assume you've got some class that has one or more classes inherited from it. The parent class has a function that is normally called using the :: operator (a class function). Assume also that the class function is never called from an object function. Is it possible to find if the class function

Re: [PHP] How can I check for variances in spelling within form text input fields?

2002-10-02 Thread Debbie Dyer
Don I am not a 'PHP guru' and I dont know where you can find an algorithm but:- If the only problem is users adding/not using name extensions, then for your company exists already test you could remove known extensions from the input company name - ltd, plc, etc - and replace this with a wildcar

[PHP] getImageSize

2002-10-02 Thread Dan McCullough
anyone know what migth cause this error. I changed the mode to 777, made sure that is was the correct owner.group. getimagesize: Unable to open 'images/product/i3_berkeley_bed_2drw.jpg' for reading = "Theres no such thing as a probl

Re: [PHP] Getting users IP address into a variable.

2002-10-02 Thread Bill Farrell
Try: $ip = ""; if ( $HTTP_X_FORWARDED_FOR ) { $ip = $HTTP_X_FORWARDED_FOR; } elseif( $HTTP_VIA ) { $ip = $HTTP_VIA; } elseif( $REMOTE_ADDR ) { $ip = $REMOTE_ADDR; } else { die(); // or perhaps some better response } --- Webmaster MBTRADINGCO <[EMAIL PROTECTED]> wro

Re: [PHP] Apache2 and PHP4.2.3 - errors

2002-10-02 Thread Ionut Ciocirlan
I haven't tried php with apache 2 on linux yet, but the windows distribution of php has 2 dlls: php4apache.dll and php4apache2.dll; there's nothing in the documentation about the second dll whatsoever, neither any installation guide for Apache 2; the guide actually says using the php4apache.dll as

RE: [PHP] Getting users IP address into a variable.

2002-10-02 Thread Jon Haworth
Hi, > > I'm sure there has to be a way to verify which IP > > address is accessing from. > > $ip=HTP_GET_ > > $REMOTE_ADDR ...and to deal with some (but not all) proxies: $ip = (getenv("HTTP_X_FORWARDED_FOR")) ? getenv("HTTP_X_FORWARDED_FOR") : getenv("REMOTE_ADDR"); Either wa

RE: [PHP] Getting users IP address into a variable.

2002-10-02 Thread Merritt, Dave
Try: $ip=$_SERVER['REMOTE_ADDR'] -Original Message- From: Webmaster MBTRADINGCO [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 02, 2002 1:08 PM To: [EMAIL PROTECTED] Subject: [PHP] Getting users IP address into a variable. I'm sure there has to be a way to verify which IP address i

Re: [PHP] Getting users IP address into a variable.

2002-10-02 Thread Rasmus Lerdorf
$REMOTE_ADDR On Wed, 2 Oct 2002, Webmaster MBTRADINGCO wrote: > I'm sure there has to be a way to verify which IP address is accessing > from. I need to establish a page where when I enter it records the IP > address I'm logging in from, to a database. > > Problem is I can't seem a command in ph

[PHP] Getting users IP address into a variable.

2002-10-02 Thread Webmaster MBTRADINGCO
I'm sure there has to be a way to verify which IP address is accessing from. I need to establish a page where when I enter it records the IP address I'm logging in from, to a database. Problem is I can't seem a command in php that can assign that to a variable, as in: $ip=HTTP_GET_ ANY IDEA

[PHP] Looking for work

2002-10-02 Thread Clint Tredway
Hi, my name is Clint Tredway and I am a web developer in Dallas Texas. I am looking for any projects that you may need help with. My rates are very reasonable and I can be reached at anytime. Thanks, Clint -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.ph

Re: [PHP] Apache2 and PHP4.2.3 - errors

2002-10-02 Thread Rasmus Lerdorf
PHP doesn't officially support Apache2 at this point. Go back to Apache1. On Thu, 3 Oct 2002, Chris Aitken wrote: > Hi all, > > I have recently upgraded to apache2 on my FreeBSD 4.6 box, and the upgrade > worked well, the daemon was running and serving pages etc. So I installed > the latest PHP

[PHP] Apache2 and PHP4.2.3 - errors

2002-10-02 Thread Chris Aitken
Hi all, I have recently upgraded to apache2 on my FreeBSD 4.6 box, and the upgrade worked well, the daemon was running and serving pages etc. So I installed the latest PHP build in my ports tree (4.2.3) and it compiled no problems, but when I added the required lines into my httpd.conf to make

[PHP] Images problem

2002-10-02 Thread Mihaela Ratri
Hi, I know that is old problem, but I could'n solved until now. Sorry for any inconvenience. I've installed gd-2.0.1 (in /my/home) and php-4.2.3 with the following options: ./configure --with-mysql --with-apache=../apache_1.3.26 --with-gd=/my/home/gd-2.0.1 --prefix=/my/home/local --with-fre

[PHP] PHP with GD and Jpeg

2002-10-02 Thread new.php.net
If have gd 1.8.4 compiled with zlib and jpeg support... This works fine but whenever I try to make php 4.2.3: configure --enable-track-vars --enable-trans-sid --with-mysql --with-apxs -- with-gd --with-jpeg-dir=/usr/local/lib --with-zlib I register following line: checking for gdImageCreateform

[PHP] How can I check for variances in spelling within form text input fields?

2002-10-02 Thread DonPro
Hi, I would like some ideas on how to perform the following. Any input from the PHP gurus would be appreciated. I have a form where my customer feels out certain information. Part of this information is the company name, address, city and state/province of their customer. I have to assign a u

Re: [PHP] php 4.2.3 giving prob.

2002-10-02 Thread Rasmus Lerdorf
Turn on register_globals in your php.ini On Wed, 2 Oct 2002, Anil Garg wrote: > hi, > i am facing a strange problem > i am using php 4.2.3 the url says > "http://ipaddress/admin/add_doc.php?id=264&mode=add";. > but in the php file when i try to print $id and $mode it couldnt print the > values..

RE: [PHP] Recursive Replace

2002-10-02 Thread John W. Holmes
> If it's genuinely one line per $info[] element, just add the dad-blamed > to your echo: > > '; } ?> > Also, just an FYI to the OP, you may want to calculate sizeof($info) before hand, and use a variable in your for() statement. That way it doesn't have to calculate sizeof() each loop... --

[PHP] php 4.2.3 giving prob.

2002-10-02 Thread Anil Garg
hi, i am facing a strange problem i am using php 4.2.3 the url says "http://ipaddress/admin/add_doc.php?id=264&mode=add";. but in the php file when i try to print $id and $mode it couldnt print the values.. but in some other files it successfully reads the parameters from url. moreover, the same

[PHP] Images problem

2002-10-02 Thread Mihaela Ratri
Hi, I know that is old problem, but I could'n solved until now. Sorry for any inconvenience. I've installed gd-2.0.1 (in /my/home) and php-4.2.3 with the following options: ./configure --with-mysql --with-apache=../apache_1.3.26 --with-gd=/my/home/gd-2.0.1 --prefix=/my/home/local --with-fre

[PHP] Images problem

2002-10-02 Thread Mihaela Ratri
Hi, I know that is old problem, but I could'n solved until now. Sorry for any inconvenience. I've installed gd-2.0.1 (in /my/home) and php-4.2.3 with the following options: ./configure --with-mysql --with-apache=../apache_1.3.26 --with-gd=/my/home/gd-2.0.1 --prefix=/my/home/local --with-fre

[PHP] RE: [PHP-INST] "VERY NEWBIE" php_* mod_* --with- question

2002-10-02 Thread Brian . Duke
Well, I'm not the best qualified to answer this question but here goes my best shot (Guru's watch me here make sure I don't screw this up). Starting with Apache. Apache does not actually process your *.php files. There is another engine that takes care of that called Zend. There are a couple lin

Re: [PHP] Quick question.

2002-10-02 Thread Simon Angell
i am unsure what you mean, where exactly do it type in 'ls -al' ? -- Cheers - Simon Angell Canberra ACT www.canberra-wx.com - Member of: Australian Severe Weather Association. www.sever

  1   2   >