[PHP] php.net's custom 404 scripts

2003-06-29 Thread Justin French
Hi all, I used to have a bookmark for how php.net's custom 404/redirect/search script worked, but I can't find it now, and can't see it on php.net... has anyone got a link? Not sure if it was on zend.com or php.net. TIA Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] passwd protected page

2003-06-29 Thread Justin French
on 26/06/03 5:23 PM, Bibhas Kumar Samanta ([EMAIL PROTECTED]) wrote: > my problem is that when I use sessions in the restricted pages > the session_start() seem to reset the form ( when other filled in data > is lost) when go back to the form using > Back in the browser. > So I wanted to avoid se

Re: [PHP] Performance question

2003-06-29 Thread Justin French
n both problems (performance and coding simplicity), but learning how to benchmark your scripts is a vital learning step... Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Cookies and Macs

2003-06-28 Thread Justin French
There should be no differences in PC/Mac/Linux implementations of cookies, for common browsers. I've never had a problem. - which browsers were you testing with? - did those browsers have cookies switched on, with a security level low enough to accept yours? - can you show us a small test scrip

Re: [PHP] PHP Web Based File Management and Security

2003-06-28 Thread Justin French
on 29/06/03 4:12 AM, Dean E. Weimer ([EMAIL PROTECTED]) wrote: >> What is the point of the web based file manager? > To eliminate Local Accounts, and so that they don't have to upload files > via ftp or ssh. > Plain ftp is very unsecure, and using a secure ftp server can be very > confusing to les

Re: [PHP] Forms / Array Question...

2003-06-28 Thread Justin French
on 28/06/03 4:20 AM, Noel Wade ([EMAIL PROTECTED]) wrote: > Anyone know if this (A) works have you tried it? surely it couldn't take more than 10 seconds to find out eh? > and > (B) is not actually just some undefined behavior that's risky to use? it's quite common, although i believe the syn

Re: [PHP] Securing PHP code

2003-06-26 Thread Justin French
I'm not a security expert at all, but... The short answer to your question is that if you have to ask how to make your code secure, then chances are, you probably shouldn't be attempting it at all... but then again, we all have to learn somewhere... Do a google search, and read thousands of artic

Re: [PHP] php question... opening external page/writing to it...

2003-06-23 Thread Justin French
hings like this: if($debug) { echo "Justin, you're an idiot: ".mysql_error().""; } Justin French - Indent.com.au - Graphic, Web & Information Design Web Application Development -

Re: [PHP] limit on displaying a LONGTEXT filed from MySQL database

2003-06-22 Thread Justin French
Here one way you can do it (untested): Justin on 23/06/03 10:41 AM, Artoo ([EMAIL PROTECTED]) wrote: > Hi, > > How can I start searching for the first space in a string while starting at > say the 150th character? I'm trying to display the first 150 characters of > an article that is store

Re: [PHP] Security conundrum ....

2003-06-22 Thread Justin French
Ok, I'm trying to get a grip on what happens here: 1. i visit your site, see a flash movie, which enables me to log-in 2. after i log in, I see a link called "news" 3. I click on it, which pops open a HTML window through javascript, with a URL like example.com/print_news.php [At this point, the

Re: [PHP] a question, need an answer

2003-06-22 Thread Justin French
I think you mean: $_SESSION['eventid'] = 'arma2'; vs $eventid = 'arma2'; session_register('eventid'); I'd advise the first, unless you need to ensure backwards compatibility with PHP < 4.1 Justin on 22/06/03 4:41 PM, nabil ([EMAIL PROTECTED]) wrote: > what is the diffirent between : > /

Re: [PHP] securing a graphic

2003-06-21 Thread Justin French
I'm with Steve on this. Call them (the numerous "hacks" mentioned in this thread) deterrents if you like, but there is NO WAY to secure images. You can brand them with a big watermark, and make sure your copyright and terms of use notice are prominent on the page, but the nature of the web is tha

Re: [PHP] User's Screen Resolution Size

2003-06-18 Thread Justin French
Vernon, If you ONLY wanted to know how to deal with JavaScript variables in PHP, then perhaps you should have limited your question to just that. Your question asked about screen resolutions, which is totally a discussion based around JavaScript. If you wanted to know about JavaScript and PHP, y

Re: [PHP] User's Screen Resolution Size

2003-06-18 Thread Justin French
on 19/06/03 6:54 AM, Vernon ([EMAIL PROTECTED]) wrote: > The point is I don't know how to do that. That's why I was asking. :) This is not a JavaScript list -- find out the value in JS (do some googling, join a JS newsgroup, etc etc), THEN ask us how to work it within your PHP app. Justin --

Re: [PHP] My non-windows friends please help

2003-06-18 Thread Justin French
This is soo OT, but you've got a JS error under IE5.1 Mac OS 8.6: Line 384 Char 2 'undefined' is undefined Now, what exactly are we supposed to be testing??? Shouldn't your browser/platform detection be echoing something to the screen, so we can tell you if it worked/was acurate or not? Jus

Re: [PHP] trigger download with left-click?

2003-06-17 Thread Justin French
on 17/06/03 9:00 PM, Sam Folk-Williams ([EMAIL PROTECTED]) wrote: > I have a site with hundreds of downloadable forms in MS Word format. > Right now to download a form you have to right-click and choose "Save > Target As..." to download the form. Is there a simple script that I > could put in that

Re: [PHP] Difference between $_POST[foo] and $_POST['foo']?

2003-06-17 Thread Justin French
on 17/06/03 6:09 PM, Jarmo Järvenpää ([EMAIL PROTECTED]) wrote: > Hi > > A quickie, how does the $_POST[foo] and $_POST['foo'] differ? > Both do work. $_POST[foo] will look for a pre defined constant foo. Under certain error-reporting levels, this will generate an notice/warning, and it assumes

Re: [PHP] Re: interact with .htaccess

2003-06-15 Thread Justin French
erstand, you'll also have exactly what you want, with the power to extend it as you wish. Justin French - Indent.com.au - Graphic, Web & Information Design Web Application Development - e: ma

Re: [PHP] Why SID changes each time I refresh the page??

2003-06-15 Thread Justin French
Is this up on the web somewhere for us to test? Justin on 16/06/03 3:09 AM, MH_Hong ([EMAIL PROTECTED]) wrote: > I have a very simple php code as below, but may i know why my SID changes > every time i refresh the page? > Do i need to change anything in PHP.ini?? thanks > session_start(); > ?

Re: [PHP] isset()

2003-06-14 Thread Justin French
$output_fname = (isset($HTTP_POST_VARS['fname'])) ? $HTTP_POST_VARS['fname'] : ''; but the value WILL be set regardless... in this case i'd prefer: if(isset($HTTP_POST_VARS['fname'])) { $output_fname = $HTTP_POST_VARS['fname']; } alternatively, I wrote a nice function to pluck out $_POST vars o

Re: [PHP] which is quicker? pseudo XML, or database?

2003-06-13 Thread Justin French
version to XML will be trivial. Regardless > of which route you take if speed is an issue you can always cache either the > parsed XML or the SQL query results. It doesn't make much difference. > > Cheers, > Rob. > > Justin French wrote: >> >> Hi all, >&

[PHP] which is quicker? pseudo XML, or database?

2003-06-13 Thread Justin French
considering: a) storing this data in a MySQL table (a fairly simple query) b) storing this data in a pseudo XML format like: 24 Justin French [EMAIL PROTECTED] 2003-11-28 This is my intro This is my text and html -- say 1000 words? I plan on doing my own performance tests, but I'd love to hea

Re: [PHP] Advice on script length please!

2003-06-05 Thread Justin French
on 05/06/03 7:25 PM, Bix ([EMAIL PROTECTED]) wrote: > If I did this, would it make a huge amount of difference? I'm almost certain it WOULD make a difference, but apart from the execution time, I can't think of anything worse than scrolling through 2000 lines of code looking for the section I'm a

Re: [PHP] TIMESTAMP -> Y-m-d

2003-06-05 Thread Justin French
on 05/06/03 6:24 PM, Nabil Attar ([EMAIL PROTECTED]) wrote: > mysql time stamp well, there are a few different formats that can be returned, so rather than me guessing which type, how about you tell us exactly what format you have (by providing an example), and exactly what format you want to ech

Re: [PHP] TIMESTAMP -> Y-m-d

2003-06-05 Thread Justin French
A unix timestamp, or mysql timestamp? for unix, see http://au.php.net/date justin on 05/06/03 5:38 PM, nabil ([EMAIL PROTECTED]) wrote: > Please help me how to print a timestamp string retrived from the database, > and print it as -MM-DD > > Nabil > > -- PHP General Mailing List (h

Re: [PHP] Gracefully dealing with Cookies OFF

2003-06-05 Thread Justin French
on 05/06/03 8:05 AM, Monty ([EMAIL PROTECTED]) wrote: > Hi Justin, > > I hear what you're saying about refusing people without cookies turned off, > and I really tried to make it work on my site, but, keep running into lots > of problems. I do have enable-trans-sid turned on, but, get inconsisten

Re: [PHP] unix time stamp to readable date

2003-06-05 Thread Justin French
http://au.php.net/date Justin on 05/06/03 1:15 AM, Diana Castillo ([EMAIL PROTECTED]) wrote: > I know this is a stupid question but I am confused, > how do I convert a unix timestamp to a readable date with php? > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: h

Re: [PHP] Best open source banner advertising application

2003-06-04 Thread Justin French
It never ceases to amaze me how much people want for free... ANYWAY, phpAdsNew seems to be the popular recommendation on this list. http://www.phpadsnew.com/ Justin on 05/06/03 12:12 AM, Adrian Teasdale ([EMAIL PROTECTED]) wrote: > Hi there > > We are looking for an open source banner advert

Re: [PHP] Gracefully dealing with Cookies OFF

2003-06-04 Thread Justin French
or cookies, know that you're testing, then let the user know that you don't want their business/traffic is more work than just letting PHP handle it with enable-trans-sid. Justin French on 04/06/03 6:08 PM, Monty ([EMAIL PROTECTED]) wrote: > I've decided to require tha

Re: [PHP] Administration packages

2003-06-04 Thread Justin French
I've built my own framework over time, and would highly recommend it, because you get exactly what you want. but here's a few things that might help: - some sort of form building/validating class (10's or 100's even at phpclasses.com) - read up on some of the large app frameworks... fusebox come

Re: [PHP] Re: Migration from register_globals=on toregister_globals=off

2003-06-04 Thread Justin French
on 04/06/03 3:02 AM, Øystein Håland ([EMAIL PROTECTED]) wrote: > I'm not sure what you mean. To give ONE example: > Earlier I could use this code on top of every page: > if ($printout != "yeah") { include("header.php"); } > This code gives an error today. The variable $printout is set if the visi

Re: [PHP] Cookies and Sessions: What's the Best Recipe?

2003-06-03 Thread Justin French
on 03/06/03 9:43 PM, Ford, Mike [LSS] ([EMAIL PROTECTED]) wrote: >> -Original Message- >> From: Justin French [mailto:[EMAIL PROTECTED] >> Sent: 03 June 2003 06:34 >> To: Monty; [EMAIL PROTECTED] >> Subject: Re: [PHP] Cookies and Se

Re: [PHP] Cookies and Sessions: What's the Best Recipe?

2003-06-03 Thread Justin French
H, Theory only here: If there is a GET value of PHPSESSID (or whatever your sessions are named), then the user is more than likely taking advantage of trans-sid (sid's in the URLs), and cookies are not available. So, we only want to append the sid to URLs in a redirect IF the sid is found in

Re: [PHP] foreach and mysql_fetch_array problem

2003-06-03 Thread Justin French
This is correct: while($myrow = mysql_fetch_array($result)) { // ... } The iteration of the while loop represents one returned row from the mysql result, with $myrow being an array of values returned. Rather than a SELECT * query, let's look at a something where we know the column na

Re: [PHP] Planning a new job

2003-06-03 Thread Justin French
That's really beyond the scope of this list, but: on 03/06/03 10:45 AM, Tim Burgan ([EMAIL PROTECTED]) wrote: > Do you have a face-to-face meeting with the client? It depends if they're in my capital city, or if the job is big enough to warrant me flying interstate > What questions do you ask

Re: [PHP] user login idle timeout feature

2003-06-03 Thread Justin French
on 02/06/03 8:06 PM, electroteque ([EMAIL PROTECTED]) wrote: > thats what i was thinking of logic but i may be having about 10 users logged > in doing full text searching on a 200 meg + database will that affect it ? the issue shouldn't be your full text searching... the issue should be your sess

Re: [PHP] session

2003-06-03 Thread Justin French
on 02/06/03 6:03 PM, Adrian Portsmouth ([EMAIL PROTECTED]) wrote: > The value isn't available until the next page Huh It's available straight away. Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] session

2003-06-03 Thread Justin French
on 02/06/03 9:55 PM, Aris Santillan ([EMAIL PROTECTED]) wrote: Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Cookies - recomendation please

2003-06-03 Thread Justin French
http://au3.php.net/manual/en/features.cookies.php (not intended as a smart-arse post) on 01/06/03 11:56 PM, Ryan A ([EMAIL PROTECTED]) wrote: > Hi everyone, > Some time back I had no idea about sessions and I asked this list to give me > a few links on the web where i can learn about them, tha

Re: [PHP] user login idle timeout feature

2003-06-02 Thread Justin French
off the top of my head... have a column in your user table called "last_active"... it should hold a date-time, or a unix timestamp, or something like that. on each page request by a logged in user, you would update that value with a newer stamp on physical logout, you would set that to zero or n

Re: [PHP] Cookies and Sessions: What's the Best Recipe?

2003-06-01 Thread Justin French
on 01/06/03 6:01 AM, Monty ([EMAIL PROTECTED]) wrote: > I have a member site that uses sessions. People who have their browser > cookies turned off, however, cannot use our site. I read somewhere that to > avoid this, I'd have to manually append the PHPSESSID var to every URL when > redirecting in

Re: [PHP] Using Cookies Securely

2003-05-31 Thread Justin French
The short answer is that if you're worried about security, don't store a uid and pwd in a cookie on the client... banks don't do it, for example. It's also common for the uid to be remembered, but not the pwd. >From what I can see happening on the "big sites", you give the user the option to be r

Re: [PHP] PHP 4.3.2 released

2003-05-31 Thread Justin French
n PHP 5 will be a stable Apache 2 release, so don't hold your breath. Search the archives for detailed answers, especially from Rasmus. Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sessions can be dangerous

2003-05-31 Thread Justin French
on 31/05/03 1:26 AM, George Whiffen ([EMAIL PROTECTED]) wrote: > 1. Heterogeneous Code Environments > php session data is not easily accessible from non-php code e.g. > Perl/C/ASP etc. In contrast, either client-stored data e.g. cookies, > hidden posts, get variables, or data stored in a structu

Re: [PHP] "Email This Story" and "Print" Functions

2003-05-31 Thread Justin French
on 30/05/03 6:36 PM, Jeffrey L. Fitzgerald ([EMAIL PROTECTED]) wrote: > Thanks to Kevin, Monty and the others who helped with my earlier post... > > Anyone have experience with PHP based "Email This Story" and "Print This > Story" functions?? I am looking to add these along with a digital postcar

Re: [PHP] Random Blank Output wit 4.3.2

2003-05-30 Thread Justin French
Do you use sessions? I had some weird results, blank output and loss of session in 4.2.x with sessions using shared memory -- when sessions were changed back to files, all was ok. This may be, but probably not, related :) Justin on 30/05/03 2:00 AM, Andy BIERLAIR ([EMAIL PROTECTED]) wrote: >

Re: [PHP] Netbilling PHP Script

2003-05-30 Thread Justin French
roblem, or teaching someone how to find the answer (and future answers) themselves? "Search google" may not be a detailed answer, or even a polite one, but in many cases (not necessarily this OP of this thread) a lazy question deserves a lazy response. Justin French on 30/05/03 12:49 AM

[PHP] making sense of time(), date() and strtotime()

2003-05-29 Thread Justin French
r appear correct when echoed out using date. How can I reliably generate timestamps which will work on any server, and reliably convert these timestamps to human readable format (eg date('Y-m-d')) on any server? Is the key to use GMT in the strtotime() string and use gmdate() instead

Re: [PHP] Session Question

2003-05-29 Thread Justin French
Register globals essentially takes the value of $_SESSION['foo'] and creates $foo. It does the same thing for GET, POST, COOKIES, etc. The problem here is that you have no way of telling if $foo was a POST variable, GET, SESSION, or whatever. So, I can choose to append ?admin=1 to one of your UR

Re: [PHP] How can I change the timezone?

2003-05-29 Thread Justin French
on 28/05/03 11:49 PM, Jay Blanchard ([EMAIL PROTECTED]) wrote: > [snip] > I am in Hong Kong and the server is in US. > I can't change the server setting. > [/snip] > > How about getting the server time and then adding or subtracting from > that to get the appropriate time? > > http://us2.php.net

Re: [PHP] Create Links on the fly?

2003-05-29 Thread Justin French
umber']}"); } else { header("Location: startpage.html"); } ?> --- It can be done client side, IF you're willing to take on the risks and uncertainties of relying on javascript, which i try to avoid wherever possible. You'll have to ask a JS list ab

Re: [PHP] strip_tags() Quandry....

2003-05-27 Thread Justin French
on 28/05/03 2:56 PM, CF High ([EMAIL PROTECTED]) wrote: > I've got a chunk of HTML text I'd like to format for insertion into our > mySql db. > > Let's say $html_string equals the following: > > > 1 > Bardo, Jesse > S > A > Andover, MA > > > To setup this chunk of text for insertion I first

Re: [PHP] counting words.

2003-04-06 Thread Justin French
It depends on what you define as a word, but let's take the simple approach of stripping HTML et al, and exploding the string on the spaces, then counting the array of words: text that I want to count"; $words = explode(' ', strip_tags($str)); $count = count($words); ?> Really no need for regex

Re: [PHP] magic quotes

2003-04-03 Thread Justin French
wice". Any one got some cool code??? Justin on 03/04/03 6:43 PM, Philip Olson ([EMAIL PROTECTED]) wrote: > On Thu, 3 Apr 2003, Justin French wrote: > >> Hi all, >> >> Can I just have a quick head check on magic quotes runtime (&gpc)? >> >> I

[PHP] magic quotes

2003-04-02 Thread Justin French
Hi all, Can I just have a quick head check on magic quotes runtime (&gpc)? I have them both set to Off currently, and my pages work fine. However, when I set them to on, I end up with slashes throughout the mysql data. Is this the expected behaviour? Seems counter-intuitive to me, but I've nev

Re: [PHP] php.ini not being used?

2003-04-02 Thread Justin French
Ok, that's what I figured! Thanks! Justin on 03/04/03 2:43 PM, Leif K-Brooks ([EMAIL PROTECTED]) wrote: > It's using default settings. You'll have to recompile PHP to change > where it looks for php.ini, or you can move your php.ini file into that > location.

[PHP] php.ini not being used?

2003-04-02 Thread Justin French
Hi, I can't believe I've never bothered to learn this stuff, so I apologise for being totally dumb in advance :P phpinfo() tells me my php.ini is being read from /usr/local/lib, however, there's definitely NOT a php.ini file there. So, I went hunting and found this on http://www.php.net/manual/e

Re: [PHP] timestamp from uniqid()

2003-04-02 Thread Justin French
If you want the microsecond use microtime(). Justin on 02/04/03 8:44 PM, Sebastian ([EMAIL PROTECTED]) wrote: > may i ask what is it that your trying to do? Why not use time(); ? > > cheers, > Sebastian > > - Original Message - > From: "nooper" <[EMAIL PROTECTED]> > > > | Would there

Re: [PHP] month

2003-04-01 Thread Justin French
on 01/04/03 10:31 PM, Jason Wong ([EMAIL PROTECTED]) wrote: > I don't want to be awkward, but wouldn't $m be holding the required info > already? -- ignoring the fact that you have an invalid date. yes. I just re-read the OP... *slaps forehead*. Justin -- PHP General Mailing List (http://w

Re: [PHP] month

2003-04-01 Thread Justin French
on 01/04/03 9:16 PM, Diana Castillo ([EMAIL PROTECTED]) wrote: > how do you get just the month (in numeric format ) of a specific date. (not > today) > same for day and year. The date is in -dd-mm format to start with. > thanks. If your date was -mm-dd, you could do this: But, because

Re: [PHP] GNU & Open Source

2003-03-31 Thread Justin French
on 01/04/03 8:01 AM, [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: > "GPL enforces many restrictions on what can and cannot be done with the > licensed > code." The point is, PHP is not released under GPL any more -- it's under QPL, so this thread hardly seems relevant to any PHP list -- just my

Re: [PHP] excel 2 csv 2 mysql

2003-03-31 Thread Justin French
on 01/04/03 11:48 AM, daniel ([EMAIL PROTECTED]) wrote: > hi guys i am trying to work out how to dynamically be able to upload an excel > file , export it to csv to be able to import into mysql , is there any > examples out there ? fopen gave me binary code :| also see fgetscsv() Justin -- PH

Re: [PHP] Sessions and iframes (or frames)?

2003-03-30 Thread Justin French
My advice is to first get REALLY comfortable with sessions in a non-framed environment... get a grip on logging in, logging out, showing different code for logged in members, restricting a user from doing something more than once, etc etc. THEN try to get it happening in a framed environment. As

Re: [PHP] Re: How do i valadate an email address?

2003-03-29 Thread Justin French
http://www.killersoft.com/downloads/pafiledb.php?action=file&id=4 Justin On 03/27/2003 03:44 AM, Philip J. Newman wrote: > How would i check that an e-mail has the right parts in it. for example. > > username @ domain . ext -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vi

Re: [PHP] Stupid question perhaps?

2003-03-27 Thread Justin French
PHP and Apache 2 don't boogie. A lot has changed in PHP over those versions... did you read the relase/upgrade notes across those versions?? I assume quite a lot of your issues are in relation to the register_globals directive in php.ini, which now defaults to off, not on. If you switch it back,

Re: [PHP] logging ip address when submitting a form

2003-03-27 Thread Justin French
$_SERVER['REMOTE_ADDR'] will contain the remote user's IP address IF it is set by the user agent (browser). It's also worth noting that this IP address could be faked, could be rotated by their ISP on a request-by-request basis (eg all AOL users), could be that of their firewall or network gateway

Re: [PHP] substr() on part an ereg() capture

2003-03-26 Thread Justin French
A that makes more sense!! Am trying everyone's suggestions now... Justin French on 27/03/03 3:32 AM, Marek Kilimajer ([EMAIL PROTECTED]) wrote: > Forgot to mention this is to be run after > eregi_replace("([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])", &q

[PHP] help with preg_replace please

2003-03-25 Thread Justin French
/([^[:space:]]*)([[:alnum:]#?/&=])!ei", "{$2}{$3}", $str); Can anyone point to the problem? The aim is to perform functions on $2 & $3. TIA Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] substr() on part an ereg() capture

2003-03-25 Thread Justin French
Hi, I have this ereg to turn URLs into links: eregi_replace("([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])", "\\1://\\2\\3", $str); ... found it in the manual i think, or maybe on weberdev.com examples Anyhoo, it places the whole link in between the and , which is fine for short links, bu

Re: [PHP] array into another site

2003-03-25 Thread Justin French
ven valid -- I don't know), so 4. based on your array's size, I'd just implode() it, and then explode() it back out on the new site: window.open('view.php?arr=','windo... Justin French on 25/03/03 8:50 PM, Fredrik ([EMAIL PROTECTED]) wrote: > Hi >

Re: [PHP] counting ..

2003-03-24 Thread Justin French
echo "last {$per_page}"; echo " | "; } if($num < $total_num) { echo "next {$per_page}"; } ?> Cheers, Justin French on 25/03/03 5:09 PM, Sebastian ([EMAIL PROTECTED]) wrote: > Hello all. > > rather dumb question. > > I have a pagination syst

Re: [PHP] count up from 7

2003-03-24 Thread Justin French
Huh? Not really following what you want to achieve, but: $floor) { $diff = $n - $floor; //eg 2 // no idea what you want to do from here } ?> on 25/03/03 10:58 AM, Richard Whitney ([EMAIL PROTECTED]) wrote: > Braindead! > > I need to evaluate a number if greater than 7 and a

Re: [PHP] Password Authentication

2003-03-22 Thread Justin French
on 23/03/03 2:02 AM, [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: > On 23 Mar 2003 Justin French wrote: > >> I just md5() the passwords, and reset them if needed... rather than >> retrieving. The advantage for me on this is that it's portable... md5() is >> part of

Re: [PHP] Password Authentication

2003-03-22 Thread Justin French
I just md5() the passwords, and reset them if needed... rather than retrieving. The advantage for me on this is that it's portable... md5() is part of the base PHP install, whereas the mcrypt stuff isn't (or wasn't). Justin on 23/03/03 1:31 AM, [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: > I

Re: [PHP] Wrapping text output

2003-03-21 Thread Justin French
on 22/03/03 3:57 PM, Philip J. Newman ([EMAIL PROTECTED]) wrote: > $my_data = "This is a really long string that could go on for ever and ever > and ever and ever and ever and ever and ever and ever and ever and ever and > ever and ever and ever and don't wrap to my table it makes it bigger"; > >

Re: [PHP] Sessions

2003-03-21 Thread Justin French
on 22/03/03 4:39 AM, Adam - ([EMAIL PROTECTED]) wrote: > Just a thought about sessions, they still rely on cookies working, unless > you pass the session id with every link on the page. If you set your > php.ini file to automatically put the session id in ever link on your page, > that's great, bu

Re: [PHP] Cookie or Session??

2003-03-21 Thread Justin French
on 22/03/03 4:18 AM, Jason Wong ([EMAIL PROTECTED]) wrote: > Bottom line is if your site requires to login you should make it mandatory > that the user enables cookies on their browser. mandatory seems a little harsh... I haven't seen any bad side effects of trans sid yet (granted, I haven't push

Re: [PHP] ob_start problem

2003-03-21 Thread Justin French
*guess* you're including the footer twice, or are calling ob_end_flush() more than once. not anywhere near sure though!! Justin 21/03/03 11:33 PM, Mr Percival ([EMAIL PROTECTED]) wrote: > Hi, > > I have a page that has an include at the top of the page and an include at the > bottom of th

Re: [PHP] Sessions question

2003-03-21 Thread Justin French
- someone said if you put no time limit on a cookie it > dies when you leave the site - I'm not sure about this, but any help is > appreciated. > > > - Original Message - > From: "Justin French" <[EMAIL PROTECTED]> > To: "Beauford.2002" &l

Re: [PHP] How to prevent re-entry of data upon page refresh?

2003-03-21 Thread Justin French
Hi, Instead of the usual flow chart of form.php -> process.php, where process.php displays a "thankyou" message afterwards, change it to: from.php <-> process.php -> thanks.php process.php doesn't echo anything out to the browser at all... it validates your form data, and depending on what happe

Re: SPAM: Re: [PHP] Sessions question

2003-03-20 Thread Justin French
on 21/03/03 6:20 PM, Beauford.2002 ([EMAIL PROTECTED]) wrote: > What about HTTP_REFERER - is there someway I could incorporate it to so if > the user didn't come from xxx (a page on my site) then kill the session and > redirect him to the login page... The referrer can maybe *help* (not sure how

Re: [PHP] Sessions question

2003-03-20 Thread Justin French
on 21/03/03 4:57 PM, Beauford.2002 ([EMAIL PROTECTED]) wrote: > I have read some posts to this list on sessions and have read as much as I > can find on them, but one problem still exists which I can't figure out. How > do I kill the session when the user leaves my site. So if a user is on > www.

Re: [PHP] Session Question

2003-03-20 Thread Justin French
Hi, A session is meant to exist on one domain... You could pass the session to another domain to *hold* for you: secure checkout Then the secure domain would be responsible for remembering the old session id, and passing it back to your site when finished... Essentially, I think that each dom

Re: [PHP] Increase a month

2003-03-20 Thread Justin French
For this exact instance (ie, trying to get the current month, and next month) then all you need is: Justin on 21/03/03 1:00 AM, shaun ([EMAIL PROTECTED]) wrote: > Hi, > > could someone tell me why this: > > $month = date(m); > echo "\$month: ".date(F,strtotime($month)).""; > $month = $mon

Re: [PHP] Cleaning user data

2003-03-19 Thread Justin French
on 20/03/03 3:53 PM, John W. Holmes ([EMAIL PROTECTED]) wrote: >> And yes, definitely striptags(), and follow the advice on the rest of > the >> thread. > > I disagree. I think stripping HTML from my text is a horrible thing. If > I want to put a in my text, then use htmlentities() and show me a

Re: [PHP] Cleaning user data

2003-03-19 Thread Justin French
The first rule is to NEVER rely on anything that they give you, or any of the security precautions in your form code, because someone can always creat a less-secure form which posts to the same script. So, whilst maxlength='4' for a year select thing is great, you should check at the other end tha

Re: [PHP] what's the best way to handle this?

2003-03-18 Thread Justin French
very cool chris!!! Justin on 19/03/03 2:27 AM, Chris Hayes ([EMAIL PROTECTED]) wrote: > At 14:38 18-3-03, you wrote: >> Ok, I hope this makes sense, >> >> When a user 'registers' with our site, I want to generate their personal >> webpage for them. Currently, I have a webpage where the conten

Re: [PHP] Sensibly accounting for timezone differences?

2003-03-17 Thread Justin French
on 17/03/03 11:55 PM, M Wells ([EMAIL PROTECTED]) wrote: > I'm an Australian PHP developer and host most of my web sites on US > servers. One in particular is primarily accessed by Australian visitors > and I want to be able to reflect Australian Eastern Standard Times when > writing / reporting r

[PHP] Re: magic quotes runtime and gpc -- difference?

2003-03-17 Thread Justin French
Apologies -- I found the documentation in the php.ini comments. Justin on 17/03/03 10:08 PM, Justin French ([EMAIL PROTECTED]) wrote: > Hi all, > > I'm attempting to find some documentation on magic_quotes_runtime and > magic_quotes_gpc -- what's the difference? > &

[PHP] magic quotes runtime and gpc -- difference?

2003-03-17 Thread Justin French
Hi all, I'm attempting to find some documentation on magic_quotes_runtime and magic_quotes_gpc -- what's the difference? Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Force refresh of graphic - how?

2003-03-16 Thread Justin French
Ok, thanks for the tip :) Justin on 13/03/03 7:53 PM, Ernest E Vogelsinger ([EMAIL PROTECTED]) wrote: > At 23:33 12.03.2003, Justin French said: > [snip] >> Put this code in your shared library of functions (adapted from manual,

Re: [PHP] Dynamic titles.

2003-03-15 Thread Justin French
You can split $_SERVER['REQUEST_URI'] on the /'s to get the directories, eg: http://site.com/info/your_pet/dogs/page.html would result in /dir/anotherdir/page.php So, (untested code): Should echo something like: 'Name of My Site / Info / Your Pets / Dogs' All you need to to do is echo $titl

Re: [PHP] Crypting Passwords for storage.

2003-03-15 Thread Justin French
Commonly, you don't need to encrypt it. just md5() the password before inserting it, so you only store the md5'd password. then, to check on login, md5() the password they enter into a form... if they match, then they are the same. heaps less code, no need to mycrypt libraries to be installed, e

Re: [PHP] Checking for a Valid Email String.

2003-03-15 Thread Justin French
on 14/03/03 2:09 AM, -{ Rene Brehmer }- ([EMAIL PROTECTED]) wrote: > Jumping in... Jumping in also: http://www.killersoft.com/downloads/pafiledb.php?action=file&id=4 This is a PHP port of a well respected Perl script which CHECKS THE FORMAT OF THE EMAIL ADDRESS AGAINST THE RCF SPEC. I use it E

Re: [PHP] checking $_POST variables

2003-03-15 Thread Justin French
As explained already, not a good idea :) Also, if someone makes a copy of your form and excludes one of the fields, then it won't be set in POST at all. Keep an array of the fields you have in the form. I choose to set the field as the key, and then for the value either 1 (required) or 0 (not re

Re: [PHP] Re: Your script possibly relies on a sessionside-effect which existed until PHP 4.2.3

2003-03-12 Thread Justin French
on 13/03/03 11:23 AM, chris ([EMAIL PROTECTED]) wrote: > Now, if any other geniouses would like to help me (or any other frustrated > 4.3.1 users) figure out a solution for this vague error message, don't > follow Justin's very unhelpful footsteps. Well I'll certainly never make the mistake of at

Re: [PHP] Re: Your script possibly relies on a sessionside-effect which existed until PHP 4.2.3

2003-03-12 Thread Justin French
My *GUESS* is that you're using: session_register('var') session_unregister('var2') rather than $_SESSION['var'] = 'something'; unset($_SESSION['var2']); Either that, or you're referring to session vars as $var instead of $_SESSION['var'] Give that a go and see what happens. Justin on 13/

Re: [PHP] Random String Generation

2003-03-12 Thread Justin French
on 13/03/03 5:49 AM, Mike Walth ([EMAIL PROTECTED]) wrote: > Hello: > > What I am trying to do is to create a email verification routine with PHP. > When people register on the site they will get an email sent to them with a > link such as http://mysite.com/activation.php?ID=ghjghjg367ghjlkj9hjlk

Re: [PHP] Force refresh of graphic - how?

2003-03-12 Thread Justin French
It's caching an image based on it's URL, so clearly, the browser is not looking for another pic if the URL is the same, based on the settings you have for caching in your browser. Other people's results will vary. The no cache headers on the images SHOULD help, as would no cache headers on the ca

Re: [PHP] Does comments slow down processing a lot

2003-03-12 Thread Justin French
It's a balance between commenting the code enough to be able to develop and re-develop the conde without much grief. As I move through from being a newbie to somebody who spends 80% of their day working with PHP, I've discovered that a LOT of what I used to comment was just pointless, because a qu

<    1   2   3   4   5   6   7   8   9   10   >