RE: [PHP] Can I do this in a single match/replace?

2012-06-28 Thread Ford, Mike
-Original Message- From: Paul Halliday [mailto:paul.halli...@gmail.com] Sent: 28 June 2012 02:27 Using preg_match and this pattern I can get the refs: $pattern = '\reference:url,([^;]+;)\'; which gives me: $matches[0] = www.ndmp.org/download/sdk_v4/draft-skardal-ndmp4-

Re: [PHP] Can I do this in a single match/replace?

2012-06-27 Thread Chris Testroet
On 6/27/2012 6:26 PM, Paul Halliday wrote: I have lines that look like (I added intentional line breaks): alert tcp $HOME_NET 1 - $EXTERNAL_NET any (msg:ET EXPLOIT NDMP Notify Connect - Possible Backup Exec Remote Agent Recon; flow:established,from_server; content:|00 00 05 02|; offset:16;

Re: [PHP] can I do this without eval?

2009-01-22 Thread Nathan Nobbe
On Thu, Jan 22, 2009 at 8:35 AM, Frank Stanovcak blindspot...@comcast.netwrote: I'm trying to build a prepared statment and dynamically bind the variables to it since I use this on severaly different pages I didn't want to build a huge bind statement hard coded on each page and then have to

Re: [PHP] can I do this without eval?

2009-01-22 Thread Frank Stanovcak
Nathan Nobbe quickshif...@gmail.com wrote in message news:7dd2dc0b0901221048g2f089cf9s36ecb9a5b35ab...@mail.gmail.com... On Thu, Jan 22, 2009 at 8:35 AM, Frank Stanovcak blindspot...@comcast.netwrote: I'm trying to build a prepared statment and dynamically bind the variables to it since I

Re: [PHP] can I do this without eval?[RESOLVED]

2009-01-22 Thread Frank Stanovcak
Nathan Nobbe quickshif...@gmail.com wrote in message news:7dd2dc0b0901221048g2f089cf9s36ecb9a5b35ab...@mail.gmail.com... yeah, id try call_user_func_array(), omit the line to create a string out of the $params, then merge the later arguments into an array w/ the first 2 args #$params =

Re: [PHP] can I do this without eval?

2009-01-22 Thread Nathan Nobbe
On Thu, Jan 22, 2009 at 12:06 PM, Frank Stanovcak blindspot...@comcast.netwrote: Nathan Nobbe quickshif...@gmail.com wrote in message news:7dd2dc0b0901221048g2f089cf9s36ecb9a5b35ab...@mail.gmail.com... On Thu, Jan 22, 2009 at 8:35 AM, Frank Stanovcak blindspot...@comcast.netwrote: I'm

Re: [PHP] Can I do in Drupal

2008-06-14 Thread Bastien Koert
On Sat, Jun 14, 2008 at 5:57 AM, mukesh yadav [EMAIL PROTECTED] wrote: Hi, I'm new to PHP and i have got an asign a job in PHP. I need to develop a site where a admin can handle a site like a CMS. e.g. updating a site without any tech guy. Is it possible using Drupal? If yes then can you

Re: [PHP] Can I do in Drupal

2008-06-14 Thread Daniel Brown
On Sat, Jun 14, 2008 at 5:57 AM, mukesh yadav [EMAIL PROTECTED] wrote: Hi, I'm new to PHP and i have got an asign a job in PHP. I need to develop a site where a admin can handle a site like a CMS. e.g. updating a site without any tech guy. Is it possible using Drupal? If yes then can you

Re: [PHP] Can I do in Drupal

2008-06-14 Thread Robert Cummings
On Sat, 2008-06-14 at 10:35 -0400, Daniel Brown wrote: On Sat, Jun 14, 2008 at 5:57 AM, mukesh yadav [EMAIL PROTECTED] wrote: Hi, I'm new to PHP and i have got an asign a job in PHP. I need to develop a site where a admin can handle a site like a CMS. e.g. updating a site without any

Re: [PHP] Can I do in Drupal

2008-06-14 Thread Daniel Brown
On Sat, Jun 14, 2008 at 11:32 AM, Robert Cummings [EMAIL PROTECTED] wrote: On Sat, 2008-06-14 at 10:35 -0400, Daniel Brown wrote: http://www.catb.org/esr/jargon/html/S/STFW.html *lol* Whoever did that webpage needs to STFW about character encodings. Why? What?s wrong with how

Re: [PHP] Can I do in Drupal

2008-06-14 Thread Robert Cummings
On Sat, 2008-06-14 at 11:38 -0400, Daniel Brown wrote: On Sat, Jun 14, 2008 at 11:32 AM, Robert Cummings [EMAIL PROTECTED] wrote: On Sat, 2008-06-14 at 10:35 -0400, Daniel Brown wrote: http://www.catb.org/esr/jargon/html/S/STFW.html *lol* Whoever did that webpage needs to STFW about

Re: [PHP] can I do this: update table while selecting data from table?

2006-06-15 Thread Jochem Maas
[EMAIL PROTECTED] wrote: ?!?!?!?!?!?! I hope youi used str_repeat() to generate that. seriously though, have you tried it? that said your [probably] better off just doing 1 query: UPDATE members SET member_name = 'N/A' WHERE member_name = ''; that said your [probably] better off

Re: [PHP] can I do this: update table while selecting data from table?

2006-06-15 Thread afan
I wonder why this sarcasm? Why so rude? -afan [EMAIL PROTECTED] wrote: ?!?!?!?!?!?! I hope youi used str_repeat() to generate that. seriously though, have you tried it? that said your [probably] better off just doing 1 query: UPDATE members SET member_name = 'N/A' WHERE

Re: [PHP] can I do this: update table while selecting data from table?

2006-06-15 Thread afan
Jochem, You are wrong. I tried and it worked. But, when I asked can I, I meant Am I allowed to do that. The same as many security or other kind questions where answer is: Yes, it works - but it's NOT correct. Yes, I did search php.net but didn't find answer. Yes, I did search mysql.com but didn't

Re: [PHP] can I do this: update table while selecting data from table?

2006-06-15 Thread Jochem Maas
[EMAIL PROTECTED] wrote: You are wrong. there's a first for everything, heh. I tried and it worked. But, when I asked can I, I meant Am I allowed to do that. The same as many security or other kind then say what you mean in future. you already knew that you *can* do it, you should have

Re: [PHP] can I do this: update table while selecting data from table?

2006-06-15 Thread Jochem Maas
[EMAIL PROTECTED] wrote: I wonder why this sarcasm? Why so rude? your original question could have been answered by: a, trying to run the code provided (thats called testing btw) b, reading php.net c, reading mysql.com/docs (or where ever they have the docs this week) my reply not only

Re: [PHP] can I do this: update table while selecting data from table?

2006-06-15 Thread tedd
At 4:11 PM +0200 6/15/06, [EMAIL PROTECTED] wrote: Jochem, You are wrong. I tried and it worked. But, when I asked can I, I meant Am I allowed to do that. The same as many security or other kind questions where answer is: Yes, it works - but it's NOT correct. Yes, I did search php.net but didn't

Re: [PHP] can I do this: update table while selecting data from table?

2006-06-15 Thread afan
Yes, you are right, I had to be more carefull about how to write my post. Thanks. for bruising your ego? or for originally giving 2 suggestions as to better strategies for doing what you *seemed* to be wanting to achieve - 2 suggestions which you blatantly seemed to ignore in favor of

Re: [PHP] can I do this: update table while selecting data from table?

2006-06-14 Thread Jochem Maas
[EMAIL PROTECTED] wrote: Am I allowde to do this: $query = mysql_query(SELECT member_id, member_name FROM members); while($result = mysql_fetch_array($query)) { if(empty($result['member_name'])) { mysql_query(UPDATE members SET member_name = 'N/A' WHERE member_id =

Re: [PHP] can I do this: update table while selecting data from table?

2006-06-14 Thread Satyam
It looks very much as if you did: update members set member_name = 'N/A' where member_name = null Nevertheless, I would rather keep null within the database and use 'N/A' at the presentation level. My rule is that the data in the database should be in a machine oriented format. For

Re: [PHP] can I do this: update table while selecting data from table?

2006-06-14 Thread afan
?!?!?!?!?!?! [EMAIL PROTECTED] wrote: Am I allowde to do this: $query = mysql_query(SELECT member_id, member_name FROM members); while($result = mysql_fetch_array($query)) { if(empty($result['member_name'])) { mysql_query(UPDATE members SET member_name = 'N/A' WHERE member_id

Re: [PHP] can I do this: update table while selecting data from table?

2006-06-14 Thread afan
No, that was just an exapmle to explain better. Of course this is not the REAL code. :) And there are some more thing to do inside while loop. Thanks. -afan It looks very much as if you did: update members set member_name = 'N/A' where member_name = null Nevertheless, I would rather keep

Re: [PHP] can i do this in one step

2006-04-18 Thread Jochem Maas
Ross wrote: I am retrieving the vlaue from an associative arrray but do I need to do it in with two lines of code? The numerical value is stroed in the DB. $region_array = array('a' ='All of Scotland', 1 ='Aberdeen City Council', 2 ='Aberdeenshire Council', 3 ='AngusCouncil', 5 ='Argyll and

Re: [PHP] can I do a for each here??

2005-03-17 Thread Chris Ramsay
Difficult to be definitive without seeing your code, but I would be tempted by the use of arrays... cheers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] can I do a for each here??

2005-03-17 Thread Marek Kilimajer
AndreaD wrote: I have about 10 text boxes each taking in value (ages) , The code I have checks for a value and if it is set it then sets the cookie to that value. The else just clears the value. On the next page I use a foreach to get the values but I think there must be a quicker way to

Re: [PHP] can I do a for each here??

2005-03-17 Thread AndreaD
Think what I want to do then is create two arrays, one for the values of the age and one for the correponding name e.g. $age = array() // this is the inputed textbox values $name= array('john', 'bob', 'tim') Then I need to assign the the ages to cookie of the persons name by using a for or

Re: [PHP] can I do a for each here??

2005-03-17 Thread Jeff Schmidt
I would be tempted to do the following. First, I would setup the html form so that the text boxes are named something like 'age[Andrea]', 'age[Bob]', etc. When the form submitted, this will give you an array, accessible as $_POST['age'] (or $_GET['age'] depending on whether you used POST or GET

Re: [PHP] can I do a for each here??

2005-03-17 Thread Jeff Schmidt
Yeah, after hitting the send button, I looked again at what I sent and realized something else. Having already caused PHP to put the stuff into an array, by the way I suggested constructing the form, you can eliminate the foreach loop, and just use the assignment operator to get PHP to copy

Re: [PHP] can I do a for each here??

2005-03-17 Thread Chris Shiflett
AndreaD wrote: I have about 10 text boxes each taking in value (ages), The code I have checks for a value and if it is set it then sets the cookie to that value. The else just clears the value. On the next page I use a foreach to get the values but I think there must be a quicker way to collect

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

2004-01-16 Thread Jake McHenry
- Original Message - From: Alex Hogan [EMAIL PROTECTED] To: PHP General list [EMAIL PROTECTED] Sent: Friday, January 16, 2004 4:20 PM Subject: [PHP] Can I do this? If so why wont it work I am wanting to read in several session values at once. This is what I have so far;

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

2004-01-16 Thread Alex Hogan
Line 24 is: $obj_ar[$i] = $_SESSION['obj[$i]']$i++; Alex -Original Message- From: Jake McHenry [mailto:[EMAIL PROTECTED] Sent: Friday, January 16, 2004 3:31 PM To: Alex Hogan Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Can I do this? If so why wont it work - Original

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

2004-01-16 Thread Alex Hogan
Tried it now I get; Parse error: parse error, unexpected T_VARIABLE in mypage.php on line 22 Line 22 is $i++; Try this: while ($i = 5) { $obj_ar[$i] = $_SESSION['obj[$i]']; $i++; } ** The contents

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] Can I do this? If so why wont it work

2004-01-16 Thread Alex Hogan
Thanks.. -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED] Sent: Friday, January 16, 2004 4:29 PM To: Alex Hogan Cc: PHP General list Subject: Re: [PHP] Can I do this? If so why wont it work Alex Hogan wrote: I am wanting to read in several session values

Re: [PHP] Can I do this? header(Content-type: text/rtf);

2003-02-20 Thread David Otton
On Thu, 20 Feb 2003 03:42:14 -0500, you wrote: I'm using PHP MySQL to generate a RTF document. I use this header: header(Content-type: text/rtf); Of course, the header scares the poor browser. The browser bawks and says, unknown file type, and instructs the browser to save the file. It tries

Re: [PHP] Can I do this? header(Content-type: text/rtf);

2003-02-20 Thread David Otton
On Thu, 20 Feb 2003 03:42:14 -0500, you wrote: I'm using PHP MySQL to generate a RTF document. I use this header: header(Content-type: text/rtf); Sorry, I should have mentioned header(Content-Disposition: attachment; filename=myfile.rtf); as well. Rather easier :) -- PHP General Mailing

Re: [PHP] Can I do this? header(Content-type: text/rtf);

2003-02-20 Thread John Taylor-Johnston
Works great. Thanks, John I'm using PHP MySQL to generate a RTF document. I use this header: header(Content-type: text/rtf); header(Content-Disposition: attachment; filename=myfile.rtf); -- John Taylor-Johnston - If

RE: [PHP] Can i do this?

2001-12-13 Thread Jack Dempsey
didn't check your code specifically, but you can definitely have arrays nested inside of arrays...to see how to print them out use something like print_r to look at the structure... -Original Message- From: Daniel Alsén [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 13, 2001 10:12

Re: [PHP] Can i do this?

2001-12-13 Thread Jeremy Reed
However, in your if statement, you need to nest your statements with parenthesis. Jack Dempsey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... didn't check your code specifically, but you can definitely have arrays nested inside of arrays...to see how to print

RE: [PHP] Can i do this?

2001-12-13 Thread Daniel Alsén
Message- From: Jack Dempsey [mailto:[EMAIL PROTECTED]] Sent: den 13 december 2001 16:30 To: Daniel Alsén; PHP Subject: RE: [PHP] Can i do this? didn't check your code specifically, but you can definitely have arrays nested inside of arrays...to see how to print them out use something

RE: [PHP] Can i do this?

2001-12-13 Thread Martin Towell
display 5 // etc... -Original Message- From: Daniel Alsén [mailto:[EMAIL PROTECTED]] Sent: Friday, December 14, 2001 9:31 AM To: PHP; Jack Dempsey Subject: RE: [PHP] Can i do this? Yep... And i don´t get any wiser. I have tried all sorts of combinations. But i can´t get the damn values