Re: [PHP] MD5 Password Login Driving me Crazy

2003-02-17 Thread Justin French
ng. I recall there is a way to trim the field so that it doesn't pick > up spaces but can't recall what it is. Anyone know what it is and if it > could be that? SEARCH THE MANUAL!!! http://php.net/trim Justin French -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] MD5 Passwords (How it works?)

2003-02-17 Thread Justin French
ress is still valid), and let them login with that password, and change it to something else if they wish. Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] session cookie that never expires

2003-02-17 Thread Justin French
on 18/02/03 1:40 AM, Altug Sahin ([EMAIL PROTECTED]) wrote: > Hi there, > > I have setup a site with session management but even the browser is closed > or after the default time expiration of the session, the user should be able > to see his/her personalized settings. I am nor using any cookies.

Re: [PHP] MD5 Passwords (How it works?)

2003-02-17 Thread Justin French
the URL and resetting the password again. > > Jason > > On Mon, 2003-02-17 at 17:48, Justin French wrote: >> on 18/02/03 3:59 AM, Vernon ([EMAIL PROTECTED]) wrote: >> >>> I'm thinking that the MD5 function more than likely encrypts a password to >>> store in

Re: [PHP] session cookie that never expires

2003-02-17 Thread Justin French
Nice!! Justin French on 18/02/03 12:54 PM, Jason Sheets ([EMAIL PROTECTED]) wrote: > You shouldn't store user password in cookies on a browser, instead a > more secure method for the user is: > > On your login form offer the ability to be remembered, if they click the &g

Re: [PHP] is"http://username:password@localhost.com/secure_area/" secure ?

2003-02-18 Thread Justin French
hoose PHP based authentication with sessions. It's REALLY easy to write a script which can protect certain files from non-logged in members with PHP. Justin French on 18/02/03 10:22 PM, Shams ([EMAIL PROTECTED]) wrote: > Hi, > > I have a PHP login scripts that takes the "

Re: [PHP] Sending/recieiving email

2003-02-18 Thread Justin French
for sending, it can be REALLY basic (php.net/mail) or really complex... if you want the complex end of things (HTML, attachments, etc) try manuel lemos' class on phpclasses.com for receiving, i've never done it, but php.net/imap looks like the go justin on 19/02/03 10:13 AM, Jono Bacon ([EMAIL

Re: [PHP] Redirect without header or javascipt

2003-02-18 Thread Justin French
without header() and without javascript? your only option would be a meta refresh, which i can't imagine is going to help :) Justin on 19/02/03 9:59 AM, Daniel Guerrier ([EMAIL PROTECTED]) wrote: > Is there any to redirect in php with using header() > and without the use of javascript? > > _

Re: [PHP] limiting characters

2003-02-18 Thread Justin French
Do you want it chopped at a certain number of words, or characters? Justin French on 19/02/03 10:00 AM, Michael P. Carel ([EMAIL PROTECTED]) wrote: > Hi to all, > > How could i limit the character output that is being displayed in the html > page. Is there a function or a php

Re: [PHP] limiting characters

2003-02-18 Thread Justin French
return $string; } } $foo = "This is my really long string"; // EXAMPLES // no change, since $foo is less than 20 chars (default) echo chopper($foo); // echos 'This is my ...' -- uses default suffix echo chopper($foo,3); // echos 'This is my [too long]' echo chop

Re: [PHP] Sessions Timing Out Too Often

2003-02-18 Thread Justin French
ver-ridden on a per-directory basis using a .htaccess file (apache assumption here). Something like (guess): php_flag session.gc_maxlifetime 1440 Of course, all this was available by: a) searching the manial b) searching the archives, where this gets asked weekly :) Justin French

Re: [PHP] Find IP address

2003-02-19 Thread Justin French
on 20/02/03 1:08 AM, Christian Ista ([EMAIL PROTECTED]) wrote: > Is there a better way to be sure, I have the IP address of the user (the ISP > ip address) No. IP address' can be faked, they can be part of a firewall/network, and the browser can choose not to send them. They are helpfull, but n

Re: [PHP] Date/Time Logic

2003-02-19 Thread Justin French
I assume you talking about a logged in, validated user -- because there's no way to prevent a user from deleting their cookies, or changing their IP, or using a different computer to access the site. My only suggestion is that you create a user/pass login system, maintain it with sessions, and mak

Re: [PHP][PHP] Money Decimals

2003-02-19 Thread Justin French
Did you even bother to look on the site? To prove a point, I did a seach for the word "number" on PHP, and found this result within SECONDS: http://www.php.net/manual/en/function.number-format.php Justin French on 20/02/03 9:54 AM, Dennis Cole ([EMAIL PROTECTED]) wrote: > I

Re: [PHP] problem with mysql / auto increment fields.. ?

2003-02-19 Thread Justin French
s really quick, and you might end up with a MASSIVE data problem REALLY quick -- it's happened to me :) Justin French on 20/02/03 11:34 AM, Chris McCluskey ([EMAIL PROTECTED]) wrote: > MySql should insert a value into that column when you update if you are using > an auto_increment field.

Re: [PHP] php ecommers site

2003-02-19 Thread Justin French
phpShop.org not sure about XML, but everything else is covered Justin on 20/02/03 1:06 PM, Chris Knipe ([EMAIL PROTECTED]) wrote: > Lo all, > > Is there any good already developed PHP based commerce solutions out there? > I'm preferably looking for something with catalogues (product pics, > d

Re: [PHP] sessions

2003-02-20 Thread Justin French
on 21/02/03 5:34 AM, Joseph Bannon ([EMAIL PROTECTED]) wrote: > I'm starting to use sessions for my website and wanted > to know some things before I fully commit to use them. > > 1) How are sessions different from cookies other than > where the information is stored? A session is just a method

Re: [PHP] Logging Referer

2003-02-21 Thread Justin French
on 22/02/03 10:19 AM, Matt Honeycutt ([EMAIL PROTECTED]) wrote: > I'd also like for it to log the referer, > but because the counter is triggered via an tag, the referer is always > the page that has the tag. Is there any other way to grab the referer > that actually sent the user to the page t

Re: [PHP] dynamic website screenshot/screen capture

2003-02-22 Thread Justin French
I get the feeling it could also be done with AppleScript on the Mac. Afterall, PHP, Perl, etc aren't a browser. But it's possible that PHP can trigger a command-line program to do the above. Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Problem with Arrays?

2003-02-22 Thread Justin French
ou bring the array or variable into the scope of the function \n"; echo $byteSize[1] . "\n"; echo $byteSize[2] . "\n"; } ?> Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Printer Friendly page

2003-02-22 Thread Justin French
if you're already building dynamic pages, just roll your own... set a GET var to trigger a simple page view (simple layout, less HTML, very little CSS, no tables, etc etc) which uses the same CONTENT but keeps it simple for printing. justin on 23/02/03 8:28 AM, Sebastian ([EMAIL PROTECTED]) wr

Re: [PHP] Downloading files

2003-02-23 Thread Justin French
on 24/02/03 1:01 AM, Anthony Rodriguez ([EMAIL PROTECTED]) wrote: > In PHP, is there a way to allow the user to download a file (e.g.: > sample.txt) to their computer? And, then, automatically return to the > PHP-generated Web page. why do you need to re-run the page? it can be done with a bit o

Re: [PHP] Another Logging Question

2003-02-23 Thread Justin French
on 24/02/03 3:30 AM, Matt Honeycutt ([EMAIL PROTECTED]) wrote: > I'd like for my counter/logger to be fairly scalable, so I'm toying with two > possible implementation routes: what are you logging (what kind of data) > 1. Have the counter dump visitor info to a text file, then run a cron job on

[PHP] re-populate array keys

2003-02-23 Thread Justin French
Hi, after asort()ing an array, the numeric keys are obviously out of order. what i'd like to do is reset the keys, starting at zero. is there a function for this, or do I just walk through the array with a foreach() and do it manually? Justin -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] re-populate array keys

2003-02-23 Thread Justin French
Oooops! Didn't see it, despite looking over and over :) Thx, Justin on 24/02/03 3:42 PM, John W. Holmes ([EMAIL PROTECTED]) wrote: >> Hi, after asort()ing an array, the numeric keys are obviously out of >> order. >> what i'd like to do is reset the keys, starting at zero. >> >> is there a fu

Re: [PHP] table border colors in html/xml

2003-02-23 Thread Justin French
CSS will help here... however this is definitely NOT a php question... :) Try the NG: comp.infosystems.www.authoring.stylesheets Justin on 24/02/03 5:23 PM, Sunfire ([EMAIL PROTECTED]) wrote: > hi > > my client just told me that he wants his table borders shown on his web page > to be a darker

Re: [PHP] Passing emails to database

2003-02-24 Thread Justin French
Please keep the emails on-list, so that others can learn, and search the answers in the archive -- that's the whole point of the list. on 25/02/03 12:14 AM, Alberto Brea ([EMAIL PROTECTED]) wrote: > Justin, > Thanks for your answer > The only real problem seems to be how to capture the different

Re: [PHP] PHP_SELF syntax

2003-02-24 Thread Justin French
on 24/02/03 11:42 AM, Jason Lange ([EMAIL PROTECTED]) wrote: > What you might try is removing the single-quotes from around PHP_SELF. > > Before: $_SERVER['PHP_SELF'] > After: $_SERVER[PHP_SELF] > > Another note: as far as I can tell you do not need the braces ({}) to > enclose a variable withi

Re: [PHP] Newbie Security Questions...

2003-02-25 Thread Justin French
on 25/02/03 1:10 PM, Miguel Angelo ([EMAIL PROTECTED]) wrote: > From what i have studid the session management, were you start a session > id, and can put in several variables... My question is this, this variables > remain were ? on the user browser (cookies, url enconding ?) or does the > user j

Re: [PHP] Uploading Images

2003-02-25 Thread Justin French
irst -- it isn't hard to find what you need! Justin French on 26/02/03 5:12 AM, clarionhaze ([EMAIL PROTECTED]) wrote: > Hey guys I need to make a place for people to upload images and then I need to > make sure the file size is alright and the pixel size too... Could someone > ple

Re: [PHP] no session id

2003-02-25 Thread Justin French
on 26/02/03 11:39 AM, php ([EMAIL PROTECTED]) wrote: Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Deleting a page after viewing it

2003-02-26 Thread Justin French
Yes, with either sessions, POST or GET, you need to let the second page know that it has to delete the other page, and then delete it with unlink... although I'm SURE there's gotta be a better way to do all this rather than creating/deleting files for each member. Justin on 27/02/03 4:32 AM, Pau

Re: [PHP] session_start

2003-02-26 Thread Justin French
Yeah, get a new host :) J on 27/02/03 11:36 AM, Mr Percival ([EMAIL PROTECTED]) wrote: > >> [snip] >>> Not to be nosey or anything but "usually" session data will always be saved >>> or not. How come one would want to check to see if is was or not. >> --

Re: [PHP] Emacs?

2003-02-26 Thread Justin French
on 27/02/03 11:55 AM, Larry Brown ([EMAIL PROTECTED]) wrote: > 25 ahahahahahahaha -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] HELP PLEASE ! Need PHP Advice !!!

2003-02-27 Thread Justin French
at Adobe InDesign 2 -- I read an article which briefly discussed it's ability to parse or read from XML files -- so you could have a simple XML doc: --- 28 Learning about XML I wish I had time to explore this properly! Justin French [EMAIL PROTECTED] XML,Justin,

Re: [PHP] Capitalising Personal Names

2003-02-28 Thread Justin French
What about DeSilva And McSomething? Justin on 28/02/03 10:11 PM, Danny Shepherd ([EMAIL PROTECTED]) wrote: > Hi, > > Well it's hardly rocket science - a flick through the manual and I came up > with : > > $name=ucwords(strtolower($name)); > > HTH > > Danny. > > - Original Message -

Re: [PHP] How can I detetct if session cookies are enabled?

2003-02-28 Thread Justin French
on 01/03/03 3:52 AM, Don ([EMAIL PROTECTED]) wrote: > Hi, > > I have a site that requires a user to login in for extended function. The > site uses sessions. I note that if a user configures his/her browser block > all cookies, he/she will not be able to navigate the extended part of the > site

Re: [PHP] strip comma from $value

2003-02-28 Thread Justin French
on 01/03/03 4:41 AM, Hugh Danaher ([EMAIL PROTECTED]) wrote: > try ereg_replace(",","",$value); no need for ereg here... str_replace(',','',$value); :) justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] 2 questions !

2003-03-02 Thread Justin French
on 02/03/03 7:51 AM, Vincent M. ([EMAIL PROTECTED]) wrote: > Hello, > > I didn't find in the doc how to: > - Know the full path of the current directory. Like /var/www/to/the/path http://www.php.net/manual/en/reserved.variables.php#reserved.variables.serve r > - Know under which user work apac

Re: [PHP] A PHP page counter / statistics app

2003-03-02 Thread Justin French
on 01/03/03 7:27 AM, Michael Zornek ([EMAIL PROTECTED]) wrote: > I'm ether looking to find or build my own open source php based script, that > would allow you to include a small code chunk on every page of a site and > then view statistics from the info, on what pages were viewed, how many > time

Re: [PHP] Deciding the directory for the uploaded file?

2003-03-02 Thread Justin French
It's all in the manual: http://www.php.net/manual/en/features.file-upload.php In particular, look at the lines involving "move_uploaded_file()" Justin French on 03/03/03 4:00 PM, Denis L. Menezes ([EMAIL PROTECTED]) wrote: > Hello friends. > > I have seen some p

Re: [PHP] Code Validator

2003-03-03 Thread Justin French
it. If you're looking for an OFFLINE validator, then I think you'd need to View Source on the resultant HTML output, copy and paste into a text editor, save it, then run it through your validator. Justin French on 04/03/03 9:51 AM, Beauford.2002 ([EMAIL PROTECTED]) wrote: > Hi,

Re: [PHP] ICQ # validation

2003-03-03 Thread Justin French
Does it actually NEED a regexp? UNTESTED code: 7) && (strlen($icq) < 9) ) { echo "yah"; } else { echo "nah"; } ?> FWIW, Are you SURE that all valid ICQ #'s are between 7 and 9 chars? Surely at some point they'll reach 10 chars, and *may* have started at 6? Justin on 04/03/03 6:00 AM

Re: [PHP] Getting Numerical Index of a Key

2003-03-04 Thread Justin French
on 04/03/03 5:47 PM, Matt Honeycutt ([EMAIL PROTECTED]) wrote: > I'm just going to spend the extra 5 minutes and rewrite that little > chunk of code. Sounds like the right move :) Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Keeping existing data in textarea's

2003-03-04 Thread Justin French
;); exit; } } ?> "; } echo "\n"; echo "Name: "; echo "Email: "; echo ""; echo ""; } if($action == "thanks") { echo "thanks!!!"; } ?> Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Using PHP to Generate a CSS Style Sheet

2003-03-04 Thread Justin French
irectly into your PHP application, and it will just appear as part of the HTML source. Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Remember scrolled position

2003-03-04 Thread Justin French
This is not a PHP issue -- it's a javascript issue... try a JS newsgroup or list. Justin on 05/03/03 1:10 AM, Lars Espelid ([EMAIL PROTECTED]) wrote: > I'm trying to implement the following functionality into the file test.php: > > When I scroll down the page and then hit a button, the page s

Re: [PHP] Truncating text

2003-03-04 Thread Justin French
Take the truncating out of the picture, and just concentrate on returning two results from mysql. If that works, then try it with rows that contain an exclamation mark (!). If they both work, THEN concentrate on truncating the variable down. Let us know how far you get, so we can pinpoint the pr

Re: [PHP] file_exists() question

2003-03-08 Thread Justin French
on 09/03/03 8:10 AM, Charles Kline ([EMAIL PROTECTED]) wrote: > if(file_exists('cherpdocs/$annrow[id].doc')){ > echo "Funding > details paper"; > } This is a pretty simple debugging type query, so: First things first, make sure that $annrow[id] is what you expect, by echoing it to the screen. "

Re: [PHP] repost: cookie problem

2003-03-08 Thread Justin French
1. Perhaps the browsers aren't accepting the cookies, or there are some other security settings set too high? Have you LOOKED in each browser to see if the cookie is set? 2. Is it the EXACT same version of PHP that you have before/after the reinstall? 3. It *may* be something to do with register

Re: [PHP] Displaying a file

2003-03-09 Thread Justin French
ly want to store the target files outside the doc root, or forbid apache to serve them directly over http. There's a decent article here: http://www.zend.com/zend/trick/tricks-august-2001.php Justin French on 10/03/03 1:17 PM, Todd Cary ([EMAIL PROTECTED]) wrote: > I want to display a

Re: [PHP] Displaying a file

2003-03-09 Thread Justin French
Same way image.php would do simular things to what view.php does in the script below. Justin on 10/03/03 2:07 PM, Mark Tehara ([EMAIL PROTECTED]) wrote: > On that note, how would i load an image from outside the document root? > > > > - Original Message - > Fr

Re: [PHP] Displaying a file

2003-03-09 Thread Justin French
on 10/03/03 3:40 PM, Todd Cary ([EMAIL PROTECTED]) wrote: > OK! This makes sense. What is the syntax to do > > b) output an appropriate header for the file type > c) pass through the actual file contents > > if I were doing an HTML file - if I were doing a PDF file? *Slaps forehead loudly*

Re: [PHP] sessions

2003-03-10 Thread Justin French
ed... therefor, you need to be concerned about running the login process under SSL. Justin French on 10/03/03 7:36 PM, Shaun van den Berg ([EMAIL PROTECTED]) wrote: > Hi, > > Tell me , is sessions safe - why is it really used ? Is it important te > delete the session variables

Re: [PHP] PHP Online Store

2003-03-10 Thread Justin French
You only have two options really... either they manually change each product themselves via a web based form, or the process is managed by a CSV file. The first thing you need to ensure is that every product in the catalogue has a unique key (identifier / product number / barcode number / whatever)

Re: [PHP] Re: sessions terminating randomly please help

2003-03-10 Thread Justin French
Check if your server is using files or shared memory to save the sessions... My ISP was using mm (memory), and it was buggy... when they changed back to files, all was well. Justin on 11/03/03 7:40 AM, David Chamberlin ([EMAIL PROTECTED]) wrote: > It's possible you're being afflicted with the s

Re: [PHP] .htaccess Help

2003-03-10 Thread Justin French
Get on the Apache list, not the PHP one :) Justin on 11/03/03 10:39 AM, Pushpinder Singh Garcha ([EMAIL PROTECTED]) wrote: > Hello All > > I need to allow users to be able to access ONLY non-html files in a > Secret Dir. > Can anyone suggest a .htaccess method to do just that. > > I have a .ht

Re: [PHP] newbie: contents will not output

2003-03-10 Thread Justin French
I've never opened a URL with fopen. Have you looked for examples in the manual? http://php.net/fopen ??? however, I can see one problem... filesize($file) -- where is $file???? Justin French on 11/03/03 2:22 PM, Anthony Ritter ([EMAIL PROTECTED]) wrote: > I'm trying to test

Re: [PHP] Subtracting two dates

2003-03-10 Thread Justin French
Then you need to decide if you want to show days, or hours, or years difference... I'll show you hours and days: You then need to round the number using round(). Justin on 11/03/03 3:02 PM, Ben C. ([EMAIL PROTECTED]) wrote: > There are a lot of artlicles on this but I need a simple solu

Re: [PHP] Subtracting two dates

2003-03-10 Thread Justin French
on 11/03/03 5:04 PM, Ben C. ([EMAIL PROTECTED]) wrote: > Thanks, Justin. It works. Of course it does :P HTH Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Forms & Session variables

2003-03-10 Thread Justin French
You need to slow down and think things through. My recommendation would be to get a SINGLE PAGE form to work how you want first, then assess the logic needed to move onto multiple forms. Also, this was asked a while back, so here was my answer & sample code last time: http://marc.theaimsgroup.co

Re: [PHP] A small problem

2003-03-11 Thread Justin French
Can you pick a decent subject like "help with regular expressions" rather than something pointless and generic like "a small problem"... a lot of readers will skip over generic subject lines, and you also miss out on attracting the attention of those who regexps well. Justin -- PHP General Mail

Re: [PHP] session

2003-03-11 Thread Justin French
on 11/03/03 6:47 PM, Shaun van den Berg ([EMAIL PROTECTED]) wrote: > Hi, > > What should the probability of your garbadge collector be ? is a 100% bad , I've never seen much more than 20% on a production server -- most at 1%. If you make it 100%, then PHP will do a garbage clean out on EVERY re

Re: [PHP] Little Problem :)

2003-03-11 Thread Justin French
PLEASE use a descriptive heading, rather than something generic. Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] need help with parsing form input ...

2003-03-11 Thread Justin French
which strip out all other characters from a string? " It's always better to specify what you will ALLOW rather than trying to think of everything little character you want to REFUSE. Unfortunately, I'm no good with regexp's, so you'll have to hope someone who IS reads your p

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

2003-03-11 Thread Justin French
soft.com/downloads/pafiledb.php?action=file&id=4 Haven't had a single complaint. The only true way to validate an address is for some to open the mail account, read an email, and then respond. Everything else just prevents obvious mistakes, dummy address' and typos. Justin French --

Re: [PHP] Subtracting two dates

2003-03-11 Thread Justin French
tell us Justin French on 12/03/03 4:06 PM, Ben C. ([EMAIL PROTECTED]) wrote: > Is there a way not to round the number but get a whole number? I don't > want to have 1.5 days show as 2 days because it really has not gone into day > 2? > > -Original Message- &

Re: [PHP] Subtracting two dates

2003-03-11 Thread Justin French
on 12/03/03 4:35 PM, Justin French ([EMAIL PROTECTED]) wrote: > if you want to round ALL decimals up, then you might have to create > something from scratch, but Actually, there's a link to both ceil() and floor() on the round() page in the manual. Justin -- PHP General Mailing

Re: [PHP] recently I meet a problem as follow ,I want to ask you

2003-03-12 Thread Justin French
on 12/03/03 7:40 PM, Chris Hewitt ([EMAIL PROTECTED]) wrote: > jiahuo xiao wrote: > >> ,it show many tables,it means I config >> correctly.but why when I post pamameter to an action >> page,all the pamaeter which I get is blank that is >> "".so the action page run incorrectly,how could I do? >> t

Re: [PHP] two questions about usning session.

2003-03-12 Thread Justin French
on 07/03/03 5:45 PM, Joe Wong ([EMAIL PROTECTED]) wrote: > Hello, > > I have two questions about using sessions in PHP. > > Firstly, I use session to remeber the username and a session ID for the > given user. When I hit the BACK button on the browser (IE), it always set > that my page is expire

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

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] 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] 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] 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] 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] 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] 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] 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] 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,

[PHP] mail() with OSX

2003-07-02 Thread Justin French
Hi all, I've googled, but to no avail... I have apache 1.3.x, php 4.3.2 and mysql on my new g4 under OSX 10.2.6, and most stuff seems to be working fine, but i just did a test using mail() and it didn't work out... no error in the apache log, no error on the screen. Obviously PHP can't find se

Re: [PHP] mail() with OSX

2003-07-02 Thread Justin French
f the bat, but google should help) Hope this helps On 07/02/03 11:07 PM, "Justin French" <[EMAIL PROTECTED]> wrote: Hi all, I've googled, but to no avail... I have apache 1.3.x, php 4.3.2 and mysql on my new g4 under OSX 10.2.6, and most stuff seems to be working fine, but i

Re: [PHP] How to hide URL but it's not from a form just a link ?

2003-07-11 Thread Justin French
What about sessions? Depends on your circumstances and the flow of pages, but storing all these vars in a session, then only passing the session id around in the URL could be an alternative Justin On Saturday, July 12, 2003, at 12:21 PM, Tom Rogers wrote: Hi, Saturday, July 12, 2003, 4:05

[PHP] any danger in overwriting $_GET ?

2003-07-14 Thread Justin French
ers) write scripts c) have the values as superglobals (ie, available within functions) TIA Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] any danger in overwriting $_GET ?

2003-07-14 Thread Justin French
On Tuesday, July 15, 2003, at 01:24 PM, Curt Zirzow wrote: Have you tried running the script to see if $_GET['myNewKey'] actually is filled out? You'll find that it is. of course I tried it, and yes it works, but that doesn't mean it's smart/safe :) Using the special name space variable rather

[PHP] textarea rich replacement?

2003-07-14 Thread Justin French
Hi all, I've looked at both editize(.com) and HTMLArea, both of which are in-browser Rich Text editor replacements (written in java) for the standard . Unfortunately, they both allow far too much control... at most I only want to offer H1, H2, P, B, A and I -- no colors, no images and please

Re: [PHP] Authentication system

2003-07-15 Thread Justin French
Doug, On Thursday, July 3, 2003, at 05:42 AM, Doug Essinger-Hileman wrote: Now I need to learn how to take the incoming message and process it. I am assuming that the processing can be done by php. Any suggestions, either on how to do this, or where I might learn how to do this? The simple versi

Re: [PHP] PHP Best practices

2003-07-16 Thread Justin French
Hi, There are plenty of articles on zend.com (and others) to do with best practices, smart coding, etc etc. I'd suggest digging through zend, and having a look on google... I don't think you'll everything you want in one book... but it's definitely all out there on the web Justin On Wednesda

Re: [PHP] Verifying a certain amount of numbers

2003-07-16 Thread Justin French
If you care about performance at all, try and find away around the problem without regular expressions... I tested if( (strlen($str) == 6) && (is_int($str)) ) vs if(ereg('^[0-9]{6}$',$str)) ...on my LAN test server with 10 iterations, and the regexp was nearly 2 times slower than the f

Re: SPAM: [PHP] KEEP IMAGE RATIO

2003-07-16 Thread Justin French
Whilst I have not tested this on multiple platforms/browsers, I believe if you only specify one (the width for example), the browser will proportionately sace the height. The is useful with a fixed width OR height area, but does not solve a scenario where there are height AND width contraints.

Re: [PHP] Verifying a certain amount of numbers

2003-07-16 Thread Justin French
On Thursday, July 17, 2003, at 12:17 AM, Curt Zirzow wrote: Excellent point! I find my self using regex's a bit to often when there are other solutions available. btw, have you ever tested the difference between if(ereg('^[0-9]{6}$',$str)) if(preg_grep('^[0-9]{6}$',$str)) I've be

Re: [PHP] pdf information..

2003-07-16 Thread Justin French
On Thursday, July 17, 2003, at 11:38 AM, Louie Miranda wrote: i never tried FPDF but just downloaded it. i'll try in a while.. have you tried making a business card using this? i've testing the pdflib it works great, but the sad thing is i have to pay for it. What's the problem with paying for

Re: [PHP] Display HTML/PHP code on a web page

2003-07-16 Thread Justin French
Don't really understand the problem but htmlspecialchars() will convert: Justin & Co into Justin & Co ... which will solve half your problem... not sure what to do with php code... perhaps the same thing... Or, you may want to look at show_source() and highlight_file() as well... Jus

Re: [PHP] Protecting files with PHP

2003-07-17 Thread Justin French
Read this -- it got me well and truely pointed in the right direction http://zend.com/zend/trick/tricks-august-2001.php Justin On Friday, July 18, 2003, at 01:36 AM, Juan Nin wrote: I need to do the same and a .htacces file would not suite the problem I need to do as yahoogroups does When you

Re: [PHP] sessions help

2003-07-17 Thread Justin French
You called session_start() too far down the page... and by that time, you had already outputted something (text, html, or even just blank lines) to the browser. 1. rearrange you code so that session_start() is as close to the top as possible 2. implement output buffering Justin On Friday, J

Re: [PHP] classes v. functions

2003-07-19 Thread Justin French
Whether it's the right move or not, I've put off my learning of PHP classes and OOP methods until PHP5.x, so I guess the time in near :) However, *especially* if you're the only programmer on a project, you can take the ideas & benefits behind OOP (for me, having clear, clean code that can be r

Re: [PHP] URL correctimizer ... how to make one?

2003-07-19 Thread Justin French
I think you should attempt to detect a VALID url, rather than attempting to correct human errors. You're guaranteed not to think of every possible mistake, so IMHO, you're approaching it the wrong way. Put the responsibility back on the user to write a valid URL, and alert them to invalid URLs

Re: [PHP] locking to domain

2003-07-19 Thread Justin French
again, what's stopping the owner of the script from modifying/removing those lines? Nothing -- unless you encode your entire script with something like zend encoder. It depends what you're trying to achieve. Justin French On Saturday, July 19, 2003, at 02:00 AM, Ryan A wrote:

Re: [PHP] Forms and PHP

2003-07-19 Thread Justin French
This is done with javascript... without getting too off topic... JS can get the contents of the textarea, and submit it via get (maybe post as well) to another (pop-up) window. the pop-up window can highlght misspelled words, and even make dynamic changes to the content in the first window. i

Re: [PHP] Coding Question

2003-07-20 Thread Justin French
Retrieving the results can be LIMITed to X results starting at row Y using mysql's LIMIT function. Check the MySQL manual, but basically, this will limit the result to 10 rows, starting with row 5. SELECT name FROM customers LIMIT 5,10 By taking your values for the starting point and row count

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