Re: [PHP] Load Data infile

2004-05-13 Thread John W. Holmes
Juan Pablo Herrera wrote: [snip] I need do load data infile in mysql: $query_string2 = LOAD DATA INFILE '/var/www/xls/test' REPLACE INTO TABLE `test` FIELDS TERMINATED BY ',' ENCLOSED BY '\' ESCAPED BY '\\' LINES TERMINATED BY '\n';$query_db_string2 = mysql_query($query_string2); But not realize

Re: [PHP] md5() with rand() || Strange results, need help....

2004-05-13 Thread John W. Holmes
CF High wrote: If anyone has any clues as to what might be happening; i.e. why the md5'd submitted plain text password does not match the stored md5'd password, please, please let me know. md5() results in a 32 character string. What kind of field are you storing it in? -- ---John Holmes...

Re: [PHP] Normalising Names

2004-05-13 Thread John W. Holmes
Justin French wrote: Can someone point me in the direction of a function/library/tutorial on normalising and formatting user-inputted names so that they have the correct capitalisation etc? I remember a discussion about this on the list a while ago

Re: [PHP] PHP Sessions on Windows

2004-05-12 Thread John W. Holmes
David Mitchell wrote: I first attempted to edit the php.ini so that the session save path was C:\Temp. No matter what I did, the save path always showed up in phpinfo() as /tmp. So I created folder on the root of C: called tmp and everything worked. You were not editing the correct php.ini, then.

Re: [PHP] Reshuffling an array

2004-05-12 Thread John W. Holmes
From: Todd Cary [EMAIL PROTECTED] I do the following: $eventList = array(); $eventList[] = Any; $dbh = db_open($host, $user, $password, $database); if($dbh) { $sthdl = db_get_event_data($dbh); while ($row = mysql_fetch_object($sthdl)) { $eventList[] =

Re: [PHP] PHP Session Handlers

2004-05-12 Thread John W. Holmes
From: Paul Higgins [EMAIL PROTECTED] I just read this tutorial: http://www.phpbuilder.com/columns/ying2602.php3 I understand what each function does and what to do in each function. However, my question is this: If I write my own session handling functions, do I have to explicity call

Re: [PHP] HTTP_RAW_POST_DATA

2004-05-11 Thread John W. Holmes
From: Curt Zirzow [EMAIL PROTECTED] * Thus wrote John W. Holmes ([EMAIL PROTECTED]): Check the value of always_populate_raw_post_data in php.ini on both servers. Thats such a funny name. So is Zirzow ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] working with forms - loosing data on back button

2004-05-11 Thread John W. Holmes
From: Merlin [EMAIL PROTECTED] The problem I have, is that the publishing is split into 3 screens (steps). If the user reaches form 2, types something in and clicks on back and then on forward again he looses the values of the data entered in form 2. The back button is done with:

Re: [PHP] session names

2004-05-11 Thread John W. Holmes
From: Edward Peloke [EMAIL PROTECTED] It is necessary to always name your sessions?or is session_start() sufficient? No. Yes. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php|works

2004-05-11 Thread John W. Holmes
From: John Nichel [EMAIL PROTECTED] Who's going (thinking about) to this? http://www.phparch.com/phpworks/ Where is this Canada they speak of?? ;) I know Marco will put on a good show for this; definitely go if you can. I'll be in school, so I don't plan on going unless I come up with some

Re: [PHP] HTTP_RAW_POST_DATA

2004-05-11 Thread John W. Holmes
From: Chris Boget [EMAIL PROTECTED] On our development server, I have a script that accesses the value of $HTTP_RAW_POST_DATA (upon form submission) and there is data there. However, on our production server, the same code shows no value held in $HTTP_RAW_POST_DATA. Both servers are running

Re: [PHP] Remove cahracters in string

2004-05-10 Thread John W. Holmes
Mike Mapsnac wrote: I search on php.net and couldn't find the function. I need a function that will remove characters in the string until it reached the pattern and remove characters in the string after another pattern. The program reads huge file, and remove unnessary data. So I need to

Re: [PHP] How to find path for PHP script

2004-05-10 Thread John W. Holmes
From: Daniel Clark [EMAIL PROTECTED] Does anyone know a quick way to find the full path on a shared hosting plan to use in an include file? What about: $_SERER['PATH_TRANSLATED'] If you note my message from yesterday, I was having some trouble with this variable on certain

Re: [PHP] Accessing the values of objects

2004-05-10 Thread John W. Holmes
From: John Nichel [EMAIL PROTECTED] Yeah, I get an empty value for the object I'm working with (quite a bit bigger than the example I posted) when I try to retrive the individual value, but the print_r of the object shows that it has value. I thought my syntax was wrong, but I guess I have

Re: [PHP] Clean Open Source PHP extranet app?

2004-05-09 Thread John W. Holmes
david david wrote: I am looking to create a simple extranet type application similar to http://www.basecamphq.com/ written by 37signals. Basically I just need a way for users to share files/projects/messages. Maybe PHProjekt? http://www.phprojekt.com/ I'm sure hotscripts.com will have others.

[PHP] Does this directory detection script work for you?

2004-05-09 Thread John W. Holmes
Hello. I'm relying on the following code so that a script can automatically detect where it's installed and create paths and URLs from the information. This way absolute paths and URLs are always used. I've had a couple people report that the script wasn't finding the paths correctly, though,

Re: [PHP] Showing only part of string

2004-05-07 Thread John W. Holmes
Dave Carrera wrote: $string = This is a test string to titleSHOW ONLY THIS BIT/title of the string; I have tried strpos, str_replace and other string manipulation things but I cant get my head around how to achieve showing the text with the title/title tags of the string. Any help is appreciated

Re: [PHP] Active PHP Sessions

2004-05-07 Thread John W. Holmes
From: Jason Wong [EMAIL PROTECTED] i) There is no way to determine which session files are for your site without actually examining their contents. ii) PHP does not store any site identification info in the session files. iii) Hence you need to store a (hopefully) unique string in all your

Re: [PHP] #209;

2004-05-07 Thread John W. Holmes
From: Curt Zirzow [EMAIL PROTECTED] * Thus wrote Diana Castillo ([EMAIL PROTECTED]): we are recieving Ñ as #209; ¿what type of code is that? Thats an html entity code. Is there a function in php to convert it? echo chr(substr('#209;', 2, 3)); also,

Re: [PHP] form submission logic

2004-05-07 Thread John W. Holmes
From: Aaron Wolski [EMAIL PROTECTED] Within the form/form tags I have my buttons - Publish, Unpublish, New, Edit and Delete. Next I have a table of that displays a list of records from a database with a checkbox to select a particular record. Once a record has been selected they click one

Re: [PHP] page_title

2004-05-07 Thread John W. Holmes
Erik Gjertsen wrote: head title/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head body ?php $page_title = Welcome; Hmmm... you're title doesn't show up? Are you using sessions? Is safe_mode on or off? Is html_title_mode on or off in your php.ini file? -- ---John

Re: [PHP] Re: strip comments from HTML?

2004-05-06 Thread John W. Holmes
Justin French wrote: $text = preg_replace('/!--.*--/su','',$text); Did not work (was too greedy, matched multiple comments) Just for the record, it should be a capital 'U' for ungreedy. Lowercase 'u' is something else. :) -- ---John Holmes... Amazon Wishlist:

Re: [PHP] Returning an object

2004-05-06 Thread John W. Holmes
Aidan Lister wrote: Please don't reply if you really, really don't know what you are talking about. Okay, I won't reply. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List

Re: [PHP] strip comments from HTML?

2004-05-06 Thread John W. Holmes
From: Justin French [EMAIL PROTECTED] This isn't working: $text = preg_replace('/!--(.*)--/','',$text); Can someone advise what characters I need to escape, or whatever to get it going? $text = preg_replace('/!--.*--/su','',$text); The 's' modifier will allow the expression to pick up

Re: [PHP] Way OT MySql Update

2004-05-06 Thread John W. Holmes
From: Dave Carrera [EMAIL PROTECTED] I have a date column and have added a datenew column and want to do a table wide update to make datenew 1 year more that date. UPDATE yourtable SET datenew = dateorig + INTERVAL 1 YEAR; Although... if datenew is always one year more than dateorig, why would

Re: [PHP] Looking for Advanced PHP Developers

2004-05-06 Thread John W. Holmes
From: Ammar Ibrahim [EMAIL PROTECTED] I don't understand what you mean. Please take any further discussion off-list. I can handle off topic posts, but the safety of caucasians in Jordan is too much of a stretch, I think. :) ---John Holmes... -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Re: strip comments from HTML?

2004-05-06 Thread John W. Holmes
From: Rob Ellis [EMAIL PROTECTED] you can make the .* less greedy... $text = preg_replace('/!--.*?--/', '', $text); You still need an 's' modifier if you want to match multi-line comments. The dot character won't match newlines unless you use an 's' modifier. ---John Holmes... -- PHP

Re: [PHP] Sending Mail with PHP

2004-05-06 Thread John W. Holmes
From: Justin @ Dreaming in TO [EMAIL PROTECTED] If you go to http://www.functionjunkie.org/contactform/contactform.php and fill out the form, it sends the email ok, but its supposed to redirect to a preset page, which it does. However, the page it redirects to is blank, except for the

Re: [PHP] problem with a while loop

2004-05-06 Thread John W. Holmes
From: Jessica Mays [EMAIL PROTECTED] I am new to php (and mySQL) and I am working on a php page that links up to a mySQL database. My current code works up to a point, BUT what happens is that I try to have a while loop and check a variable with an inner while loop but it only catches after

Re: [PHP] problem with a while loop

2004-05-06 Thread John W. Holmes
From: John Nichel [EMAIL PROTECTED] $i =0; while ($i $num_results) { $row = mysql_fetch_array($result); $producer = $row[PRODUCE]; snip Try changing the above from while ($i $num_results) { $row = mysql_fetch_array($result); To

Re: [PHP] problem with a while loop

2004-05-06 Thread John W. Holmes
From: John Nichel [EMAIL PROTECTED] Same thing, really. It's a little more efficient than keeping a count, but not the cause of any of the problems. :) ---John Holmes... Chris! John is picking on me! I thought we agreed that Chris is the one that cannot be trusted?? ---John

Re: [PHP] textarea and quotes

2004-05-05 Thread John W. Holmes
From: Vincent DUPONT [EMAIL PROTECTED] I can't remember the name of the function to remove the escaping of quotes when submitting a textarea example : tr class=content_title becomes : tr class=\content_title\ stripslashes and stripcslashes seem not to work... stripslashes() works, just

Re: [PHP] form validation wih html input FILE

2004-05-05 Thread John W. Holmes
From: Vincent DUPONT [EMAIL PROTECTED] I'd like your opinion on the best way to do a form validation when the form contains a file upload object (input type=file) When the form does not validate, I try to re-show all values entered by the user.But, as far as I know, browsers do not allow

Re: [PHP] paging methodology

2004-05-05 Thread John W. Holmes
- Original Message - From: Paul Chvostek [EMAIL PROTECTED] On Tue, May 04, 2004 at 02:37:50PM -0700, Chris W. Parker wrote: well that just meant that after the initial count of records is found it will be retrieved from the querystring instead of through a select statement

Re: [PHP] HTTP_REFERER ... ?

2004-05-05 Thread John W. Holmes
From: Pablo Gosse [EMAIL PROTECTED] The following is quoted from a previous post by Chris Shifflet: Referer is just as easy to spoof as the form data you're expecting. wait, wait, wait... we CAN'T trust form data? Crap... ---John Holmes... -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] paging methodology

2004-05-05 Thread John W. Holmes
From: Chris W. Parker [EMAIL PROTECTED] do you know if that's any faster than doing a SELECT COUNT(*) FROM table WHERE ... ? I did a couple (unscientific) tests and there doesn't seem to be much of a difference. I'd use the COUNT(*) method just because it's more portable, though. ---John

Re: [PHP] paging methodology

2004-05-05 Thread John W. Holmes
From: Chris W. Parker [EMAIL PROTECTED] on a related note... how does BENCHMARK() work? i don't understand their explanation. the reason i ask is because i'd like to test our the efficiency of what you are suggesting compared to what i am currently doing. SELECT BENCHMARK(500, 'SELECT *

Re: [PHP] It opens the file instead downloading

2004-05-05 Thread John W. Holmes
From: Phpu [EMAIL PROTECTED] header( Content-type: application/force-download ); if ((is_integer (strpos($user_agent, msie))) (is_integer (strpos($user_agent, win { header( Content-Disposition: filename=.$filename); } else { header( Content-Disposition: attachment;

Re: [PHP] String Question

2004-05-02 Thread John W. Holmes
Dave Carrera wrote: How would I show 100 chars after finding the first instance of a searched word in a string. $start = strpos('hello',$str); $hundredchars = substr($str,$start,100); -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for

Re: [PHP] sessions failing to persist

2004-05-02 Thread John W. Holmes
Michael R. Wayne wrote: form method=post action=xxx.php input type=text maxlength=7 size=7 name=field value=?echo $_POST['field']? input type=submit value=Submit /form Try adding in a hidden element input type=hidden name=PHPSESSID value=?=session_id();? You're relying on PHP

Re: [PHP] Select from 24 tables

2004-05-01 Thread John W. Holmes
Dave Carrera wrote: Hi List, How do I select data from 24 table in my database. Each one is identical in structure layout being Id,name,list The first thing you need to do is reorganize your database schema and put all of this into one table. You can see what a pain it is having 24 similar

Re: [PHP] string replace in files

2004-04-30 Thread John W. Holmes
From: Steve Buehler [EMAIL PROTECTED] I am trying to write a script that will replace a string in a file. Actually, about 3000 files. And I am stuck. I can get the list of files, but then I pretty much become stuck. I wanted to try str_ireplace (not sure if that is what I should use or

Re: [PHP] string replace in files

2004-04-30 Thread John W. Holmes
From: Steve Buehler [EMAIL PROTECTED] Thank you so much for this. I was thinking of it all wrong when doing this. I have a couple of other questions to go along with this. 1. How would I change this to do a recursive search for the .php files instead of just the *.php or */*.php

Re: [PHP] dollar sign ASCII code

2004-04-30 Thread John W. Holmes
David T-G wrote: I have a comment field where I allow users to enter the picture comments and then I later display them. I thought I was converting everything as needed (I inherited the code), but using a dollar sign breaks things (I'm sure PHP is trying to interpret it). The proper fix, I know,

Re: [PHP] Re: $_SERVER['SERVER_NAME'] in read-only.

2004-04-29 Thread John W. Holmes
From: Red Wingate [EMAIL PROTECTED] AFAIK the content of the superglobal variables cannot be changed ( even though i haven't found this in the docs i can remeber got beaten by PHP for doing so :-) ) They can be changed and you can even add to them. $_SERVER['foo'] = 'bar'; is valid and now

Re: [PHP] how to verify PHP has been installed with ldap?

2004-04-29 Thread John W. Holmes
From: Bing Du [EMAIL PROTECTED] So my question is how to verify PHP has been installed with ldap support? ?php phpinfo(); ? And see if there is an ldap section. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] re-keying an array

2004-04-29 Thread John W. Holmes
Justin French wrote: been RTFMing for about 10 minutes, and can't find the function to re-key an array. In other words, I want an array of items to remain in their current order, but have the keys renumbered counting from zero. yes, I know it can be done with a foreach, but I was hoping for

Re: [PHP] re-keying an array

2004-04-29 Thread John W. Holmes
Justin French wrote: On 30/04/2004, at 12:06 PM, John W. Holmes wrote: Although this begs the question of why you'd need to rekey an array... It seemed the easiest way to get the first two elements off the beginning of the array after shuffle()ing it, or so I thought -- but I'm more than happy

Re: [PHP] mouse over problem on php

2004-04-24 Thread John W. Holmes
gowthaman ramasamy wrote: hi list , Hi. This has nothing to do with PHP. In the web page, i display different bars (actually tables with single column, with cellpadding=1 and color=xxx) based on the information parsed from MySQL database. I, now want to display more information by mouse over when

Re: [PHP] A security thing or just sessions working?

2004-04-24 Thread John W. Holmes
[EMAIL PROTECTED] wrote: Hi I had a problem with what my host called a spate of insecure PHP applications being used to upload proxying applications which I think has been solved, however I've just spotted this when trying to validate my HTML: form action=abc.php4 method=postinput type=hidden

Re: [PHP] calling php function

2004-04-23 Thread John W. Holmes
From: T UmaShankari [EMAIL PROTECTED] Is it possible to call php function in the onclick event ? No. Please do research on the difference between server side and client side code. Report back to us when finished. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] OK SQL experts...

2004-04-23 Thread John W. Holmes
From: Brian Dunning [EMAIL PROTECTED] I STFW and RTFM and I still can't figure out why this returns a 1064 parse error: SELECT * FROM 'my_table' WHERE ('field_1' LIKE '%$keyword%' OR 'field_2' LIKE '%$keyword%' OR 'field_3' LIKE '%$keyword%') AND 'status' = 'active'; Use backticks

Re: [PHP] OK SQL experts...

2004-04-23 Thread John W. Holmes
From: Brian Dunning [EMAIL PROTECTED] My error. Here is the actual return: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''my_table' WHERE ('field_1' LIKE '%custom%' OR 'field_ I am searching for the

Re: [PHP] Creating an assoc array from two arrays

2004-04-23 Thread John W. Holmes
From: Alex Hogan [EMAIL PROTECTED] I am looking through the manual and I think I may be blind or something, but how can I create an associative array from two arrays. What I have is two arrays that look like this; Array1([0]=Spider, [1]=Monkey, [2]=Cards) Array2([0]=26.3, [1]=0.65,

Re: [PHP] PHP vs PERL?

2004-04-22 Thread John W. Holmes
From: [EMAIL PROTECTED] What would be the technical arguments of PHP vs. PERL? Depends if you catholic or not. Use what you know. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] install IIS ISAPI

2004-04-22 Thread John W. Holmes
From: Vincent DUPONT [EMAIL PROTECTED] I use to install PHP under IIS as a ISAPI module. So I add a ISAPI filter and define a new App mapping in 'configure' When looking at the documentation (see http://be.php.net/manual/en/install.iis.php, Windows NT/2000/XP and IIS 4 or newer) I can read

Re: [PHP] searching trough doc and pdf files

2004-04-22 Thread John W. Holmes
From: Arthur Radulescu [EMAIL PROTECTED] I need to search on the disk trough doc and pdf files. What would you suggest me to use for reading and indexing those kind of files? I've heard of some doc-html/text and pdf-html/text converters. You could convert them to that format (since you're just

Re: [PHP] Adding includes to files

2004-04-22 Thread John W. Holmes
From: Robert Sossomon [EMAIL PROTECTED] I need to add PHP calls to include a file to each page as it is generated, the only thing is I can't get the includes to come through correctly: ! Code $display_block .= ?php include(\nav/top_nav.html\); ?; $display_block .= ?php

Re: [PHP] Mathematical expression calculation function?

2004-04-22 Thread John W. Holmes
From: Enfors Christer [EMAIL PROTECTED] Hi. I need a function that takes a mathematical expression in the form of a string, and calculates the result. PHP itself doesn't seem to provide one. I need something which can handle strings like: 10*73.2+3-(4*358.2874)/352 $str =

Re: [PHP] A to Z incremental

2004-04-22 Thread John W. Holmes
From: Paul [EMAIL PROTECTED] ?php for($i='A';$i='Z';$i++){ echo $i.' | '; } ? The output is: A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | AA | AB | AC | ... YX | YY | YZ | where is should display only letters from A to Z.

Re: [PHP] regular expressions php/perl/actionscript

2004-04-22 Thread John W. Holmes
From: Gabino Travassos [EMAIL PROTECTED] I'm wondering if Regular Expressions are the same in Perl and PHP (and possibly Actionscript)? They look the same and smell the same, but if I see a book in a store for Perl Regular Expressions that's $10 cheaper than the PHP one (is there one?), then

Re: [PHP] What's wrong with this IF statement?

2004-04-22 Thread John W. Holmes
From: Robert Sossomon [EMAIL PROTECTED] if ($cat_id != 53 || $cat_id != 54 || $cat_id != 55 || $cat_id != 117 || $cat_id != 118 || $cat_id != 74) Okay, if $cat_id is 53, this will work out to: if(FALSE || TRUE || TRUE || TRUE || TRUE || TRUE) which results in TRUE overall. You want

Re: [PHP] Conditional Functions

2004-04-22 Thread John W. Holmes
From: Anguz [EMAIL PROTECTED] So I thought that maybe I could only define the needed ones in each case, although there's more in the include file. Example: if ($in_array('Hello', $functionArray)) { function Hello() { echo 'Hello'; } } I understand that the whole php file will be

Re: [PHP] Escape problems...why?

2004-04-22 Thread John W. Holmes
Ryan A wrote: For example this insert statement: insert into test_ing values('a','a','a','a') becomes: insert into test_ing values (\'a\',\'a\',\'a\',\'a\') I immediatly suspected magic_quotes but checked (via phpinfo) and see that magic_quotes are off, as a safety precaution I even have

Re: [PHP] Re: lt;buttongt; tag

2004-04-20 Thread John W. Holmes
From: Richard Lewis [EMAIL PROTECTED] In all fairness to IE, it WILL send the value of each button - but PHP cannot distinguish between them all because you have given them all the same name! :) RL Does input type='submit'... allow this sort of functionality? If it has a unique name,

Re: [PHP] Whats faster? text files or mysql?

2004-04-20 Thread John W. Holmes
From: Andrew Fenn [EMAIL PROTECTED] I have two text files with two rows of data on each line sperated by a tab for about 20 lines in each file. Would it be faster accessing this data by putting it in a mysql table? Depends what you want to do with the data. If you're searching through for

Re: [PHP] Program that'll parse HTML form with results and send HTML email?

2004-04-20 Thread John W. Holmes
From: Tom Rogers [EMAIL PROTECTED] JWH Does anyone know of a script that'll receive the results of a form, JWH parse the original form and substitute the user supplied data in for the JWH form elements and then send an HTML email of the form? Here is a class I use with my template system but

Re: Re[2]: [PHP] Program that'll parse HTML form with results and send HTML email?

2004-04-20 Thread John W. Holmes
From: Tom Rogers [EMAIL PROTECTED] It does not need to know the form elements, only the reserved words it uses and you take those out and pass them directly to the class if needed. It takes the variable name from the POST array and uses it with the value. No need to know what the input fields

Re: [PHP] PHP and Perl Integration for E-Cart

2004-04-20 Thread John W. Holmes
From: Pushpinder Singh [EMAIL PROTECTED] We are trying to incorporate a CGI Perl based E-Cart module into our PHP driven site. This is because the E-Cart supplied by our merchant uses CGI. I want to check with all of you if its possible to integrate PHP with Perl. If you're talking

Re: [PHP] PHP and Perl Integration for E-Cart

2004-04-20 Thread John W. Holmes
From: Pushpinder Singh [EMAIL PROTECTED] This is the situation at hand ... we have a PHP Session based Login module. The user is required to login to get to the Shopping cart (which is provided for by the Merchant) This shopping cart is CGI / Perl based. So my question would be to integrate

Re: [PHP] ADOdb SQL Updates

2004-04-20 Thread John W. Holmes
From: Gabe [EMAIL PROTECTED] I double checked the names. Everything looks okay. Another ideas? (access): UPDATE tblFAQ_Book SET tblFAQ_Book.fldTitle = one more test WHERE (tblFAQ_Book.autoBookID = 1) Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access Driver] Too few

Re: [PHP] addslashes vs. mysql_real_escape_string

2004-04-19 Thread John W. Holmes
From: Hardik Doshi [EMAIL PROTECTED] Currently i am using PEAR DB abstration layer. Which function should i use to escape the ' character? There are couple of functions in the PEAR DB documentation so i don't know which one should i use. I don't use PEAR DB, but it looks like quoteSmart() is

Re: [PHP] How to disable browser's back- and refresh-Button

2004-04-19 Thread John W. Holmes
From: Marco Schuler [EMAIL PROTECTED] I want to prevent the user to use the browser's back-/refresh-button in my multipage registration form (as well as in other forms). How can I do this? You don't. I decide when I want to go back and/or refresh, not you. You need to program your application

Re: [PHP] PHP and HTTP requests

2004-04-19 Thread John W. Holmes
From: Aleksei Ivanov [EMAIL PROTECTED] I realize it's a stupid question but I need a simple solution.. I'd like to get contence from script-generated webpage (I send a regquest via get or post method to a page and it generates a response page - how do get that page as a string? Get the

[PHP] Program that'll parse HTML form with results and send HTML email?

2004-04-19 Thread John W. Holmes
Does anyone know of a script that'll receive the results of a form, parse the original form and substitute the user supplied data in for the form elements and then send an HTML email of the form? For a static form, this obviously isn't too hard, but it'd be ideal if the program was dynamic

Re: [PHP] Program that'll parse HTML form with results and send HTML email?

2004-04-19 Thread John W. Holmes
Justin French wrote: But I guess your motivation behind starting with the HTML is so that Joe Average can build a form in a WYSIWYG editor without caring about anything else, right? Yeah, that's the key. It'd be easy if I could just build everything from an XML file. I'm thinking that if I

Re: [PHP] addslashes vs. mysql_real_escape_string

2004-04-18 Thread John W. Holmes
Richard Davey wrote: Does mysql_real_escape_string (or mysql_escape_string) do anything extra that addslashes() doesn't? In the examples in the manual it is just used to escape the ' character, but that is exactly what addslashes() will do anyway. real_escape_string() takes the current character

Re: [PHP] why doesn't this work ?

2004-04-17 Thread John W. Holmes
Pooya Eslami wrote: If I put the following script in a .php file it would work but if I put it in an .html file doesn't work, why? script tag is only used in .html file. You web server determines whether or not to look for PHP in a file based upon its extension. You must set up your web server to

Re: [PHP] why doesn't this work ?

2004-04-17 Thread John W. Holmes
Daniel Clark wrote: I should have also said: Because it's missing the ?php and ? tags, the web server isn't going to run the code, but pass it back to the client browser. You are right, but not for the reason you think. script language=php is a valid way of starting PHP mode.

Re: [PHP] why doesn't this work ?

2004-04-17 Thread John W. Holmes
Pooya Eslami wrote: I took out the scrip tags and put in ?php in the beginning and ? at the end, but it returns this: $file ; } } closedir($handle); } echo ; ? Any ideas how to fix this? Use a .php extension on your file. Or you can ask your hosting company to have .html files processed as

Re: [PHP] Unwanted e-mails

2004-04-16 Thread John W. Holmes
From: David A. Stevens [EMAIL PROTECTED] I have somehow, for reasons unknown to me, gotten onto some e-mail list that I don't want to or need to be on. Somebody please, at all the above addresses, do everything possible to get me off that list(s). For reasons unknown to me, you obviously

Re: AW: [PHP] smarty

2004-04-16 Thread John W. Holmes
Either we'd talk about the (dis)advantages of TE's in general or compare different TE's, i.e. smarty vs. pattemplate vs. xslt. Wait a minute... are we talking about Smarty as in smarty.php.net? Because I was thinking of something else this entire time and this completely changes the

Re: [PHP] Unwanted e-mails

2004-04-16 Thread John W. Holmes
From: Lester Caine [EMAIL PROTECTED] Does not Fing work!! The unsubscribe process requires you to reply to the eMail that is sent. THAT email is bounced for many people who are trying to unsubscribe. SOMEBODY NEEDS TO GET THEIR ACT TOGETHER AND FIX THE SYSTEM SO THAT WE C*A*N*

Re: [PHP] sending mail with php on a linux box

2004-04-16 Thread John W. Holmes
From: Chris W [EMAIL PROTECTED] I'm not sure if this is a PHP, Apache, Network, or sendmail configuration but hopefully someone here will know. When I send email with PHP the from header is [EMAIL PROTECTED] I can't run a real mail server on my machine, so I want to change that email

Re: [PHP] Unwanted e-mails

2004-04-16 Thread John W. Holmes
From: Lester Caine [EMAIL PROTECTED] I am hitting reply, and EVERY php list sends a message back bouncing the unsubscribe message ( along with every post I have tried to make since XMAS - which is why I am having to use the newsgroup interface ) This only happens on list.php.net, I have no

Re: [PHP] PHP editor

2004-04-15 Thread John W. Holmes
From: Chris Boget [EMAIL PROTECTED] function cleanFinalOutput($html){ $return = eregi_replace(\n, , $html); $return = eregi_replace(\r, , $return); return eregi_replace(\t, , $return); } Not to be too pedantic, but you could probably reduce the above to a single line function:

Re: [PHP] alternating row color--newbie help

2004-04-15 Thread John W. Holmes
Montagna, Dan wrote: [snip] I'd appreciate any hints on this... See FAQ #38 here: http://forums.devshed.com/t25412/s.html -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing

Re: [PHP] Formatting phone numbers?

2004-04-15 Thread John W. Holmes
Rob Ellis wrote: On Thu, Apr 15, 2004 at 04:31:09PM -0500, BOOT wrote: I'm looking for a way to take a 7 digit number and put it into xxx- format. So basically the logic is to count 3 characters into $number and insert a - there. substr_replace($string, '-', 3, 0); Won't that replace the

Re: [PHP] binary data in php

2004-04-15 Thread John W. Holmes
Anthony Ritter wrote: Greets, Register globals are to off - however the files will not upload. At wit's end - help please! Thank all in advance. TR ? if ($submit) { // connect to the database // (you may have to adjust the hostname,username or password)

Re: [PHP] binary data in php

2004-04-15 Thread John W. Holmes
Anthony Ritter wrote: I inserted the mysql_query() below but it still doesn't upload the file nor does it throw an error. [snip] // Create the SQL query. $sql = INSERT INTO binary_data SET filename = '$uploadname', filetype = '$uploadtype', description = '$uploaddesc', bin_data

Re: [PHP] preg_match

2004-04-14 Thread John W. Holmes
From: Sorry Confidential [EMAIL PROTECTED] I'm trying to parse a Postfix queue file to extract a few informations. The Postfix queue file is a binary file. Here is an extract of the file, not a line, just an extract: N^WFrom: [EMAIL PROTECTED]N^[To: [EMAIL PROTECTED]N#Subject: Test 14

Re: [PHP] function for backing up mysql

2004-04-14 Thread John W. Holmes
From: Victor Spng Arthursson [EMAIL PROTECTED] Wonder if anyone knows if there somewhere out there are any good functions that streams out data from mysql as a sql-file, like phpmyadmin does? The best would be one which I told which database and which tables to dump, and which directly

Re: [PHP] Re: smarty

2004-04-14 Thread John W. Holmes
From: pete M [EMAIL PROTECTED] Think everyone is missing the point.. the whole point of smarty is to take the presentation code away from the logic Correct. The point your missing is that PHP can be on both sides of the equation. You can have PHP in your templates that only controls your

Re: Re[2]: [PHP] smarty

2004-04-14 Thread John W. Holmes
From: Richard Davey [EMAIL PROTECTED] Because you're injecting variables directly into your HTML, which some of the time might be ok - but what if the $row_array doesn't contain name ? You'll raise an Error Warning without first passing it through some kind of test (or function). Only if you

Re: [PHP] unexpected $ in ... WTF?

2004-04-14 Thread John W. Holmes
From: Brian V Bonini [EMAIL PROTECTED] Parse error: parse error, unexpected $ in /foo/bar/foo.php4 on line 150 146: /p 147: ?php 148: } 149: include foobar.inc.php4; 150: ? You missed a closing bracket or quote somewhere. ---John Holmes... -- PHP General Mailing List

Re: [PHP] requests per s with php and mysql queries

2004-04-12 Thread John W. Holmes
From: Merlin [EMAIL PROTECTED] I am trying to stress my LAMP app with MS stress tool for web applications. It simulates about 100 threads. It looks like the LAMP app is only able to handel about 6 requests per second :-( Is this normal für php with database queries? Every application is

Re: [PHP] After calling a Function the Script aborts without any error :-\

2004-04-12 Thread John W. Holmes
From: Ben [EMAIL PROTECTED] i got a big problem. I have a script which includes some other script i tried include, require and require once. The problem is, if i do a function call to a function in one of these included files, the script aborts but without any error. The strange thing is,

Re: [PHP] Preg_match_all problem

2004-04-12 Thread John W. Holmes
From: Jeff McKeon [EMAIL PROTECTED] Can anyone see why I'm getting this error message: Warning: No ending delimiter '^' found in C:\Inetpub\wwwMIS_DEV\import_mvs.inc.php on line 126 From this line: if(preg_match_all(^([00])?.*$,$called,$found)) Because you do not have an ending

Re: [PHP] Preg_match_all problem

2004-04-12 Thread John W. Holmes
From: John W. Holmes [EMAIL PROTECTED] From: Jeff McKeon [EMAIL PROTECTED] Can anyone see why I'm getting this error message: Warning: No ending delimiter '^' found in C:\Inetpub\wwwMIS_DEV\import_mvs.inc.php on line 126 From this line: if(preg_match_all(^([00])?.*$,$called

Re: [PHP] creating log files out of a delete statement

2004-04-11 Thread John W. Holmes
Andy B wrote: i have a section of a website that deletes records from a mysql table... right now all the query is is a delete statement but i need to make a log file in this format: current time::username who executed delete:: deleted(name of record)::delete completed or delete failed depending

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