[PHP] SUID ROOT

2002-06-06 Thread Yamin Prabudy
Hi there, I used rasmus script (PEAR) (with a change a little bit to fit to FreeBSD) to adduser/changepassword/verifypassword for my user from web I got some problem with the SUID to read the file and rewrite the file from the web i had set the safe_mode = On safe_mode_gid = On in php.ini and the

[PHP] Re: emulating --enable-trans-sid -- project idea?

2002-06-06 Thread Giancarlo Pinerolo
Justin French wrote: > > Hi all, > > About 2.30 in the morning I started kicking around an idea, based on the > recent discussions on sessions, and what --enable-trans-sid did. > > From my understanding: > > + if there is no session cookie, set a cookie AND append a > session ID to URLs

[PHP] Thumbnail pages - alot of them

2002-06-06 Thread rory oconnor
I have a mysql database table of about 7000 images (they are not actually in the db, just references), as yet uncategorized. I need to put them online and allow my client to browse 12-18 thumbnails per page. what would be the most efficient method to code that with PHP? any help is appreciated!

[PHP] ?eregi?

2002-06-06 Thread Nikolai Jeliazkov
Can anybody help me!!! In my Windows2000 machine I use Apache 3.24 and PHP 4.0.6 and all is OK. But when I transfer my code to work machine (Apache/1.3.22 (Unix) (Red-Hat/Linux) mod_ssl/2.8.5 OpenSSL/0.9.6b DAV/1.0.2 PHP/4.0.6 mod_perl/1.26) the following script returns FALSE. ') . '(.*)' . p

Re: [PHP] UNSET & Arrays

2002-06-06 Thread Jason Caldwell
I was doing something wrong... ;) I figured it out. Sorry for the post -- it was one of those things that took me *forever* to figure it out and when I saw the problem I felt like an idiot -- oh well. Thanks anyway. Jason "Jason Wong" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">ne

RE: [PHP] Files

2002-06-06 Thread Martin Towell
if the file's not too long, you could use file() to read the file into memory, then loop through the array you get back and look for the line(s) you're after. if you don't want to read the entire file into memory, you can loop through the file with: $f = fopen($file, "r") or die("can't open file

Re: [PHP] Need info abou ASP/Java HTML Form handling

2002-06-06 Thread Yasuo Ohgaki
Chris Knipe wrote: > *urgh* > > So off topic it's not funny http://www.microsoft.com/vbscript / > http://www.microsoft.com/jscript/ > > I might not be 100% correct on the urls. Just search for VB / JS Script > Refence at microsoft.com Thanks for the input, but I know the url of cource. I

Re: [PHP] Missing posted variables in target script when multipart/form-data is set

2002-06-06 Thread Jason Wong
On Friday 07 June 2002 12:32, Ed Greenberg wrote: > I have a small test script which fails when enctype="multipart/form-data" > is set. > > > Your name: > You age: > You file: > > > When the above is submitted to action.php, $_POST and $HTTP_POST_VARS are > both empty. If I remove the enctyp

Re: [PHP] OOP style question

2002-06-06 Thread Analysis & Solutions
Hey Erik: It's getting late, so I may not be thinking clearly... On Thu, Jun 06, 2002 at 04:57:42PM -0400, Erik Price wrote: > I have a method in my class that essentially unsets an array element. Uh, I know you're a sharp guy, but I've got to ask anyway. If it's doing such a simple thing

[PHP] Files

2002-06-06 Thread Uma Shankari T.
Hello, Can anyone please clear my doubt... I am having the input data in one file. i need check whether some lines are there continuosly in that file and i have to extract that line using file operation commands in php..how do i go about with that ?? can anyone please tell me Waiting for you

Re: [PHP] am i just a session tracking idiot?

2002-06-06 Thread dan radom
i got everything working tonihgt. the problem seems to be that i was running this from an apache vhost, and not the real server. why would that matter? how can i fix that? dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Missing posted variables in target script when multipart/form-data is set

2002-06-06 Thread Ed Greenberg
I have a small test script which fails when enctype="multipart/form-data" is set. Your name: You age: You file: When the above is submitted to action.php, $_POST and $HTTP_POST_VARS are both empty. If I remove the enctype="multipart/form-data" portion of the form tag, the arrays are set co

Re: [PHP] Need info abou ASP/Java HTML Form handling

2002-06-06 Thread Chris Knipe
*urgh* So off topic it's not funny http://www.microsoft.com/vbscript / http://www.microsoft.com/jscript/ I might not be 100% correct on the urls. Just search for VB / JS Script Refence at microsoft.com Kind Regards, Chris Knipe MegaLAN Corporate Networking Services Tel: +27 21 854 7064

Re: [PHP] Best way to store 1000 char in a database

2002-06-06 Thread Analysis & Solutions
On Fri, Jun 07, 2002 at 11:50:10AM +1000, [EMAIL PROTECTED] wrote: > What is the best way to store text with up to 1000 characters in a > mySQL database? http://mysql.com/doc/C/o/Column_types.html --Dan -- PHP classes that make web design easier SQL Solution | Layout

Re: [PHP] Best way to store 1000 char in a database

2002-06-06 Thread Tyler Longren
What do you mean "the best way"? Do you mean which data type you should give the field? A bit more info please. :-) Tyler Longren Captain Jack Communications www.captainjack.com [EMAIL PROTECTED] - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 0

Re: [PHP] Anyone?

2002-06-06 Thread Analysis & Solutions
Hi Jas: > if ((!$u_name) || (!$p_word) || (!$image)){ What if the variables aren't submitted at all? Better to test for empty() on each variable. Avoids Warnings if error reporting is high. > require '/path/to/database/connection/script/dbcon.php'; Put a @ in front of that require to keep

Re: [PHP] high % of capital letters in a string

2002-06-06 Thread Justin French
Thanks Lars & Evan... much appreciated! Justin French on 07/06/02 2:13 PM, Lars Torben Wilson ([EMAIL PROTECTED]) wrote: > On Thu, 2002-06-06 at 20:20, Justin French wrote: >> Hi, >> >> How would I determine if there was a high % (say > 40%) of capital letters >> in a string? I'm trying to t

[PHP] Need info abou ASP/Java HTML Form handling

2002-06-06 Thread Yasuo Ohgaki
Hi All. Could anyone tell me any reference for ASP and/or Java HTML form handling script/program/module/class/etc? I'm going to write PHP module for easier HTML form handling and would like to know what kind of feature/options ASP/Java have. Thanks. -- Yasuo Ohgaki -- PHP General Mailing Li

[PHP] Best way to store 1000 char in a database

2002-06-06 Thread webmaster
What is the best way to store text with up to 1000 characters in a mySQL database?   Sorry for the slightly of topic posting but I am not going to join another mailing list unless I have to.   I am going to create a weekly qoute generator thingy for my site.   JJ Harrison[EMAIL PROTECTED]www

Re: [PHP] high % of capital letters in a string

2002-06-06 Thread Lars Torben Wilson
On Thu, 2002-06-06 at 20:20, Justin French wrote: > Hi, > > How would I determine if there was a high % (say > 40%) of capital letters > in a string? I'm trying to think of a way of preventing endless use of > capital letters in a message board, to stop YELLERS. > > Justin French >

Re: [PHP] high % of capital letters in a string

2002-06-06 Thread Evan Nemerson
/* Perhaps something like this? */ // UNTESTED $string = "ThE sTrInG tO tEsT"; function str2arr($str) { for ( $x = 0 ; $x < ( strlen($str) ) ; $x++ ) { $arr[$x] = substr($str, $x, 1); } return $arr; } foreach ( (str2arr($string)) as $char ) {

RE: [PHP] return array

2002-06-06 Thread Martin Towell
that seems odd I've got a function that returns an array something like you had in your example. eg function blah() { return array("C"=>3,"D"=>9,"M"=>1); } $arr = blah(); then doing echo $arr["C"] output's 3 -Original Message- From: Jule Slootbeek [mailto:[EMAIL PROTECTED]] Sent:

[PHP] high % of capital letters in a string

2002-06-06 Thread Justin French
Hi, How would I determine if there was a high % (say > 40%) of capital letters in a string? I'm trying to think of a way of preventing endless use of capital letters in a message board, to stop YELLERS. Justin French Creative Director http://Indent.com.au --

Re: [PHP] Getting http:// include to return?

2002-06-06 Thread Sqlcoders.com Programming Dept
It's not exactly what you wanted, but try this: http://www.hysp.net","r";); while (!feof ($intFileHandle)) { $intFileOutput .= fgets($intFileHandle, 4096); } fclose($intFileHandle); return $intFileOutput; } ?> HTH, Dw. Sqlcoders.com Dynamic data driven web solutions - Original Messag

[PHP] Re: PHP and ZIP/TAR.GZ files

2002-06-06 Thread Manuel Lemos
Hello, On 06/06/2002 11:03 PM, Devraj Mukherjee wrote: > Hello All, > > I am new on this list serve and am the developer of the Terracotta project >(http://terracotta.sourceforge.net) which is an extentsive document management system >written in PHP. > > Terracotta uses, stores all it's conte

[PHP] Getting http:// include to return?

2002-06-06 Thread Leif K-Brooks
I'm trying to make a script that people using PHP can get information from my site from by including it. They would do something like: $var = include("http://mydomain.com/infoscript.php?infotoget=info1";); //returns "This is info 1." Is there anything I can do in my script to make return()

Re: [PHP] NEWBIE- Is this possible? How?!

2002-06-06 Thread Kevin J
Yup, you just hit the nail on the head with that one Justin. I am sure this isn't the best way to learn PhP, but I am running out of ideas for making this website work. Static content just seems boring these days, so I would liek to "spice" up the site by having the band members themselves contri

Re: [PHP] return array

2002-06-06 Thread Jule Slootbeek
> > try: > > list($doo, $dah) = my_function(); > thanks alot that was it list ($array['name'], $array['password']); Jule -- Jule Slootbeek [EMAIL PROTECTED] http://blindtheory.cjb.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.n

RE: [PHP] majordomo in php?

2002-06-06 Thread David Freeman
> Anyone knows of a majordomo type mailing list made with php > somewhere? Why would you want to do that? If you need mailing list software you'd be infinitely better off using one that already exists - if you need features that it doesn't support (eg. A web front-end for majordomo) then per

Re: [PHP] return array

2002-06-06 Thread Jason Wong
On Friday 07 June 2002 10:56, Jule Slootbeek wrote: > Hey guys and gals, > > if i have a function > and i return an array from it > > function my_function() { > blabla; > return array ($array['name'], $array['password']); > } > > how do i get this into an array on the page i call the function? > >

RE: [PHP] [PLEASE HELP] Passing variable to new page.

2002-06-06 Thread David Freeman
> echo ""; > echo" function pop1() {"; > echo" window.open(\"info.php?prod_id=$result[0]\"); }"; > echo ""; > I am calling this function in the following manner: echo" onclick=\"pop1();\""; OK, I tend not to put javascript inside php echo statements as it confuses things - which variables

[PHP] return array

2002-06-06 Thread Jule Slootbeek
Hey guys and gals, if i have a function and i return an array from it function my_function() { blabla; return array ($array['name'], $array['password']); } how do i get this into an array on the page i call the function? $array = my_function() doesn't work? any ideas? thanks Jule -- Jule Sl

Re: [PHP] Extracting specific data from a URL using PHP...

2002-06-06 Thread Jason Wong
On Friday 07 June 2002 06:57, Anthony Ritter wrote: > Newbie question. > > I understand that one can open a page off an existing website to extract > text data using a PHP script by using the fopen and fread functions. > > And by using the strip_tags() function, one can extract data without the >

Re: [PHP] UNSET & Arrays

2002-06-06 Thread Jason Wong
On Friday 07 June 2002 09:04, Jason Caldwell wrote: > i'm trying to unset an array element within my array -- > > my array looks like; > > $foo[0][magazine] > $foo[0][subscription] > $foo[0][term] > $foo[0][rate] > > $foo[1][magazine] > $foo[1][subscription] > $foo[1][term] > $foo[1][rate] > > and

Re: [PHP] How can i resize images after upload?

2002-06-06 Thread Jason Wong
On Friday 07 June 2002 10:09, Andre Dubuc wrote: > // The actual uploaded file was 320x380 in size and a jpeg (could be > anything) > > print height='40'>" > Works for me . . . no need to alter/mogrify/resize. Perhaps I am missing > something, but after struggling with resizing, I remembered t

Re: [PHP] NEWBIE- Is this possible? How?!

2002-06-06 Thread Justin French
Translation: You want a password-protected form, which the band members can access, which overwrites (updates) a central (or individual) chunk of text. This text is placed inside a HTML page (dynamic, whatever, doesn't matter) at run time, and is visible each time the page is hit, until someone

Re: [PHP] How can i resize images after upload?

2002-06-06 Thread Andre Dubuc
Hi Ragnar, I had the same problem whenI wanted to display an uploaded image file. Unfortunately, Imagemagick isn't pre-compiled with Linux-Mandrake 8.2 distro. So I couldn't do it the usual way. However, I solved it in a very easy way. Since the file was referenced in my db, and the actual fil

[PHP] PHP and ZIP/TAR.GZ files

2002-06-06 Thread Mukherjee, Devraj
Hello All, I am new on this list serve and am the developer of the Terracotta project (http://terracotta.sourceforge.net) which is an extentsive document management system written in PHP. Terracotta uses, stores all it's contents as files. I am attempting to introduce a feature, where by user

RE: [PHP] NEWBIE- Is this possible? How?!

2002-06-06 Thread Peter
have a look at something like http://phpnuke.org or the like ... maybe this is what ur after ... -Original Message- From: Kevin J [mailto:[EMAIL PROTECTED]] Sent: Friday, 7 June 2002 11:50 AM To: [EMAIL PROTECTED] Subject: [PHP] NEWBIE- Is this possible? How?! Hello All Helpers!

[PHP] NEWBIE- Is this possible? How?!

2002-06-06 Thread Kevin J
Hello All Helpers! :) I was wondering if it is possible to mix Dynamic Content with Layers? If not I was wondering if someone can help me with my idea: I have designed a website for a band (see below name) and I would like to add a feature where the band members can log in and write something

[PHP] emulating --enable-trans-sid -- project idea?

2002-06-06 Thread Justin French
Hi all, About 2.30 in the morning I started kicking around an idea, based on the recent discussions on sessions, and what --enable-trans-sid did. >From my understanding: + if there is no session cookie, set a cookie AND append a session ID to URLs on the first (session start) page + on

Re: [PHP] oracle again!!!!

2002-06-06 Thread Michael P. Carel
Thanks Chris , but i used to run this script within the same server(localhost) where oracle/php/apache reside. That's why im wondering why this error appears. I've tried to setup oracle/php/apache with AIX and it work fine. I've also red alot of documentation in setting up with RedHat but still it

Re: [PHP] Re: Anyone?

2002-06-06 Thread Justin French
PHP is secure, it's upto the programmer to make sure the script they write is secure. I'd guess the reason that no one has replied is because we hate reading 75+ lines of code. In my experience on this list, the best answers come when you ask a specific question about a specific problem... NOT w

Re: [PHP] UNSET & Arrays

2002-06-06 Thread Jason Caldwell
that didn't work. "Mark" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... first try quoting your strings and see if that helps :) $foo[0]["magazine"] On Thu, 6 Jun 2002 18:04:47 -0700, Jason Caldwell wrote: >i'm trying to unset an array element within my array -

Re: [PHP] UNSET & Arrays

2002-06-06 Thread Mark
first try quoting your strings and see if that helps :) $foo[0]["magazine"] On Thu, 6 Jun 2002 18:04:47 -0700, Jason Caldwell wrote: >i'm trying to unset an array element within my array -- > >my array looks like; > >$foo[0][magazine] >$foo[0][subscription] >$foo[0][term] >$foo[0][rate] > >$foo[1

Re: [PHP] How can i resize images after upload?

2002-06-06 Thread Mark
On Thu, 6 Jun 2002 23:44:06 +0200, Ragnar wrote: >Is there a way in php to change the size of a posted/uploaded image >regardless of the imagetype? install imagemagick and then do something like: exec("/path/to/mogrify -geometry ".$width."x".$height." ".$file); -- PHP General

[PHP] UNSET & Arrays

2002-06-06 Thread Jason Caldwell
i'm trying to unset an array element within my array -- my array looks like; $foo[0][magazine] $foo[0][subscription] $foo[0][term] $foo[0][rate] $foo[1][magazine] $foo[1][subscription] $foo[1][term] $foo[1][rate] and so forth -- when i call unset($foo[0]) for example, the entire array goes aw

RE: [PHP] Weird intermittent "No Database Selected" problem

2002-06-06 Thread Jeff Field
Thanks for the help, all! Here was the problem...I think, I'm pretty sure, eh? In mysql_select_db($database_mydb, $mydb), I have the variable, "$database_mydb", which is actually something that Macromedia's Dreamweaver MX created (for those that don't know it, Dreamweaver MX supports a little PH

Re: [PHP] Php 4 Deleteing Cookies: Trying to set and delete a cookie in same page

2002-06-06 Thread Rick Emery
first, it's not PHP that won't delete the cookie...it's the nature of cookies. second, there is no need to try to delete it and set it to a new value. Just set it to the new value. third, the cookie will expire and disappear when the browser closes. The browser MUST close, not simply go

RE: [PHP] Trying to list a directory content HELP PLEASE

2002-06-06 Thread Philip Olson
This is not how readdir() works, it takes on a directory resource from opendir() http://www.php.net/readdir I'm guessing you meant to put the directory name into opendir() which will work, I don't see any advantage to using chdir() here. Maybe it's permissions or doesn't exist, consider u

[PHP] Php 4 Deleteing Cookies: Trying to set and delete a cookie in samepage

2002-06-06 Thread John Weez
Hi all. I'm trying to delte a cookie and then set it to a new value in a php page. The problem is that once the cookie is set. PHP will not delete it. I use PhP 4. Here is the code...The pgp file name is testcookie.php...so the page goes back to itself again..i'm testing to see my code was a

Re: [PHP] am i just a session tracking idiot?

2002-06-06 Thread dan radom
I am my ISP. I'm running PHP 4.2.1 and Apache 1.3.24. session configurables in php.ini are as follows... mars:~/apache/htdocs/test.radom.org$ grep session /usr/local/lib/php.ini session.save_handler = files ; variable in order to use PHP's session functions. session.save_path = /foo session.us

Re: [PHP] Weird intermittent "No Database Selected" problem

2002-06-06 Thread hugh danaher
Are all the variables needed for the function getting into your call_user_func()? Also, perhaps some aren't set or are being unset outside your function--say, you are opening a new page and not passing all the variables to it. The function (which apparently works) isn't getting set variables. T

[PHP] Extracting specific data from a URL using PHP...

2002-06-06 Thread Anthony Ritter
Newbie question. I understand that one can open a page off an existing website to extract text data using a PHP script by using the fopen and fread functions. And by using the strip_tags() function, one can extract data without the html markup as a literal string. Here's my question... Let's s

[PHP] Tree structures, references & segfaults

2002-06-06 Thread Peter Blokland
Hi, I'm trying to build a tree of objects in PHP, and having all sorts of trouble. Ideally, I'd like to end up with a reference to an object, which has an array of (references to) child-objects. Each child-object, except the root, also contains a reference to its parent. A sample : name = $name

Re: [PHP] scope of class atts in methods

2002-06-06 Thread Erik Price
If anyone read this post, you probably already forgot about it, but I just wanted to clarify that I found the source of the problem and it was a coding mistake on my part, not a problem with PHP's array implementation. Erik On Thursday, June 6, 2002, at 03:11 PM, Erik Price wrote: > Hi

[PHP] How can i resize images after upload?

2002-06-06 Thread Ragnar
Is there a way in php to change the size of a posted/uploaded image regardless of the imagetype? -R -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] keep alive refresh

2002-06-06 Thread Mauro
It would help to know exactly what information you are gathering and for what reason are you storing it. -Kevin Kevin, thanx for your reply. Basically the data flow is the following: . get the value from the web form . pass the value to the program . this program gathers data from a couple of re

Re: [PHP] IMDb - How it works?

2002-06-06 Thread Jess Planck
another method using .htaccess files and Apache. ForceType application/x-httpd-php This is for Apache 1.3.x. Apache 2.0.x does it a little different. jess. On Thursday, June 6, 2002, at 04:11 PM, Chris Knipe wrote: > apache rewrite rules can do this... > > They redirect Title?* to a server

RE: [PHP] Weird intermittent "No Database Selected" problem

2002-06-06 Thread Scott Hurring
I assume you're not checking the status returned by the database function calls, becuase they'd probably give you valueable information on *why* it's doing that. :) try checking the return val, and (if using mysql) print out mysql_error() if you get a bad return val. --- Scott Hurring Systems P

Re: [PHP] OOP style question

2002-06-06 Thread Erik Price
Thanks Scott, That's kind of what I thought -- that there's no cut-and-dried answer to the question I asked. I'm actually amazed that it came out coherently enough for someone to understand it and answer! Your solution is a good one. On the one hand this is less modular, since it tests for

RE: [PHP] Weird intermittent "No Database Selected" problem

2002-06-06 Thread Jeff Field
Hmmm...not sure how to check the status of the db function calls (sorry, I'm relatively new to PHP, help on this is appreciated), but I did add the following to the script: echo "Error " . mysql_errno ( ). ": " . mysql_error ( ); It prints out "Error 0:" when the script runs just fine, but nothi

[PHP] RE: Possible bug? (was Re: [PHP] Arrays: Please help before I go insane?)

2002-06-06 Thread Scott Hurring
When i run your code, the result is 100% correct, even though you're outputting the wrong text label to go along with the value you say "branch[one][two]" = $branch[one] and since $branch[one] *IS* an Array, the output is correct (even though "branch[one][two]" is NOT an Array -- very very im

RE: [PHP] OOP style question

2002-06-06 Thread Scott Hurring
It depends highly on what you're doing and how you're doing it :) If somethign needs to be done *always*, just throw it into the Object so that the user won't have to call it explicitly, however if you want to provide fine-grained control over how/when/why things are cleaned-up, you might want to

Re: [PHP] Re: Anyone?

2002-06-06 Thread Miguel Cruz
Just FYI, I read your previous two messages and decided not to answer them for the following (very subjective) reasons: 1. Your commenting style () made my head hurt. 2. The question was a little too open-ended yet the answer would be very specific. I'm happy to write a long-winded

[PHP] IMDb - How it works?

2002-06-06 Thread Randum Ian
Hi there, I am very interested in how the IMDb site works. For example: http://uk.imdb.com is the basic URL http://uk.imdb.com/Title?0068646 is the URL for a film (this example is The Godfather) http://uk.imdb.com/Details?0068646 is the URL for the film details... http://uk.imdb.com/Credits?0

Re: [PHP] Combo box selected value...

2002-06-06 Thread Miguel Cruz
On Fri, 4 Jan 1980, Alexandra Aguiar wrote: > I got the followin code to generate a combo box... Your clock is off by about 20 years. Is it possible to fix it before posting to the list? Thanks. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.ne

[PHP] Weird intermittent "No Database Selected" problem

2002-06-06 Thread Jeff Field
I apologize...I just posted this to the database list but then realized it may not be a database issue, so thought I'd better give it a shot over here. Help! I've been having a weird problem today (and maybe it's been there all along, just haven't noticed...it's only been live a few days). I ha

[PHP] OOP style question

2002-06-06 Thread Erik Price
I'm trying to solve my earlier-posted dilemma of a class attribute (array) that is "remembering" elements that should have been unset(). The good news is that, according to some testing I've been doing (I have separated the relevant code and am directly testing it), it looks like PHP is behav

[PHP] Possible bug? (was Re: [PHP] Arrays: Please help before I go insane?)

2002-06-06 Thread Chris Boget
> In that case, split it up into two-steps, to only init the > array if you need to i'm not really sure how the rest of > your code is -- you could probably do this a nicer way, > but this will work: > if (!is_array($ary["this"])) > $ary["this"] = array(); > $ary["this"]["that"] = 1; This is

Re: [PHP] am i just a session tracking idiot?

2002-06-06 Thread Shane Wright
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi On Thursday 06 June 2002 7:55 pm, dan radom wrote: > the last bgcolor example was cut and pasted from oreilly's session tracking > examples. it should work. IIRC, some things depend on your PHP version and ini file (register_globals, track_vars

RE: [PHP] Trying to list a directory content HELP PLEASE

2002-06-06 Thread Scott Hurring
Instead of chdir() try putting the path directly into readdir(); it'll make the code a tiny bit cleaner. readdir("/home/casapu/paginas/images/carteleras"); ** and check return values! ** $fd = readdir(...) if (!$fd) die("Cannot readdir"); The code you have *should* work, but you'll never kno

RE: [PHP] Quick Question about Classes

2002-06-06 Thread Ray Hunter
You need to call "new" operator to create the object. Thank you, RAY HUNTER -Original Message- From: Jay [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 06, 2002 2:22 PM To: Php-General (E-mail) Subject: [PHP] Quick Question about Classes When you define a new class can you do the

[PHP] Quick Question about Classes

2002-06-06 Thread Jay
When you define a new class can you do the following? $className = "Parent"; class $className { }; Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Some generic pointers for secure writing (was Re: Anyone?)

2002-06-06 Thread Scott Hurring
Well, off the top of my head, some good pointers are: *NEVER* use any unchecked/unquoted vars in system() or database calls. ever. i mean it :-) never assume that you'll get correct data from a form. validate everything. never be careless with user passwords or sesitive data. never put them

RE: [PHP] Arrays: Please help before I go insane?

2002-06-06 Thread Scott Hurring
In that case, split it up into two-steps, to only init the array if you need to i'm not really sure how the rest of your code is -- you could probably do this a nicer way, but this will work: if (!is_array($ary["this"])) $ary["this"] = array(); $ary["this"]["that"] = 1; --- Scott Hu

Re: [PHP] Re: Anyone?

2002-06-06 Thread Jas
Ok, I think you have gotten my point... I simply want to make sure that the code I am writting is "up to par" on security issues such as you listed. Maybe there are some examples of what to do vs. what not to do when writting code that would be near impossible to exploit. I simply do not need som

Re: [PHP] Trying to list a directory content HELP PLEASE

2002-06-06 Thread Jason Wong
On Friday 07 June 2002 00:47, webmaster mbtradingco wrote: > I know my doubt is probable odd, but I would ask your help please. > > I need a user to be able to select an image from a directory, from a > drop down box. For this I need to list all the images available on the > directory, hence, I ha

Re: [PHP] Mail routing/reply to woes

2002-06-06 Thread Jason Wong
On Thursday 06 June 2002 23:31, Dennis Gearon wrote: > I am the webperson for a couple of sites, new ones. I've set up several > addresses, some I get and respond to. [snip] where's your php question? -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Inte

Re: [PHP] Arrays: Please help before I go insane?

2002-06-06 Thread Chris Boget
> Try: $ary["this"] = array("that" => 1); That works great until "this" has 2 children. The second child overwrites the first. :( Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] majordomo in php?

2002-06-06 Thread The Gabster
Hi everyone.. Anyone knows of a majordomo type mailing list made with php somewhere? thanks, gabi. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] FW: NEED HELP (passing variable to new page)

2002-06-06 Thread Chris Knipe
OOOH, but everyone does such a fine job!!! *eg* Can anyone help me and tell me how to switch a computer on? -hides before he starts some arb war or something- And yes, for the curious or missing minded, that was a joke... -- me - Original Message - From: "Scott Hurring" <[EMAIL PROT

RE: [PHP] Can I get back a deleted row from mysql?

2002-06-06 Thread Scott Hurring
Nope. For future reference, perhaps create two identical tables, one for actual live data and one for trash, and instead of deleting anything, just move it all into the trash table. then, you can purge the trash table every few days/months. --- Scott Hurring Systems Programmer EAC Corporation [

Re: [PHP] Combo box selected value...

2002-06-06 Thread Rick Emery
The value is returned in whatever is stored in $nome. So, if $nome="var", then $var will contain the selected value. Second, this could not possibly operate the way you want it to, because the mysql_result() is called TWICE with each line. You want it called only ONCE to retrieve the value

RE: [PHP] FW: NEED HELP (passing variable to new page)

2002-06-06 Thread Scott Hurring
... especially when the error is not even with PHP :-) Contrary to what some newbies seem to think, this list is not a free consulting service... none of us are obligated to help everyone with every problem. We're all volunteers -- sometimes we just don't have the time or knowledge to answer ev

[PHP] Can I get back a deleted row from mysql?

2002-06-06 Thread Jan Grafström
Hi, I wonder if you can get back or view the deleted data in a delted row in mysql? "DELETE FROM $table WHERE id=$id" I used the above code to delete. Thanks for any help. -- Regards, Jan Grafström Sweden -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.

Re: [PHP] Combo box selected value...

2002-06-06 Thread Rick Emery
the value is returned in whatever is stored in $nome. So, if $nome="var", then $var will contain the selected value. - Original Message - From: "Alexandra Aguiar" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 04, 1980 12:56 PM Subject: [PHP] Combo box selected

[PHP] scope of class atts in methods

2002-06-06 Thread Erik Price
Hi all, a quick question about using PHP's objects, specifically in terms of the scope of class attributes: Normally, in PHP, a variable in a function is local to that function and is NOT a reference to a similarly-named variable outside the function, right? To the best of my knowledge, ther

RE: [PHP] [PLEASE HELP] Passing variable to new page.

2002-06-06 Thread Scott Hurring
Javascript, being silly, has silly string rules: function pop1($id) { window.open("info.php?prod_id="+ $id); } --- Scott Hurring Systems Programmer EAC Corporation [EMAIL PROTECTED] Voice: 201-462-2149 Fax: 201-288-1515 > -Original Message- > From: Chris Knipe [mailto:[EMAIL PROTECTED

Re: [PHP] Combo box selected value...

2002-06-06 Thread Chris Knipe
'.mysql_result($resultado, $cont,$letra).''); } else { echo(' '.mysql_result($resultado, $cont,$letra).''); } $cont++; } echo("\n "); } } +++ > But, how can i return the selected item value into

RE: [PHP] Re: Anyone?

2002-06-06 Thread Scott Hurring
No language is "secure" becuase there's no such thing. even supposedly secure Java VM sandboxes have well-known security exploits. PHP code is as secure as you write it. Bad programmer = bad code Name any language or program and there are well-documented ways to subvert it. Buffer overflows

Re: [PHP] Number formatting

2002-06-06 Thread Scott
Shane- Thank you for the response. This works, I also changed the column type to numeric with a scale of 2 in SQL Server. Thank you again. -Scott On Thu, 6 Jun 2002, Shane Wright wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi > > > $aprTemp = number_format($apr, 2); w

[PHP] Combo box selected value...

2002-06-06 Thread Alexandra Aguiar
Hi ppl... I got the followin code to generate a combo box... ++ function comb_alfabeto( $resultado, $nome, $letra) { global $error; $quant = mysql_num_rows($resultado); If ($quant == 0) { $error->erro(); } Else { //>>

Re: [PHP] am i just a session tracking idiot?

2002-06-06 Thread dan radom
the last bgcolor example was cut and pasted from oreilly's session tracking examples. it should work. that file write error concerns me. i think something larger is going on here. * Chris Knipe ([EMAIL PROTECTED]) wrote: > Have you tried using $_SESSION['bgcolor'] = "bleh" > > It might work

RE: [PHP] Arrays: Please help before I go insane?

2002-06-06 Thread Scott Hurring
Try: $ary["this"] = array("that" => 1); --- Scott Hurring Systems Programmer EAC Corporation [EMAIL PROTECTED] Voice: 201-462-2149 Fax: 201-288-1515 > -Original Message- > From: Chris Boget [mailto:[EMAIL PROTECTED]] > Sent: Thursday, June 06, 2002 1:48 PM > To: PHP General > Subject:

RE: [PHP] Download Page?

2002-06-06 Thread Ray Hunter
Kevin, You will need to send the header information for the file...then you can do a new header so that you show the "thank you for downloading" page... Thank you, RAY HUNTER -Original Message- From: Kevin Stone [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 06, 2002 12:49 PM To:

Re: [PHP] [PLEASE HELP] Passing variable to new page.

2002-06-06 Thread Chris Knipe
> echo ""; > echo" function pop1() {"; > echo" window.open(\"info.php?prod_id=$result[0]\"); }"; \\ $result[0] is > variable that stores id of the image in database > echo ""; > > I am calling this function in the following manner: echo" onclick=\"pop1();\""; ^ You're not pass

Re: [PHP] am i just a session tracking idiot?

2002-06-06 Thread Chris Knipe
Have you tried using $_SESSION['bgcolor'] = "bleh" It might work... who knows... - Original Message - From: "dan radom" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 06, 2002 8:36 PM Subject: Re: [PHP] am i just a session tracking idiot? > what's weird is that if i s

Re: [PHP] Download Page?

2002-06-06 Thread Kevin Stone
Common question becuase of it's somewhat unintuitive nature, but it is very simple. Do a search for keywords "header" and "Content-disposition". That should reveal what you want. Good luck. -Kevin - Original Message - From: "Nick Richardson" <[EMAIL PROTECTED]> To: "PHP General" <[EMAI

Fw: [PHP] [PLEASE HELP] Passing variable to new page.

2002-06-06 Thread Kevin Stone
Question.. why are you opening up a full sized new window with the javascript popup script? I susspect the problem has something to do with the javascript, although I'm not going to take the time to test it myself. You can open a new page in an HTML link by setting target=new. You shouldn't have

  1   2   >