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: [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
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 post :) Justin French on 12/03

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

2003-03-11 Thread Justin French
/pafiledb.php?action=fileid=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 -- PHP General Mailing List (http

Re: [PHP] Subtracting two dates

2003-03-11 Thread Justin French
, then 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- From: Justin French [mailto

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 List (http

Re: [PHP] sessions

2003-03-10 Thread Justin French
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 after u use it ? When a user logs on to my site

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 /

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

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 .htaccess

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 the following

Re: [PHP] Subtracting two dates

2003-03-10 Thread Justin French
? $otherDate = 2003-11-15; // -mm-dd format $otherDateStamp = strtotime($otherDate);// now a unix timestamp $difference = time() - $otherDateStamp; // diff in seconds ? Then you need to decide if you want to show days, or hours, or years difference... I'll show you

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:

Re: [PHP] Displaying a file

2003-03-09 Thread Justin French
contents You would actually 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

Re: [PHP] Displaying a file

2003-03-09 Thread Justin French
Message - From: Justin French [EMAIL PROTECTED] To: Todd Cary [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, March 10, 2003 4:06 PM Subject: Re: [PHP] Displaying a file Change your link to something like: a href=view.php?file=raceschedule.pdf ../a view.php will NOT be a HTML

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* Did

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 br /a href=\cherpdocs/$annrow[id].doc\Funding details paper/a; } This is a pretty simple debugging type query, so: First things first, make sure that $annrow[id] is what you

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

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
: input type='text' name='email' value='{$email}' /br /; echo input type='submit' name='submit' value='submit' /br /; echo /form; } if($action == thanks) { echo thanks!!!; } ? /body /html Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

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

2003-03-04 Thread Justin French
to suit. this is my .htaccess file: Files dynamic.css ForceType application/x-httpd-php /Files Or, you can just include() some CSS generated by PHP directly into your PHP application, and it will just appear as part of the HTML source. Justin French -- PHP General Mailing List (http

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

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

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: ? $icq = 2264532680; if( (is_int($icq)) (strlen($icq) 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*

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

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

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 php scripts for uploading files

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 - From:

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. Is

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] HELP PLEASE ! Need PHP Advice !!!

2003-02-27 Thread Justin French
. Is it taking stuff from quark and messing with it, or is it having a good clean source of data which can be used many ways? Justin French on 28/02/03 12:24 AM, justin brenton ([EMAIL PROTECTED]) wrote: can anyone give me some good advise on how abouts I should go about maintaining a newspaper

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,

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

Re: [PHP] Uploading Images

2003-02-25 Thread Justin French
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 please send me in the right

Re: [PHP] no session id

2003-02-25 Thread Justin French
on 26/02/03 11:39 AM, php ([EMAIL PROTECTED]) wrote: ? session_start (); // OPTION echo session id: . session_id(); // OR $sid = session_id(); echo $sid; ? Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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 within a

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 of

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 function

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] dynamic website screenshot/screen capture

2003-02-22 Thread Justin French
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
or variable into the scope of the function ? $byteSize[0] = bytes; $byteSize[1] = kb; $byteSize[2] = mb; function getMaxSize( $maxSize ) { global $byteSize; echo $byteSize[0] . br/\n; echo $byteSize[1] . br/\n; echo $byteSize[2] . br/\n; } ? Justin French -- PHP General

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

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 img tag, the referer is always the page that has the img tag. Is there any other way to grab the referer that actually sent the user to the

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 of

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

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

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 am writing

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

2003-02-19 Thread Justin French
to be changed, but I'm just pointing out that it's worth getting this stuff right, because one day you'll copy the same code/structure to another site, and it may attract 100,000 users really quick, and you might end up with a MASSIVE data problem REALLY quick -- it's happened to me :) Justin

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,

Re: [PHP] ishttp://username:password@localhost.com/secure_area/ secure ?

2003-02-18 Thread Justin French
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 username and password and stores it in a session. Once

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 classes

Re: [PHP] limiting characters

2003-02-18 Thread Justin French
($foo,3); // echos 'This is my [too long]' echo chopper($foo,3,'[too long]'); ? Justin French on 19/02/03 10:18 AM, Michael P. Carel ([EMAIL PROTECTED]) wrote: it would be better if it will be chopped by words and not by characters. Any idea how? - Original Message - From

Re: [PHP] Sessions Timing Out Too Often

2003-02-18 Thread Justin French
a .htaccess file (apache assumption here). Something like (guess): IfModule mod_php4.c php_flag session.gc_maxlifetime 1440 /IfModule Of course, all this was available by: a) searching the manial b) searching the archives, where this gets asked weekly :) Justin French on 19/02/03 12

Re: [PHP] Protecting files

2003-02-17 Thread Justin French
My preference 1. if possible, store the files above your public_html directory (doc root)... this means they cannot be over http:// by apache, if that isn't possible: 2. use .htaccess to either block the entire directory of includes, or all *.inc files, or whatever you think is best.

Re: [PHP] MD5 Password Login Driving me Crazy

2003-02-17 Thread Justin French
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/) To unsubscribe, visit: http://www.php.net

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

2003-02-17 Thread Justin French
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
, 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 into a database, and when you log in using the MD5 function it will simply encrypt the value being passed along

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 Remember Me box generate

Re: [PHP] URL of calling page

2003-02-16 Thread Justin French
on 17/02/03 9:25 AM, Kevin Waterson ([EMAIL PROTECTED]) wrote: This one time, at band camp, acleave [EMAIL PROTECTED] wrote: I believe there's a way in PHP to get the URL of the page that called the current page but can't find it. Is there such a function? Or would I have to use

Re: [PHP] Date formating

2003-02-15 Thread Justin French
? echo date('the format you want', strtotime('2003-02-15 13:19:02')); ? In this case 'the format you want' is 'l, d F, Y. H:i:s', but you should be able to look it up in the manual for yourself. php.net/date strtotime('2003-02-15 13:19:02') SHOULD work, converting the string to a unix time

Re: [PHP] Block direct image loads but allow them in PHP

2003-02-15 Thread Justin French
Using Apache's main config file (or at a per-directory level using a .htaccess file), you need to black all .jpg, .jpeg, .gif, .png, .bmp, etc etc files from being *directly* served via http. I'm not too good with Apache yet, but an example would be: Files ~ \.jpg$ Order Allow,Deny Deny

Re: [PHP] restricting access to files using PHP

2003-02-13 Thread Justin French
on 13/02/03 9:19 PM, Shams ([EMAIL PROTECTED]) wrote: Also, is there no way I can allow a user to login using a PHP login script, and then pass the username and password over to .htaccess to verify ? Just use .htaccess for the whole lot Justin -- PHP General Mailing List

Re: [PHP] Templates

2003-02-13 Thread Justin French
Go for a complex situation if that's what you want, or consider the basics: home.php ? include('inc/header_code.php'); // // unique code for this page to be executed before the html tag // include('inc/header_html.php'); ? Welcome to our website! ? include('inc/footer.php'); ? contact.php ?

Re: [PHP] Templates

2003-02-13 Thread Justin French
If you update any code in any of the 3 include files, you will update the entire site's look, feel and actions. It still allows for you to execute unique PHP code either before or after the HTML starts too. I forgot to mention that a whole heap of your formatting and visial design can be

Re: [PHP] Templates

2003-02-13 Thread Justin French
applications. Justin Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] restricting access to files using PHP

2003-02-12 Thread Justin French
to the code: --- ? if( (the user isn't valid) AND (eregi('.html$',$_SERVER['PHP_SELF'])) ) { header(Location: login.php); exit; } ? --- -- which should only impose the access control on *.html pages, but i'm not good with regexp at all!! Justin French on 12/02/03 8:46 PM, Shams

Re: [PHP] Who's Online

2003-02-10 Thread Justin French
Search the archives. This asked, and answered, a few times a week. Justin French on 11/02/03 9:53 AM, Vernon ([EMAIL PROTECTED]) wrote: I have a membership base that is logging into a php and MySQL based web site and am wanting to be able to create a who's online (and perhaps an ability

Re: [PHP] numerics

2003-02-10 Thread Justin French
I guess it might be possible with javascript. At the very least, you can do a validation client-side for numbers only before submitting. Justin. on 11/02/03 5:27 AM, Edward Peloke ([EMAIL PROTECTED]) wrote: IS there a way to only allow the user to type in numerics to a text field? I do not

Re: [PHP] several buttons in form - which one was clicked

2003-02-10 Thread Justin French
Hi, Why do you want a checkbox beside each button? Wouldn't the button alone be enough? I'm assuming it's for something like a delete items list? This is one of many ways to do it... I can't see why you need checkboxes -- perhaps you need to tell us more abut what you want to achieve. ?

Re: [PHP] Vars in URL

2003-02-08 Thread Justin French
on 06/02/03 10:03 AM, Shawn McKenzie ([EMAIL PROTECTED]) wrote: I am trying to do something simple to sell items with paypal. One of the options paypal has is a return url, so that after the buyer pays via the paypal website they are forwarded to the return url (my site) so they can access

Re: [PHP] Client Side PHP

2003-02-06 Thread Justin French
on 07/02/03 2:41 AM, Pete ([EMAIL PROTECTED]) wrote: Think thje user base will be quite big if we got it together. How many oho programmers are there who struggle with Javascript - me included ;-) Anyway the opensourcness of php would make the plugins more efficient for each browser. I

Re: [PHP] php and Mac running 8.6

2003-02-02 Thread Justin French
on 02/02/03 3:30 PM, Bobbi-Lea ([EMAIL PROTECTED]) wrote: I've just installed php, zend developer, mysqladmin, and apache on my pc laptop. Are there any available for mac 8.6 ? Not to the best of my knowledge... mac OSX has though :) Justin -- PHP General Mailing List

Re: [PHP] index.php

2003-02-02 Thread Justin French
Strange -- can u change it to foo.php and execute it, or do you get a 404 error (not found)? Justin on 03/02/03 12:45 PM, Renato Lopes ([EMAIL PROTECTED]) wrote: Hi! I have called a index.php file in a directory. Every time I point my browser to that directory the contents of the

Re: [PHP] including files...

2003-02-02 Thread Justin French
on 03/02/03 5:28 AM, John W. Holmes ([EMAIL PROTECTED]) wrote: Pretty much. Only addition is to make sure filename.inc can't be viewed through the browser. ... by having apache refuse to server all .inc files through http, via the use of a .htaccess file (assuming apache server) Cheers,

Re: [PHP] question

2003-02-02 Thread Justin French
on 02/02/03 7:56 AM, Karl James ([EMAIL PROTECTED]) wrote: what is a winmail.dat file? PLEASE don't post in rich text / HTML -- you've been asked more than once PLEASE ask php-specific questions Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] .php extensions versus .html

2003-01-31 Thread Justin French
I think what you've seen is shtml / ssi / server side includes, but anyway, since you asked: 1. create a .htaccess file which pushes *all* .php pages through PHP I *THINK* the code is something like: Files ~ \.html$ ForceType application/x-httpd-php /Files But you should check the apache

Re: [PHP] need some guidance

2003-01-31 Thread Justin French
On a major level, create or use a large CMS (content management system), and use the information you have in the databases / file system to establish what's new, modified, etc. On a smaller level, you could check which files have been updated in X days (I think) with PHP, and display them as a

Re: [PHP] PHP Apache

2003-01-31 Thread Justin French
strings must be wrapped in quotes $name = 'ab'; Justin on 31/01/03 8:45 PM, Aaron Stephan William Boeren ([EMAIL PROTECTED]) wrote: The script: ?php #start variables $name = ab; $age = 16; #start script echo Hi, my name is $name and I'am $age years old.; ? -- PHP General Mailing

Re: [PHP] Unable to upload multiple files

2003-01-31 Thread Justin French
Firstly, try uploading two SMALL files (say, no more than 1k each), just to check if it's an issue with *two files*, or an issue with *file size*, *script time outs* (maximum execution time) or something else. Start ruling them out, one at a time. Justin on 01/02/03 12:03 AM, Antti ([EMAIL

Re: [PHP] Exclusion in Regex not working

2003-01-31 Thread Justin French
Can I make a suggestion? I tend to look at the issue of user input the other way around... rather than excluding things I don't think I want, I choose in allow things I *DO* want... so instead of saying a username shouldn't contain !@#$%^*()_+-=?:';, I say it should contain a-zA-Z0-9_-. This

Re: [PHP] Context

2003-01-30 Thread Justin French
AFAIK, PHP skips over anything out side the ? and ?... so yes, technically, it would be a little faster. End of the day, such a small gain could probably be made up elsewhere by optimising a function you use on every page, or something else like that. It's been said on the list many times

Re: [PHP] How to check for refresh in PHP

2003-01-30 Thread Justin French
Not really that simple. You can't use the HTTP_REFERER, because it's not set when the user refreshes (at least on my browser, so at best it will be unreliable). Common ways to prevent such things happening (like voting for a pic or song or poll more than once) are usually done with either: 1.

Re: [PHP] using custom button instead of standard submit formelement

2003-01-29 Thread Justin French
The W3.org site is down at the moment, so I can't confirm this, but I'm pretty sure... input type=submit name=parent value=foo src=icon.gif / ... is correct, but I've never done it :) I think the page you want to look at is: http://www.w3.org/TR/html401/interact/forms.html#edef-INPUT Cheers,

Re: [PHP] best way to save form data on user side

2003-01-28 Thread Justin French
you want to achieve on the web, or offline. If on the web, keep it basic, with perhaps a save to server option and a printable thankyou/proof page. If offline, I think PDF forms are the best of a bad bunch. Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP] register_globals

2003-01-28 Thread Justin French
on 29/01/03 6:41 AM, Kiswa ([EMAIL PROTECTED]) wrote: change If($id==1){ to If($_GET['id']==1){ or put this line near the top of your script: $id = $_GET['id']; or, a little more anal: if(isset($_GET['id'])) { $id = $_GET['id']; } Justin font size=2a href=left.php?id=1

Re: [PHP] Advice on uploaded files

2003-01-28 Thread Justin French
on 29/01/03 11:16 AM, Manuel Ochoa ([EMAIL PROTECTED]) wrote: I writting a php program for a small insurance company and they want to receive uploaded digital photos. Should I store the photos in a mysql database or in a directory on the hard drive? If you have experience with this any

Re: [PHP] best way to pass variables to iframe

2003-01-28 Thread Justin French
on 29/01/03 4:35 PM, Mantas Kriauciunas ([EMAIL PROTECTED]) wrote: I believe there was question like this, but I was wondering if someone could point me with useful information about passing variables to iframe. To point out the obvious, you can pass variables to any URL by using GET: iframe

Re: [PHP] multiple entry forms !!

2003-01-27 Thread Justin French
on 28/01/03 10:20 AM, scott ([EMAIL PROTECTED]) wrote: hi looking for some advice I have a site in progress. user to it have to enter a LOT of information (it will contain a club directory) in order to try and make it a less unpleasant experience for the user, I want to give them 7

Re: [PHP] PHP Page Refresh on Redirection

2003-01-27 Thread Justin French
on 28/01/03 4:42 PM, Phil ([EMAIL PROTECTED]) wrote: I have a PHP page with a form that submits to another PHP processing page. On completion of the PHP actions on the processing page, I have echoed into the page the javascript action of 'location.href=...' and the location is redirected to

Re: [PHP] IP address

2003-01-24 Thread Justin French
server with PHP) 5. page comes back thru the 2 to 20 servers 6. arrives at my ISP 7. gets sent to my computer 8. I look at the page So, which one of these computers are you trying to get the IP address of? Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

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