RE: [PHP] preventing sql injections

2002-12-18 Thread John W. Holmes
> Also, please note that if you're using MySQL you don't have to bother at > all security-wise - MySQL won't accept more than one query per > mysql_query(). You do have to bother about regular errors though - if > $f_namn or $email contain quotes (which $email might well contain) then > you're goin

Re: [PHP] *OK, more eval for today

2002-12-18 Thread Alexey Lysenkov
Okay, wait. How? say, I have a field of checkboxes in 3 columns and 6 rows. I need at least one checked. At the moment every checkbox has the name of kind: q3_4_1 , where 4 stands for row and 1 for column. Now, how do I name them and loop through them? Plus, if $HTTP_POST_VAR["q3_4_1"] wasn't chec

RE: [PHP] *OK, more eval for today

2002-12-18 Thread John W. Holmes
> Okay, wait. > How? > > say, I have a field of checkboxes in 3 columns and 6 rows. I need at least > one checked. > At the moment every checkbox has the name of kind: q3_4_1 , where 4 stands > for row and 1 for column. Now, how do I name them and loop through them? > Plus, if $HTTP_POST_VAR["q3_4

Re: [PHP] *OK, more eval for today

2002-12-18 Thread Alexey Lysenkov
am trying -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: mysql_num_rows

2002-12-18 Thread Philip Olson
And now mysql4 allows doing this another way, I *assume* this new way is slightly faster then the additional count() although I haven't tested it and wonder if it affects mysql_num_rows()... See: SQL_CALC_FOUND_ROWS() http://www.mysql.com/doc/en/Miscellaneous_functions.html Regards, Philip

Re: [PHP] *OK, more eval for today

2002-12-18 Thread Alexey Lysenkov
It worked for validation! :) Hooray. Now, I guess, I have to set the same logic for the whole other bumch of questions God.. Most probably will post here today later again. Cheers, John! -Alex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/

[PHP] creating objects by reference?

2002-12-18 Thread Jonathan Sharp
Is it better to do: $obj = &new object(); verses: $obj = new object(); thanks, -js -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] who is connected?

2002-12-18 Thread Scott Alden
I've done the same for my site, but I've found that even when using the MySQL INSERT DELAYED when adding a username to the online users table it can bring my site to a crawl under heavy traffic. -- Scott Jason Reid wrote: How I do it for my sites is borrowing from the concept that phpBB uses...

[PHP] old getenv?

2002-12-18 Thread Bryan Koschmann - GKT
Hello, I'm trying to use a formmail script (Jack's Formmail) but I'm having a problem, because it seems to not spit out any info for getenv("HTTP_REFERER"). Is there any way around this, other than fixing every reference to that (there are others to get the form information as well)? I had the sam

RE: [PHP] Re: Compiling php-4.0.6 with MySQL support

2002-12-18 Thread Dan Rossi
not the sources where you put your libmysql, i prefix my apps , as its easier to contain and find stuff -Original Message- From: Igor Shulgin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 18, 2002 10:00 PM To: electroteque; [EMAIL PROTECTED] Subject: Re: [PHP] Re: Compiling php-4.0.

Re: [PHP] old getenv?

2002-12-18 Thread Kevin Stone
The only way to get at HTTP_REFERER is either through getenv(), $HTTP_SERVER_VARS, or $_SERVER. There is no other way around it. But since the methods are universial there shouldn't be any harm in just using the Find/Replace command in your editor. I found one (rather odd) reference that suggest

[PHP] Automated Php Page

2002-12-18 Thread msmecca
Still a php newbie here I am creating a website set on an intranet server. I have to create two pages that consists of the following actions and I'd like to know if its possible to do with php if so, how? The first page, information page, would somewhat look like a forum page to enter infor

[PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread rolf vreijdenberger
hey there, I include files outside the document root in my site. include $_SERVER['DOCUMENT_ROOT']."../inc.php" ; when I use this on the localhost it doesn't find this variable: $_SERVER['DOCUMENT_ROOT'] which makes testing more annoying since I have to upload to my site all the time. any idea

Re: [PHP] Automated Php Page

2002-12-18 Thread Brad Bonkoski
Well, read up on fwrite() to actually write the page. I would have the 1st page form submit to itslef, process/create the new static page and then to a re-direct to the new page. There are tutorials for image uploading, and the other stuff would just be writting form vairables to a static file wi

Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread Joseph W. Goff
Is there a difference between PHP versions on your machine and your site? Have you looked at phpinfo() to see what variables have been set on your system? - Original Message - From: "rolf vreijdenberger" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, December 18, 2002 3:38 PM

Re: [PHP] preventing sql injections

2002-12-18 Thread Bogdan Stancescu
Thy words are wise, milord. Bogdan John W. Holmes wrote: Also, please note that if you're using MySQL you don't have to bother at all security-wise - MySQL won't accept more than one query per mysql_query(). You do have to bother about regular errors though - if $f_namn or $email contain quo

Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread Rolf Vreijdenberger
yes, the server var doesn't exist in phpifno(); no difference winxp pro with iss -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread Leif K-Brooks
No, PHP version. With virtually no information, I'm going to guess that you're using a version below 4.1, which is where the $_* variables were introduced. Upgrade or use $HTTP_SERVER_VARS. Rolf Vreijdenberger wrote: yes, the server var doesn't exist in phpifno(); no difference winxp pro wit

Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread Joseph W. Goff
Both sites are running winXP and IIS? Both same version of IIS? If the variable is on one and not on the other it could be either a version conflict, or a configuration problem. - Original Message - From: "Rolf Vreijdenberger" <[EMAIL PROTECTED]> To: "Joseph W. Goff" <[EMAIL PROTECTED]>; "

Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread rolf vreijdenberger
I use php 4.2.3 and only my pc is running xp, the server is a linux machine -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread rolf vreijdenberger
the document_root just doesn't show up in my phpinfo(); do windows machines have one anyway? I have used this var before, just not testing it locally. It normally shows up when I use phpifno on the server. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.ph

Re: [PHP] old getenv?

2002-12-18 Thread Bryan Koschmann - GKT
Hey thanks Kevin. That was all I needed to know. I can't quite understand why it didn't report back, but I have it working now. I did have register_globals off, and even tried turning it on, but that didn't make a difference. Maybe I should just start trying to write my own from scratch :) Thanks

Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread Joseph W. Goff
IIS may not have that variable. You might want to install apache on your local machine so that you are using the same tools. - Original Message - From: "rolf vreijdenberger" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, December 18, 2002 4:00 PM Subject: Re: [PHP] $_SERVER['

Re: [PHP] session variables

2002-12-18 Thread Justin French
on 19/12/02 2:25 AM, Antti ([EMAIL PROTECTED]) wrote: > Neather this seem to work > > $_SESSION['some_variable']=$variable; > > nor this: > > $_SESSION['today']= date('Y-m-d h:m:s'); > > antti What do you mean "don't work"... what are you trying to do? page1.php click to go to page 2

Re: [PHP] Empty textfield

2002-12-18 Thread Justin French
read ALL of http://www.php.net/manual/en/features.file-upload.php I'm assuming php >= 4.1.1 Justin on 19/12/02 2:33 AM, shaun ([EMAIL PROTECTED]) wrote: > Hi, > > what is the best way to check if a textfield is empty, and is it the same > for file fields? > > thanks for your help > >

Re: [PHP] *Premature end of script headers

2002-12-18 Thread Alexey Lysenkov
Guys? The support guy says that my php-script brings his php interpreter to crash. I am astonished (wow-what a powerful man I am :) ) - no, but really, it doesn't crash MY server? He also said, it happens just right after the file is being asked for, that is, as I suspect, somewhere in the first li

RE: [PHP] *OK, more eval for today

2002-12-18 Thread Martin Towell
argh! eval() try this instead: $temp = ${"php_q3_$i"}; to get it directly from $HTTP_POST_VARS: $temp = $HTTP_POST_VARS["php_q3_$i"]; simple HTH Martin -Original Message- From: Alexey Lysenkov [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 6:08 AM To: [EMAIL PROTECTED] Subje

Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread DL Neil
Rolf, > > the document_root just doesn't show up in my phpinfo(); > > > > do windows machines have one anyway? > > I have used this var before, just not testing it locally. > > > > It normally shows up when I use phpifno on the server. Please check/compare the entries for doc_root = in the two P

RE: [PHP] *Premature end of script headers

2002-12-18 Thread Dave [Hawk-Systems]
>Guys? The support guy says that my php-script brings his php interpreter to >crash. I am astonished (wow-what a powerful man I am :) ) - no, but really, >it doesn't crash MY server? He also said, it happens just right after the >file is being asked for, that is, as I suspect, somewhere in the firs

[PHP] is there php equiv left() and right() functions?

2002-12-18 Thread Jeff Bluemel
I have a string that will look like the following; data1|data2 now - I need to put data1 in a variable, and data2 in another variable. I've found the functions strlen, and strpos, but I can't figure how to grab this data. thanks, Jeff -- PHP General Mailing List (http://www.php.net/) To uns

[PHP] Re: creating objects by reference?

2002-12-18 Thread Matthew Gray
Jonathan Sharp wrote: > Is it better to do: > $obj = &new object(); > > verses: > $obj = new object(); > > thanks, > -js If you are looking to the future: I don't believe the ability to return objects by reference will be an option in Zend Engine 2. Matt -- PHP General Mailing List (http:/

[PHP] Re: is there php equiv left() and right() functions?

2002-12-18 Thread Matthew Gray
Jeff Bluemel wrote: > I have a string that will look like the following; > > data1|data2 > > now - I need to put data1 in a variable, and data2 in another variable. > I've found the functions strlen, and strpos, but I can't figure how to > grab this data. > > thanks, > > Jeff Try list($var1,

Re: [PHP] is there php equiv left() and right() functions?

2002-12-18 Thread Philip Olson
You want explode(), something like: list($a, $b) = explode('|', $string); Regards, Philip Olson On Wed, 18 Dec 2002, Jeff Bluemel wrote: > I have a string that will look like the following; > > data1|data2 > > now - I need to put data1 in a variable, and data2 in another variable. > I've

[PHP] Re: is there php equiv left() and right() functions?

2002-12-18 Thread Jeff Bluemel
thanks... Jeff "Matthew Gray" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Jeff Bluemel wrote: > > > I have a string that will look like the following; > > > > data1|data2 > > > > now - I need to put data1 in a variable, and data2 in another variable. > > I'v

Re: [PHP] is there php equiv left() and right() functions?

2002-12-18 Thread Jeff Bluemel
works great thanks, Jeff "Philip Olson" <[EMAIL PROTECTED]> wrote in message Pine.BSF.4.10.10212190240490.68100-10@localhost">news:Pine.BSF.4.10.10212190240490.68100-10@localhost... > > You want explode(), something like: > > list($a, $b) = explode('|', $string); > > > Regards, > Philip

[PHP] recommendation needed for dedicated server hosting

2002-12-18 Thread Taek Kwon
Hi, I recently went through a horrendous experience with two different hosting providers. I'd like some recommendations on excellent hosting providers if anybody has some. My key priorities in order are: 1) around-the-clock, technically competent TELEPHONE support (webchat support, message boards

[PHP] PHP and MySQL queries

2002-12-18 Thread Beauford.2002
Hi, I am having a real problem with variables in PHP and trying to query my MySQL database. I have a form that a user inputs information and then that info is used to query my database, but it's not working. I don't get any errorrs and it appears every thing worked, but nothing gets displayed (see

Re: [PHP] recommendation needed for dedicated server hosting

2002-12-18 Thread Jason Sheets
For server colocation or dedicated leased servers I would recommend Hurricane Electric, they have an excellent backbone, excellent technical support and friendly sales staff. Their website is at http://www.he.net. For shared hosting I recommend pair networks ( http://www.pair.com ) or Fidelity Ho

Re: [PHP] recommendation needed for dedicated server hosting

2002-12-18 Thread Tom Rogers
Hi, Thursday, December 19, 2002, 2:30:44 PM, you wrote: TK> Hi, TK> I recently went through a horrendous experience with two different hosting TK> providers. I'd like some recommendations on excellent hosting providers if TK> anybody has some. TK> My key priorities in order are: TK> 1) around-th

[PHP] Re: recommendation needed for dedicated server hosting

2002-12-18 Thread Kyle Gibson
Hi, I recently went through a horrendous experience with two different hosting providers. I'd like some recommendations on excellent hosting providers if anybody has some. My key priorities in order are: 1) around-the-clock, technically competent TELEPHONE support (webchat support, message boards

[PHP] repeat region

2002-12-18 Thread Bruce Levick
Hi php'ers, I have learnt alot in the last week in regards to php and listing the rows of a table set. I need help with a small challenge. I can retrieve rows from a database table and list the results in HTML cell successfully. My challenge is this. I want to list the I.D (auto increment id num

[PHP] Re: PHP question

2002-12-18 Thread gamin
Have a look at suexec HTH gamin "Tom Ray" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Are PHP script supposed to run as the user or as the web server? > Currently I'm running Red Hat 7.3 with apache 1.3.x and all my PHP > scripts run as apache, not as the

[PHP] Re: repeat region

2002-12-18 Thread Jeff
$idx=1; echo() while(fetch_rows) { printf("%s, ID); if($idx%7=0) {echo(''} ++$idx; } "Bruce Levick" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi php'ers, I have learnt alot in the last week in regards to php and listing the rows of a table set. I nee

[PHP] FW: checking bounce email

2002-12-18 Thread See kok Boon
Hi, Can someone kindly teach me how to check for bounced emails when I use mail() to send emails? OR Tell me whether there are other mail functions which can accomplish that. Thanks in advance kokboon

Re: [PHP] repeat region

2002-12-18 Thread Justin French
Hi, what you want to do is only echo the and every 7 loops through the records. Untested example: "; } echo "{$myrow['id']}"; if($i == 7) { echo ""; $i = 0; } } ?> Justin on 19/12/02 4:27 PM, Bruce Levick ([EMAIL PROTECTED]) wrote: > Hi php'ers, > I have learnt alot in the la

[PHP] Re: URL parsing

2002-12-18 Thread gamin
Hi Mako, if your URL is going to have this format consistently try this $data = explode("/",$URL); $user = $data[3]; HTH (untested code) gamin. "Mako Shark" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I've got a URL like this: > > http://www.naturalis

RE: [PHP] PHP and MySQL queries

2002-12-18 Thread John W. Holmes
So print out $query before you execute it and see what you're actually sending to MySQL. You're apparently sending a valid query, but it's not matching any rows... ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ > -O

[PHP] PHP: XML + XSL

2002-12-18 Thread Hristina
hello! I have the following problem: I want to display text from nodes in xsm file, but after every text to put picture with link. The rows above dispay the text correctly in

[PHP] php + xsl + xsm

2002-12-18 Thread Hristina
hello! I have the following problem: I want to display text from nodes in xsm file, but after every text to put picture with link. The rows above dispay the text correctly in

Re: [PHP] flush output error

2002-12-18 Thread electroteque
sorry about the false alarm , if you go here u will see a working example http://galleries.dyndns.org:1023/progress.php i had to add both flush functions together to work , obviosuly flsuh is not emptying the buffer within a loop, is this still a bug ? flush(); ob_flush(); "Wico De Leeuw" <[EM

<    1   2