Re: [PHP] Convince teh boss

2002-11-06 Thread Khalid El-Kary
hi, thanx for that list it's really convincing for these Microsofts :) just something i wanted to ask about, is it a good thing or better for security to hide the script name from the address bar, through that list i found all the PHP pages hidden with HTML names, i don't know the technique exac

RE: [PHP] Help me learn! with an explanation of these two functions.

2002-11-06 Thread Steve Jackson
My second query still doesn't return anything? Even with $orderid = $row removed as Jason suggested. This is my current function. function get_order_numbers() { $conn = db_connect(); $query = "select orders.orderid from orders, email where orders.orderid = email.orderid and email.checked='no'"; $

[PHP] Re: Convince teh boss

2002-11-06 Thread nicos
Thats a very nice research. Thanks you. -- M.CHAILLAN Nicolas [EMAIL PROTECTED] www.WorldAKT.com Hébergement de sites internets. "Evan Nemerson" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Okay, it took me a long (

[PHP] Convince teh boss

2002-11-06 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Okay, it took me a long (expletive deleted) time, so I figured I should share. Here is a list of popular web sites running Apache, PHP, MySQL, and Linux. If there are any errors, I apologize. This is not meant to be a definitive work. In fact, I was

[PHP] Regular Expression

2002-11-06 Thread Salman
Hi, I have this ereg call ereg("([-d])[rwxst-]{9}.* [0-9]* [a-zA-Z]+ [0-9: ]* (.+)",$dirline,$regs); This regular expressions parses the following line: drwxrwxrwx 1 ownergroup 0 Nov 5 23:19 fantasy to return: fantasy (or in general any filename/directory name) The above

[PHP] Delete a file via FTP (without PHP FTP support)

2002-11-06 Thread Charles Wiltgen
// Delete a file via FTP function deleteFileViaFTP($ftpServer, $user, $password, $ftpDir, $ftpFile) { $error = FALSE; // Open connection to FTP port $ftp = fsockopen($ftpServer,21); $foo = fgets($ftp); if (!ereg("^220*", $foo)) { $error = "*** Error! FTP service not r

Re: [PHP] session vs. header

2002-11-06 Thread Chris Shiflett
huge junk mail wrote: Can someone tell me why I can't have $_SESSION['foo'] = 'content of foo'; following by header('Location: http://www.mysite.com'); Someone from www.php.net told me that it can confuse browser (http://bugs.php.net/19991). But, still I can't the idea why it can happen. Does

Re[4]: [PHP] Trouble with php-4.2.3, apache-1.3.27, sablotron 0.96

2002-11-06 Thread Tom Rogers
Hi, Thursday, November 7, 2002, 1:11:43 PM, you wrote: EN> Same error. >> As a test try compiling statically into apache...That is the way I have php at the moment. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Foreach ...... Help

2002-11-06 Thread Remon Redika
Sorry before. I Just to try to Explain my Problem may be this my reason .. I have Two Text Fields The First Text Field i call it "InputX" and The Second Text Field I Call it "InputY", Generatable Field (using javascripts), if User Click the Button ("AddRow's Button") for Generated / produce th

Re: [PHP] File locking problem

2002-11-06 Thread Charles Wiltgen
Marco Tabini wrote... > Just a (possibly stupid) suggestion--is it possible that the file is being > overwritten by another instance of your script that's run in the meantime? This may also be a problem at some point, but currently I'm just trying to get it working in an test environment where on

[PHP] Help Needed for Project

2002-11-06 Thread Karl James
Is There anyone that I can chat with in reatlime About the project I need help with for my fantasy football League. Karl

Re: [PHP] File locking problem

2002-11-06 Thread Marco Tabini
Just a (possibly stupid) suggestion--is it possible that the file is being overwritten by another instance of your script that's run in the meantime? - php|architect -- The Magazine for PHP Professionals Check us out on the web at http://www.phparch.com On Wed, 2002-11-06 at 23:06, Ch

Re: [PHP] Re: Foreach ...... Help

2002-11-06 Thread Rasmus Lerdorf
Your code is bogus. You probably want: $vary[$i] = $y; And $vary(100) also makes no sense. Also, why are you looping through the $InputY array and putting all the values into $vary? Why not just do $vary = $InputY; ? If it is because you need to renumber the indices, have a look at the arr

[PHP] Re: Foreach ...... Help

2002-11-06 Thread Remon Redika
Parse error: parse error, unexpected '=' in /home/intra/Inventroot/software/savedata.php on line 35 $vary(100); $i = 0; foreach($InputY as $y){ $vary($i) = $y; <-line 35 $i++; } foreach($Nama_Software as $x){ $insertq = "Insert into NSoftware (X, Y) values ('$In

[PHP] File locking problem

2002-11-06 Thread Charles Wiltgen
Hello, I'm having file locking problems. I'm using fopen() to write a file via FTP. At the end, I'm doing... fflush($fp); fclose($fp); ...and then I include it immediately after. But many times I only get part of what I wrote to the file, which suggests that it wasn't really flushed a

Re: [PHP] Running functions as other than nobody

2002-11-06 Thread Charles Wiltgen
Marco Tabini wrote... >> I need to chmod files which are owned by a nother user than nobody with a >> php script runing from a browser. >> >> lets say i have a file called image.gif and I want to chmod(imgage.gif, >> 0777); and I want to run it as user: myuser with passwd: passwd. >> >> Can I do

Re: Re[2]: [PHP] Trouble with php-4.2.3, apache-1.3.27, sablotron 0.96

2002-11-06 Thread Evan Nemerson
Same error. On Wednesday 06 November 2002 05:40 pm, you wrote: > Hi, > > Thursday, November 7, 2002, 5:35:10 AM, you wrote: > EN> -BEGIN PGP SIGNED MESSAGE- > EN> Hash: SHA1 > > EN> Nope... same error. Patch worked perfectly, LDFLAGS=-lstdc++ did too. > End EN> result: same error. Any oth

RE: [PHP] Getting Newest

2002-11-06 Thread John W. Holmes
Read my last post and then run SELECT VERSION() in MySQL. I really doubt you're running 4.0. ---John Holmes... > -Original Message- > From: Stephen [mailto:webmaster@;melchior.us] > Sent: Wednesday, November 06, 2002 9:57 PM > To: PHP List > Subject: Re: [PHP] Getting Newest > > Oh, wel

Re: [PHP] Getting Newest

2002-11-06 Thread Stephen
Oh, well, now I'm getting this error: You have an error in your SQL syntax near 'union select * from church union select * from misc order by date desc limit 1' at line 1 Here's what I did for the SQL $sql = "select * from school union "; $sql .= "select * from church union "; $sql .= "select *

RE: [PHP] Getting Newest

2002-11-06 Thread John W. Holmes
UNION is implemented in MySQL 4.0.0, btw. > -Original Message- > From: Stephen [mailto:webmaster@;melchior.us] > Sent: Wednesday, November 06, 2002 9:33 PM > To: PHP List > Subject: Re: [PHP] Getting Newest > > So for my SQL statement I put this? > > $sql = "select id, date, name, text f

RE: [PHP] Getting Newest

2002-11-06 Thread John W. Holmes
> $sql = "select id, date, name, text from table1 union"; > $sql2 = "select id, date, name, text from table2 union"; > $sql3 = "select id, date, name, text from table3 order by date desc";> No, it's all one query. $sql = "select id, date, name, text from table1 union " ."select id, date,

Re: [PHP] Getting Newest

2002-11-06 Thread Stephen
So for my SQL statement I put this? $sql = "select id, date, name, text from table1 union"; $sql2 = "select id, date, name, text from table2 union"; $sql3 = "select id, date, name, text from table3 order by date desc"; - Original Message - From: "Nick Eby" <[EMAIL PROTECTED]> To: <[EMAIL

RE: [PHP] Code help

2002-11-06 Thread Martin Towell
CAUTION: It's not reliable you can use $HTTP_REFERER (or, I think's it's under $_SERVER, $_SERVER["HTTP_REFERER"]) -Original Message- From: William Holroyd [mailto:w.holroyd@;versity-cobalt.com] Sent: Thursday, November 07, 2002 12:42 PM To: [EMAIL PROTECTED] Subject: [PHP] Code help I

[PHP] Code help

2002-11-06 Thread William Holroyd
I am fairly new to the PHP language and have built a website with it before, but nothing very complicated. Is there anyway of grabbing information from the browser as to where a user may have come from (referring page, search engine, etc.)? And if so, how would I go about getting it? William --

[PHP] PHP wrapper around binary CGI app

2002-11-06 Thread gap
I have a binary (non-modifiable) CGI program that does form processing. It gets form data by HTTP POST and outputs the results to Apache. Is there any way to make a PHP wrapper around the program, so that the form data will be submitted to my script, which in turn will send the data to the program

Re[2]: [PHP] Trouble with php-4.2.3, apache-1.3.27, sablotron 0.96

2002-11-06 Thread Tom Rogers
Hi, Thursday, November 7, 2002, 5:35:10 AM, you wrote: EN> -BEGIN PGP SIGNED MESSAGE- EN> Hash: SHA1 EN> Nope... same error. Patch worked perfectly, LDFLAGS=-lstdc++ did too. End EN> result: same error. Any other ideas??? EN> On Wednesday 06 November 2002 09:09 am, you wrote: >> Hi, >>

Re: [PHP] Getting Newest

2002-11-06 Thread Nick Eby
you could make a union of all the records, and order by newest date first: (select id, date, name, text from table1) union (select id, date, name, text from table2) union (select id, date, name, text from table3) order by date desc then select the first record /nick -- PHP General Mailing Lis

Re: [PHP] fopen() with permissions?

2002-11-06 Thread Charles Wiltgen
Charles Wiltgen wrote... > I'm using sockets, and everything working except I can't CD to a directory > with a period in it (which is, of course, what I need to do). Does I need to > escapte this somehow for fputs()? Sorry, I'm an idiot...I went back to the FTP RFC and everything's working fine.

Re: [PHP] fopen() with permissions?

2002-11-06 Thread Charles Wiltgen
Ernest E Vogelsinger wrote... >> So, DreamHost doesn't appear to have compiled PHP with FTP support. Can >> anyone recommend a great FTP class? (I'm not exciting about doing this via >> sockets, but I will if I have to...) > > Would curl be an option? Do they have this? You could, however, alwa

Re: [PHP] fopen() with permissions?

2002-11-06 Thread Ernest E Vogelsinger
At 00:08 07.11.2002, Charles Wiltgen said: [snip] >So, DreamHost doesn't appear to have compiled PHP with FTP support. Can >anyone recommend a great FTP class? (I'm not exciting about doing this via >sockets, but I will if I have to...)

Re: [PHP] fopen() with permissions?

2002-11-06 Thread Charles Wiltgen
Ernest E Vogelsinger wrote... > $fp = ftp_connect("$ftphost"); > if ($fp) { > $login = ftp_login ($fp, $user, $pass); > ftp_delete ($fp, $ftpfile); > ftp_quit($fp); > } > else die('Cannot connect to FTP'); So, DreamHost doesn't appear to have compiled PHP with FTP support. Can

[PHP] Anyone used Phpmailer()

2002-11-06 Thread Pushpinder Sngh Garcha
Hello Everyone I am unable to send mail using the SMTP mode in phpmailer. I keep getting "Error: Could not authenticate" I am determined to find out why this keeps on happening...the mail() function works fine though. Many Thanks, -Pushpinder Pushpinder Singh Garcha _

Re: [PHP] fopen() with permissions?

2002-11-06 Thread Charles Wiltgen
Ernest E Vogelsinger wrote... > Why don't you do it this way: > > $fp = fopen("ftp://username:password@;domain.com/folder/file.prefs", "w"); > fwrite($fp, 'Some content', 12); > fclose($fp); > > I don't see a reason why you shouldn't directly use the file handle > returned by fopen - that's why

Re: [PHP] fopen() with permissions?

2002-11-06 Thread Charles Wiltgen
Marco Tabini wrote... > I'm not much of a PHPriest, but I love PHP because it's the first web > scripting language that I have encountered that actually make sense, is > coincise and very powerful. Yes, I'm a big fan. I was going to do this in .NET, which I'm more familiar with

Re: [PHP] Getting Newest

2002-11-06 Thread Stephen
Yes, same columns, everything the same except names and content. - Original Message - From: "1LT John W. Holmes" <[EMAIL PROTECTED]> To: "Stephen" <[EMAIL PROTECTED]>; "PHP List" <[EMAIL PROTECTED]> Sent: Wednesday, November 06, 2002 5:31 PM Subject: Re: [PHP] Getting Newest > Are all t

Re: [PHP] fopen() with permissions?

2002-11-06 Thread Ernest E Vogelsinger
At 22:48 06.11.2002, Charles Wiltgen said: [snip] >Well, I'm able to make an empty file with > >fopen("ftp://username:password@;domain.com/folder/file.prefs", "w") > >However, I'm still nowhere because this file belongs to the user and her >group, not to

Re: [PHP] Getting Newest

2002-11-06 Thread 1LT John W. Holmes
Are all three tables the same? Same columns and everything? ---John Holmes... - Original Message - From: "Stephen" <[EMAIL PROTECTED]> To: "PHP List" <[EMAIL PROTECTED]> Sent: Wednesday, November 06, 2002 4:10 PM Subject: [PHP] Getting Newest I have three tables with certain content in

Re: [PHP] Getting Newest

2002-11-06 Thread Marco Tabini
That's probably because you can't do it in a single SQL statement, but have to use three separate ones and build the logic to check which one is the most recent in PHP. Try outputting the query and posting it to the list, or try inserting a line like this: echo mysql_error(); after you execute yo

Re: [PHP] Getting Newest

2002-11-06 Thread Stephen
I know that you can select data from multiple tables, but when I do that I get an error. The error is this: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /usr/local/plesk/apache/vhosts/melchior.us/httpdocs/live/all.php on line 17 - Original Message --

Re: [PHP] fopen() with permissions?

2002-11-06 Thread Marco Tabini
Charles, can you not create and write the file locally and then upload it directly via ftp? I'm not much of a PHPriest, but I love PHP because it's the first web scripting language that I have encountered that actually make sense, is coincise and very powerful. It's the old question--do we make co

Re: [PHP] fopen() with permissions?

2002-11-06 Thread Charles Wiltgen
Hello, Well, I'm able to make an empty file with fopen("ftp://username:password@;domain.com/folder/file.prefs", "w") However, I'm still nowhere because this file belongs to the user and her group, not to Apache, so I still can't write to it. Here's what I have to work with: -- I have t

Re: [PHP] Getting Newest

2002-11-06 Thread Stephen
Sorry, I'm using MySQL. - Original Message - From: "Marco Tabini" <[EMAIL PROTECTED]> To: "Stephen" <[EMAIL PROTECTED]> Cc: "PHP List" <[EMAIL PROTECTED]> Sent: Wednesday, November 06, 2002 4:00 PM Subject: Re: [PHP] Getting Newest > That depends on what DBMS you are using. Which one is

Re: [PHP] Getting Newest

2002-11-06 Thread Marco Tabini
That depends on what DBMS you are using. Which one is it? Marco -- php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to PHP programmer Come visit us at http://www.phparch.com! --- Begin Message --- I have three tables with certain

[PHP] Getting Newest

2002-11-06 Thread Stephen
I have three tables with certain content in each that's added almost daily. I want to get the most recent, out of those three tables, and then display it. How would I do that without changing the structure of my tables? (My current structure is this: id, date, name, text) Thanks, Stephen Craton

Re: [PHP] generically accessing member variables problem

2002-11-06 Thread John Kenyon
Ok. I think I got it. Now I have to look at my code again to see if I can implement it. Thanks for your time. jck Maxim Maletsky wrote: Well, if, say, one class has this function: function inherit($class_name, $pointer) { $this->objects[$class_name] = $pointer; } then you end up knowing that

Re: [PHP] Help Needed with PhpMailer

2002-11-06 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Are you sure your SMTP requires authentication? If so, have you checked the username and password you supplied? On Wednesday 06 November 2002 11:19 am, Pushpinder Sngh Garcha wrote: > Hi , > > I am using PhpMailer in my mail application. > I keep ge

Fw: [PHP] mysql list

2002-11-06 Thread Kevin Stone
Yes that has happened to me before. I don't know why it's so strict becuase you can bet your bouncing booty there are ways around it. But did you heed their advice and put "MySQL" somewhere in your message? -Kevin - Original Message - From: "electroteque" <[EMAIL PROTECTED]> To: <[EMAIL

RE: [PHP] mysql list

2002-11-06 Thread Jay Blanchard
[snip] if anyone is on the mysql list why do i keep getting this , i can post anything dammit To bypass the filter you must include one of the following words in your message: sql,query [/snip] Follow the directions to make sure the message gets to the list. My original reply to this got bounced

Re: [PHP] Code Advice

2002-11-06 Thread Jason Young
I just saw that post... I feel completely stupid at this point, might I point out. You're right - register_globals is by default 'on' on this particular server I"m working on (I don't do a lot of PHP work on it), cuz its an older version and I haven't been bothered enough to upgrade it... I hav

Re: [PHP] To Move Recordset back to initial position

2002-11-06 Thread Evan Nemerson
You mean like php.net/mysql-data-seek ??? On Wednesday 06 November 2002 11:38 am, ppf wrote: > Hi All: > I am having a problem in MySQL records,If i used the > record set once and later on if i want to use the same > record set in some oteher place in the same page its > behive like an empty recor

Re: [PHP] To Move Recordset back to initial position

2002-11-06 Thread Kevin Stone
I believe it is mysql_data_seek($result, 0); -Kevin - Original Message - From: "ppf" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, November 06, 2002 12:38 PM Subject: [PHP] To Move Recordset back to initial position > Hi All: > I am having a problem in MySQL records,If i

[PHP] Help Needed with PhpMailer

2002-11-06 Thread Pushpinder Sngh Garcha
Hi , I am using PhpMailer in my mail application. I keep getting this error when I run the application "Message was not sent Mailer Error: SMTP Error: Could not authenticate" Here is the code that I am using : require("class.phpmailer.php"); //require("class.smtp.php"); $mail = new phpmailer

Re: [PHP] Code Advice

2002-11-06 Thread Ernest E Vogelsinger
At 20:40 06.11.2002, Jason Young spoke out and said: [snip] >register_globals is definately off.. >Maybe its a PHP miracle, as Ernest suggested.. maybe Rasmus or someone >else on the PHP dev team has something to say about it, but it works.. >maybe you all

[PHP] installing PHP with netscape on Sun Solaris

2002-11-06 Thread Joydeep Ghosh
Hello, installing PHP with netscape on Sun Solaris Iplanet webserver 4.1 Sun Solaris  2.7 followed instruction as published at http://www.php.net/manual/sv/install.netscape-enterprise.php Onstep 6 of Basic install during netscape server configuration it errors out. Attached is the config.log. gcc

Re: [PHP] publishing php > mysql website on cd-rom

2002-11-06 Thread John Wards
Thinking about this more A U.K. based electronics company has a CD which is Databse driven. It is compleatly searchable etc I think its either RS or Maplin.or it might be someone else ;-) but its a company like them.. John - Original Message - From: "ROBERT MCPEAK" <[EMAIL PR

[PHP] mysql list

2002-11-06 Thread electroteque
if anyone is on the mysql list why do i keep getting this , i can post anything dammit Your message cannot be posted because it appears to be either spam or simply off topic to our filter. To bypass the filter you must include one of the following words in your message: sql,query If you just

Re: [PHP] Code Advice

2002-11-06 Thread Jason Young
register_globals is definately off.. Maybe its a PHP miracle, as Ernest suggested.. maybe Rasmus or someone else on the PHP dev team has something to say about it, but it works.. maybe you all could use it :-D Hopefully I didn't find a bug :-o -J Kevin Stone wrote: It's probably working becua

[PHP] To Move Recordset back to initial position

2002-11-06 Thread ppf
Hi All: I am having a problem in MySQL records,If i used the record set once and later on if i want to use the same record set in some oteher place in the same page its behive like an empty recordset, I want to know is there any method to (recordset.moveFirst or some thing) move the cursor towards

Re: [PHP] Code Advice

2002-11-06 Thread Kevin Stone
Oh ho! Good call Mr. Vogelsinger. I would never have guessed. So infact the code DOES work. My apologies Jason, I guess ya learn something new every day. ;-) -Kevin - Original Message - From: "Ernest E Vogelsinger" <[EMAIL PROTECTED]> To: "Jason Young" <[EMAIL PROTECTED]> Cc: <[EMAIL

Re: [PHP] Code Advice

2002-11-06 Thread Chris Wesley
On Wed, 6 Nov 2002, Jason Young wrote: > So then can anyone tell me why its working so far? ;) It doesn't work at all like you want it to. I assume you've already put this script up on a web server to test, so watch this: After this line: $$key = $val; Insert this line for debugging:

Re: [PHP] Trouble with php-4.2.3, apache-1.3.27, sablotron 0.96

2002-11-06 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Nope... same error. Patch worked perfectly, LDFLAGS=-lstdc++ did too. End result: same error. Any other ideas??? On Wednesday 06 November 2002 09:09 am, you wrote: > Hi, > > Wednesday, November 6, 2002, 2:50:42 PM, you wrote: > EN> -BEGIN PGP SI

Re: [PHP] Code Advice

2002-11-06 Thread Kevin Stone
It's probably working becuase you have register_globals = ON in your php.ini and those variable names are being set by default. Your posted code is actually doing nothing. What I can't figure is why you're not getting any errors. :-\ -Kevin - Original Message - From: "Jason Young" <[EMA

Re: [PHP] Code Advice

2002-11-06 Thread Ernest E Vogelsinger
At 20:13 06.11.2002, Jason Young spoke out and said: [snip] >Hmm.. > >So then can anyone tell me why its working so far? ;) > >I am trying out every single function in this page in hopes to catch >something, but so far I don't see any breakage - I can see t

Re: [PHP] generically accessing member variables problem

2002-11-06 Thread Maxim Maletsky
Well, if, say, one class has this function: function inherit($class_name, $pointer) { $this->objects[$class_name] = $pointer; } then you end up knowing that, whenever you need to access an instance for a class, you can use $this->objects['that_class']->that_array. What I picked on, was

RE: [PHP] Code Advice

2002-11-06 Thread Ernest E Vogelsinger
At 20:08 06.11.2002, Ford, Mike [LSS] spoke out and said: [snip] >> -Original Message- >> [...snip...] >> value, in _GET or _POST? Try this: >> foreach ($_POST as $name => $value) >> $_GET[$name] =& $value; >> You

Re: [PHP] Code Advice

2002-11-06 Thread Jason Young
Hmm.. So then can anyone tell me why its working so far? ;) I am trying out every single function in this page in hopes to catch something, but so far I don't see any breakage - I can see there are a few ways to skin this cat.. the original code I posted DOES work.. I still may be blind to an

[PHP] filemtime() error

2002-11-06 Thread Jule Slootbeek
Hi, i'm writing a piece of code that allows me to upload the updated version of my website from the local tree, to the server. I do this by comparing the linux timestamps on the local and remote files. printing a table of the remote files works fine, but when i do it for my local files, i get an

Re: [PHP] generically accessing member variables problem

2002-11-06 Thread John Kenyon
I am not really sure I understand what you are saying here, and I would like to. Let me first say that I think the syntax you came up with earlier will solve my immediate problem, but if I could design this in a better way I'd like to know. Let me give you a few more details: I have a large cla

Re: [PHP] Code Advice

2002-11-06 Thread Maxim Maletsky
look well through the code you posted, it had a bug :) But we got your idea - it can be a solution for limiting input. Yet, you need to also know a way to unset unwanted variables. That can only be done by accessing $_GET or $HTTP_GET_VARS (if GET method). -- Maxim Maletsky [EMAIL PROTECTED] "

RE: [PHP] Code Advice

2002-11-06 Thread Ford, Mike [LSS]
> -Original Message- > From: Ernest E Vogelsinger [mailto:ernest@;vogelsinger.at] > Sent: 06 November 2002 18:49 > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Code Advice > > > Ever had a headache with posted parameters, as to where to > look for the > value, in _GET or _POST? Try this: >

RE: [PHP] Code Advice

2002-11-06 Thread Ford, Mike [LSS]
> -Original Message- > From: Kevin Stone [mailto:kevin@;helpelf.com] > Sent: 06 November 2002 18:50 > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Code Advice > > > All I have to go by is what I see. The method was this.. > > $get_allow = array('foo', 'bar', 'add', 'takeovertheworld'); >

Re: [PHP] Converting variables to integer

2002-11-06 Thread Kevin Stone
Ooops my str_replace() function needs one more parameter. str_replace(',', '', $str); -Kevin - Original Message - From: "Kevin Stone" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, November 06, 2002 11:45 AM Subject: Re: [PHP] Converting variables to inte

RE: [PHP] Code Advice

2002-11-06 Thread Ernest E Vogelsinger
At 19:50 06.11.2002, Ford, Mike [LSS] spoke out and said: [snip] >> -Original Message- >> From: Kevin Stone [mailto:kevin@;helpelf.com] >> Sent: 06 November 2002 18:32 >> >> The method that you have described below is going to produce

Re: [PHP] Converting variables to integer

2002-11-06 Thread Marek Kilimajer
This should work for you, this recursive function loops the array, if it gets array again, calls itself function convert2int($var) { foreach($var as $k => $v ) { if(is_array($v)) { $var[$k]=convert2int($v); } else { $var[$k]=str_replace(',',$v); } }

Re: [PHP] Code Advice

2002-11-06 Thread Kevin Stone
All I have to go by is what I see. The method was this.. The array $get_allow has numerical indicies. Looping through that in the method described is going to set an integer to $key. So your first error is going to be that $_GET[0] is Undefined. Second error is going to be $$key is an invali

Re: [PHP] Code Advice

2002-11-06 Thread Ernest E Vogelsinger
At 18:52 06.11.2002, Jason Young spoke out and said: [snip] >I (think I) have come up with an interesting little solution for pages >that have/can potentially have a lot of get vars, and I just wanted to >throw it by everyone to see if I know what I'm talki

Re: [PHP] Converting variables to integer

2002-11-06 Thread Kevin Stone
function str2int($str) { $str = str_replace(',', $str); // http://www.php.net/manual/en/function.str-replace.php settype($str, "integer"); // http://www.php.net/manual/en/function.settype.php if (is_int($str)) // http://www.php.net/manual/en/function.is-int.php return $str

RE: [PHP] Code Advice

2002-11-06 Thread Ford, Mike [LSS]
> -Original Message- > From: Kevin Stone [mailto:kevin@;helpelf.com] > Sent: 06 November 2002 18:32 > > The method that you have described below is going to produce > a numerical Key > which is going to result in several errors. Huh? What on earth does this mean? > -Kevin > > - Or

Re: [PHP] Code Advice

2002-11-06 Thread Kevin Stone
The method that you have described below is going to produce a numerical Key which is going to result in several errors. -Kevin - Original Message - From: "Jason Young" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, November 06, 2002 10:52 AM Subject: [PHP] Code Advice > I

Re: [PHP] publishing php > mysql website on cd-rom

2002-11-06 Thread ROBERT MCPEAK
It's a database site, containing thousands of records, similar to a products catalog like Amazon, for example. Publishing as static pages is not a viable option, and would greatly limit the search functionality. There must be a way to do this! Thanks for all the feedback. >>> Maxim Maletsky

Re: [PHP] generically accessing member variables problem

2002-11-06 Thread Maxim Maletsky
You pass it the name of the element, and whatever the data inside. You do not need to add other sub-elements to it automatically, as you would need to be "searching" through the elements later for the right data. Whatever your need is - it's a good idea using arrays, and add other arrays into it.

Re: [PHP] generically accessing member variables problem

2002-11-06 Thread John Kenyon
See below: MM> class Example { MM> var $array = array(); MM> function add2array($element_name, $val){ MM> $this->$array[$element_name] = $val; MM> } MM> } MM> $t = new Example(); $t->>add2array('array1',25); $t->>add2array('array2',26); $t->>add2array('array3',"Hello");

Re: [PHP] generically accessing member variables problem

2002-11-06 Thread Maxim Maletsky
Tom Rogers <[EMAIL PROTECTED]> wrote... : > Hi, > > Thursday, November 7, 2002, 3:45:34 AM, you wrote: > > MM> Yet, this is not a such elegant way doing it. It can be helpful in a lot > MM> of cases, but most often, element key is enough. Try rethinking your > MM> logic: > > > MM> class Exam

Re[2]: [PHP] generically accessing member variables problem

2002-11-06 Thread Tom Rogers
Hi, Thursday, November 7, 2002, 3:45:34 AM, you wrote: MM> Yet, this is not a such elegant way doing it. It can be helpful in a lot MM> of cases, but most often, element key is enough. Try rethinking your MM> logic: MM> class Example { MM> var $array = array(); MM> function add

[PHP] Code Advice

2002-11-06 Thread Jason Young
I (think I) have come up with an interesting little solution for pages that have/can potentially have a lot of get vars, and I just wanted to throw it by everyone to see if I know what I'm talking about... Instead of having a whole bunch of ... "if (isset($_GET['var'])) $var = $_GET['var']" ..

Re: [PHP] generically accessing member variables problem

2002-11-06 Thread Maxim Maletsky
Tom Rogers <[EMAIL PROTECTED]> wrote... : > > Amazing what you learn on this list :) > This works: > > class Example > { >var $array1 = array(); >var $array2 = array(); >var $array3 = array(); > > function add2array($array_name,$val){ > $this->{"$array_name"}[] = $val; > }

Re[2]: [PHP] generically accessing member variables problem

2002-11-06 Thread Tom Rogers
Hi, Thursday, November 7, 2002, 3:11:12 AM, you wrote: MM> You can do: ${"this->>$passed_in_array_name"} MM> not sure right now of the correct syntaxing, I never do that - normally MM> I'd pass the element key. MM> -- MM> Maxim Maletsky MM> [EMAIL PROTECTED] MM> John Kenyon <[EMAIL PROTECTE

Re: [PHP] generically accessing member variables problem

2002-11-06 Thread John Kenyon
Thanks, that may be what I was looking for. jck Maxim Maletsky wrote: You can do: ${"this->$passed_in_array_name"} not sure right now of the correct syntaxing, I never do that - normally I'd pass the element key. -- Maxim Maletsky [EMAIL PROTECTED] John Kenyon <[EMAIL PROTECTED]> wrote..

Re: [PHP] Trouble with php-4.2.3, apache-1.3.27, sablotron 0.96

2002-11-06 Thread Tom Rogers
Hi, Wednesday, November 6, 2002, 2:50:42 PM, you wrote: EN> -BEGIN PGP SIGNED MESSAGE- EN> Hash: SHA1 EN> I'm trying to get XSLT working with PHP, and after slowly working my way EN> through several other problems, I've found one that I can't figure out. EN> Software: EN> PHP 4.2.3 EN>

Re: [PHP] generically accessing member variables problem

2002-11-06 Thread Maxim Maletsky
You can do: ${"this->$passed_in_array_name"} not sure right now of the correct syntaxing, I never do that - normally I'd pass the element key. -- Maxim Maletsky [EMAIL PROTECTED] John Kenyon <[EMAIL PROTECTED]> wrote... : > Thank you for replying, but I don't think I've made my problem clea

Re: [PHP] publishing php > mysql website on cd-rom

2002-11-06 Thread Maxim Maletsky
Theoretically it is possible, but fact stays - you won't ever make it work well. So, try to find an alternative for this. Usually, this choice is made by the managers that know nothing about how webcontent works. -- Maxim Maletsky [EMAIL PROTECTED] "ROBERT MCPEAK" <[EMAIL PROTECTED]> wrote...

Re: [PHP] publishing php > mysql website on cd-rom

2002-11-06 Thread John Wards
I dunno if its an old wives tail but I have heard that you can get apache/mysql and php running from a CD. You would of course need to turn off all logging etc. Do a bit off google bashing. John On Wednesday 06 Nov 2002 9:50 am, .: B i g D o g :. wrote: > That is going to be very hard to do...

Re: [PHP] publishing php > mysql website on cd-rom

2002-11-06 Thread .: B i g D o g :.
That is going to be very hard to do...you might want to look at doing it all static...however, what are u going to do about the database connections... IMHO, i would take the php site and make it static and then put it on a CD-ROM...it might be out of date, however, it might be the fastest way for

Re: [PHP] generically accessing member variables problem

2002-11-06 Thread John Kenyon
Thank you for replying, but I don't think I've made my problem clear enough. Let me give it another shot. What I want is a function that takes the name of an array as a parameter so that it can be popped into any class that has arrays in it and work without modification. The problem I am having

Re: [PHP] publishing php > mysql website on cd-rom

2002-11-06 Thread Marco Tabini
That would be a bit difficult--you would have licensing issues, particularly with MySQL, unless you actually distribute the sources. Would publishing all the files in "static" format be an option? -- php|architect - The magazine for PHP Professionals The first monthly worldwide maga

[PHP] publishing php > mysql website on cd-rom

2002-11-06 Thread ROBERT MCPEAK
My organization has a need to publish some of our web content on a CD-ROM. I'm in search of suggestions on how to publish our dynamic content (php/mysql templates) in some sort of "runtime" configuration that would let users browse the site from cd. What's involved with this? Is there such a t

Re: [PHP] Running functions as other than nobody

2002-11-06 Thread Marco Tabini
There was actually a brief thread about this last night. If you're using Apache, you could look into suexec--this may or may not be a possibility depending on the degree of control that you have on your server. Marco -- php|architect - The magazine for PHP Professionals The first m

[PHP] Running functions as other than nobody

2002-11-06 Thread Davíð Örn Jóhannsson
I need to chmod files which are owned by a nother user than nobody with a php script runing from a browser. lets say i have a file called image.gif and I want to chmod(“imgage.gif”, 0777); and I want to run it as user: myuser with passwd: passwd. Can I do this? Regards, David

[PHP] Converting variables to integer

2002-11-06 Thread drparker
I have a bunch of form variables that I need to process as integers. The problem is that some users are writing in values with commas - e.g. 100,000, and that isn't read as an integer. There's more than one variable so I don't want to have to do a string replace for each one. Is there a general wa

Re: [PHP] Help me learn! with an explanation of these two functions.

2002-11-06 Thread Jason Wong
On Wednesday 06 November 2002 21:46, Steve Jackson wrote: > It doesn't contain a single result. It returns 16 order numbers (which > is correct - 8 should be in the table emails with no checked and > therefore the query has worked and pulled out 8 from the orders table > also). What I want the fun

  1   2   >