If you want 100% accessability, forget cookies were ever invented :)
While you're erasing stuff from your brain, throw out javascript too :D
Some people don't have a fast access to internet. Very simple javascript to
validate a form before submitting it can be IMHO still useful. But I agree
Actually, there is Banother way and you should consider it.
Sensitive information like passwords should be kept in a file stored
outside the live web content directory (ie, outside DocumentRoot on
Apache). This file can then be included in your main file.
This way, you can be sure that a
The GRANT USAGE statement creates a user with no priveleges ... the user
exists but can't do anything.
See MySQL Manual section 6.13
Michael
On Fri, 19 Jul 2002, Sailom wrote:
I just checked grant and it said something like...
GRANT USAGE ON *.* TO 'X'@'%' IDENTIFIED BY .
Any ideas on why this won't work? It will only include(inc/entrance.php)
It never, no matter what the value of $mode, displays collection.php.
?php
$mode = entrance;
if ($mode = entrance) {
include(inc/entrance.php);
}
else if ($mode = collection) {
Hello John,
Friday, July 19, 2002, 12:25:12 AM, you wrote:
JW Any ideas on why this won't work? It will only include(inc/entrance.php)
JW It never, no matter what the value of $mode, displays collection.php.
thinking logicaly:
JW?php
JW$mode = entrance; $mode is entrance
JW
You need == instead of = there
On Fri, 19 Jul 2002, John Wulff wrote:
Any ideas on why this won't work? It will only include(inc/entrance.php)
It never, no matter what the value of $mode, displays collection.php.
?php
$mode = entrance;
if ($mode = entrance) {
Well, first thing I see is that you need to change this:
if ($mode == entrance)
You need the double equal signs for string comparison.
From: [EMAIL PROTECTED] (John Wulff)
Newsgroups: php.general
Date: Fri, 19 Jul 2002 00:25:12 -0700
To: [EMAIL PROTECTED]
Subject: Why won't this
You probably do not have a background of C / C++ programming ;-)
assignments:single equal sign
comparison:dual equal sign
The *assignments* in your if statements are always TRUE, so it will
always execute the statements after the first *if*
So use
if ($mode == entrance) {
and
Hello Rasmus,
Friday, July 19, 2002, 12:26:45 AM, you wrote:
RL You need == instead of = there
RL On Fri, 19 Jul 2002, John Wulff wrote:
Any ideas on why this won't work? It will only include(inc/entrance.php)
It never, no matter what the value of $mode, displays collection.php.
?php
I've just downloaded a bunch of stuff from www.gingerall.org, which I hope
will set up Sablotron on my RH7.2/Apache1.3.24/PHP4.2.1 box.
Can I just use the rpms?:
sablotron-0.95-1.i386.rpm
sablotron-devel-0.95-1.i386.rpm
There is also a Sablot-0.95-PHP.patch in there, plus a
Sablot-0.95.tar.gz
You can try this.
?PHP
$datafile = file(...); // Here comes your filename
for ($k=0; $k=count($datafile)-1; $k++) {
echo $datafile[$k]br; // Display each line read from datafile
}
?
Yamin Prabudy [EMAIL PROTECTED] schreef in bericht
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I got a
Is there a way to get and store the name of a referenced variable into
another variable? Example...
$varname = blah;
checkit($varname);
function checkit($name) {
...code...
}
In the function above, I'd like to find out the name of the referenced
variable (pointed to by $name) which should
I think more info is probably needed here. Is it always the literal string
line3 that you want to catch, or always the second last line?
Some kind of regular expression solution is probably what you need.
Michael
On Fri, 19 Jul 2002, Peter wrote:
You can try this.
?PHP
$datafile =
On Friday 19 July 2002 15:43, Peter wrote:
You can try this.
?PHP
$datafile = file(...); // Here comes your filename
for ($k=0; $k=count($datafile)-1; $k++) {
echo $datafile[$k]br; // Display each line read from datafile
}
?
foreach ($datafile as $line) {
echo $linebr;
}
On Friday 19 July 2002 14:08, David Robley wrote:
You might consider running the first query just to get a COUNT(), rather
than extracting all the resulting rows and using mysql_numrows to
determine how many were returned
Am I missing something? If you do a COUNT() in the query then, in
En réponse à Mantas Kriauciunas [EMAIL PROTECTED]:
Hi
You use = instead of ==
So, the first condition is always true
Regards
Julien
Hello John,
Friday, July 19, 2002, 12:25:12 AM, you wrote:
JW Any ideas on why this won't work? It will only
include(inc/entrance.php)
JW It never, no
From: Justin French [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 19, 2002 7:39 AM
To: php
Subject: [PHP] best way to delete char# 4-7 from a string?
Hi,
Let's say I have the following string:
$str = 'abcdefghijklmnop';
...and I want to strip out char #'s 4 through to 7
snip
$mode = entrance;
if ($mode == entrance) {
/snip
I suppose you added the first line ($mode = entrance; ) for testing
purposes during debugging, but in order for the script to work you
should now remove it, because now $mode will always have
Hello,
can you tell me what i have to do to generate more than one pdf document
with pdflib. At the moment i am not able to do this. the only thing i can do
is actually to make one pdf.
It is really important for me to bring more sites in one document. the
problem is not solved if i just make
hmm... seems a MySQL topic.
I suppose that your table is filled with correct data at some other
point. So what you need is a count query that returns
*one* result and not all records in that table. You do not want a
*while* loop in your PHP script, because that would show a list of
unique ips.
Dear all
I had a folder which contains a lot of pdf file, the name format of the pdf
files are : x.dateformat.pdf (eg : abcdefg.20020718.pdf).
Now i want to use the php script to detect what files it got in a specific
folder.
i want to make a user input form which will let user to input the
I'd use something like:
?php
$handle=opendir('.');
while (false!==($file = readdir($handle))) {
if ($file != . $file != ..) {
echo $file\n;
}
}
closedir($handle);
?
to retrieve dir listing. If you make a function from it, which you'll give a
path for argument you can make the
?php
//DATEFORMAT MMDD
if($dir=@opendir(/yourdirwithpdf)) {
echo Found following files:
while(($file=readdir($dir))!==false) {
if(ereg(^[a-zA-Z0-9]+\.$INPUTDATE\.pdf)) {
echo 'a href='.$file.''.$file.'\n';
}
}
}
?
UPS
if(ereg(^[a-zA-Z0-9]+\.$INPUTDATE\.pdf,
From: René Moonen [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 19, 2002 11:01 AM
$result = mysql_query(SELECT COUNT(DISTINCT IP) AS ips FROM ma_counter);
You _might_ need to add GROUP BY ip (without quotes) to the end of that
query.
Disclaimer: code not tested. You might want to check
Johan Holst Nielsen wrote:
?php
//DATEFORMAT MMDD
if($dir=@opendir(/yourdirwithpdf)) {
echo Found following files:
while(($file=readdir($dir))!==false) {
if(ereg(^[a-zA-Z0-9]+\.$INPUTDATE\.pdf)) {
echo 'a href='.$file.''.$file.'\n';
}
}
}
?
UPS
Jack wrote:
Dear all
I had a folder which contains a lot of pdf file, the name format of the pdf
files are : x.dateformat.pdf (eg : abcdefg.20020718.pdf).
Now i want to use the php script to detect what files it got in a specific
folder.
i want to make a user input form which will let
Well if you *know* your query only returns one row or you are just
interessed in the first row, just forget about the while construction
$result = mysql_query(SELECT id FROM ma_users WHERE user='$PHP_AUTH_USER');
$id=mysql_fetch_row($result)
print $id;
Good luck
René
John Wulff wrote:
Eh.. probably should be:
$result = mysql_query(SELECT id FROM ma_users WHERE
user='$PHP_AUTH_USER');
$row=mysql_fetch_row($result)
print $row['id'];
René
René Moonen wrote:
Well if you *know* your query only returns one row or you are just
interessed in the first row, just forget about
Peter a écrit :
If you removed the
ErrorDocument 404 /phpinfo.php
from the apache conf (or reset it to original value), what happens? Do you
get a standard 404 not found error page?
Sure. But it's an apache problem, it drops the body as soon as you do
have a 404 error. Sux :p
--
1) you use whats called an Itterative Server Model. That is to say you
create an list of all the sockets you are using and pass them to
socket_select (http://www.php.net/manual/en/function.socket-select.php)
and it will tell you which ones are ready to be read from, which can be
written to and
if I do this:
if(validate($_POST['password'], $_POST['username']) != 0)
echo validate($_POST['password'], $_POST['username']);
will it execute the function twice or use the same result twice?
would it be (slightly) faster to do this:
$uid = validate($_POST['password'], $_POST['username'])
On Thursday 18 July 2002 19:32, JJ Harrison wrote:
if I do this:
if(validate($_POST['password'], $_POST['username']) != 0)
echo validate($_POST['password'], $_POST['username']);
will it execute the function twice or use the same result twice?
Function executes twice.
would it be
In article [EMAIL PROTECTED], php-
[EMAIL PROTECTED] says...
On Friday 19 July 2002 14:08, David Robley wrote:
You might consider running the first query just to get a COUNT(), rather
than extracting all the resulting rows and using mysql_numrows to
determine how many were returned
Am
hello everybody,
I have a real problem, and a vague description to it (can you guess?: newbie).
I've created a site which retrieves a word from a database and displays it.
The user enters another word (a translation) which is checked against the
solution and feedback is given. These words are
Firstly, many thanks to Richard and Dan...
A quick test script in PHP would have been faster than asking... :-)
It was just one of those questions that I had burning in my mind at the time, and
since I don't have access to PHP at work (As if the Government would allow that!), I
had to ask :o)
PHP is a scripting language I am pretty much
aware of that... But is there a way to translate
php into binary/machine code or would one
have to write a translator program?
Kondwani...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
thx
Jason Wong [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
On Thursday 18 July 2002 19:32, JJ Harrison wrote:
if I do this:
if(validate($_POST['password'], $_POST['username']) != 0)
echo validate($_POST['password'], $_POST['username']);
will it
[snip]
PHP is a scripting language I am pretty much
aware of that... But is there a way to translate
php into binary/machine code or would one
have to write a translator program?
[/snip]
PHP has an underlying binary translator, but I don't think that the source
code is available from Zend. Are
Hi all how are yas?
I have one question for which I could not find the answer:
How do I remove an element of an array with a specific key or index?
To be clearer:
Lets say I have an array $shoppingCart[] (quite a lot of them)
I want to delete $shoppingCart[345]
39 matches
Mail list logo