ote:
>> $filename = implode(array_reverse(explode('/', $value)));
I should have checked before I wrote. It does work, but through me off,
didn't realize that the first arg was optional. Sorry
> I think you ment
>
> $filename = implode('', array_reverse(explode(
I suppose you mean strtotime
-Oorspronkelijk bericht-
Van: Fredrik Thunberg [mailto:[EMAIL PROTECTED]
Verzonden: dinsdag 30 januari 2007 16:36
CC: php-general@lists.php.net
Onderwerp: Re: [PHP] convert date to reversed date
> date("Ymd", strotodate( $value ));
>
Of course I mean:
date
Is this a good way to convert 01/02/2007 to 20070201
$value='01/02/2007';
list($day, $month, $year) = split('[/.-]', $value);
$filename=$year.''.$month.''.$day;
It does work but i would like to verify if there are no better, more logical
ways to do this.
Thanks in advance
Something like:
http://www.groep6049.ksjnet.be/ it does not work anymore (appearently the
cookie domain is not recognized anymore).
Any other ideas?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ks perfectly.
Is it possible to set something extra in my php session variables to make it
work when surfing directly to http://www.ksachiropoelkapelle.be
<http://www.ksachiropoelkapelle.be/> ?
Or do I have to disable the cloaking?
Thanks in advance,
Reinhart Viane
>I think the more likely attack is actually due to how annoying
>magic_quotes is. You have to remove it to do any work, then you have to
>remember to put it back on because you aren't escaping your sql.
>David
What exactly do you mean by ' You have to remove it to do any work '?
Seems that the
Thx a lot
-Oorspronkelijk bericht-
Van: Dave Goodchild [mailto:[EMAIL PROTECTED]
Verzonden: maandag 11 september 2006 14:10
Aan: Reinhart Viane
CC: php-general@lists.php.net
Onderwerp: Re: [PHP] does magic_quotes_gpc prevents sql injection through
forms?
Yes. Always treat incoming data
So, if I understand correct mysql_real_escape_string is the way to prevent
sql injection.
Is there still need (as in both good coding and security) for variable
validation at that point? Like a hidden field id that must only be an int?
Van: Dave Goodchild [
After some comments on my code I went on a 'fieldtrip' to learn about sql
injection...
Now after testing some examples with single and double quotes and mysql
comment (--) I haven't find any way to insert edit or delete any data in the
database.
The loginscript is rather simple:
$query="SELECT FR
Thx, it works like a charm
I think the mysql_fetch_assoc was the thing I was looking for.
-Oorspronkelijk bericht-
Van: Robert Cummings [mailto:[EMAIL PROTECTED]
Verzonden: zaterdag 9 september 2006 17:36
Aan: [EMAIL PROTECTED]
CC: php-general@lists.php.net
Onderwerp: Re: [PHP] loop struc
I've been experimenting some time now but i can't get it right.
I have a database in which I have a table with a list of photo_url
Table: photos
Id photo_url
1 photos/boeket_s40.jpg
2 photos/boeket_k12.jpg
3 photos/boeket_z23.jpg
...
I get this out of the database with thi
Ok 'ill give this a shot together with the guidelines from jochen.
Thx afan.
-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Verzonden: dinsdag 29 augustus 2006 15:28
Aan: [EMAIL PROTECTED]
CC: php-general@lists.php.net
Onderwerp: Re: [PHP] replace single and do
ingle and double quotes
Reinhart Viane wrote:
> This is the code is use to insert/update text into a database field:
>
> $sqledit="update activities set act_extra='$_POST[editextra]',
> act_extra_fr='$_POST[editextrafr]' where act_id=$_POST[editid]";
t
This is the code is use to insert/update text into a database field:
$sqledit="update activities set act_extra='$_POST[editextra]',
act_extra_fr='$_POST[editextrafr]' where act_id=$_POST[editid]";
Now both $_POST[editextra] and $_POST[editextrafr] can contain single or
double quotes.
So the query
Actually, I know that it's browser/OS dependent, cuz I had a bunch of
Mac users who sent only \r all the time.
This may be true only of OS 9, and you may not care about them
anymore, but there it is.
I also would not be so quick to claim that Linux sends \r\n -- It
could be dependent on the brows
82 38
The first column is fixed, but I have an unkown amount of projects
Hope this aint to much html related.
Thanks in advance,
Reinhart Viane
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thx all
-Oorspronkelijk bericht-
Van: Ivo F.A.C. Fokkema [mailto:[EMAIL PROTECTED]
Verzonden: dinsdag 8 augustus 2006 16:17
Aan: Reinhart Viane
CC: php-general@lists.php.net
Onderwerp: RE: [PHP] break up variable and put each element in an array
On Tue, 2006-08-08 at 16:06 +0200
> try this:
>
> $string = "3/01/2005 29/12/2005 2/01/2006 20/02/2006 28/12/2006 1/01/2007
> 15/02/2007";
> $array = explode(' ', $string);
> foreach ($array as $value) echo "Date: $value";
If the user separates the dates by an enter in the textarea, you need to
explode on "\r\n". To be able to
A. I have a page on which people can supply dates in a text area. Dates are
entered like this:
3/01/2005
29/12/2005
2/01/2006
20/02/2006
28/12/2006
1/01/2007
15/02/2007
B. Now I need this Post element to be broken into pieces (per date) and each
of those pieces should be put into a text so the out
Thx Miles and Jay
-Oorspronkelijk bericht-
Van: Miles Thompson [mailto:[EMAIL PROTECTED]
Verzonden: vrijdag 17 maart 2006 22:35
Aan: php-general@lists.php.net
Onderwerp: Re: [PHP] print page from php
At 09:57 AM 3/17/2006, Reinhart Viane wrote:
>All,
>
>I have a web page
on the size of the tables the queried data
will be shown in.
Hope this makes any sense,
Thanks in advance,
Reinhart Viane
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thanks everyone,
Time to dig myself in and see what is best for my purpose. :)
-Oorspronkelijk bericht-
Van: Chris Ramsay [mailto:[EMAIL PROTECTED]
Verzonden: woensdag 23 maart 2005 9:53
Aan: php list general
Onderwerp: Re: [PHP] seraching / indexing in php
If you are using Apache you a
t you take a look at:
http://www.phpdig.net/
Regards,
Frank
2005-03-22 kl. 15.47 skrev Reinhart Viane:
> I'm looking for a script which indexes the pages of a site (dynamic
> pages)
> in a dbase and makes it possible to search the site based on
> keywords/sentences/etc.
&
I'm looking for a script which indexes the pages of a site (dynamic pages)
in a dbase and makes it possible to search the site based on
keywords/sentences/etc.
Does anyone has any experience with such scripts and which do they
recommend?
Thx in advance
Reinhart
$ret = explode('|', $_GET['id']);
if(count($ret) > 1) {
$id = $ret[1];
} else {
$id = $ret[0];
}
Suberb,
This indeed did the trick. Aargh I hate when things are this simple and I
just can't seem to find them...
Thx!
--
PHP General Mailing List (http://www.php.net/)
To unsubscri
I have a page which gets the id of a user from the url.
$_GET[id]
Now this id can have two forms:
Normal: page.php?id=1
Not so normal: page.php?id=whatever|1
I can explode the second string so I only have the number (1). Explode ("|",
$_GET(id))
But this command fails my query in case w
Strange, I did not send any attachement with the message.
Maybe by anti virus software automatically attached something
-Oorspronkelijk bericht-
Van: Jason Barnett [mailto:[EMAIL PROTECTED]
Verzonden: vrijdag 4 maart 2005 17:37
Aan: php-general@lists.php.net
Onderwerp: [PHP] Re: mass emai
I use a while loop and the mail function to send email to
all subscribers of a site. This works fine for 50 users but I know there can be
some problems when you do it like this for 1000 users.
Eg. Limit of page execution is exceeded and even server
crashes because each time a mail is send
I use a while loop and the mail function to send email to
all subscribers of a site. This works fine for 50 users but I know there can be
some problems when you do it like this for 1000 users.
Eg. Limit of page execution is exceeded and even server
crashes because each time a mail is send
This is how I would do it, don't know if it is the best way.
A. get the date out of the database
Let's say $maindate is that date you retrieved from the database
B. split up the date into several parts for day month and year The day as a
number (dd):
$day=date ("j", strtotime($maindate));
The mo
it.
select * from activities where act_date >= NOW() && act_type_id = 1
or something of that nature.
-justin
On Wed, 23 Feb 2005 13:05:53 +0100, Reinhart Viane <[EMAIL PROTECTED]> wrote:
>
>
> Hey list
>
>
>
> I have a mysql table like this:
>
>
Hey list
I have a mysql table like this:
Act_name
Act_type_id Act_date
Heyhey
1
22-06-05
Aloha
2
22-06-05
Tralala
2
22-06-05
Wuhu
1
Probably because you forgot to use a closing } somewhere or you forgot a ;
somewhere
Greetings
-Oorspronkelijk bericht-
Van: Alp [mailto:[EMAIL PROTECTED]
Verzonden: donderdag 3 februari 2005 12:36
Aan: php-general@lists.php.net
Onderwerp: [PHP] Script stuck on final ?>
Why would a php
: [EMAIL PROTECTED]
Subject: Re: [PHP] MYSQL Query question
>Reinhart Viane wrote:
>And a last question:
>I always seem to get stuck on mysql queries when scripting. mysql.com
>gives me a headache whens earching something. Does someone know a good
>mysql manual site or a good mysql bo
shows all online chatters *
total amount of users of that region. It should be all online chatters
from that specified region
And a last question:
I always seem to get stuck on mysql queries when scripting. mysql.com
gives me a headache whens earching something. Does someone know a good
mysql manua
I think it was Darth Moeder
"PHP, I am your mother, *heavely breathing*"
(for those who don't speak dutch: Vader is 'father' and Moeder is
'mother')
-Original Message-
From: Santa [mailto:[EMAIL PROTECTED]
Sent: woensdag 1 december 2004 9:29
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Ver
t; chat_online c2
>>where
>> UNIX_TIMESTAMP(c2.activity)=$limit_time and
>> c2.session_id = $thisuser and
>> ((c1.user1_sessionid = $thisuser) or
>> c1.user2_sessionid = $thisuser));
>>Respectfully,
>>Ligaya Turmelle
gt; ((c1.user1_sessionid = $thisuser) or
>> c1.user2_sessionid = $thisuser));
>>Respectfully,
>>Ligaya Turmelle
>>Reinhart Viane wrote:
> Hey all,
>
> Hope you all have fun this saturday evening :)
> I'm sure i'm having fun except i'm kinda s
-Original Message-
From: Reinhart Viane [mailto:[EMAIL PROTECTED]
Sent: zaterdag 27 november 2004 23:24
To: 'Dustin Krysak'
Subject: RE: [PHP] get image dimensions
$dimensions=getimagesize($image_url);
$dimensions[0]=width
$dimensions[1]=height
Hope this helps
-Origin
w him in
the list (optional delete the record in the database)
}
or maybe i can combine those two queries in one?
Can someone help me out on this?
Thx in advance,
Reinhart
_
Reinhart Viane
<mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
Domos || D-Studio
Graaf Van Egm
his?
Thx in advance
Reinhart
_
Reinhart Viane
<mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
Domos || D-Studio
Graaf Van Egmontstraat 15/3 -- B 2800 Mechelen -- tel +32 15 44 89 01 --
fax +32 15 43 25 26
STRICTLY PERSONAL AND CONFIDENTIAL
This message may contain confidential and propriet
PROTECTED]
Subject: Re: [PHP] Javascript and php
Reinhart,
picture_url.'"';
if($i <= mysql_num_rows($result)-2)
{
echo ',';
}
}
?>
Here is how I do in my developments.
Regards,
Bruno B B Magalhães
On Nov 7, 2004, a
27;
But not after the last picture.
At this moment all pictures have the ',' after there url, even the last
one.
Any way to determine if the url is the url of the last picture and thus
not printing a ',' behind that last one?
Thx in advance,
Reinhart
_
Reinhart Via
L PROTECTED]
Subject: RE: [PHP] using require or include?
Have you looked at the GLOBAL keyword?
http://uk.php.net/manual/en/language.variables.scope.php
> -Original Message-
> From: Reinhart Viane [mailto:[EMAIL PROTECTED]
> Sent: 04 November 2004 23:02
> To: [EMAIL PROTECTED
hat's stupid i think.
Can i use a include without any problems? Or is there a significant
difference in use and security?
Thx in advance
Reinhart
_
Reinhart Viane
<mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
Domos || D-Studio
Graaf Van Egmontstraat 15/3 -- B 2800 Mechele
Also, it seems my messages are posted slower then the ones of Richard...
So I have given the same answer as he did for the second time. My
apoligizes.
Greetings,
Reinhart
-Original Message-
From: Stuart Felenstein [mailto:[EMAIL PROTECTED]
Sent: donderdag 4 november 2004 11:03
To: Richar
Why not, on page 2:
//Set the session variable, input on Page 1
If ($_POST['ListingName']) {
$_SESSION['f1a'] = $_POST['ListingName'];
}
If there is a POST value, it will be used, else $_SESSION['f1a'] will
keep it's value.
-Original Message-
From: Stuart Felenstein [mailto:[EMAIL PROTEC
>>Page 1:
>>//Start the Session - begin Block
>>@session_start();
>>
>>>/>
Is it necesarry to start the session here? Maybe it is if they have to
be logged in or something
Normally I only start the session when I indeed can assign some session
variables in the same page
>>Page 2:
>>//Start the Se
Can someone point me out the best ini settings?
Which are nowadays used as standards when scripts are writte?
I wanna make sure the codes i (try to) write meet this standards
Thx
_
Reinhart Viane
<mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
Domos || D-Studio
Gra
vrijdag 29 oktober 2004 16:51
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Bug-Tracking-System in PHP ?
Am 2004-10-29 09:48:32, schrieb Reinhart Viane:
> Dunno if this is ok:
> http://www.mantisbt.org/
Nice features and 1.0 support postgresql
(can not use MySQL because some tools conflicts
-
From: Stuart Felenstein [mailto:[EMAIL PROTECTED]
Sent: vrijdag 29 oktober 2004 15:29
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP] Code help on a multi select list
--- Reinhart Viane <[EMAIL PROTECTED]> wrote:
> I would choose javascript to to check this
>
Thi
I would choose javascript to to check this
-Original Message-
From: Stuart Felenstein [mailto:[EMAIL PROTECTED]
Sent: vrijdag 29 oktober 2004 15:13
To: [EMAIL PROTECTED]
Subject: [PHP] Code help on a multi select list
I want to do a server side trap if a user selects more
from a mult se
Try this:
And then to populate the list:
select one
'.$rijladders["$x"]["laddername"].'');
}
?>
-Original Message-
From: Garth Hapgood - Strickland [mailto:[EMAIL PROTECTED]
Sent: vrijdag 29 oktober 2004 12:36
To: [EMAIL PROTECTED]
Subject: Re: [PHP] trying
>if ( mysql_num_rows( $rsladders ) )
>{
>while ( $rijladders = mysql_fetch_array( $rsladders ) )
>{
>echo <<$rijladders[laddername]
>EOF;
>}
>}
>Like I wrote above, I tend to use heredoc syntax for stuff like this.
This indeed seems to be a faster way. Can you point me out the <
I always do this with a script like this:
$sql="select * from ladders order by laddername";
$rsladders=mysql_query($sql);
$aantal_ladders=mysql_num_rows($rsladders);
for($x=0;$x<$aantal_ladders;$x++)
{
$rijladders["$x"]=mysql_fetch_array($rsladders)
Dunno if this is ok:
http://www.mantisbt.org/
-Original Message-
From: Michelle Konzack [mailto:[EMAIL PROTECTED]
Sent: vrijdag 29 oktober 2004 5:31
To: [EMAIL PROTECTED]
Subject: [PHP] Bug-Tracking-System in PHP ?
Hello,
Curently I create my website and I need for my development proj
if the
current
session id is identical to the one being set.
Thanks google.
Reinhart Viane wrote:
> Some days ago I asked some questions concerning php and sessions
>
> Apparently it seems to be a bug:
> 'When you use a session name that has only numbers, each call to
> se
Instead of:
Try this:
//unregister the sessions
$_SESSION['validlogin']=""; $_SESSION['username']="";
$_SESSION['password']="";
//destroy the sessions array
$_SESSION = array();
//destroy the session
session_destroy();
Greet
search_for=session&boolean=0&limit=10&ord
er_by=&direction=ASC&cmd=display&status=Open&bug_type%5B%5D=Session+rela
ted&php_os=&phpver=&assign=&author_email=&bug_age=0
And there you pick bug with ID 27688
Just to let everyone know.
Greetz,
Reinhart Via
] = $row->last_name;
//session_register('email');
//$_SESSION['email'] = $email;
session_register('user_level');
$_SESSION['user_level'] = $row->user_level;
}
* last questio
I do not think this causes the problem.
It's just redundant.
Thx anyway
-Original Message-
From: Curt Zirzow [mailto:[EMAIL PROTECTED]
Sent: donderdag 21 oktober 2004 22:11
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Sessions question
* Thus wrote Reinhart Viane:
> PHP Code
>
>I normally do as you have suggested here - but why do you suggest that
>this method is better?
>
>
One reason is for security. You cannot ever rule out the possibility of
a user injecting someone else's data into the session to get access to
information that he should not have. Of course he
On Thu, 21 Oct 2004 14:43:45 +0200, Reinhart Viane <[EMAIL PROTECTED]> wrote:
> Hey Mike,
>
> After some intensive testing it seemed that $user_id did not solve the
> isue
>
> I hereby give the script to get the $user_id:
>
> // check if the user info validates the
d the last thing I've done is putted:
session_start();
On the first line instead of after this:
mailto:[EMAIL PROTECTED]
Sent: donderdag 21 oktober 2004 13:28
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Sessions question
On Thu, 21 Oct 2004 11:39:23 +0200, Reinhart Vian
orrect, but the
$_SESSION['userid'] is the one of the user who logged out...
Now when using user_id in all places it seems to work correctly...
Is userid something that is defined by the server when making sessions?
If not, i don't have any clue what is going wrong...
Can someone help me on this? So i know what is wrong?
Thx in advance
Reinhart Viane
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
in a page checkuser i do this after the user is logged in:
PHP Code
// Register some session variables!
session_register('userid');
$_SESSION['userid'] = $userid;
session_register('first_name');
$_SESSION['first_name'] = $first_nam
66 matches
Mail list logo