www.php.net/htmlentities
Daniel Guerrier wrote:
If I have text containing quotes, single or double in
my database, and I try to set the text as a value for
my html text field. The quote in the text will
prematurely close the value="" or value='' html and
cut of the remainder of the text. How ca
not trim whitespace from begin/end of lines
-v : show lines that do NOT match pattern
--
Jason k Larson
{R}ichard Ashton wrote:
On Wed, 5 Mar 2003 10:21:30 -0500, 1LT John W. Holmes wrote:
$ts = '/(' . $trigger_string .')/is';
echo "trigger_string is $ts ";
$matche
Include can handle URLs as the path if allow_url_fopen is set correctly
in the php.ini. But it does have some limitations if being done on a
Win32 platform instead of (*)nix.
Try reading this, it might shed some needed light.
http://www.php.net/manual/en/function.include.php
HTH
--
Jason k
ue;
}
else
{
foreach ($value as $subkey => $subvalue)
{
$destination_Array[] = $subvalue['code'];
}
}
}
--
Jason k Larson
Konference wrote:
Hi all,
i have o question, is there some solution how
http://www.php.net/manual/en/function.constant.php
$msg = constant('_LANG'.$num);
HTH,
--
Jason k Larson
Vincent M. wrote:
Hello,
I do a lot of define like that:
define ("_LANG1", "Server options");
define ("_LANG1", "Manage your system");
etc.
"Note: implode() can, for historical reasons, accept its parameters in
either order. For consistency with explode(), however, it may be less
confusing to use the documented order of arguments."
Chris Wesley wrote:
The above line:
I'm assuming you want to collapse $recordsarray into a sting, wi
CGI meaning perl?
SpyProductions Support Team wrote:
Does PHP use less system resources than CGI on a server?
I have a bulletin board which is incredibly active, but there is a PHP
sister to it.
Thanks,
-Mike
--
The above message is encrypted with double rot13 encoding. Any unauthorized
What the heck? The string "[status]='active'" doesn't check anything.
It is converted to boolean by the if statment, which will be true, as
it's not an empty string. I'm guessing you want to use
if($status=='active'){
Hunter, Jess wrote:
I have a short bit of code that contains an if/else th
No.
Van Andel, Robbert wrote:
Is there a handy function in PHP that I can use to retrieve the users Windows Log in? We are creating an application that will allow users to add comments to a mysql database, and we would like to be able to track who is putting the comments into the table, preferab
print "$i :: {$manilist[$i][0]}\n";
David T-G wrote:
OK. That works, though it isn't pretty. Is there any way I can avoid
doing the dot dance? I'd rather something like
print "$i :: ${manilist[$i]}[0]\n" ;
(which I know to not work! :-) than to have to open and close; that's
just not very cl
Yes. http://www.php.net/mailing-lists.php
electroteque wrote:
hi there , is there any way to possibly get the list via email ? i can only
access it via the newsgroup viewer in outlook and my firewall guy at work
persists not to let me have access and you guys are very important to have
in the co
It's fairly simple. The code you posted could also be written:
if(strpos($a,'-')){
$a = explode('-',$a,2);
}else{
$a = array($a);
}
It's called the ternary conditional operator. Unfortunatley, it's
buried in the PHP manual.
http://us2.php.net/manual/en/language.expressions.php
Jimmy wrote:
I'
Lately, I've been getting the following error:
Fatal error: Allowed memory size of 15728640 bytes exhausted (tried to
allocate 86460 bytes) in Unknown on line 0
The thing is, I'm not doing anything that could possibly require much
memory. Is there some kind of bug, or am I missing something?
--
And what about:
print htmlspecialchars('[EMAIL PROTECTED]@#%:[EMAIL PROTECTED]@[EMAIL PROTECTED]|#:~December,2003~on~fjskl');
It seems to work for me.
--
Jason k Larson
Niklas Lampén wrote:
print htmlspecialchars("[EMAIL PROTECTED]@#%:[EMAIL PROTECTED]@[EMAIL
PROTECTED]|#:~De
Yes, I'm sure.
Nik Makepeace wrote:
Are you sure you don't have an infinite loop anywhere? This sort of
thing can happen if you have an array or a string being built by a loop
that never quits.
Nik
--
The above message is encrypted with double rot13 encoding. Any unauthorized attempt
to decr
Not sure where you can read more, but let me try to explain it. The
bitwise operators operate on a binary representation of a number. 4 is
100 in binary, 5 is 101. 5 | 4 results in 5, because the | operator
sets bits set in either number. 5 & 4 results in 4, because the &
operator only sets
uggling
Thanks
ultimatefootballleague.com/index.php
[EMAIL PROTECTED]
-Original Message-----
From: Leif K-Brooks [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 08, 2003 2:20 AM
To: James Taylor
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Difference between & &&
Not sure where you can read more, b
Try the limit parameter of the explode function, www.php.net/explode.
André Sannerholt wrote:
Hi everyone!
Does anybody know how to "stop" an "explosion" of a string: Let me explain:
$variable_aray=explode('-', $variable);
I want the variable to be devided in only two other ones! If for exampl
for ($i=1; $i<=8 i++)
{
if (${'where'.$i} != '')
{
$whereArray = array_push($whereArray, ${'where'.$i});
}
}
julian haffegee wrote:
Hi all,
I have something thats been driving me mad for days
I have:
if ($where1 != '')
{
$whereArray = array_push($whereArray, $where1);
Try this (untestted):
if(get_magic_quotes_gpc()){
foreach($_REQUEST as $vname => $value){
$$vname = stripslashes($vname);
}
}
John Taylor-Johnston wrote:
I need to stripslashes() practically every $value as I pass data from one submit to another.
L\'apprentissage d\'une langue ...
I
If you have register_globals on, you'll need to session_unregister it.
Gerard Samuel wrote:
Got a problem thats baffling me.
I have a form that includes a file that starts a session.
Creating sessions are no problem, but deleting the session variable is
not working as its supposed to.
Sudo code
How about:
preg_match_all ('/([a-zA-Z0-9]+)/', $subject, $matches);
HTH,
Jason k Larson
Justin French wrote:
Unfortunately, I'm no good with regexp's, so you'll have to hope someone who
IS reads your post :)
Justin French
on 12/03/03 5:14 AM, Kenn Murrah ([EMAIL PROTE
http://zend.com/store/products/zend-encoder.php
http://www.ioncube.com/
Davis Tan wrote:
Hi,
Would like to know whether is there any possibilities to encrypt or compile the PHP scripts so that it is not human-readable? Thanks!
--
The above message is encrypted with double rot13 encoding. A
You're checking with javascript, correct? If so, try checking
server-side too.
Pag wrote:
Been having some hacker problems on my site, and a simple one:
I have a shoutbox, a simple form with name and text that adds
lines to the database. I do checks for insults, too long words, tags,
That's can still easily be spoofed. The only safe way is to validate
the form server-side.
[EMAIL PROTECTED] wrote:
Yes, theoretically...you could require it to be posted data. In order
to do this you would have to make sure "registered_globals" is set to
"off" in your php.ini and then for e
if(stristr($text,'badword') or stristr($text,'badword2') or
strlen($text) > maxlength){
die('Invalid!');
}
[EMAIL PROTECTED] wrote:
So how could you validate it server-side?
-Original Message-
From: Leif K-Brooks [mailto:[EMAIL PROTECTED]
Sent: Wed
That's just not possible.
[EMAIL PROTECTED] wrote:
Swear filtering is easy, I want to know how to make sure the data is
coming from MY formI'm just picky like that. :-)
-Original Message-
From: Adam Voigt [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 8:55 AM
To: [EMAIL P
Correct.
[EMAIL PROTECTED] wrote:
So we aren't actually validating "where" the data is coming from, we
are just validating the data?
-Original Message-----
From: Leif K-Brooks [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 8:57 AM
To: [EMAIL PROTECTED]
Cc: [
strtotime() them, then subtract.
YC Nyon wrote:
Hi,
I need to get the time/date (ie. 1 day 12 hours 11 min 4sec) between 2 time
dates.
Can't seem to find any of these functions in the PHP manual.
Thanks
Nyon
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://ww
You can do that, but it's much less secure.
Scott Holmes wrote:
I'd just like to interject here that I execute php code from cron and
I do not have php compiled as a cgi. I use lynx. Here is a sample of
what I'm doing to e-mail a weekly newsletter to a membership database:
#!/bin/sh
LYNX_TEM
2003, at 09:20 PM, Leif K-Brooks wrote:
You can do that, but it's much less secure.
Scott Holmes wrote:
I'd just like to interject here that I execute php code from cron
and I do not have php compiled as a cgi. I use lynx. Here is a
sample of what I'm doing to e-mail a we
You can't execute PHP from an HTML page. My guess is that your old
provider had PHP parsing enabled for .html files, shich most don't.
Oliver Witt wrote:
Hallo,
after a Provider-Change my counter-script dosn't work again.
My entry is: in an
html-document.
Is there an Error inside?
My server
This has absolutley nothing to do with PHP. I believe that it will stay
if you set the width with CSS, but no promises.
Bev wrote:
Is there any simple way to stop the Cells of a Table from Moving, say for a
simple table I want the first column to be always fixed at 100 pixels(col A)
and the sec
That replies on this list go to the person who originally posted the
message by default? It seems to me that the reply-to header should be
set to the list, or is it not possible with the mailing list system this
list uses?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit
The way I see it, part of the point in a mailing list is for people with
the same question to only have to ask once. Replies not going to the
list by default defeats this purpose.
CPT John W. Holmes wrote:
There is already enough traffic on the list. Just use Reply-All if you want
to include t
if(something){
header("Location: {$_SERVER['HTTP_HOST']}/thispage.php");
}else{
header("Location: {$_SERVER['HTTP_HOST']}/thatpage.php");
}
Beauford.2002 wrote:
Hi,
I have searched around for hours on this and nothing seems to work. I want
simply to do this
if yes - goto thispage.php
if no
That's exactly what logical operators are for.
http://www.php.net/manual/en/language.operators.logical.php
use || instead of && for allowing either to be true.
if ((test1) || (test2) || (test3))
{
\\ if any of these can return true, this will execute
}
HTH,
Jason k Larson
Liam G
www.php.net/str-replace
Awlad Hussain wrote:
I have a string with underscore in the middle.. like "This_That"
which function do i use to replace the _ with space? eg to "This That"
the string is in a variable..
I know its really simple but just don't know which function to use.
any suggestion?
The string is in double quotes, ont single quotes. The single quotes
are simply characters in the double-quoted string. I believe the
register_globals explanation is correct.
Brent Baisley wrote:
I'm pretty sure your problem is the single quotes around your
variables. Single quotes and doubl
Anyone can send any referer (sic) header to your script. It shouldn't
be used for checking if someone is trying to hack the script, but it
should be find in your case.
rotsky wrote:
I've experimented using $_SERVER['HTTP_REFERER'] which seems to work here.
If the user enters valid login detail
You're missing the ; on this line:
$result=strcmp($firstword, $secondword)
Anthony Ritter wrote:
The following test script for the function strcmp() is from page 114 -115 of
PHP (Hungry Minds).
I'm getting a parse error on line 6.
Using PHP 4.1.1 / MS Win 98 / Apache Server.
Many thanks...
T
Steve Buehler wrote:
Another question is this. The "&" in wsstrip(&$str). Does that mean
that it takes the input to the function as Global and changes it
Globally? I am assuming that because that is what the whole function
seems to do for me.
No, it means that it passes a reference to the va
Karina S wrote:
Hello,
I want to make a php site which can generate a html code and display it on
the screen. (Display the code itself.)
I use htmlspecialchars() function. It works fine, but now I have to add
about 200 lines of static html code to print it out. If I put all of the
code in a strin
Jim Lucas wrote:
You could always use at the top of the screen.
And violate every single HTML standard. AFAIK, was never a
real tag.
--
The above message is encrypted with double rot13 encoding. Any unauthorized attempt
to decrypt it will be prosecuted to the full extent of the law.
--
P
In browsers that refuse to follow standards, maybe. Breaking standards
is a bad thing.
Jim Lucas wrote:
So what, it would do what was requested. :)
--
The above message is encrypted with double rot13 encoding. Any unauthorized attempt
to decrypt it will be prosecuted to the full extent of th
Jim Lucas wrote:
well, tell me. What browser follows the standards 100% ??
Most likely none. That doesn't mean you should violate the standards
for absolutley no reason, though! Future browsers will most likely drop
.
--
The above message is encrypted with double rot13 encoding. Any unau
ferent servers, both PHP version 4.3.2.
Any thoughts, comments, suggestions would be kindly appreciated.
Regards,
Jason k Larson
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
jwulff wrote:
How would I calculate if a $number is a multiple of $spacer?
if(int($number / $spacer) == ($number / $spacer)){
echo "It's a multiple!";
}else{
echo "Nope!";
}
--
The above message is encrypted with double rot13 encoding. Any unauthorized attempt
to decrypt it will be prosec
hi,
i didn't find a function for this in the manual, but maybe there is one (or
a workaround):
does anyone have a solution for replacing multiple whitespaces with a single
whitespace whitin a string? similar to trim(). maybe a regular expression?
eg:
$string = 'word1 word2 word3';
$modified
Is there any way to get Apache's list of extension -> MIME type
associations into an array? I want to readfile() a file which only some
users can view for security, but the file types vary from file to file
so I need to know the MIME type.
--
The above message is encrypted with double rot13 en
David R wrote:
Hello,
I have a cookie question.
I have the following code is a file called tc.php
I have no problem retrieving the value cookie value ( 123 ) on my local
machine but when I post to the internet I can't get the cookie value.
Any ideas why?
Did you set the cookie for the productio
David R wrote:
I have never read anything about a production server domain. How do I set
the cookie for it?
Same way as for the cookie on your local server, but change the cookie's
domain.
--
The above message is encrypted with double rot13 encoding. Any unauthorized attempt
to decrypt it will
Dan Anderson wrote:
Be careful when using PHP self. Not all servers support it. If you're
planning on using this script over and over on multiple servers you may
find creating a variable is helpful.
$some_variable = "the_script_name.php";
Then, where you would use PHP_SELF just echo (o
Dan Anderson wrote:
I assure you that server administrators can turn off the variables such
as PHP SELF. It may not be common but it does happen.
The only way to do that would be editing the PHP source. That's above
the IQ of any sysadmin who would want to do that.
--
The above message is encr
SID. If you are posting form data, make sure there is an input
for the session name with a value of the session id, etc.
Hope that helps.
--
Jason k Larson
Dave Alger wrote:
Hi All,
I'm struggling with a session problem and I'm not sure where I should be
looking for the answer.
Most o
[EMAIL PROTECTED] wrote:
I use the dll "php4isapi.dll" and it doesn't work, Could someone give me a
hand?
Most of us don't have crystal balls. What does it do when it doesn't
work? How is it set up? Give us some information!
--
The above message is encrypted with double rot13 encoding. Any
Chris Morrow wrote:
Does anybody recognize this:
!==
with 2 '='
Ive known != to mean not equal to but i'm just looking at someone elses
script and they use this instead. Does anyone know if this works or any
problems with it?
Not identical. Negative ===.
http://us2.php.net/manual/en/language.o
CPT John W. Holmes wrote:
You can get the username, that's it.
$_SESSION['LOGON_USER']
Don't you mean $_SERVER['LOGON_USER']?
--
The above message is encrypted with double rot13 encoding. Any unauthorized attempt
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General
Alvaro Rosales R. wrote:
Hi guys,I am new to PHP and I am writing my forst scripts, so maybe this quesetion
is a kinda stupid, but it is driving me crazy, can you tell meHow can I set a line
break in long line of my code?.
More of a text editor question than a PHP question. In most text
edit
Alvaro Rosales R. wrote:
Thank you but ,(I come from microsoft vb world, and line breaks of code could be
divided with a character(&_), so the compiler could parse it and where it finded that
character it knew that it was a line break), is there something similar in php?
No. Just put a line b
I wish to create be able to put in the meta tags value from functions.
How can be done ?
Here is part of the code :
?>
>
--
The above message is encrypted with double rot13 encoding. Any unauthorized attempt
to decrypt it will be prosecuted to the full extent of the law.
--
Chris Hayes (SENSE) wrote:
if i understand well, a checkbox in a form is only send on to the next
page when it is checked: so the next page will only see a value in
$_POST['checkboxname'] if it is set: else it is not set. Right?
So the followup page cannot see the difference between a form wher
Ow Mun Heng wrote:
This isn't really a Problem but.. is it bad programming practice?? Or I
should just write another function that can return the values/string?
I don't see why it would be, unless you don't like how it looks.
--
The above message is encrypted with double rot13 encoding. Any unau
Daryl Meese wrote:
One important difference between most windows and linux setups is is case
sensitivity. Windows sees $x and $X as the same variable but Linux does
not. so it could be a case issue.
The two OSes do that with /files/, but PHP doesn't rely on the OS to
check variable names. PHP
Daryl Meese wrote:
Well, I know I am not running the latest version of PHP but I don't believe
this is accurate. I believe PHP case sensitivity is based on the os that
processes the file. Can anyone clear this up.
Correct for files, but variables aren't files.
--
The above message is encrypted
Beauford.2005 wrote:
It's obvious though that PHP can not handle it.
A poor workman always blames his tools.
--
The above message is encrypted with double rot13 encoding. Any unauthorized attempt
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (htt
hi guys and gals,
i know this is possible with php, but have been wracking my brain trying to
figure this out, in any case, i am just a beginning php programmer, but
what i want to do is...when a link is clicked, i need to be able to pull
some text from a static html page and dynamically create a
Jason Martyn wrote:
Here's kinda what I'm trying to do (not working of course).
[snip unimportant code]
mysql_query = ("select");
while ($result = mysql_fetch_array($sql_uc, MYSQL_ASSOC)
{
mysql_query .= (" ". $season .".".$result['field_name']." as ".$result['dis
Greg Beaver wrote:
$GLOBALS does not contain a reference to itself
Yes it does. I just ran the following, and I got "Greg is wrong."
--
The above message is encrypted with double rot13 encoding. Any unauthorized attempt
to decrypt it will be prosecuted to the full extent of the law.
--
PHP G
[EMAIL PROTECTED] wrote:
oh right sure thats easy done , i assumed u meant the variable itself
document.formname.fieldname.value=somevar;
Well, ASP can't do any more in that area than PHP can, nor should it be
able to.
--
The above message is encrypted with double rot13 encoding. Any unauthor
[EMAIL PROTECTED] wrote:
yeh i'm saying it would be nice , i didnt say can it, i built an image
uploader progress bar class , it had to use javascript with flash as php
has no way of working out how much a file has uploaded where asp can
Luckily, ASP doesn't work by magic. PHP (thankfully) doesn't
[EMAIL PROTECTED] wrote:
umm sorry i wouldnt know i've never sold my soul to the devil
"lol jscript dude , dont get the boyz and girlz started , it would be
nice if php could do client stuff like asp" --You
--
The above message is encrypted with double rot13 encoding. Any unauthorized attem
Aloha all,
I just wanted to apologize for some of the "Out of Office" alerts some of
you may have gotten from me yesterday. I had thought I had disabled the
function, but it did not work. In any case, I hope that it wasn't too much
of a nuisance to you all.
Mahalo for your understanding,
Ryan
[EMAIL PROTECTED] wrote:
i didnt understand a word of that , please rephrase ??
ASP doesn't do an upload meter by magic. PHP can do anything ASP can do,
it simply doesn't have built-in features for anything unessential.
--
The above message is encrypted with double rot13 encoding. Any unauthor
[EMAIL PROTECTED] wrote:
how is it possible to send a jscript variable to php thats impossible
It would look something like this (unfinished, using comments instead of
real code in a few places:
if(!isset($_GET['height'])){
?>