Re: [PHP] Another preg question

2004-02-15 Thread Al
Thanks for the feedback. Here was my problem; I misunderstood how the "+" worked. It only applies to the last "\n", not both "n\n". Hans Juergen Von Lengerke wrote: From: Al <[EMAIL PROTECTED]> $text= preg_replace("/\n\n+/", "\n\n&qu

[PHP] Re: Apache+modssl+php problem??? possible IE bug?

2004-02-13 Thread Al
Did you try print_r($_SESSION); to see if anything is getting into the buffer? Chris Wilson wrote: When in IE, submitting any form on our https page, the post variables intermittantly don't come through. The get variables come through fine. Just not the $_POST variables. I have tried everyth

[PHP] Finding orphan functions

2004-02-18 Thread Al
Anyone have a suggestion for how I can determine if I have any orphan functions in a function file? I have a include file with about 30 functions that I have been adding to for several months. No doubt some have been superseded, etc. and are now obsolete. I could laboriously trace every path

[PHP] Can I get varaibles from an include file without exectuting it?

2004-04-07 Thread Al
I have a script that is run with a cronjob and would like to fetch some variables from it, using another file, without the script executing. I could resort to putting the variables in a third file, or reading the script as a text file and reconstructing the variables. But, I was hoping there is

[PHP] Re: blank function parameters

2004-11-03 Thread Al
Giles Roadnight wrote: Hello If I defined a function with 4 parameters but only pass 3 I get an error. Is there anyway around this? I want to be able to set the missing parameter to a default value if it is not passed which works ok but How do I get rid of the error message? Thanks Giles Ro

Re: [PHP] Error logging problem

2004-11-10 Thread Al
Greg Donald wrote: On Wed, 10 Nov 2004 10:49:29 -0500, Al <[EMAIL PROTECTED]> wrote: ini_set("error_log", "/AutoSch/error.log"); Looks like this might be a path relative to your domain or your vhost definition? I'd go with a full system path if that's th

[PHP] Multiple session_start()s / Is it a problem??

2004-11-10 Thread Al
ice" error. Of course I can simply use "@session_start()" to negate the Notice; but, I want to be certain this is good practice. Al. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Error logging problem

2004-11-10 Thread Al
My site is on a virtual host and I'd like to log errors to a file while I'm debugging. Can't get it to work. Here is the code at the top of my script: ini_set("display_errors", "on"); //also tried "Off" ini_set("error_log", "/AutoSch/error.log"); $ini_array= ini_get_all(); error_repor

[PHP] Is there a shorthand way to...?

2004-11-22 Thread Al
When handling $_POST[] values that may or may not be assigned, I am forever using: if((isset($_POST['courses_list']) AND $_POST['courses_list']== 'Used')) Is there a shorthand way of doing this without causing notice errors? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscr

[PHP] Coding Question

2004-12-05 Thread Al
I've searched the PHP manual and can't find an answer for this question I'd like to use the "OR DIE" construct; but instead of "DIE" I'd like to use "RETURN FOO". I haven't found a way to do it. $string= file_get_contents($filename) OR die("Could not read file"); $db_link= mysql_connect($

Re: [PHP] Coding Question

2004-12-06 Thread Al
Jason Wong wrote: On Monday 06 December 2004 14:19, Rory Browne wrote: If I'm not mistaken Al wanted to return something if the thing failed, without having to put it inside an if_block. I'm watching this with curiosity, because return is a language construct, and not a function, or any

Re: [PHP] Coding Question

2004-12-06 Thread Al
Richard Lynch wrote: Al wrote: Essentially, I'm creating warning reports for my users, not code errors. > The users can then email the warnings to our webmaster. Jason Wong wrote: On Monday 06 December 2004 14:19, Rory Browne wrote: $result = mysql_db_query($db,"

[PHP] $_FILE[user][error] = 6 ?

2004-12-28 Thread Al
What is a $_FILE[user][error]=> 6 I can't find Error level 6 in the manual or on Google. Here is my files array: [userfile] => Array ( [name] => Readme.txt [type] => [tmp_name] => [error] => 6 [size] => 0 ) Doesn't make sen

Re: [PHP] $_FILE[user][error] = 6 ?

2004-12-28 Thread Al
Doesn't work on any file type. I've checked the usual suspects. e.g. URL is my php file. Jason Wong wrote: On Wednesday 29 December 2004 01:40, Al wrote: What is a $_FILE[user][error]=> 6 I can't find Error level 6 in the manual or on Google. Here is my files array: [

Re: [PHP] $_FILE[user][error] = 6 ?

2004-12-28 Thread Al
passed at all, double check if you have any typos.. type is blank which should at least show the mime type.. - Original Message - From: "Al" <[EMAIL PROTECTED]> To: Sent: Tuesday, December 28, 2004 2:51 PM Subject: Re: [PHP] $_FILE[user][error] = 6 ? Doesn't work

Re: [PHP] $_FILE[user][error] = 6 ?

2004-12-30 Thread Al
You nailed it Curt. Virtual Host "Powweb" removed the system default tmp directory without telling anyone. All file uploading services were broken. I fixed the problem in php.ini Thanks everyone. Curt Zirzow wrote: * Thus wrote Al: What is a $_FILE[user][error]=> 6 I can't

[PHP] Re: Persistent PHP web application?

2005-01-14 Thread Al
George Schlossnagle addresses exactly your requirement in his book "Advanced PHP Programming". Josh Whiting wrote: Dear list, My web application (an online classifieds server) requires a set of fairly large global arrays which contain vital information that most all the page scripts rely upon for

[PHP] question about a cron job

2005-01-17 Thread Al
I've got a question about the following cronjob. #At 3:01 our time, run backups 1 0 * * * /usr/local/bin/php /www/r/rester/htdocs/auto_backup/back_em_up.php >/www/r/rester/htdocs/auto_backup/cron.log 2>&1 #At 3:02 clean up sessions folder 2 0 * * * (find /www/r/rester/htdocs/sessions/ -name 'sess_

Re: [PHP] question about a cron job

2005-01-17 Thread Al
Jay Blanchard wrote: [snip] I've got a question about the following cronjob. #At 3:01 our time, run backups 1 0 * * * /usr/local/bin/php /www/r/rester/htdocs/auto_backup/back_em_up.php /www/r/rester/htdocs/auto_backup/cron.log 2>&1 #At 3:02 clean up sessions folder 2 0 * * * (find /www/r/rester/ht

Re: [PHP] question about a cron job

2005-01-17 Thread Al
Erwin Kerk wrote: Al wrote: I've got a question about the following cronjob. #At 3:01 our time, run backups 1 0 * * * /usr/local/bin/php /www/r/rester/htdocs/auto_backup/back_em_up.php >/www/r/rester/htdocs/auto_backup/cron.log 2>&1 #At 3:02 clean up sessions folder 2 0 * *

Re: [PHP] question about a cron job

2005-01-17 Thread Al
Michael Sims wrote: Erwin Kerk wrote: The CRON daemon only refreshes it's job list after a job in the current list is completed. Therefore, the CRON daemon won't notice the "every-minute" job until 3.01 pm. I'm not sure I understand what you're saying above. Can you provide a pointer to document

[PHP] Re: question about a cron job

2005-01-17 Thread Al
Al wrote: I've got a question about the following cronjob. #At 3:01 our time, run backups 1 0 * * * /usr/local/bin/php /www/r/rester/htdocs/auto_backup/back_em_up.php >/www/r/rester/htdocs/auto_backup/cron.log 2>&1 #At 3:02 clean up sessions folder 2 0 * * * (find /www/r/rester/

[PHP] Need best way to determine if cronjob or external browser called my script

2005-01-19 Thread Al
I'm working on a script that can be initiated by a cronjob or from a browser. I want the script to act differently depending on which one called it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Multiple jobs in crontab

2005-01-28 Thread Al
I'm trying to run 3 jobs in a crontab and only one job will run. I can rearrange the order and only the first one runs. Here is my code, the command line may show wrapped, but it is not: #phpList PQ This job replaces its log and error files. Runs at 3:03am, 3:18, etc. 3,18,33,48 0 * * * /usr/lo

Re: [PHP] Multiple jobs in crontab

2005-01-28 Thread Al
Richard Lynch wrote: Al wrote: I'm trying to run 3 jobs in a crontab and only one job will run. I can rearrange the order and only the first one runs. Try setting the MAILTO and check the output -- Perhaps that will tell you something useful... Super suggestion. It clearly showed I

[PHP] fopen, fsockopen on my virtual host

2005-01-31 Thread Al
I've got a script that fetches a stream from a file on our virtual host. Its been working fine; but, yesterday they changed something and it no longer works. $fp= fsockopen("www.oursite.org", 80, $errno, $errstr, 30); I can use any remote site and fscockopen works fine. Anyone have a suggestion a

Re: [PHP] fopen, fsockopen on my virtual host

2005-01-31 Thread Al
Richard Lynch wrote: Al wrote: I've got a script that fetches a stream from a file on our virtual host. Its been working fine; but, yesterday they changed something and it no longer works. Can you define "no longer works" a bit more clearly... Error messages? Just times out? What?

Re: [PHP] fopen, fsockopen on my virtual host

2005-01-31 Thread Al
Richard Lynch wrote: Al wrote: I've got a script that fetches a stream from a file on our virtual host. Its been working fine; but, yesterday they changed something and it no longer works. Can you define "no longer works" a bit more clearly... Error messages? Just times out? What?

Re: [PHP] fopen, fsockopen on my virtual host

2005-02-01 Thread Al
Richard Lynch wrote: Al wrote: Richard Lynch wrote: Al wrote: I've got a script that fetches a stream from a file on our virtual host. Its been working fine; but, yesterday they changed something and it no longer works. Can you define "no longer works" a bit more clearly... Error

[PHP] stream_set_timeout() mystery

2005-02-01 Thread Al
Anyone see why stream_set_timeout() / socket_get_status() don't work? $fp= fopen($URL_full, 'r'); stream_set_timeout($fp, 0, 1); tried other values for microseconds $procque_str= fread($fp, 8096); print_r(socket_get_status($fp)) ; Print_r is: Array ( [wrapper_data] => Array

Re: [PHP] stream_set_timeout() mystery

2005-02-01 Thread Al
nch wrote: Al wrote: Anyone see why stream_set_timeout() / socket_get_status() don't work? Perhaps you should explain what you think isn't working... Cuz it sure looks good to me... $fp= fopen($URL_full, 'r'); stream_set_timeout($fp, 0, 1); tried other values for microseconds

Re: [PHP] stream_set_timeout() mystery

2005-02-01 Thread Al
x27;s fine and I have all errors on and nothing unusual shows up. php version is 4.3.10 Richard Lynch wrote: Al wrote: Hi Richard, thanks for the help. Note I have the timeout set for 1 microsec, have tried several values, eg, 100ms, 1 sec, etc. I even used a 4mb file and it did no

[PHP] Re: Regex help

2005-06-06 Thread Al
RaTT wrote: Hi Guys, I am currently creating a once off text parser for a rather large document that i need to strip out bits of information on certain lines. The line looks something like : "Adress line here, postcode, country Tel: +27 112233665 Fax: 221145221 Website: http://www.urlhere.co

[PHP] Re: resetting arrays

2005-06-21 Thread Al
I. Gray wrote: Hi. I am sure this is easy, but I can't get this work. Is there not a php function that can do this? I have an array- for example... [1] => Yellow [2] => Green [3] => Purple [4] => Blue [5] => Red [6] => Orange [7] => Cyan What happens, say if I delete [3] => Purple? I get..

[PHP] Re: resetting arrays

2005-06-21 Thread Al
in general, you should use "0" as your first key, not 1. It'll save trouble. array_values() will index from 0 $pos= 0; unset($ses_basket_items[$pos]) //will remove the first item. I. Gray wrote: Thanks Al, That's done it! unset($ses_basket_items[$pos]

[PHP] Re: Apache Webserver User Survey

2005-06-21 Thread Al
Why bother. http://news.netcraft.com/archives/web_server_survey.html Ian Holsman wrote: Hi. I am conducting a survey about what users want out of a webserver and how the Apache webserver ranks as far as fulfilling those needs. In order to get a better understanding of it, I thought I would a

[PHP] Re: text areas and line brakes

2005-06-23 Thread Al
Sunny Boy wrote: if someone writes something in a text box, how would I convert a line break in the text area to echo a ? I think i'll have to get the \n and convert it. can anyone tell me? Thanks. sunny I use a technique similar to Lynch's $value= preg_replace("/(\r\n|\r|\n)/", "\n", $va

[PHP] Changing directory permissions???

2005-07-11 Thread Al
Is there a way to change directory permissions with pre php5.0? Linux/Apache I'm designing a CM application and would like my code to enable non-techies to be able to create a simple text file. [e.g., directory temporarilly from 755 to 757 and then back again.] PHP5.0 has a chmod; but not, 4.3

Re: [PHP] Changing directory permissions???

2005-07-11 Thread Al
The key word is "directory" chmod only works for files PHP5 has a ftp_chmod; but not 4.3.x Philip Hallstrom wrote: Is there a way to change directory permissions with pre php5.0? Linux/Apache I'm designing a CM application and would like my code to enable non-techies to be able to create a

Re: [PHP] Changing directory permissions???

2005-07-11 Thread Al
Philip Hallstrom wrote: The key word is "directory" chmod only works for files PHP5 has a ftp_chmod; but not 4.3.x It works on directories for me... % php -v PHP 4.3.4 (cli) (built: Jul 19 2004 14:52:27) Copyright (c) 1997-2003 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2003 Zen

Re: [PHP] Changing directory permissions???

2005-07-11 Thread Al
Steve Buehler wrote: At 02:13 PM 7/11/2005, you wrote: Philip Hallstrom wrote: Is there a way to change directory permissions with pre php5.0? Linux/Apache I'm designing a CM application and would like my code to enable non-techies to be able to create a simple text file. [e.g., directory

[PHP] Re: Trimming Text

2005-07-16 Thread Al
André Medeiros wrote: Greetings. I am trying to trim some text containing HTML tags. What I want to do is to trim the text without trimming the tags or html entities like   and such, wich completelly break the design. Has anyone succeded on doing such a thing? phpclasses.org won't help :( Than

[PHP] Re: Trimming Text

2005-07-17 Thread Al
Al wrote: André Medeiros wrote: Greetings. I am trying to trim some text containing HTML tags. What I want to do is to trim the text without trimming the tags or html entities like   and such, wich completelly break the design. Has anyone succeded on doing such a thing? phpclasses.org won&#

[PHP] A strategy question about using mySQL for saving flat-file stings?

2005-07-25 Thread Al
I've been creating a number of CM applications for a virtual-host website. One feature, of several applications, allows the editor [one of our people] to create simple text files. I've been using simple flat-files in a directory for saving the files. I've gotten tried of dealing with directory

[PHP] A directory permissions question

2005-07-25 Thread Al
I'm on virtual-host server and have been following a rule of making certain all directories on the root have permissions set to 755. This is the default when creating new directories with ftp, etc. Occasionally, I need directories with 757 and have always made certain they were not on the root

[PHP] Re: application-wide shared data/object

2005-07-28 Thread Al
Aiguo Fei wrote: In ASP.Net there is the concept of "application" which is a virtual directory on a Web server. An application can have application-wide shared data/objects, which can be accessed by any script of that application (i.e., scripts under the virtual directory). I have gone through se

Re: [PHP] FAQ: replace first instance (couldn't find in archive)

2005-07-28 Thread Al
Dotan Cohen wrote: On 7/28/05, Jochem Maas <[EMAIL PROTECTED]> wrote: Dotan, now _I'm_ sending _you_ multiple copies (last one didn't go to the list by mistake!) php -r ' echo preg_replace("#the#","a","Then the big bear ate the little cat in the north of the woods.",1), "\n"; ' Wow! It wa

[PHP] Re: Using File to count number of lines

2005-08-04 Thread Al
Tom Chubb wrote: I'm having a problem with the following code: $file = "http://www.mysite.co.uk/mailing_list_database.list";; $lines = count(file($file)); echo "$lines "; ?> I'm trying to show the number of subscribers to my visitors from a text file, but it returns a value of 1 when it sh

Re: [PHP] Re: Using File to count number of lines

2005-08-04 Thread Al
line. You either have to replace all line feeds with carriage return and then line feed, or read it in and parse it. Brandon On 8/4/05, Al <[EMAIL PROTECTED]> wrote: Tom Chubb wrote: I'm having a problem with the following code: http://www.mysite.co.uk/mailing_list_database.lis

[PHP] Re: strip out too many newlines

2005-08-04 Thread Al
Sebastian wrote: im working on a comment/forum app and when a user enters too many carriage returns i want to remove them before insert to db. example, user input: -snip- [quote=user] foo [/quote] more text... -snip- I to change to: [quote=user]foo[/quote] more text...

[PHP] Re: regular expression for time

2005-08-29 Thread Al
babu wrote: HI, how can i write regular expression for time in 24-hour format i:e, HH:MM:SS. using preg_match. thanks babu - How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo! Photos. Get Yahoo! Photos Yo

[PHP] Re: Protecing files

2005-08-30 Thread Al
Thomas wrote: Hi there, How can I protect all files with extension .xml from being accessed by the outside? For Apache can one use .htaccess (if yes, how?), is there a generic way of keeping stalkers from viewing your config files? Thomas SPIRAL EYE STUDIOS P.O. Box 37907, Faerie Glen

[PHP] Re: FTP Chmod problem

2005-09-06 Thread Al
Matt Palermo wrote: Hello everyone. I have a script where I am using FTP functions to chmod files/folders. I'm running into a problem with the ftp_chmod() function when trying to change the permissions of a directory. Here is the code I'm using: ftp_chmod($connId, 0777, $folder); The func

Re: [PHP] Modifying data in forms with values

2005-09-13 Thread Al
Murray @ PlanetThoughtful wrote: I have to create registration forms all the time for people in the office and what I keep running into is that I need a way for when they edit a field that the drop-down list of choices is automatically set for the right now. I have 100+ counties in one list, but

[PHP] Re: headers .vs javascript location.href

2005-09-19 Thread Al
bruce wrote: hi.. need to talk to someone to figure out how/what i need to do to use the php 'headers' function, as opposed to the javascript 'location.href'. i've tried to implement the buffering functions, but still get the same error... is there someone that i can talk to about this, who ha

[PHP] Re: Unserialize Errors

2005-09-19 Thread Al
James Thomas Richardson wrote: Hello all, I'm curious to know if there are stability issues with the un/serialize functions. I've my code, I serialize a multidimensional array to disk and when I read it in later, 20% of the time I get errors like: Notice: unserialize(): Error at offset 2137774

[PHP] Re: email validation (no regex)

2005-09-21 Thread Al
Jim Moseby wrote: I threw together this totally untested and unreliable code to solicit comments on whether or not this is a good way to validate emails. Consider the following: function validate_email($email){ if (str_word_count($email,'@')!=1){return('Not a proper email address');} $par

[PHP] ftp_site problem

2005-09-22 Thread Al
I can't get ftp_site() to chmod a file. WS_FTP utility changes them OK. I can connect and log-in via ftp OK Then I send if(ftp_site($conn_id, "chmod 0777 /public_html/EditPage/cd_ef_W.txt")) echo 'successful'; else 'failed'; And get "successful" OK But, the file's permissions don't change.

Re: [PHP] ftp_site problem

2005-09-23 Thread Al
[EMAIL PROTECTED] wrote: try: if(ftp_site($conn_id, "SITE chmod 0777 /public_html/EditPage/cd_ef_W.txt")) echo 'successful'; else 'failed'; it works for me Crom - Original Message - From: "Al" <[EMAIL PROTECTED]> To: Sent: Thur

[PHP] Re: Posting variables from one php script to another

2005-09-23 Thread Al
Graham Anderson wrote: I am using GET to send variables from one php script to another php script How would I POST the same variables ? This is the php script I am sending GET variables to... $movieBuilder = "./movieBuilder.php?mask=mask.gif&drag=drag.gif&movie=fonovisa.mov"; I am placing $mo

Re: [PHP] Re: Posting variables from one php script to another

2005-09-23 Thread Al
Jasper Bryant-Greene wrote: Al wrote: I'd use this. It's simple and doesn't involve CURL. Here is a brief outline. $file_str= base64encode(serialize($_GET)); //$_GET can be any array Any reason why you base64_encode here? fwrite is binary-safe so base64 encoding your d

[PHP] cgi chmod problem

2005-09-25 Thread Al
I've got a php script that checks certain file permissions and if not OK for writing, chmods as required. I can use ftp_site(); but, prefer not to because the code is not readily transportable. Requires ftp login. I'd like a simple cgi file that can be called by my script as needed. My cgi f

Re: [PHP] cgi chmod problem

2005-09-25 Thread Al
Mikey wrote: Al wrote: I've got a php script that checks certain file permissions and if not OK for writing, chmods as required. I can use ftp_site(); but, prefer not to because the code is not readily transportable. Requires ftp login. I'd like a simple cgi file that can be ca

[PHP] Mystery about chmod and permissions

2005-10-09 Thread Al
I've got a script that checks a directory's permissions for 757 and if they are not correct, chmods them with a cgi script. That part works just fine. Can alternately switch the permissions from 755 to 757 and back. I can use a ftp utility to check the permissions and they are correct. The m

Re: [PHP] Mystery about chmod and permissions

2005-10-09 Thread Al
"Directory permissions for $dirname: ". substr(sprintf('%o', fileperms($dirname)), -3). " //reports 0755; Give that a try - Jeff -Original Message- From: Al [mailto:[EMAIL PROTECTED] Sent: Sunday, October 09, 2005 3:50 PM To: php-general@lists.php.net Subject:

[PHP] Re: Store a variable name in a database field.

2005-10-13 Thread Al
Liam Delahunty wrote: I'm sure this is a pretty basic question, but I have searched for a decent answer and can't find one. I have a client that want to be able to write newsletters (newsleters_tbl.email_body) and use fields from his contact table, so as we grind through the contact list for new

[PHP] Re: Help with a regular expression for 0,1 or 2 decimal places

2005-10-24 Thread Al
Shaun wrote: Hi, I am trying to create a regular expression for a width of a room, the value can be a whole integer (up to 999) with up to 2 decimal places -when it is stored in the database mysql will pad the value accordingly. /^[0-9]{1,3}.?[0-9]{0,2}?$/ The only problem I have found with

[PHP] Re: selected index

2005-10-25 Thread Al
Ross wrote: Hi, I have an array $people= array ("ross", "bob", "chris") I have a variable $selected_person = "chris" I want to do the find out the index of the $selected_person in the $people array. Is there a function that can do this?? ta, Ross It appears you are learning php. I

[PHP] Re: cURL to re-post form iinformation

2005-10-25 Thread Al
Jay Blanchard wrote: Howdy all, I am trying a new technique, for me, when processing a form. The form is filled out and submitted, during processing it is determined that there is an error with the posted data...such as a blank or mismatched password, I want to return the form with the data fill

[PHP] Re: Strange array access problem

2005-10-27 Thread Al
Ken Tozier wrote: I'm having a major problem with what seems, on it's face, to be a really basic array function. What happens is on the browser end, I've written some javascript code that packages up javascript variables in native PHP format and sends the packed variables to a PHP script o

[PHP] Re: regex and global vars problem

2005-10-27 Thread Al
Jason Gerfen wrote: I am having a problem with a couple of function I have written to check for a type of string, attempt to fix it and pass it back to the main function. Any help is appreciated. if( ( eregi( "^[0-9A-Fa-f]{2}\:[0-9A-Fa-f]{2}\:[0-9A-Fa-f]{2}\:[0-9A-Fa-f]{2}\:[0-9A-Fa-f]{2}\:[

[PHP] Re: better way to mix html and php code?

2005-11-16 Thread Al
[EMAIL PROTECTED] wrote: Hi to all, always wondered what's better way to mix html and php code. Here are three "ways" of the same code. Which one you prefer? (And why, of caurse :)) Solution 1: ec

[PHP] Re: Regex for balanced brackets?

2005-11-22 Thread Al
Jeffrey Sambells wrote: I came across this method of matching brackets with regex in .NET http://puzzleware.net/blogs/archive/2005/08/13/22.aspx but I am wondering if it is possible to do the same in PHP? I've tried it a bit but I can't seem to get it to work properly. I'm just wondering if

[PHP] Re: Count and Preg_Replace Using Version 4.4.1

2005-12-05 Thread Al
Shaun wrote: Hi, The following code matches all occurences of tags within an html page and wraps form tags around it: echo preg_replace( '/]*>(.*?)<\/p>/ms', 'action="'.$CFG->edit_pages_adm.'/index.php?action=edit_paragraph" method="post"> $1 ', file_get_conte

[PHP] Re: What software do you use for writing PHP?

2005-12-06 Thread Al
Jeff McKeon wrote: Hey all, Forever now I've been using Frontpage for all my web work including php. I'm sure there's better software out there that is more suited to writing and editing PHP pages. What do you all use? Thanks, Jeff http://www.waterproof.fr/products/PHPEdit/ -- PHP General

[PHP] IE6 not returning POST data from a textarea

2005-12-12 Thread Al
Anyone know to get IE6 to return POST data from a textarea when the text is pasted in? Works fine for Mozilla, etc. print_r($_POST) shows several and values just fine. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] IE6 not returning POST data from a textarea

2005-12-12 Thread Al
tomasz abramowicz wrote: Al wrote: Anyone know to get IE6 to return POST data from a textarea when the text is pasted in? Works fine for Mozilla, etc. print_r($_POST) shows several and values just fine. Thanks post your code. ie6 not returning post values from textarea fields

[PHP] Re: IE6 not returning POST data from a textarea

2005-12-12 Thread Al
Al wrote: Anyone know to get IE6 to return POST data from a textarea when the text is pasted in? Works fine for Mozilla, etc. print_r($_POST) shows several and values just fine. Thanks For those interested, here is the answer... Text pasted into a textarea [e.g., from Word] can

Re: FW: [PHP] IE6 not returning POST data from a textarea

2005-12-13 Thread Al
Jay Blanchard wrote: [snip] Everyone keeps asking it. Of course it's named or Mozzilla wouldn't work. [/snip] You can insert a textarea into a page without a name and mozilla will work. If the textarea is named have you tried this echo $_POST['textareaName']; This thread was broken. No

[PHP] Re: Declaring arrays? Good practice?

2005-12-14 Thread Al
s, if the expression is a bit fancy in the loop and you are using $keys, it is easy to make a mistake. Al.. Michael Hulse wrote: Sorry if this question sounds noobish: $foo = array(); // Declare first, good practice. $foo = array('one', 'two', 'three'); Us

Re: [PHP] Re: Declaring arrays? Good practice?

2005-12-14 Thread Al
Jochem Maas wrote: Al wrote: However For loops: $new_array= array(); foreach($old array as $value){ $new_array= $value: } Otherwise, all you'll get it the last assignment of $new_array as a variable, not an array. which is exactly what you get if yuou run the code above -

Re: [PHP] Re: Declaring arrays? Good practice?

2005-12-14 Thread Al
"; ?> The result of the echo is "four". Doing the same above with the [] after new_array returns the right result, a new array.(outputs Array). So what exactly where you saying 'Taint so' Al? I'm confused since Jochem's email about how to properly copy an ar

Re: [PHP] i18n maybe?

2005-12-16 Thread Al
Jochem's right about this. I've just encountered problems trying to utf-8_decode strings. I now just make certain everying is set for utf-8, from webpage on. So far, no problems with this approach. Al... Jochem Maas wrote: hi Richard, what charset is your DB set to use? wh

[PHP] Re: Filtering URLs problem..

2005-12-22 Thread Al
I didn't fully test this; but it should get you started. $types= array('http', 'ftp', 'https', 'mms', 'irc'); $pattern= "%.+%i"; // the "i" makes it non case sensitive if(preg_match($pattern, $URL_str, $match)){ $URL= match[1]; } else{ User did not enter a complete link; do

[PHP] Re: PHP is OK in IE but not in Netscape

2005-12-22 Thread Al
You do not have a legitimate HTML page. Back to the books first. Always validate here http://validator.w3.org/ If a page validates, it will run on about browser except NS4x and IE5x Nanu Kalmanovitz wrote: Hi The http://www.kalmanovitz.co.il/hello.php file appears OK in M$-IE but not in

Re: [PHP] Re: Filtering URLs problem..

2005-12-23 Thread Al
Jochem Maas wrote: Al wrote: I didn't fully test this; but it should get you started. fully? more like not at all. point 1: "%.+%i"; ^-- double quotes are not escaped == parse error point 2: "%.+%i"; ^-- this will inject the strin

Re: [PHP] Re: Filtering URLs problem..

2005-12-23 Thread Al
Jochem Maas wrote: ... Jochem's correct. I was in too big a hurry trying to help. It was you don't mind if I forward that to my girlfriend? ;-) (the bit about me being correct) obvious that Anders was not getting much useful help. His points 3 and 4 the lack of help is due to the

[PHP] Re: RegEx drop everything after last pattern

2005-12-23 Thread Al
John Nichel wrote: Okay, maybe it's just the fact that I'm concentration on getting out of here for the holidays more than I am on my work, but I'm pulling my hair out. Say I have a string - Now, is the time; for all good men! to come to the aide? of their What I want to do is drop everythin

[PHP] Re: PhP

2005-12-27 Thread Al
James Lumb wrote: Hi, Does anyway know whether there is a PHP function which creates a new file? i know there is fwrite, fopen etc but is there any way of creating a new file? Thanks, James _ Are you using the latest version of M

[PHP] Re: php / JS / DOM question

2005-12-29 Thread Al
jonathan wrote: I know that this is more of a Javascript / DOM question but I cannot for the life of me figure this out: I have this form: When the user clicks on the button, I want the text that is in input elment 'q' to be sent to the Javascript function drawImg but when I debug i

Re: [PHP] Which is faster, a MySQL access, or a set of PHPvariables?

2006-01-02 Thread Al
Dave M G wrote: Thank you for the advice. The point was raised, and it's a good one, that if I'm getting content from the database for most pages, then attaining the necessary translations probably won't make a difference. And of course, it is true that at my current level

Re: [PHP] manipulating constant name as string

2006-01-02 Thread Al
Tom Rogers wrote: Hi, Monday, January 2, 2006, 4:37:17 AM, you wrote: DG> Hello DG> I am trying to access the constant name as string and not the constant DG> contents. For example, DG> define('myconst', 'const text 1'); DG> $myArray = array() DG> myArray['myconst'] = "this is it" DG> etc.

[PHP] Re: Setting cookie for two domains.

2006-01-05 Thread Al
Shafiq Rehman wrote: Hi, How can I register a session or cookie for two domains. I want to maintain logged user's state when he goes from one domain to other domain. Example Suppose a user is logged in on domain1.com. A cookie is set and user is authenticated from database on the basis of that

Re: [PHP] help register domain name

2006-01-05 Thread Al
John Nichel wrote: n.g. wrote: hi, i want to register a domain name through NetworkSolutions.com, but it require a credit card which i dont have to pay the bill. if you have a credit card, i can transfer to your account, and then you please regiter the domain using my info. or if you have any

[PHP] Re: Set variable outside of scope (redo)

2006-01-05 Thread Al
Mike Tuller wrote: Excuse the last post, I didn't have all the code it there. I have a table listing items in a database, and have a delete button next to each item, and I want to be able to click on the delete and delete only that record in the database and then reload the page where it would d

Re: [PHP] Dynamic Array Index using Variable

2006-01-09 Thread Al
Jim Moseby wrote: I want to do something like this to check if a variety of submitted form fields (crn, instructor, etc) have any value in them: $reqfields = array('crn', 'instructor'); $errorflag = 0; foreach ($reqfields as $field) { if ($_REQUEST[$field] == '') { $erro

Re: [PHP] Dynamic Array Index using Variable

2006-01-09 Thread Al
Chris Lott wrote: What I have is a form with 45 data fields... if any of a selected 35 of those fields is empty, I want to have the user go back. So I can't loop over the entire _POST array. So I thought I would put the names of the fields I *do* want to check into an array and check. So this wo

[PHP] Re: array of checkbox values

2006-01-11 Thread Al
Sjef Janssen wrote: Hallo, I have a form with a number of checkboxes grouped together. The value of these boxes is stored in an array: $used[]. Now I found that the value of checked boxes (value = 'Y') are stored in the array while non checked boxes are not stored at all. This makes the array inc

[PHP] Cookie problem

2006-01-14 Thread Al
Can't get a cookie to set. Below is the code near the file top BEFORE any html output. $_POST['prefs'] comes from a hidden field in the middle of the html output. $_POST['filter'] comes from a select option. A Submit button closes the page and refreshes it. print_r($_POST) shows $_POST['prefs

[PHP] Re: Cookie problem

2006-01-16 Thread Al
Al wrote: Can't get a cookie to set. Below is the code near the file top BEFORE any html output. $_POST['prefs'] comes from a hidden field in the middle of the html output. $_POST['filter'] comes from a select option. A Submit button closes the page and refreshes i

<    2   3   4   5   6   7   8   >