Re: [PHP] Newbie needs help

2010-01-07 Thread John Taylor-Johnston
Great. Ok. Thanks. [I'm a top quoter)]. I'll look at it. This was my dirty way of hacking it: if (($current_user->id == 0) && ($user_ID == 0)) { $content = str_replace('', 'Protected ', '--> Content href="/wp-login.php">[Log in here]', $content); } Cheap & Dirty and need refinement :p viraj w

Re: [PHP] Newbie needs help

2010-01-07 Thread viraj
try http://www.php.net/manual/en/function.preg-replace-callback.php. you need to read a bit on 'regular expressions' http://www.gskinner.com/RegExr/ will be handy in crafting a suitable regex to capture your 'tags' ~viraj On Thu, Jan 7, 2010 at 2:16 PM, John Taylor-Johnston wrote: > > $content

RE: [PHP] newbie needs help with session variables

2008-04-19 Thread Warren Vail
As I understand it, the "register variables" operation occurred before execution began on your script. It involved copying data items from your form ($_POST), from the request URL ($_GET) and from your session ($_SESSION) so that you could simply refer to them by name in your programs. The drawbac

Re: [PHP] newbie needs help with session variables

2008-04-19 Thread revDAVE
On 4/19/2008 2:20 PM, "Rod Clay" <[EMAIL PROTECTED]> wrote: > Hi. I'm still very new to php and still trying to learn the ropes. ...Blind leading the blind (I'm a newbie also but...) Did you try...? session_id()) session_start(); - - - - - From: PHP: session_id - Manual Location: http://us2

Re: [PHP] newbie needs help

2007-05-02 Thread Ben Clapp
Thank you, someone had sent me some code that worked on Friday Ben Richard Lynch wrote: On Mon, April 30, 2007 3:37 pm, Ben Clapp wrote: I am new to PHP programming and need some help. I have an image that i have show up each May for the month with $mymonth = date("m", mktime()), but i want

Re: [PHP] newbie needs help

2007-05-02 Thread Richard Lynch
On Mon, April 30, 2007 3:37 pm, Ben Clapp wrote: > I am new to PHP programming and need some help. I have an image that i > have show up each May for the month with $mymonth = date("m", > mktime()), > but i want to set up a date range for it to show up. Ex. 4-13 to 5-13 > each year. How can I do th

Re: [PHP] newbie needs help

2007-05-01 Thread Ben Clapp
I do apologize for the non-list reply, I will make sure and keep that in there on the next emails. I checked this morning and there was only one image, so the second mymonth code did not execute, but I replaced the code with what Richard gave me and it works also. And about the {} brackets, I a

Re: [PHP] newbie needs help

2007-04-30 Thread Daniel Brown
Good catch on the non-list reply, Richard. I didn't even notice that. On 4/30/07, Richard Davey <[EMAIL PROTECTED]> wrote: Ben Clapp wrote: > Thank you again for the help, it does work now but with an issue, here > is the code that i have for it right now: You should always reply to the

Re: [PHP] newbie needs help

2007-04-30 Thread Richard Davey
Ben Clapp wrote: Thank you again for the help, it does work now but with an issue, here is the code that i have for it right now: You should always reply to the php mailing list, so other people can benefit from the answers we give. With this it works, but i am sure that when mymonth == 5 (

Re: [PHP] newbie needs help

2007-04-30 Thread Ben Clapp
Thank you both, I will try the code and go from there. Thank you again Daniel Brown wrote: Ben, make sure whatever method you use, you use the operator combinations >= and <= as Richard just showed you. I had forgotten to do that, which would mean (in my example) that the 13th of April a

Re: [PHP] newbie needs help

2007-04-30 Thread Daniel Brown
Ben, make sure whatever method you use, you use the operator combinations >= and <= as Richard just showed you. I had forgotten to do that, which would mean (in my example) that the 13th of April and 13th of May of each year would not be counted, only 14 April through 12 May of any given year.

Re: [PHP] newbie needs help

2007-04-30 Thread Richard Davey
Ben Clapp wrote: I am new to PHP programming and need some help. I have an image that i have show up each May for the month with $mymonth = date("m", mktime()), but i want to set up a date range for it to show up. Ex. 4-13 to 5-13 each year. How can I do that? Any help would be great. There

Re: [PHP] newbie needs help

2007-04-30 Thread Daniel Brown
One way would be to do this: 413 && date("md") < 513) { // Display image } ?> On 4/30/07, Ben Clapp <[EMAIL PROTECTED]> wrote: I am new to PHP programming and need some help. I have an image that i have show up each May for the month with $mymonth = date("m", mktime()), but i want to

Re: [PHP] Newbie needs help with MySQL and multiple databases

2004-10-04 Thread - Edwin -
Hi, On Monday 04 October 2004 12:09, Matthew wrote: > Hi, im fairly new to php and mysql and need a little help. im > running a forum community and would like to have it run on > multiple databases because of performance issues others have > encountered using the same software on

Re: [PHP] Newbie needs help

2002-07-24 Thread Johan Holst Nielsen
Neil Freeman wrote: > mysql_db_query has been depreciated since PHP 4.0.6 > Yep.. but thats not the only different... mysql_db_query() have an extra parameter that is what Database you want to execute your query in... mysql_query() just use the database you have selected with f.ex. mysql_s

Re: [PHP] Newbie needs help

2002-07-24 Thread Neil Freeman
mysql_db_query has been depreciated since PHP 4.0.6 ctan wrote: > ** > This Message Was Virus Checked With : SAVI 3.59 May 2002 > Last Updated 8th July 2002 > *

Re: [PHP] Newbie needs help! '>' closing PHP Tag

2001-05-15 Thread Marc Johnson
My bad.. Typical am error. I have concurrent dev locations for my documents (one live/one test) since the live side is the only connected to PHP/SQL I have been doing my dev there. Of course I was a) seeing the problem in HomeSite (which will close the tag in its browe window) and b) reading the

Re: [PHP] Newbie needs help! '>' closing PHP Tag

2001-05-15 Thread Jack Dempsey
Marc: > should not close php ?> will can you paste in the script so i can see what you mean? -jack Marc Johnson wrote: > > Greetings fellow devs! > > I am new to PHP (having tried my hand at running ASP/SQL here at the house. > No, I didnt chose ASP, it just happened to be the software I had