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
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
$content = "... a bunch of text with some protected
information with some more text with some more
more protected
text and even some
protected content>b>";
I want to replace any content between these tags:
with say
$replacewith = "protected content";
$content = " a bunch of text with so
I am trying to get an order page working to submit credit card orders
and I am having trouble with the order page. the included file "HOP.php" is
in the same directory and it has both read and write permissions. I am
on a Linux and PHP 5.2.3 server. there are no PHP error messages.
I have this pag
t
certainly enhances your ability to control the source of data coming into
your programs.
HTH,
Warren Vail
> -Original Message-
> From: Rod Clay [mailto:[EMAIL PROTECTED]
> Sent: Saturday, April 19, 2008 2:20 PM
> To: php-general@lists.php.net
> Subject: [PHP] newbie needs h
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
Hi. I'm still very new to php and still trying to learn the ropes.
I'm working on some code now trying to set up a session and use session
variables in different scripts, but I'm getting this message:
*Warning*: Unknown: Your script possibly relies on a session side-effect
which existed unti
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
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
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
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
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 (
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
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.
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
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
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.
Thank you
Ben
--
PHP Gen
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
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 on
database. My question is is it possible to have the software connect to 2
d
All,
I'm a newbie trying to learn PHP and MySQL (following examples in a book "PHP and
MySQL by Larry Ullman". I am running:
Windows XP SP1
Norton Antivirus and Internet Security
Apache 2
PHP 5
MySQL 4.0.16
All seem to work. I can run PHP scripts on the Apache server without any trouble. I
h
I need to compare dates which opens commenting system.
For example: If show starts 2003.05.01 20:00 then I need that only from
that date and time the commenting system apears on my site ant would
be there all the time from the start of the show. But in my code the
commenting system opens only for
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
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
> *
Whats the difference between 'mysql_db_query' and 'mysql_query'?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hello,
I have a problem with checking an array if it is empty:
if ($artikel[$i] != ""){
...
}
That code does not work!
May somebody help me?
thanx,
Moritz
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi everybody,
I am having a problem with GET variables. Basically I have not
found a way to clear them so they are reset to "" if the user reload
the page.
Here is the speudo code:
>?php
session_start();
If ($Faction=="Add to Data")
{ Add_to_data(); }
...
..
The above speudo scrip
I am having difficulty with supporting file uploads from remote domains. I
currently am able to upload files if I am on my local area network to the
apache server but when I try from another network, the brower times out and
comes back with a cannot find server. I suspect either my apache/php
co
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
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
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 when I
decided to mess with dynamic content.
My problem is probably really simple. I am learning to use PHP via online
documents and
30 matches
Mail list logo