[PHP] Re: Exec as user

2001-12-27 Thread Mike Eheler
There's no way that I have found to actually execute a script as a specified user, however: Should tell you what user the web server is running as. Mike Charlesk wrote: > I have been looking through the docs and found no help on either finding which user >the EXEC'ed commands run as, or ho

[PHP] Re: php code beautifier

2001-12-27 Thread Mike Eheler
I'm working php script that would perform such a feat. I'll post news on php.general when/if it's finished. Mike George Nicolae wrote: > do you know if exist a php code beautifier for win32? pls tell me the > address. > > -- > > > Best regards, > George Nicolae > IT Manager > __

Re: [PHP] Exec as user

2001-12-27 Thread Mike Eheler
Try doing this '; print_r(array($HTTP_SERVER_VARS,$HTTP_ENV_VARS)); echo ''; ?> And see if the information you want is in there anywhere. Mike > I don't believe that the system variables are available to php. I work on > *nix mostly, but I have a windows machine at home running php

[PHP] Re: Select box won't display in Netscape 4.xx

2001-12-31 Thread Mike Eheler
This happens when a tag is not within a block in netscape 4.. if the select isn't meant to be part of a form, and is just for navigation (javascript onchange or whatever), then just do ... Mike Edwin Boersma wrote: > Hi, > > I'm developing a website for multiple browsers. In Netscape 4.xx

[PHP] Re: web mail clients?

2001-12-31 Thread Mike Eheler
Depends what you want to do with it. If you want it to grab messages from a POP server, and download them to your local machine, then some sort of cyclic folders database structure would help: int auto_inc folderid int default(0) parentid (= 0 if root, otherwise id of parent folder) str folder

[PHP] Re: How to strip off all html-comments

2001-12-31 Thread Mike Eheler
Checkout the preg_replace page in the PHP manual (at http://www.php.net/manual/en). There is an example there on removing all HTML tags. You can just modify it to work on just comments. Mike Martin wrote: > Hello! How can I easily strip off all html-comments () from > a string? > > Martin >

[PHP] IMP 3.0 out!

2002-01-03 Thread Mike Eheler
So is Horde 2.0. And Turba 1.0 I think Chora 1.0 is due any day, as well. Just noticed this at http://www.horde.org/ For anyone who doesn't know, Horde is an application framework built upon the PEAR style of coding. IMP is *the* webmail solution for anyone looking to provide webmail to their

[PHP] Re: More on images...

2002-01-03 Thread Mike Eheler
$HTTP_SERVER_VARS['HTTP_REFERER'] or (php 4.1.x) $_SERVER['HTTP_REFERER'] Mike Matthew Walker wrote: > Related to my last question about the cookies in images, is there any > way to get the referrer from the calling page without passing it as an > argument to the image generation script? >

[PHP] An idea for a PHP tool

2002-01-03 Thread Mike Eheler
Like google has it's toolbar, why not have a PHP Manual toolbar? That would be *great*. Just type in the function name and hit "go" and the manual comes up. One for Moz & one for IE I'm sure would be appreciated. I'd do it myself, but I have not the ability to code in C (or C++ for that matte

[PHP] User-friendly URI's

2002-01-03 Thread Mike Eheler
http://www.somesite.com/news/2002/01/02/keyword I've seen some sites do this with other scripting languages (maybe even PHP.. I just don't know).. I like the look of this *way* better. Anyone have any insight as to how I can make that work with an Apache 1.3.xx + PHP 4.1.x setup? "news" would

Re: [PHP] User-friendly URI's

2002-01-03 Thread Mike Eheler
A 404 ErrorDoc would still reply with a 404 code, which could mess up some search engines. I was thinking of the .htaccess solution, but I'm not sure if that's possible to force only certain files or perhaps all files in just a certain directory to all be application/x-httpd-php? I guess that

[PHP] Re: User-friendly URI's

2002-01-03 Thread Mike Eheler
I don't want to mess with the whole site, just a file or 10, or one directory, etc. Mike Jason Murray wrote: >>True, but if I remember right, the hit will end up in your >>error_log not in your access_log. >> > > Ah. Bugger. > > But since this would require messing with your Apache config >

[PHP] Re: User-friendly URI's

2002-01-03 Thread Mike Eheler
e script name "news.php" and not worry about it? > > On Thu, 3 Jan 2002, Mike Eheler wrote: > > >>A 404 ErrorDoc would still reply with a 404 code, which could mess up >>some search engines. >> >>I was thinking of the .htaccess solution, but I

Re: [PHP] An idea for a PHP tool

2002-01-03 Thread Mike Eheler
Through suggestions of people here is the code I produced for a bookmark: javascript:void(srch=prompt('Function Name?',''));if(srch) {self.location.href='http://download.php.net/search.php?pattern=' +srch+ '&show=quickref';}; Of course that should all go on one line. That is a good hack for no

[PHP] PHP 4.1 crypt()

2002-01-08 Thread Mike Eheler
Is there any way to force PHP 4.1's crypt to generate crypt's with 2-letter salts? We've written some apps that do things the hack way -- if (crypt($pass,substr($pass,0,2)) == $cryptpass) -- and changing all of them to work the extended way is a real pain the arse. That includes changing all o

Re: [PHP] PHP 4.1 crypt()

2002-01-08 Thread Mike Eheler
It's too late for that. And I don't believe that the system's crypt() function just magically changed at exactly the same time we upgraded to PHP 4.1 Mike Patrik Wallstrom wrote: > On Tue, 8 Jan 2002, Mike Eheler wrote: > > >>Is there any way to force PHP 4

Re: [PHP] PHP 4.1 crypt()

2002-01-08 Thread Mike Eheler
help! I'll see what I can do. Mike Patrik Wallstrom wrote: > On Tue, 8 Jan 2002, Mike Eheler wrote: > > >>It's too late for that. And I don't believe that the system's crypt() >>function just magically changed at exactly the same time we upgraded to >&

[PHP] Re: Date

2002-01-08 Thread Mike Eheler
echo date('m/d/Y', strtotime('September 1, 2002')); http://www.php.net/manual/en/function.date.php Mike Aurelio wrote: > hi, > > how i make to catch a future date, with this formatting 09/01/2002.??? > > thanks, > Aurélio Sabino > > -- PHP General Mailing List (http://www.php.net/) To u

[PHP] Limiting CPU usage/time of spawned processes

2002-01-09 Thread Mike Eheler
Hi There, Okay, I have a server that allows a couple hundred virtual hosts that we have run websites as we are a hosting company. Recently one of our customers decided to spawn lynx through PHP. The process was running at 80% cpu for over 400 minutes, and it appears that Apache's RLimitCPU di

[PHP] Re: PHP vs. ASP

2002-01-09 Thread Mike Eheler
Well being a former ASP programmer and a current PHP programmer I think I can help you there. The key point is ease of use. PHP provides far more functionality than ASP (try finding a function to print out the date in ASP.. yeah, I thought so), while at the same time giving you access to low-l

[PHP] Compiling PHP with imap & recode support

2002-01-15 Thread Mike Eheler
I get this error when compiling php with ./configure --with-imap=../imap-2001a --with-record Any ideas on a workaround for this? /web/src/imap-2001a/c-client/libc-client.a(misc.o): In function `hash_lookup': /web/src/imap-2001a/c-client/misc.c:311: multiple definition of `hash_lookup' /usr/li

[PHP] Re: Compiling PHP with imap & recode support

2002-01-15 Thread Mike Eheler
Of course by --with-record I meant --with-recode Mike Mike Eheler wrote: > I get this error when compiling php with ./configure > --with-imap=../imap-2001a --with-record > > Any ideas on a workaround for this? > > /web/src/imap-2001a/c-client/libc-client.a(mi

[PHP] Feature Suggestion

2002-01-17 Thread Mike Eheler
If this is the wrong place for it, please point me to the right place. This is real small, though.. I'd like to see a shorthand for defining arrays.. for example $ucase_alphabet = array(['A'..'Z']); (creates an array of all alphabet characters, uppercase) $numeric = array([1..100]); Or someth

[PHP] Re: Feature Suggestion

2002-01-18 Thread Mike Eheler
Julio Nobrega. > > Um dia eu chego lá: > http://sourceforge.net/projects/toca > > Ajudei? Salvei? Que tal um presentinho? > http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884 > > > "Mike Eheler" <[EMAIL PROTECTED]> wrote in message > [EMA

[PHP] Reading config files

2002-01-24 Thread Mike Eheler
Hiya, Just looking for some tips on reading formatted config files. The config file is pretty strictly formatted.. here's an example: # this is a comment. any text on a line after a # should be ignored section "section1" { option "value"; option-array { "value 1"; 12

[PHP] Re: MySQL query question

2002-01-24 Thread Mike Eheler
Let's say you have this table, pseudo-coded: TABLE table tableid int auto_increment, value text ; You could run this query on it: insert into table values ('','value'); And the id will be auto generated. Same would apply with: inert into table (value) values ('value'); Mike Phil Schw

[PHP] Re: RFE: $HTTP_POST_VARS =& $_POST;

2002-01-24 Thread Mike Eheler
I disagree based simply on two points: a) Ideally, the $HTTP_POST/GET and $_POST/$_GET vars should be treated as "read only". b) There is no good reason to mix the two. Consistancy is the ideal. If you are working on an existing project, and you have the implied need to assign values to keys

[PHP] Re: RFE: $HTTP_POST_VARS =& $_POST;

2002-01-24 Thread Mike Eheler
Just a correction on that. It started as two points, then grew into 4.. I should proof read more often ;) Mike Mike Eheler wrote: > I disagree based simply on two points: > > a) Ideally, the $HTTP_POST/GET and $_POST/$_GET vars should be treated > as "read only". &g

[PHP] Re: Speed test: mysql query vs. file_exists()

2002-01-24 Thread Mike Eheler
That would probably give you more control over the data.. however is not really an ideal solution. Also, if you want speed.. go with the file method. That's how I'd do it, anyhow. Mike Qartis wrote: > I'm running a logs system where log entries are .log files with filenames > like 03012002.log

[PHP] Re: wierd function behavior within classes.. Bug?

2002-01-24 Thread Mike Eheler
PHP doesn't support that. Dunno if it plans to, either. There are workarounds.. can't remember exactly how it's done, but I think I saw it on phpbuilder.com in a tutorial somewhere. Mike Marc Swanson wrote: > I'm not sure if this is a known feature in php.. but the following code will > gene

[PHP] Re: Problems with date function

2002-02-01 Thread Mike Eheler
Y",strtotime(odbc_result($resultado,'fechaasignacion')));?> date accepts unix timestamps, not strings, so you have to convert that string to a unix time with strtotime. Mike Jorge Arechiga wrote: > Hi everybody > > I hope someone can help me in an issue on where i've been stuck for a

[PHP] getting a list of all php functions

2002-02-01 Thread Mike Eheler
Okay, my goal is to compile an array of *all* functions currently defined and available in PHP 4.1.1. That's a simple task if all I want is functions for the extensions I chose to compile into PHP (get_defined_functions()), but what about the other ones? Is there a place somewhere that has a t

Re: [PHP] getting a list of all php functions

2002-02-01 Thread Mike Eheler
That'll do! Thanks! Mike Jason Wong wrote: > On Saturday 02 February 2002 02:29, Mike Eheler wrote: > >>Okay, my goal is to compile an array of *all* functions currently >>defined and available in PHP 4.1.1. >> >>That's a simple task if all I want is f

[PHP] Re: Email Attachment

2002-02-01 Thread Mike Eheler
s.. a good place to start would be http://phpclasses.upperdesign.com/ Mike Eheler SearchBC.com Technical Support Mauricio Sthandier wrote: > Hello, I'm new in php development... I was wondering how can I attach a Word > (.doc) Document in an email sent with the mail() function (if I can d

Re: [PHP] Re: case-insensitive str_replace

2002-05-02 Thread Mike Eheler
Well to make it case insensitive, you could change them to '/search/i'. Adding that /i makes them case-insensitive. Mike Reuben D Budiardja wrote: > On Thursday 02 May 2002 04:08 pm, J Smith wrote: > >>preg_replace() can be used with arrays. >> > > Yeah, but how to make it case-insensitive be

[PHP] session_write_close() bug in 4.1.2?

2002-05-02 Thread Mike Eheler
user-defined session handlers. I'll start with how I have set up the handlers, please correct the process if it is wrong: -- BOF -- function sess_open($save_path, $session_name) { // open a database connection } function sess_close() { // close the database connection } function ses

[PHP] Re: SESSIONS

2002-05-02 Thread Mike Eheler
Javascript cannot interact with PHP. You have to realise that the PHP code has been already executed long before the javascript gets a chance to. Mike Morten Nielsen wrote: > Hi, > I got a php and a javascript page. In the PHP page I register a SESSION call > 'info'. I would then like to put a

Re: [PHP] srand thought

2002-05-02 Thread Mike Eheler
Yeah. If I understand correctly, if you do, like: Then, I believe, the theory is that you will get the same "random" number twice. Mike Miguel Cruz wrote: > On Thu, 2 May 2002, Gerard Samuel wrote: > >>Quick question. Im using srand to seed array_rand in a script. >>I read that srand shoul

[PHP] more session "bugs"?

2002-05-02 Thread Mike Eheler
Here's a test you can try yourself. On your server, set up these two files: test.php Click here to unset Click here to set test-unset.php -- What's supposed to happen: You click on the set link, this sets the variable. You then click on the unset link. This loads anoth

[PHP] Re: more session "bugs"?

2002-05-02 Thread Mike Eheler
Pardon the parse error in test-unset.php. change: header("Location: test.php")); to: header("Location: test.php"); Mike Mike Eheler wrote: > Here's a test you can try yourself. > > On your server, set up these two files: > > test.php > --

[PHP] Re: more session "bugs"?

2002-05-02 Thread Mike Eheler
, but it's documented. > > -- > Yasuo Ohgaki > > Mike Eheler wrote: > >> Here's a test you can try yourself. >> >> On your server, set up these two files: >> >> test.php >> >> > session_start(); >> if ($_RE

[PHP] Re: PHP with MySQL

2002-05-02 Thread Mike Eheler
Typically it's done like: $db = mysql_connect('localhost','username','password'); The MySQL database detects what host you're connecting from, and appends that to your username. I'm not sure if it's possible to specify an alternate host. So if both PHP and MySQL are on the same machine, and y

Re: [PHP] php converts \ to \\, how can I stop that

2002-05-03 Thread Mike Eheler
You could also set these values in your php.ini: magic_quotes_gpc = off magic_quotes_runtime = off If you do this, then remember when inserting the data into a mysql database, it still needs to be escaped: $sql = sprintf( "insert into table (id, field) values ('', '%s')", mysql_escap

[PHP] Re: Newbie - still working on my first script.

2002-05-03 Thread Mike Eheler
Seems to me that space in the file copy is what's causing problems. Try changing "ads/ $File_name" to "ads/${File_Name}". Just a note that doing things that way can cause big problems, especially on unix systems.. imagine if you went to your website and type: http://site/index.php?File=%2Fetc%

Re: [PHP] phpMyAdmin

2002-05-03 Thread Mike Eheler
I've always found it's good to set numeric primary keys to UNSIGNED. Gives you a larger range, and it's not very likely those numbers are ever going to be negative. Also, there is absolutely no need to check Index or Unique when you have selected Primary, as Primary implies both (hence why in

Re: [PHP] Controlling Word Files (FDA Concern)

2002-05-03 Thread Mike Eheler
... which still doesn't stop you from taking screenshots of the pages, and printing those. Mike Jay Blanchard wrote: > [snip] > >>Does anyone know of how to put a Word file on a web page without the user >>being able to save it to their hard drive? And also another issue of making >>it so they

Re: [PHP] Turning OFF 'auto_prepend_file' on a page by page basis

2002-05-03 Thread Mike Eheler
In .htaccess: auto_prepend_file "/dev/null" auto_append_file "/dev/null" Mike Stefen Lars wrote: > Usually, I use the Apache directive to add the prepend option. > > I already tried setting another prepend option in the apache directives, > but it seems one does not overwite the other. I trie

Re: [PHP] php/.htaccess/.htpasswd

2002-05-03 Thread Mike Eheler
It's possible, but is it really recommended? Wouldn't the .htaccess/.htpasswd file have to be owned by the apache user, which might leave it open to being overwritten by any kind of a weak/exploitable script? Mike Josh & Valerie McCormack wrote: > I've used the script phtaccess, which I think

Re: [PHP] php/.htaccess/.htpasswd

2002-05-03 Thread Mike Eheler
#x27;s password in view of the httpd, which is > even worse... > > miguel > > On Fri, 3 May 2002, serj wrote: > >>You could use fopen() to connect to the file via ftp therefore keeping >>the .htaccess file owned by the user for increased security. >> >

Re: [PHP] php/.htaccess/.htpasswd

2002-05-03 Thread Mike Eheler
;>>You could use fopen() to connect to the file via ftp therefore keeping >>>the .htaccess file owned by the user for increased security. >>> >>>Josh Boughner >>> >>>On Fri, 3 May 2002, Mike Eheler wrote: >>> >>> >>>>I

[PHP] Re: php/.htaccess/.htpasswd

2002-05-03 Thread Mike Eheler
s and if I'm > doing it wrong perhaps I should begin recoding it. > > josh > > On Fri, 3 May 2002, Mike Eheler wrote: > > >>If someone can overwrite your .htaccess there's a chance they can also >>view files through the same exploit (possibly). They could

[PHP] Re: php/.htaccess/.htpasswd

2002-05-03 Thread Mike Eheler
actually save the password anywhere in the > script. > > On Fri, 3 May 2002, Mike Eheler wrote: > > > The problem is not in them being able to overwrite the .htaccess *and* > > getting your FTP password.. those are the cons for both solutions we > > have presented

[PHP] #!/usr/bin/php in output?

2002-03-05 Thread Mike Eheler
Having a bit of a weird problem with using PHP as CGI. The problem is this.. the output is returning the #!/usr/bin/php line from the file. Example: /cgi-bin/test: #!/usr/bin/php Then in a web browser: http://www.example.com/cgi-bin/test: #!/usr/bin/php Hello World! Has anyone else experien

[PHP] Re: Help with an error I can't solve!

2002-03-05 Thread Mike Eheler
Is the line within a function? If so, it's possible that $HTTP_POST_VARS hasn't been globalled. Check to see if within the function that line is on that the line global $HTTP_POST_VARS; exists. Mike On Tue, 05 Mar 2002 12:32:59 -0800, Lic. Carlos A. Triana Torres wrote: > Hello all, > I h

[PHP] Re: Webmail

2002-03-05 Thread Mike Eheler
It's really quite simple. Here's a quick script that will dump all variables sent in a form to an email address: $email = '[EMAIL PROTECTED]'; $subject = 'Form Posted on ' . date('r'); $from = '"Your Website" <[EMAIL PROTECTED]>'; $message = ''; // PHP up to 4.0.6 foreach ($HTTP_POST_VARS as $ke

[PHP] Re: Value of $_* variables

2002-03-05 Thread Mike Eheler
$result = mysql_query("select user from users where id = $_SESSION[id]", $db); No need to quote the key name in a string. Mike James Taylor wrote: > I'm sure this has been asked before, but at least not within the last 600 > messages (i checked): > > I have the session variable $_SESSION['id

Re: [PHP] #!/usr/bin/php in output?

2002-03-05 Thread Mike Eheler
-p argument to the end of that line: > > #!/usr/bin/php -q > > -- > Aaron Gould > [EMAIL PROTECTED] > Web Developer > > > - Original Message - > From: "Mike Eheler" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tu

Re: [PHP] #!/usr/bin/php in output?

2002-03-05 Thread Mike Eheler
a CGI. Mike Anas Mughal wrote: > Why do you have "#!/usr/bin/php" in your script?! > You are running it thru the webserver. You shouldn't > need that line. > > > > --- Mike Eheler <[EMAIL PROTECTED]> wrote: > >>Having a bit of a weird prob

[PHP] Re: Basic help for radio buttons needed

2002-03-05 Thread Mike Eheler
First, change your form tag to: Post's are better, and to be standard-compliant it should be defined lower-case. Then in admin.php, just to see what is being returned, do: Replace $_POST with $HTTP_POST_VARS if you're using a version of PHP older than 4.1.0. If still there is nothing, the

Re: [PHP] timestamp iin MySQL not compatible to the one in PHP???

2002-03-05 Thread Mike Eheler
The long way, but it will help in the understanding of it: $timestamp = "20020305211704"; $year = substr($timestamp, 0, 4); $month = substr($timestamp, 4, 2); $day = substr($timestamp, 6, 2); $hour = substr($timestamp, 8, 2); $minute = substr($timestamp, 10, 2); $second = substr($timestamp, 12, 2

Re: [PHP] parsing a string

2001-10-18 Thread Mike Eheler
Beyond that, why not keep it conforming to HTML, and use an tag, for example: This is some text . That way if you need to view the page "as-is" in a browser or whatever, it'd still look fine.. go grab yourself some good free html parser code, and analyse the options. If processat="server" th

Re: [PHP] Newbie in Need of Help!

2001-10-23 Thread Mike Eheler
if you prefer more traditional syntax: '; } ?> Mike Eheler JMack wrote: >Greetings. I have been playing around with PHP this week, programming a >football pool. I have hit a small snag that I would like some assistance >with, if anyone knows the answer -- it's probably ver

Re: [PHP] Can PHP do what this javascript does...

2001-10-24 Thread Mike Eheler
There's a really long method of doing it that would work, but would involve server-side browser detection, and a database containing a list of browsers that support print shortcuts. Stick with the JS. Mike [EMAIL PROTECTED] wrote: >To print: >Click here or Select File >and then Print from y

Re: [PHP] conjob etc.

2001-10-25 Thread Mike Eheler
1. Just re-compile with the same options as before, just without --with-apxs or --with-apache (however you did it before). Run make all install and a php binary should be installed in $PREFIX/bin (default: /usr/local/bin). Then to use it to run shell scripts, put #!/usr/local/bin/php -q at the

Re: [PHP] SIMPLE, secure user authentication

2001-10-25 Thread Mike Eheler
"Protected Directory" AuthUserFile /path/to/folder/below/document/root/.htpasswd AuthGroupFile /dev/null Require valid-user This is untested code, and should work fine, but it may have something silly like a syntax or parameters error or something I overlooked. Hope this helps. Mike

Re: [PHP] MKDIR Permission Denied

2001-10-25 Thread Mike Eheler
a) check to see if the user that apache is running as has access to the directory you're trying to write to. b) try removing the quotes around 0775 Mike Jeff Gannaway wrote: >$GalleryPHPName = "Pins"; >mkdir ("../$GalleryPHPName", "0775"); >?> > >Results in... > >MkDir failed (Permission denie

Re: [PHP] www.php.net offline for a bit

2001-10-25 Thread Mike Eheler
Don't forget www.ca.php.net, for us Canadian PHP junkies. Mike Rasmus Lerdorf wrote: >Some servers are being moved around. Use a mirror. Here are some for you >to try: > >us.php.net >us2.php.net >rack1.php.net >uk.php.net >dk.php.net >dk2.php.net > >Any one of those will have a full mirror l

Re: [PHP] while() looping over query results twice?

2001-10-25 Thread Mike Eheler
Trying using mysql_fetch_array, and using the field names. This is the recommended behaviour in PHP4: $result = mysql_query($myQuery) //$myQuery gets defined earlier $resultCount = mysql_num_rows($result); $companyID = array(); while($query_data = mysql_fetch_

Re: [PHP] What's the difference between mail() in PHP and sendmail?

2001-10-26 Thread Mike Eheler
Nothing, really. I believe PHP's mail() actually calls sendmail directly (or whatever you have configured in php.ini). Also Mike Web user wrote: >What's the difference between mail() in PHP and sendmail? >Thanks! >Mike > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] editor for working with php

2001-10-26 Thread Mike Eheler
I've always been partial to TextPad, myself. http://www.textpad.com/ You gotta download the PHP4 Syntax Definition file for syntax hilighting. Mike Pavel Jartsev wrote: > Ray Todd Stevens wrote: > >> I ahve been using go-live (4.0) to edit pages containing php >> scripts. this is not really

Re: [PHP] Best [non-PHP] way to redirect a browser

2001-10-26 Thread Mike Eheler
Before any of your HTML code, put in: header('Location: index.php'); If anything has been sent to the browser yet (through echo/print/etc, or through code outside of the tags), though, you will get an error. Mike René Fournier wrote: >This is really I guess a non-PHP question, so please exc

[Fwd: [PHP] Best [non-PHP] way to redirect a browser]

2001-10-26 Thread Mike Eheler
Right. My bad. Heh, I have an excuse.. it's before noon here ;) Definitely go with the approach, then: Example: Click here to enter the site Mike this wouldn't work from an index.html page unless html pages were set up to parse as php file... At 10:35 AM 10/26/2001 -0700, yo

Re: [PHP] Re: Best [non-PHP] way to redirect a browser

2001-10-26 Thread Mike Eheler
Actually beyond that, for #1, if you server allows you to create .htaccess files, simply create a .htaccess file in your root directory, and put this in it: DirectoryIndex index.php Mike Mike Frazer wrote: >Two ways: > >#1 - If you have server admin access, just add to the default page list

Re: [PHP] Advanced. Trapped in architecture.

2001-10-26 Thread Mike Eheler
I know in ASP it's as easy as doing: Response.Clear Response.Redirect But PHP doesn't seem to have that feature. My best suggestion would be to try and re-work your code so that the redirect can be detected *before* any html code is written to the browser. Mike Andy wrote: >Hi there, > >I h

Re: [PHP] Excel to MySQL

2001-10-27 Thread Mike Eheler
Yet another good way (if you have Windows) is to grab a copy of the MSDE (comes with most distros of Office, on the CD.. you'll hafta search for it), which is essentially a stripped down version of Microsoft SQL Server. Install that, and on your start menu somewhere (it'll say like MSDE or som

Re: [PHP] Getting arrays out of HTTP_POST_VARS

2001-10-27 Thread Mike Eheler
$HTTP_POST_VARS['middlecasts']['key']['subkey']['wecould']['go_on']['forver']; ;) Mike Ian Evans wrote: >My mind is going blank here and I feel like I'm missing something basic. > >I have an insert form for movie profiles that takes cast members, writers and >directors and inserts them into

Re: [PHP] Getting arrays out of HTTP_POST_VARS

2001-10-27 Thread Mike Eheler
The output will be: key2: World #2! However, if we do: echo "key1/subkey: $HTTP_POST_VARS[key1][subkey]"; The output should be: key1/subkey: Array[subkey] So what you want to do is: echo 'key1/subkey: ' . $HTTP_POST_VARS['key1']['subkey']; Which

Re: [PHP] HELP: Re: Table comments

2001-10-27 Thread Mike Eheler
Mike jtjohnston wrote: >>In my phpadmin, I have something called: "Table comments". >>Can I acccess this somehow? Can't find it in the function database. >> > >I've tried this since, but can't get syntax right: > > $myconnection = mysql_pconnect("localhost","",""); > mysql_select_db("",$myconn

Re: NOPE: [PHP] HELP: Re: Table comments

2001-10-27 Thread Mike Eheler
That's because you're not selecting a database. You need to either put the database name in mysql_select_db, or change the query to: SHOW TABLE STATUS FROM databasename LIKE 'table_name'; so change the line to: $sql = "SHOW TABLE STATUS FROM db_name LIKE 'bookmark_unit4'"; Mike jtjohnston w

Re: [PHP] How Do I Re-Compile PHP4

2001-10-28 Thread Mike Eheler
I'm not sure if you can add functionality using ./config.status, but inside that file is the command line you used to originally compile it, so what you can do is copy that ./configure line, then add your --enable-ftp, and go. Might wanna run make clean first (not distclean!) Mike Jeff Ganna

Re: [PHP] Attaching a file to a form!

2001-10-28 Thread Mike Eheler
Don't forget to enctype yer form ... Mike Olexandr Vynnychenko wrote: >Hello Ben, > >Sunday, October 28, 2001, 10:04:21 PM, you wrote: > >BC> I am trying to let a person attach a file to my form. Can anyone help? > > >Just read http://www.php.net/manual/en/features.file-upload.php. >That's

Re: [PHP] Where are lists of PHP's predefined constants and keywords?

2001-10-31 Thread Mike Eheler
Don't forget true, false, and null. :) A good place to look might be to grab a syntax definition file for some sort of popular editor (like textpad), and just go through it. Not the best way, for sure. The best place to look easily is http://www.php.net/manual/en/ Mike Johnson, Kirk wrote:

Re: [PHP] Question about MySQL, ORDER

2001-11-01 Thread Mike Eheler
SELECT Main.title, Replies.date FROM (Main LEFT JOIN Replies ON Main.id = Replies.main_id) ORDER BY Replies.date That should do it. Mike BlueBytes wrote: >http://paa.fragland.net/hosted/myquestion/ > >here you find my question, thx > -- PHP General Mailing List (http://www.php.net/) To un

Re: [PHP] javascript to php ????

2001-11-14 Thread Mike Eheler
No. You have to realise that JavaScript is client side, and PHP is server side, so -- apart from inserting those javascript values into a form and submitting it using code -- PHP and JavaScript cannot interact. Mike fitiux wrote: >Hi =) > >is it possible to pass a javascript array to php ??

Re: [PHP] silly question

2001-11-14 Thread Mike Eheler
I assume that you have or some variation thereof. In that case, just set $field1 = "" after you save the record, or remove the value="" statement altogether. Mike Rodrigo Peres wrote: >Hi list, > >I have PHP code to insert the result of a form into mysql. When I nedd to >made an update, I pas

Re: [PHP] Another POST case?

2001-11-15 Thread Mike Eheler
0 && is_array($toppings)) { $strtoppings = implode(', ',$toppings); $msg = "The customer wants: $strtoppings."; } ?> Mike Raymond wrote: >Hi! > >I have this using postmethod: > > > > > > > >Then I'm trying to mail the result with the mail() function. > > >/* recipie

Re: [PHP] require or include

2001-11-15 Thread Mike Eheler
It all depends on the purpose. With require, the script will die on the spot if the file is not found. Also, the code will always be included in the file.. so take this example: file.php: requiretest.php: The run script would be: Of course that code would never be executed, but the requi

Re: [PHP] Supplied argument is not a valid MySQL result

2001-11-15 Thread Mike Eheler
Because you are enclosing your $sql string within () brackets, $sql is being set a boolean value, not the value of the string. Change it to $sql = "SELECT * ... '$group_id'"; -Mike Dan McCullough wrote: >Warning: Supplied argument is not a valid MySQL result resource in >/home/sites/projects.

[PHP] PEAR Syntax

2001-11-15 Thread Mike Eheler
Hi There, I'm just exploring PEAR a bit, and am confused. Many examples cite calling functions such as: RFC822_Mail::parseAddressList(...); But when I call the function like that, I get a parse error. Any ideas anyone? Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] What version did $PHP_SELF still work?

2001-11-15 Thread Mike Eheler
Hrm. Well if you want quick fix: $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF']; Mike John Steele wrote: >Hi Mike and Jim, > > From my earlier message [Re: PHP 4.0.6 $PHP_SELF empty?]: > >> No, I updated my php.ini manually (just to change the zend optimizer and >>add the DBG debugger. These two

Re: [PHP] Cookies and Variables

2001-11-20 Thread Mike Eheler
$HTTP_COOKIE_VARS['someWord']; $HTTP_GET_VARS['someWord']; :P Mike Richard S. Crawford wrote: > Consider this code, in page1.php: > > setcookie("someWord","I am a cookie"); > ?> > > ...and this code, in page2.php: > > setcookie("someWord",$someWord); > print ("someWor

Re: [PHP] Deleting from MySQL with more than one 'where' variable?

2001-11-21 Thread Mike Eheler
Are you getting an error, or is it simply not deleting the fields that should match that criteria? Mike cosmin laslau wrote: > Ok, there's a table with 4 fields, I want to delete from it when two > of the variables passed (through the function below) match up with the > table's contents. How

[PHP] PHP 4.1 out?

2001-11-28 Thread Mike Eheler
Try it: http://www.php.net/distributions/php-4.1.0.tar.gz No word on the website, though. Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PRO

Re: [PHP] HELP: Writing Files securely from apache php module

2001-11-28 Thread Mike Eheler
This is something I have been battling with for ages. I finally decided on just setting up a system that saves the files to a world-writeable temp directory, then uploads them via FTP. If anyone has a better solution, I would *love* to hear it. Mike Michael Blower wrote: > Can some one expla

Re: [PHP] PHP 4.1 out?

2001-11-28 Thread Mike Eheler
Ahh I see. Thanks! :) Mike Andrey wrote: >Already known. 4.1.0 is 4.1.0RC3 . >Final tests are in progress. > >Regards, >Andrey Hristov >- Original Message ----- >From: "Mike Eheler" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: We

Re: [PHP] PHP 4.1 out?

2001-11-28 Thread Mike Eheler
ersions for download anywhere? Mike Zeev Suraski wrote: > And for a good reason. Please don't publish such URLs in the future... > > Zeev > > At 18:56 28/11/2001, Mike Eheler wrote: > >> Try it: >> >> http://www.php.net/distributions/php-

Re: [PHP] Help anyone

2001-11-29 Thread Mike Eheler
ew How about: ?> >On-Line >Off-Line Here is what I did. >if ($edit[status]=="On-line") { >print "Status: \n"; >print "On-line\n"; >print "Off-line\n"; >print "\n"; >} else { >print "Status: \n"; >print "On-line\n"; >print "Off-line\n"; >print "\n"; >} >//and >if ($edit[single]=="1") { >p

Re: [PHP] getting a user's ip address

2001-11-29 Thread Mike Eheler
Your IP address is That is all case sensitive too, by the way. Mike Ken Savage wrote: >Super new to PHP but I'm putting in the effort to learn quickly. >How would I output the user's IP address in a php file. > >I want the webpage to say... > >Your IP address is xx.xx.xx.xx > >thanks >Ken Sav

Re: [PHP] Help anyone

2001-11-29 Thread Mike Eheler
Maybe, but where I come from, printing HTML is illegal, and XHTML compliance must be 100%, so: > > Mike faeton wrote: >Hello Mike, > >And cleaner: >print ''; >print ''').'>'; >?> > >:) > >ME> >ME> ME> selected="selected"'; } ?>>On-Line >ME> ME> selected="selected"'; } ?>>Off-Line >ME> >ME>

Re: [PHP] RE: MySQL ORDER BY or PHP Sort?

2001-12-03 Thread Mike Eheler
Don't forget LIMIT 0,25 ("I want to select about 25 rows from a table...") SELECT * FROM mytable ORDER BY series,price LIMIT 0,25 Mike Rick Emery wrote: >SELECT * FROM mytable ORDER BY series,price; > > >-Original Message- >From: René Fournier [mailto:[EMAIL PROTECTED]] >Sent: Monday,

  1   2   >