Re: [PHP] what PHP really needs

2004-01-24 Thread John W. Holmes
Marlon Moyer wrote: But I think the original question was about a tree that took a long time to create, and application variables would be a plus in this situation. Again, if you're just talking about reading, how hard is it to just do this to save: $save_data = '?php $array = ' .

Re: [PHP] Session time-out value

2004-01-23 Thread John W. Holmes
From: Pushpinder Singh [EMAIL PROTECTED] I am using php and Mysql in my application. The problem is that the system automatically logs the user out of the system after 24 minutes. I would like to extend the session lifetime to about 2-3 hrs. I know there is a way to do it using a .htaccess

Re: [PHP] sessions not registering inside a function.

2004-01-23 Thread John W. Holmes
From: Jarratt Ingram [EMAIL PROTECTED] I have created a login system, which works as expected on php 4.2. When i was asked to move it onto an older server using 4.0.6, the system stopped registering sessions. main page: ? session_start(); function login($username, $password){ global

Re: [PHP] Session time-out value

2004-01-23 Thread John W. Holmes
From: Pushpinder Singh [EMAIL PROTECTED] I dont have rights t change this value for my webserver. I only want this value to be changed for my application. Is there a way to take care of this ? Thanks again !! You can use an .htaccess file or (maybe) ini_set() (before session_start()!!).

Re: [PHP] simple ?- load page after submit

2004-01-23 Thread John W. Holmes
From: Katie Dewees [EMAIL PROTECTED] Matt Hedges wrote: I want when they hit submit for it to take them to their page (personalpage.php?id=$id)... header(Location: personalpage.php?id=$id); Or, correctly: header(Location: http://www.yourdomain.com/personalpage.php?id=$id;); ---John

Re: [PHP] Session time-out value

2004-01-23 Thread John W. Holmes
From: John Nichel [EMAIL PROTECTED] php_value session.gc_maxlifetime number of seconds I'm really curious to see if any of this really works. I know it _should_, but... Assuming a shared/virtual server where all session files for all sites are in the same location. When the garbage collector

Re: [PHP] drop downs

2004-01-23 Thread John W. Holmes
From: Mark Luquette [EMAIL PROTECTED] I am migrating a site that used cold fusion. It used a mouseover feature that dropped a box with links that responded to additional mouseover features. This is not a right side down arrow form like box. Any php scripts that do this ? That is a

Re: [PHP] Session time-out value

2004-01-23 Thread John W. Holmes
If you just change the session.save_path variable for one site on your box to something like /tmp/onesite, do you still have to write your own garbage routine? Wont the autamatic php garbage collection know to only cleanup sessions in the /tmp/onesite directory? Is the garbage collection

Re: [PHP] what PHP really needs

2004-01-23 Thread John W. Holmes
From: Chris Boget [EMAIL PROTECTED] [snip] [/snip] Learn and use C++ Or sessions. Along with serialize() and deserialize(), all are your friends in this case. He's talking about the same set of data being available to all instances of PHP, though. I think they're called Application

[PHP] PHP script to help write documentation (not from source, though!!)

2004-01-23 Thread John W. Holmes
Hi all. Does anyone know of any good programs to help write documentation? I'm not looking for things like phpdoc that read/parse the comments of the source code and create documentation, though. I'm looking for something to help me write something like the MySQL manual with chapter, images,

Re: [PHP] what PHP really needs

2004-01-23 Thread John W. Holmes
Justin Patrin wrote: Then you could use a serialized file in the filesystem that any app can read. For added speed, make a RAM-disk and store the file there. Slight overhead deserializing, but it's likely faster than recreating whatever it is (if it's large). Then you've still got to worry

Re: [PHP] Odd Code Error.

2004-01-21 Thread John W. Holmes
[EMAIL PROTECTED] wrote: Hmm i was checking out a pear class, what about the variables within a function ? like function foo($name) { if ($name) { } } or foo($name) { if (isset($name)) { } } it uses isset on variables coming outside the function Those examples don't make much sense. Without

Re: [PHP] Get First 20 Characters of a Variable or Database Entry

2004-01-21 Thread John W. Holmes
Dimitri Marshall wrote: How would I go about getting the first 20 characters of a varibale or database entry. The situation is this, I created a calendar where users can post events and on the date instead of just a number (the number of events and the date), I would like to show the first 20-30

Re: [PHP] Odd Code Error.

2004-01-21 Thread John W. Holmes
Chris W wrote: $Key = xyz; lots more code here. if($key == xyz){ Notice: Undefined variable: key in \path\to\test.php on line X do this stuff; } lots more code here; If the language forces variable deceleration you simply get an error variable $key not defined on line x then there is no

Re: [PHP] Cookie Guestion

2004-01-20 Thread CPT John W. Holmes
From: Chris W [EMAIL PROTECTED] I am still new to web programing but I have a lot of experience in developing non web based applications. So I think I am a reasonably clever programmer and I have now done enough web programming that I understand the cookie mechanism. What I can't figure

Re: [PHP] Cookie Guestion

2004-01-20 Thread CPT John W. Holmes
From: Stuart [EMAIL PROTECTED] And don't forget the effect media hype had on their reputation. Cookies were portrayed as bad guys. As John says, they're not if they're used correctly, but it only takes one high-profile example of improper use to tarnish a reputation forever. And as that

Re: [PHP] php running as user apache

2004-01-20 Thread CPT John W. Holmes
From: Nirnimesh [EMAIL PROTECTED] My question relates to using php for handling file uploads. Since php runs as user apache, using it to manage file uploads means that I need to give write permissions to the user apache, which is a near-to-nobody user, i.e. 0+w permissions. Now does that not

Re: [PHP] preg_replce ' for use with mysql

2004-01-20 Thread CPT John W. Holmes
From: Nirnimesh [EMAIL PROTECTED] How do I replace all ' with \' in php so that I'm able to use the mysql queries. Note that simply using: preg_replace(/'/, \', -1) is not what I'm looking for, for this does not help me. Let's say I take the address from a form and want to enter it into the

Re: FW: [PHP] Re: Generating an Excel file?

2004-01-20 Thread CPT John W. Holmes
From: Ben Ramsey [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: or download the file without the php-script and analyse the http-headers with a network-sniffer There is no way to download the file without the PHP script. It is being generated by the PHP script from data in a database. The

Re: [PHP] Flash .swf outside webroot: width and height problems

2004-01-20 Thread CPT John W. Holmes
From: Toby Irmer [EMAIL PROTECTED] I am trying to display an .swf-file that is stored outside the webroot. Just sending the header and doing a readfile on the swf results in the swf being displayed with the maximum available width and height. Does anyone know a way of displaying Flash with

Re: [PHP] include working....but confusion

2004-01-20 Thread CPT John W. Holmes
From: Ryan A [EMAIL PROTECTED] Do I have to start and end the included files with ?php ? ? Yes. One day you'll learn to spend the two seconds trying this instead of asking the list. I'll be so proud of you then! ;) ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] include working....but confusion

2004-01-20 Thread CPT John W. Holmes
From: Ryan A [EMAIL PROTECTED] Thanks for the very informative reply but I did try itproblem is, it seems to work with and without...thats why the confusion. I have one program like the one i outlined and the second one, like this: some html code goes here some output stuff goes here

Re: [PHP] Help with preg_replace

2004-01-19 Thread John W. Holmes
joel boonstra wrote: The problem is that there are still special chars that need escaping. Specifically, the question mark (?) and the square braces ([]). Here is some modified code (apologies for poor word-wrapping): ?php $code = blah

Re: [PHP] Re: how to check the form filled all

2004-01-19 Thread John W. Holmes
Chris W wrote: Sungpill Han wrote: HI, i want to check if the user filled the all inputs in the form. So, I checked NULL and with this function in the post receiving script. --- function is_filled_out() { // test that each variabl has a value foreach($_POST as $key

Re: [PHP] Hot to MD5 two values (Valu1+Valu2)

2004-01-19 Thread John W. Holmes
Radwan Aladdin wrote: Can I use : $md5 = md5($variable1 + $variable2); Is it right to use that? Yes, you can do that. Whether it's right or not depends. You could have taken the two seconds to try it, either way. :) -- ---John Holmes... Amazon Wishlist:

Re: [PHP] Error Reporting help

2004-01-19 Thread John W. Holmes
Chris Edwards wrote: but do I need to do something to get PHP to actually work off of these setting once they have been changed, Restart your web server. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals

Re: [PHP] Re: Generating an Excel file?

2004-01-19 Thread John W. Holmes
Ben Ramsey wrote: Adding any of those headers still does not remove the .php from the end of the file when I am prompted for the download. I have a client that will be downloading this file, and I do not wish to instruct them to first remove the .php extension before they can view it. Are you

Re: [PHP] Error Reporting help

2004-01-18 Thread John W. Holmes
Chris Edwards wrote: My hosting company recently upgraded to PHP 4.3.0. Since doing this I no longer get syntax type errors, from my typo's inside my PHP scripts. These use to come up in my browser when that page was requested and the script run. You probably need to have them turn on

Re: [PHP] Win32 Getting username from windows

2004-01-17 Thread John W. Holmes
Gastovski (James) wrote: I'm using the following code to extract the username running on the windows machine: [start code] $api = new win32; $api-registerfunction(long GetUserName (string a, int b) From advapi32.dll); $len = 255; $name = str_repeat(\0, $len); if ($api-GetUserName($name, $len) ==

Re: [PHP] Schedule an Event with PHP

2004-01-16 Thread John W. Holmes
Alex Pilson wrote: Say I want a MySQL database to have a table that holds certain events, the Event table. And in the event table, one of the records is an event that has a startdate of today, I want to check against that date, if it equals now, then do this Besides using CRON to hit that

Re: [PHP] Non American strtotime

2004-01-16 Thread John W. Holmes
Tom wrote: The end user gets to chose their date format, and so if I cannot reverse their arbitrary date format into a timestamp then I have no chance of ensuring that dates are correct. This seems like a really fundamentally bad thing about PHP :( Seems like a fundamental flaw in your

Re: [PHP] Non American strtotime

2004-01-16 Thread John W. Holmes
Tom wrote: Is there a way I can force PHP's time functions not to read date strings in the American MM-DD- format? If you read the strtotime() manual page, there is a link to this page: http://www.gnu.org/software/tar/manual/html_chapter/tar_7.html which gives you all of the formats that are

Re: [PHP] R: [PHP][PEAR] PEAR::DB_Common::nextId()

2004-01-16 Thread John W. Holmes
[EMAIL PROTECTED] wrote: Hello Not sure if you thought of it or if it even applies to you but when you use PEAR::DB::getOnce(SELECT LAST_INSERT_ID()); to retrieve the id do consider concurrent access to the database when using it for inserting stuff. Been there and its a hassle to resolve

Re: [PHP] /VAR is driving me crazy

2004-01-16 Thread John W. Holmes
Boaz Yahav wrote: Hi Does anyone have an idea what is so special about the string /VAR ? If i create a form that submits to a php file and in the form i put the string /VAR anywhere in the text or just /VAR I get an 404 error from apache on an existing file. If i take the same form and remove the

Re: [PHP] Combining results - is there better way?

2004-01-16 Thread John W. Holmes
Miles Thompson wrote: This code works, but are there alternate, more efficient ways of doing it. A count of subscribers, by classification, has to be provided, where the classification definitions are in one table (class) with this structure: nClassKey - unique, numeric, autoincrement

Re: [PHP] LOAD_FILE and PHP

2004-01-16 Thread John W. Holmes
Jough P wrote: Greetings all, I can't get LOAD_FILE to work in an INSERT statement from PHP. The generated sql works when you're in mysql but won't work from PHP. BSDB is my database object. sql_query basically just does a mysql_query and some error outputting stuff. There error is: Column

Re: [PHP] dynamic array creation from form elements

2004-01-16 Thread John W. Holmes
Jon Bennett wrote: Hi, I've got a dynamically generated form and once it's submitted I need to _push the data from my form elements into an array so I can ad them to the db. My form elements are created like so: ?php $i = 1; while ($i = $iListItems){ ? div class=row div class=labelList

Re: [PHP] Can I do this? If so why wont it work

2004-01-16 Thread John W. Holmes
Alex Hogan wrote: I am wanting to read in several session values at once. This is what I have so far; $_SESSION['obj[1]'] = $_REQUEST['txtObj1']; $_SESSION['obj[2]'] = $_REQUEST['txtObj2']; $_SESSION['obj[3]'] = $_REQUEST['txtObj3']; $_SESSION['obj[4]'] = $_REQUEST['txtObj4'];

Re: [PHP] Please help me retrieving data from a PHP file!!???

2004-01-16 Thread John W. Holmes
SASSINC Internet Solutions - Arabic Department wrote: How to retrieve data from a PHP file? (The value that will be retrieved of course it is echoed in the PHP file, and it will be shown in a TextBox in my VB program.. so I want to retrieve it to my EXE VB program that will put it inside a

Re: [PHP] [GD] Circlediagram

2004-01-16 Thread John W. Holmes
Simon Fredriksson wrote: Does anyone out there have any idea on how to create circlediagrams, using GD? Preferably something to set that x% of the circle is filled with one color and the rest with some other. Thinking about it, doesn't sound like an easy task with the current functions. :-\

Re: [PHP] Printing on remote windows printers

2004-01-15 Thread CPT John W. Holmes
From: [EMAIL PROTECTED] Can i print on remote windows systems using php printing functions? How can i do ? No. Use a client side solution. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Junk Mail from this List?

2004-01-15 Thread CPT John W. Holmes
From: Ben Ramsey [EMAIL PROTECTED] I'm using Mozilla Thunderbird 0.7 to view and post to this news group, so I don't know if that has anything to do with this, but, after just posting a few messages to the list, I've received a bunch of what I consider spam to my e-mail address. Common

Re: [PHP] Multiple Queries

2004-01-15 Thread CPT John W. Holmes
From: Arthur Pelkey [EMAIL PROTECTED] I have a page that has multiple queries on it, I want to do doing the following: Query a mysql db multiple times in the same page, but i must be missing something, I keep getting these AFTER the first queryis successful: Warning: mysql_fetch_array():

Re: [PHP] regexp with mysql

2004-01-15 Thread CPT John W. Holmes
How about: SELECT * FROM table WHERE FIND_IN_SET(2,column); where column is your table column containing the comma separated list. ---John Holmes... - Original Message - From: Toby Irmer [EMAIL PROTECTED] To: Lowell Allen [EMAIL PROTECTED]; PHP [EMAIL PROTECTED] Sent: Thursday,

Re: Re[4]: [PHP] Re: jpeg Uploader issue

2004-01-15 Thread CPT John W. Holmes
From: Toby Irmer [EMAIL PROTECTED] file: show.php ? header(Content-type: image/jpeg); readfile(/path/to/file/.$_GET[filename]); ? in your files: img src=show.php?filename=myfile.jpg ... or something like that ;) Are you trying to get him to compromise his server? I'm sure that's

Re: Re[4]: [PHP] Re: jpeg Uploader issue

2004-01-15 Thread CPT John W. Holmes
From: Toby Irmer [EMAIL PROTECTED] that was explaining the prinicple. of course you wouldn't do it like this, but pass an id to identify. you could also send an encryption key... Ok. I'm sure the original poster is grateful. Hopefully, if anyone actually searches those things called the

Re: [PHP] MySQL Question

2004-01-15 Thread CPT John W. Holmes
From: John Taylor-Johnston [EMAIL PROTECTED] Sorry, don't want to be off-topic, but have found something curious about MySQL 4.0.16-standard. It does not seem to prioritise properly. Searching for 'English Canada' (as opposed to +English +Canada) gives me all instances of both words but does

Re: [PHP] PHP Includes and Echoes in Head Sections and Search Engines

2004-01-15 Thread CPT John W. Holmes
From: Freedomware [EMAIL PROTECTED] I discovered that includes will apparently work just about anywhere, but echo functions apparently don't work with the title tag and meta tags; at least, I can't see the word Alaska in those locations when I click View Source in my browser. Look back over

Re: [PHP] IIS and PHP 4.2 on NT 4.0

2004-01-15 Thread John W. Holmes
Todd Cary wrote: I am running PHP 4.0.6 on IIS and NT 4. I cannot get PHP 4.2 to run. Is there something simple I am overlooking? Yes. http://www.bigredspark.com/questions-with-yes-or-no-answers.html -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect:

Re: [PHP] Defining own globals

2004-01-14 Thread CPT John W. Holmes
From: Ville Mattila [EMAIL PROTECTED] Would it be possible to make all hard-coded variables beginning with $_ automatically global? I've found useful to set some variables per page to $_PAGE variable (for example $_PAGE['title'] etc) that would be nice to get available to all functions

Re: [PHP] Multiple RDBMS in one request

2004-01-14 Thread CPT John W. Holmes
From: Geoff Caplan [EMAIL PROTECTED] Is it possible to interact with multiple RDBMS during a single request? I seem to remember that with older versions at least, there was some problems with this, but can't find anything definitive in the archive or docs. Yes, you can open up multiple

Re: [PHP] convert date from UK to US for strtotime

2004-01-14 Thread CPT John W. Holmes
From: Jon Bennett [EMAIL PROTECTED] I'm trying to re-work this code from the php site http://uk.php.net/strtotime so that my users can input dates in UK format (dd-mm-) and still use strtotime. // from http://uk.php.net/strtotime $date=explode(/,trim($records[2])); $posted=strtotime

Re: Re[2]: [PHP] nested tags

2004-01-14 Thread CPT John W. Holmes
From: Richard Davey [EMAIL PROTECTED] GJ HTML tags. GJ I can have something like GJ table GJ first GJ table GJ second table GJ /table GJ table GJ /table GJ and i need to convert each table/table tags into something more user GJ friendly. Come again? Might be helpful to

Re: [PHP] Function Problem (Long-ish)

2004-01-13 Thread CPT John W. Holmes
From: Dave Carrera [EMAIL PROTECTED] I get a Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource Whenever you get this warning it's because your query failed for some reason and you're trying to use a result that's not valid. Use mysql_error() to see what the

Re: [PHP] Can php select which ini file to use?

2004-01-13 Thread John W. Holmes
Richard Davey wrote: I need PHP4 and 5 on the same machine CS This can't happen. You'll have to pick one or the other. Only on Unix it would appear, working fine here on Windows XP giving me a multi-platform development environment, which is what I need. Installed as a module or CGI and with what

Re: [PHP] MySQL query

2004-01-12 Thread CPT John W. Holmes
From: Ashley M. Kirchner [EMAIL PROTECTED] I need to query for record within a certain date stamp. The datetime field contains the createdon information that i need and is in the following format: 2004-01-11 21:40:50 What I'd like to do is search for records that are between

Re: Re[2]: [PHP] MySQL query

2004-01-12 Thread CPT John W. Holmes
From: Richard Davey [EMAIL PROTECTED] RD SELECT whatever FROM table WHERE date_column_name BETWEEN '2004-01-09 RD 00:00:00' AND '2004-01-04 23:59:59' Actually sorry, inverse the seconds (put the 00:00:00 onto the lower date, the 4th) so it encompasses the whole period. You might actually

Re: [PHP] MySQL query

2004-01-12 Thread CPT John W. Holmes
From: Ashley M. Kirchner [EMAIL PROTECTED] RD SELECT whatever FROM table WHERE date_column_name BETWEEN '2004-01-09 RD 00:00:00' AND '2004-01-04 23:59:59' Actually sorry, inverse the seconds (put the 00:00:00 onto the lower date, the 4th) so it encompasses the whole period. You might

Re: [PHP] Globals problem - $_REQUEST good solution?

2004-01-12 Thread CPT John W. Holmes
From: Ryan A [EMAIL PROTECTED] After going through the manual trying to find an answer I came accross $_REQUEST, is this a good solution? because I have never used this before or is this as bad as having globals on? The only simularity it has to register_globals ON is that you don't know

Re: [PHP] Storing PHP code in a database

2004-01-12 Thread John W. Holmes
Justin French wrote: Is there much I need to know about storing mixed PHP/HTML text in a mysql database table, and then using eval() to execute it? All I managed to find so far is that I should store it in a blob. A TEXT or BLOB column will do. Only difference is BLOB is case sensitive. Do I

Re: [PHP] session expires

2004-01-12 Thread John W. Holmes
Andreas Magnusson wrote: Hi, I wonder if anyone knows of a way to detect if a session has expired (when your session.cookie_lifetime != 0). I've tried to see if the session-vars are unset, but that doesn't seem to be the case, still everythings seems to be lost. My problem is that I have a page

Re: [PHP] limit mysql connections

2004-01-09 Thread John W. Holmes
Diana Castillo wrote: Is there any way to limit the connections so that this error never happens? Warning: mysql_connect(): Too many connections at /home/local/global/php/libraries/dblayer_mysql.php line 14. The connections are already limited, that's why you get this warning. You need to handle

Re: [PHP] Buffalo'ed, stumped, confused...

2004-01-08 Thread John W. Holmes
Robin Kopetzky wrote: I'm trying to read using $_POST, 4 radio buttons named miles. I tried reading the selected value with $_POST['miles[0]'], etc. with no success. I've even tried using foreach to read the selected radio button with no success. It's just $_POST['miles']. :) -- ---John

Re: [PHP] php.ini config on 4.3.4

2004-01-08 Thread John W. Holmes
Turbo wrote: I use windows Xp,apache,php 4.3.4.I can recieve variable from form by $_POST[''] (Short Term).But i can not recieve variable from form by $HTTP_POST_VARS[''] (Long Term).Include other recieve variable ( GET,SESSION,COOKIE). Yes you can. Let me use my crystal ball and guess that

Re: [PHP] Very confusing problem!

2004-01-07 Thread CPT John W. Holmes
From: Aaron Wolski [EMAIL PROTECTED] Fatal error: Call to a member function on a non-object in /services/webpages/a/t/somedomain.com/secure/Store/index.php on line 140 The line of code is this: $paging-query(SELECT * FROM ProductTable); At the top of the page I have this:

Re: [PHP] Mysql Insert/Update Problem

2004-01-07 Thread John W. Holmes
Haseeb Iqbal wrote: here is what i am trying to do.i have a PHP CLI script that will open a dbx file extract records from the dbf file one by one check is the record is already on the linux server (mysql database). if the record is already on the linux server then it will update the mysql

Re: [PHP] Redirecting and get length problems

2004-01-07 Thread John W. Holmes
Chris W wrote: In this application I am working on, if there is a problem with the data, I use a redirect to go back to the form and send the data with an error message in a get. That way the user doesn't need to retype everything. Most errors can be caught with java script before they post

Re: [PHP] eregi filter stopping valid email address, part two

2004-01-06 Thread CPT John W. Holmes
From: Dave G [EMAIL PROTECTED] A while ago on this list I posted a few questions about an eregi filter for email addresses entered into a form. With the help of people on this list, I settled on the following code which has worked fine in the months since I started using it. The code is this:

Re: [PHP] mysql_affected_rows() function

2004-01-06 Thread CPT John W. Holmes
From: Tyler Longren [EMAIL PROTECTED] I don't think mysql_affected_rows() is working like it should for me. In the manual for mysql_affected_rows() it has this (Example 1): /* this should return the correct numbers of deleted records */ mysql_query(DELETE FROM mytable WHERE id 10);

Re: [PHP] mysql_affected_rows() function

2004-01-06 Thread CPT John W. Holmes
From: Tyler Longren [EMAIL PROTECTED] That's not the exact code. The exact code is below. Multiple workers are being selected from a MULTIPLE select form field. I just use a while loop do go through the selected ones to delete them individually. PHP Version: 4.3.4 MySQL Version: 4.0.17

Re: [PHP] if(NANC 0) - always evaluates TRUE...

2004-01-06 Thread CPT John W. Holmes
From: Kelly Hallman [EMAIL PROTECTED] On Tue, 6 Jan 2004, Ivo Pletikosic wrote: $data = 'NANC'; if(is_numeric($data) $data 0) { die('Not OK'); } Interesting problem, one of the first legit oddities I've seen since joining the list. Anyway, in addition to your workaround, casting the

Re: [PHP] Remove quotes from form field

2004-01-05 Thread John W. Holmes
Vernon wrote: I'm having trouble returning the value less the quatation marks from the following: $words=explode( , strtolower($keywords)); I'm having the words from the form field put into an array. Problem is if the field contains something like trackworker AND New York It seperates

Re: [PHP] Retrieve key from $_POST

2004-01-05 Thread John W. Holmes
Robin Kopetzky wrote: Is there any way to retrieve a key value from $_POST when there is more than one $_POST array entry? I'm trying to retrieve the name of an 'INPUT TYPE=image' control with HTML because you can't pass a value back. I need to get the name of the control to use in a 'switch'

Re: [PHP] Retrieve key from $_POST

2004-01-05 Thread John W. Holmes
Vail, Warren wrote: is an INPUT TYPE=img actually an input? I've never actually seen it used that way. If not that may explain difficulty finding it in $_POST array. It is, but you end up with two variables. If you name it img for example, you'll have $_POST['img_x'] and $_POST['img_y']. --

Re: [PHP] urlencoding.

2004-01-01 Thread John W. Holmes
Larry Brown wrote: foreach($_GET as $key=$value) { $send = $send..$key.=.$value; } Just use $_SERVER['QUERY_STRING'] instead of recreating it using this loop (unless the data is coming from $_POST). As for the original question, just throw $_GET into $_SESSION

Re: [PHP] A simple instruction

2004-01-01 Thread John W. Holmes
Dino Costantini wrote: i have a file name with the path ex food/italy/pizza/margherita.php. how can i obtain the name of the file in this case margherita.php i know there is a function, but i don't remember it. basename() -- ---John Holmes... Amazon Wishlist:

Re: [PHP] Mysql management programme for windows?

2003-12-30 Thread John W. Holmes
pehepe php wrote: Do you know any mysql management programme as phpmyadmin but not works on the server. i want to install on my PC. then i connect my database on server from my PC at home. Do you know it? Well, you could just run PHPMyAdmin on your own computer and just have it connect to the

Re: [PHP] What is the Basic function to encode the password upon the authentication..

2003-12-30 Thread John W. Holmes
Scott Fletcher wrote: What is the function exactly for encoding the user's typed password in PHP after the HTTP Authentication pop-up window by Apache was submitted? I tried the base64_encode() but it is not the right function. The authentication header here is .. --snip--

Re: [PHP] MySQL Sub search - Is there such a thing?

2003-12-30 Thread John W. Holmes
Vernon wrote: Some one is asking me to create a sub search on a search that has already been done. For instance, the database has 50,000 records, a user does a search for two keywords which yielded 1700 records. They want to now filter that list with other keywords. The logic is that searching

Re: [PHP] Securing Free Scripts

2003-12-30 Thread John W. Holmes
Ian wrote: If I am putting out a couple free scripts to the public, is there any way I can make sure people dont remove the copyright? No. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP

Re: [PHP] Replication Rollback

2003-12-29 Thread John W. Holmes
karthikeyan.balasubramanian wrote: I posted this question in MySQL mailing list and go no reply. Since PHP is so close to MySQL. I am posting this question here. That's no excuse. Just wait for an answer and don't bother other lists because they're kinda sorta related... The basic problem

Re: [PHP] Removing/unsetting session variables.

2003-12-24 Thread CPT John W. Holmes
From: Alain Williams [EMAIL PROTECTED] I have several variables that I set in a session - to record that a user is logged in. I want to be able to unset them - when they log out. $_SESSION['PERMS_USER'] = 'fred'; Sets the variable quite nicely, I can also change it and the change is

Re: [PHP] Error with Absolute URLs

2003-12-24 Thread CPT John W. Holmes
From: Brad [EMAIL PROTECTED] I keep getting errors on my websites, that contain absolute URLs, e.g. http://www.url.com/blah.html. With most, being in the folder of my website, it's fine, i can just add $_SERVER['DOCUMENT_ROOT'], but there's a script I use to display the network statistics of

Re: [PHP] Headers Problem

2003-12-24 Thread CPT John W. Holmes
From: Beauford [EMAIL PROTECTED] Just a clarification, session_start() is on the first line of restricted.inc and restricted.inc is included on the first line of update-corrections-input.php. All update-corrections-write.php does is write info to a database and includes

Re: [PHP] No ? or ?php in Windows

2003-12-24 Thread CPT John W. Holmes
From: Robin Kopetzky [EMAIL PROTECTED] Good Morning and Merry Christmas to all. I recently installed PHPTriad to a new server and the ? and ?php tags do not work on ANY html page. Does anyone know what I may have missed in configuration? Help... Try using them on a .php page? PHP doesn't

Re: [PHP] warnings

2003-12-23 Thread CPT John W. Holmes
From: Chakravarthy Cuddapah [EMAIL PROTECTED] Can anyone pls tell me how to prevent warnings to be displayed on the screen ? For example, I get this message: Warning: ldap_get_entries(): supplied argument is not a valid ldap result resource in test.php on line 235

Re: [PHP] Simple fwrite question

2003-12-23 Thread CPT John W. Holmes
From: Hartley, Matt [EMAIL PROTECTED] I am trying to have a counter in a file. With what I have below I get in the $counterfile 0 + 01 = 01 01 + 01 = 012 012 + 01 = 01213 [snip] /* Add 1 to the counter */ $counter = ($counter + '01'); You're adding a string. That doesn't make

Re: [PHP] String replacement problems...

2003-12-23 Thread CPT John W. Holmes
From: John Clegg [EMAIL PROTECTED] I am trying to figure out how to get ereg_replace / preg_replace to replace a match only once. The fourth parameter to preg_replace() is an integer limit to how many matches you want to allow. So, if you only want 1 replacement to occur, pass 1. :) ---John

Re: [PHP] Variable variables

2003-12-23 Thread John W. Holmes
Richard Baskett wrote: Ok I am trying to create a variable from the value of a variable plus some extra text tagged on the end of it. So for example: $test = '_over'; $$CONFIG['island'].$test = 'testing'; ${$CONFIG['island'].$test} = 'testing'; echo hawaii = $hawaii_over; Why not just use an

Re: [PHP] Assist with session persistance

2003-12-23 Thread John W. Holmes
Terry Romine wrote: Is there a timeout on sessions other than closing the browser? If so, is there a way to set timeout if one doesn't have server admin access? Session timeout is controlled by the session.gc_maxlifetime setting. It's the number of seconds after which session files will be

Re: [PHP] Re: HTTP headers, IE and downloading

2003-12-23 Thread John W. Holmes
Andreas Magnusson wrote: And through PHP (my script) it is: Accept-Ranges: bytes Cache-Control: private I've had the cache-control header cause problems with IE in the past. It's sent by starting a session, not something you manually send. You can change it using the session functions, though.

Re: [PHP] Headers Problem

2003-12-23 Thread John W. Holmes
Beauford wrote: I'm getting the following error. My question is, where would I use the ob_start() and ob_end_flush() function so I can get rid of this. I have read the PHP manual, but not quite getting it.Or if there is a better way? Don't work around the problem with output buffering; try

Re: [PHP] UNUSUAL PROBLEM WHEN WRITING TO THE SCREEN

2003-12-23 Thread John W. Holmes
Chris W. Parker wrote: Justin French mailto:[EMAIL PROTECTED] on Monday, December 22, 2003 6:12 PM said: Sounds more like the mysql field is a varchar255, rather than maybe a mediumtext, and only the first 255 chars are getting inserted into the DB? But I could be horribly wrong :) In an

Re: [PHP] Parse error in mysql_query()

2003-12-22 Thread John W. Holmes
Tyler Longren wrote: Error: Parse error: parse error, expecting `']'' in /usr/local/apache/htdocs/UP/index.php on line 871 ('$_POST[domainregister_domain$i]', If you're going to be creating array keys like that, break out of the string to do it. (' . $_POST['domainregister_domain' . $i] . ', ...

Re: [PHP] reading excell and writing to text file..

2003-12-22 Thread John W. Holmes
Andrew Kwiczola wrote: I was wondering a good place I could get started on reading excel spreadsheets in PHP ive seen a couple of things out there that will take data from the web and transform it into a .xls file. I was wondering if I could take a XLS file with php and read it, and rip out

Re: [PHP] Parse error in mysql_query()

2003-12-22 Thread John W. Holmes
Tyler Longren wrote: Hi Matt, I put this right above like 871: print brbr$_POST[domainregister_domain$i]brbr; So now that print line is 871. It produces the exact same error as the mysql_query() line. The reason I'm doin it like this is cuz I'm dynamically generating forms, and lots of the

Re: [PHP] evaluating a variable

2003-12-22 Thread John W. Holmes
Carey Baird wrote: Hey, I have stored the name of a function as a variable. I have then passed the variable to another function as follows: //put function name in a variable $contentfunction = newsadmincontent(); Take off the parenthesis... $contentfunction = 'newsadmincontent'; To call the

Re: [PHP] Magic Quotes

2003-12-21 Thread John W. Holmes
[EMAIL PROTECTED] wrote: I've continued plowing my way thru the 2nd edition of PHP and MySQL Web Development by Welling and Thomson. I've made it to chapter 24, where I've just read that for this chapter's project I will need to have switched on magic quotes or use addslashes() and

Re: [PHP] newbie question about header()

2003-12-21 Thread John W. Holmes
Scott Taylor wrote: I am simply trying to redirect users from one page to another. Yet when I use this code I get the following error: *Warning*: Cannot add header information - headers already sent by (output started at

Re: [PHP] Re: HELP!! ISS does not load the ISAPI of PHP

2003-12-19 Thread John W. Holmes
Astron of BrOnX wrote: Hi, here is the steps, 1 . Copy all php_*.dll from extentions dir to c:\windows\system32 2 . Copy phpsapi.dll to c:\windows\system32 3 . Copy php4ts.dll to c:\windows\system32 4 . Copy php.ini to c:\windows\system32 5. go ISAPI Filters and add .php

<    1   2   3   4   5   6   7   8   9   10   >