Re: [PHP] locally enabling register_globals?

2003-01-03 Thread Justin French
Well, I have this in my .htaccess file, so it SHOULD work, but this will depend if your host allows things to changed via .htaccess. php_flag register_globals on You can place this in your root directory, and it will work for your whole site, or place it further down the file hierarchy to o

Re: [PHP] Avoiding Repeat Posts

2003-01-04 Thread Justin French
they can't go back? they can still go "back" after a redirect... it's just pages in the browser cache... Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: security in guest book and user forums

2003-01-04 Thread Justin French
on 05/01/03 5:24 AM, Seraphim ([EMAIL PROTECTED]) wrote: > I use the htmlspecialchars() function to disable all html. This function > basically puts a '\' in front of eacht html character and thus disables all > html. > You may not want to do this if you want to allow, for example or > other frie

Re: [PHP] security in guest book and user forums

2003-01-04 Thread Justin French
on 05/01/03 4:16 AM, Anders Thoresson ([EMAIL PROTECTED]) wrote: > I've seen both guest books and user forums "hacked" by users who enter > javascript or other code, and that way redirects vistors to other sites or > do other unwelcome things. What expressions should I look for and not allow > in

Re: [PHP] Re: security in guest book and user forums

2003-01-05 Thread Justin French
other harmfull markup? Let me know where your message board / guestbook's are on the web, and i'll wrap a tag around my whole post... as soon as someone mouses over my guestbook post, the window will close down :) Justin French -- PHP General Mailing List (http://www.php.net/) To un

Re: [PHP] Passing Query_String or variables through multiplepages?

2003-01-05 Thread Justin French
get your entire query string (eg key1=val1&key2=val2&key3=val3), base64encode() it, pass it through to the next page via get as a var (eg href="page.php?ref=">, the base64decode() it on the next page... I use this HEAPS. Justin on 06/01/03 1:12 PM, Noel Wade ([EMAIL PROTECTED]) wrote: > Hi all,

Re: [PHP] Error handling with multiple file uploads and sql

2003-01-06 Thread Justin French
Why not split it into 2 forms? insert, then attach pictures to the record. Otherwise, decide what's the key issue (imho the a record can exist without pics, but not vice-versa), and focus on that first. Justin on 06/01/03 10:15 PM, Jim ([EMAIL PROTECTED]) wrote: > Hi, > > I have the followin

Re: [PHP] time stamp screwing up

2003-01-06 Thread Justin French
r of 32 bits (from what I can tell from the manual). I personally prefer unix stamps (seconds) over formatted dates (-MM-DD) because it's easy to compare them and find out the difference (subtract one from the other), add a day (add 24*60*60) etc etc, BUT it's harder (impossible) for a human

Re: [PHP] Defaults in drop down list...

2003-01-06 Thread Justin French
ike $state or $selectedState, with a value of 'AZ' for example. '; foreach($states as $code => $fullName) { if($stateSelected == $code) { $sel = ' SELECTED'; } else { $sel = ''; } echo "{$fullName}"; } echo ''; ?> The result of which

Re: [PHP] populate a list menu

2003-01-06 Thread Justin French
I'm *positive* there is a better way, but this should work (untested): 0) { $stamp = $stamp + 86400; } $date = date('d-m-Y',$stamp); echo "{$date}"; $i++; } ?> Cheers, Justin on 07/01/03 4:39 PM, Bruce Levick ([EMAIL PROTECTED]) wrote: > Howdy, > I am looking to populate

Re: [PHP] populate a list menu

2003-01-06 Thread Justin French
ion of the while loop Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] htmlspecialchars() or htmlentities without destroying tags?

2003-01-07 Thread Justin French
Hi all, Has anyone got a function or regexp floating around that will convert behave like htmlspecialchars() or htmlentities() (eg converting & to &, " to "e;, etc etc) BUT NOT DESTROY HTML TAGS? Eg: "hello" said Fred & Judy should become: "hello" said Fred & Judy NOT: "hello" said Re: [PHP] Re: htmlspecialchars() or htmlentities withoutdestroying tags?
match_all('/(<li.*>)/U',$result,$matches); > for($i=0;$i { > $result = > str_replace($matches[1][$i],strtr($matches[1][$i],array_flip(get_html_transl > ation_table(HTML_SPECIALCHARS))),$result); > } > preg_match_all('/(<a .*>)/U',$result,$matches);

Re: [PHP] Submit Form

is your question in regards to: a) how to bring data from the 1st form across to the 2nd, so that it can all be updated together OR b) how to POST data from a form using a html link, probably with javascript If b, best place to ask is a javascript list/newsgroup, or by looking for something sim

Re: [PHP] Variables

on 09/01/03 11:52 AM, Stephen ([EMAIL PROTECTED]) wrote: > Yet another question: How would you make a variable's name the value of > another variable? For example... Variable 1's value is "joe." I want to make > the value of variabe one, or joe, the name of variable two which would equal > somethi

Re: [PHP] Auto Include a Function

Hi, I haven't seen anything like that implemented yet. I have my functions logically grouped/organised into files... I only include the file when needed. Some files (like my string functions and DB functions) are auto-prepend (a php.ini directive) auto-included into every script, which does save

Re: [PHP] Databases vs. File Access

is to make > it accessible via the web. I am curious about the performance differences > between using a database or leaving the data in the individual files they > originated in. Can anyone offer any recommendations? Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Informing a User of an Illegal Character in a post

Basically, you want to do a regular expression to see what characters are in the username, and make none of them are illegal... I currently have the rules of 5-30 characters lowercase, numbers 0-9 and underscore (_) only I achieve this with: 30) ) { echo "username invalid -- must contain o

Re: [PHP] Is this possible with php?

on 10/01/03 6:14 PM, Tom Rogers ([EMAIL PROTECTED]) wrote: > I use webdrive which allows me to map an ftp site to a windows drive letter so > it gets treated as a local drive . very usefull. > You can read about it here http://www.webdrive.com/ Does anyone know of a mac (OS8/9 NOT OSX) applic

Re: [PHP] Adding HTTP URL Code

I think the reason you didn't get a reply is because no one could understand what you wanted to happen my guess is... You need a regular expression to turn URLs in a string into links. So that this: --- This is a test. It is only a test. What happens when I include a URL in my results text?

Re: [PHP] Simple Form Processing

Hi, the files themselves are available in the $_FILES array, but it's not as simple as that. may i recommend you start by copying the Examples 18-1 and 18-2 from this page: http://www.php.net/manual/en/features.file-upload.php Once you've got THAT code working smoothly and understand what's happ

Re: [PHP] rintones using php

You'd need a server capable of sending them (I think it's an SMS gateway hardware device, or something like that), which I think is more of an issue than then PHP scripts involved... Justin on 12/01/03 6:57 AM, Arvindv ([EMAIL PROTECTED]) wrote: > Hi, > > Were can i get scripts to send rinto

Re: [PHP] Format tables!!

name address phone "; echo "{$myrow['name']}"; echo "{$myrow['address']}"; echo "{$myrow['phone']}"; echo ""; } ?> You haven't really said what you want the checkboxes to do, but including them in the while loop i

Re: [PHP] Simple Form Processing

s_uploaded_file($_FILES['image1']['image1'])) { > copy($_FILES['image1']['image1'], "$DOCUMENT_ROOT/images"); > } > > ,the image (which was within the size range) was never uploaded. I have > a feeling that I am makeing 1 or 2 of the same m

Re: [PHP] Favorite Email validation routine?

I use, and love the simplicity of, validEmailFormat()... it's a near-as-possible port of someone's Perl script which has become close to the definitive script/function for Perl developers. http://www.killersoft.com/downloads/pafiledb.php?action=category&id=1 Cheers, Justin on 13/01/03 4:21 PM

Re: [PHP] Favorite Email validation routine?

Just checked the URL -- there are now 2 versions... I'm using 1.0 Justin on 13/01/03 4:38 PM, Justin French ([EMAIL PROTECTED]) wrote: > I use, and love the simplicity of, validEmailFormat()... it's a > near-as-possible port of someone's Perl script which has become clos

[PHP] "document contained no data"

Hi gang, I'm encountering a strange, random, sporadic error on a new server. Basically, sometimes, in a non-repeatable fashion, a page will not load. In NN7 Mac, the error is "the page contained no data". In IE5.x Mac, the error is along the lines of "host not found" or "could not access URL ...

Re: [PHP] "document contained no data"

cess to the logs, but it's a bit tricky -- I have to wait until I spot an error, then download a 10+meg log, and try and find my request... but I'll work on that next for sure. Justin > Justin French wrote: > >> Hi gang, >> >> I'm encountering a strange

Re: [PHP] "document contained no data"

on 13/01/03 10:05 PM, Jason Wong ([EMAIL PROTECTED]) wrote: > On Monday 13 January 2003 17:46, Justin French wrote: >> Hi gang, >> >> I'm encountering a strange, random, sporadic error on a new server. >> Basically, sometimes, in a non-repeatable fashion, a page

Re: [PHP] Authentication programming

on 15/01/03 7:07 AM, Jordan Elver ([EMAIL PROTECTED]) wrote: > Hi, > I'm about to start a new project which will require a login system. The system > should allow for different types of access on a per page basis. I'm going to > achieve the login system using sessions, which I have done before. >

Re: [PHP] emptying hte array??

on 15/01/03 7:52 AM, Scott Fletcher ([EMAIL PROTECTED]) wrote: > How to do the proper way of emptying hte array?? > > Example... > > $a[0] = "test1"; > $a[1] = "test2"; > $a[2] = "test3"; > $a[3] = "test4"; > > $a = "";<-- Is this hte proper way to do it unset($a); http://php.net/unse

Re: [PHP] htmlspecialchars

on 15/01/03 4:24 AM, Foong ([EMAIL PROTECTED]) wrote: > Hi, > I wonder which is the better way to store data into database? > 1. stor the data after we call htmlspecialchars with the data (means we > store " as "e; in database) > 2. stor the data in non encoded form and call htmlspecialchars whene

Re: [PHP] "document contained no data"

Just as an update, the sysadmin definitely thinks it's my code... I'm not convinced, but I'm faced with the task of finding out :) > It appears your site is causing the webserver to segfault (crash), which is > why nothing comes up some times - these crashes are logged in the main Apache > logfile

[PHP] alternative control structure syntax

Hi, Can someone point me to the page in the manual where this style of control structure syntax is documented? $var = ($something) ? "foo" : "bah"; ??? Can't see it, Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] intermittent session loss

ntropy stuff, which I don't understand :) So, what could cause the session to drop (then kick back in again) by simply refreshing the page a few times? Many thanks in advance, Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: SPAM: Re: [PHP] intermittent session loss

n there... one that gets to 18, the other getting to 4. Again, this is NOT a repeatable bug... right now, it just counted perfectly up to 25 before I got bored... :) Justin > ---John Holmes... > > - Original Message - > From: "Justin French" <[EMAIL PROTECTED]&

Re: [PHP] "document contained no data"

Well, I know *I* aren't using any extensions that you wouldn't find in a base install. Thanks for the words of encouragement though :) Justin > Justin French wrote: > >> Just as an update, the sysadmin definitely thinks it's my code... I'm not

Re: [PHP] "document contained no data"

I wrote a simple test script which increments a sessions counter, as per the manual. That way they couldn't complain about having to debug mountains of code, etc etc. Intead of the usual 1,2,3,4,5...50 it was more like 1,2,3,0,4,5,1,6,7,2,8,9,3 I emailed them, and they've switched the sessions o

Re: [PHP] Re: Ever complained about lousy PHP programmers?

on 17/01/03 5:44 AM, Peter Hutnick ([EMAIL PROTECTED]) wrote: > Because short tags are evil ;-) My provider has short tags enabled, so > there is no getting around this bit of ugliness. Can you set the php.ini value to disallow short tags locally via a .htaccess file?? Justin -- PHP General

Re: [PHP] Session Length

Check out the 'max lifetime' session settings in the sessions part of php.ini Justin on 17/01/03 7:11 AM, Pushpinder Singh Garcha ([EMAIL PROTECTED]) wrote: > Hello Everyone: > > I am using Sessions to secure parts of my website. I need to know if > there is a way to set a lifetime for these s

Re: [PHP] Display Dates in English o_O

start with http://php.net/strtotime and http://php.net/date OR For the 24hr time to 12hr time conversion, something like: = 12) { $suffix = 'pm'; } else { $suffix = 'am'; } if($h > 12) { $h = $h - 12; } echo "{$h}:{$m}{$suffix}"; ?> Untested code of course, but it should do the job, and wou

Re: [PHP] fit window to image

php can help, but remember, PHP only outputs HTML code to the browser... it can't actually resize the window, because that's a client-side thing like javascript. but you can find out the x and y of an image with http://www.php.net/manual/en/function.getimagesize.php Then use this information in a

Re: [PHP] Create unike variables for each record

wouldn't you use the primary key as the unique identifier? "; echo "{$myrow['firstname']} {$myrow['lastname']}"; } } else { // show the details of a specific contact $sql = "select * from contacts where id='{$_GET['id]}' LIMIT 1"; $result = mysql_query($sql);

Re: [PHP] frame problem

1. this has nothing to do with PHP 2. this has nothing to do with PHP 3. you could call a frameset html page with 4. you could set individual frames to different sources from one link with javascript -- but you'd have to consult a JS list :P Justin on 18/01/03 9:30 AM, Kiswa ([EMAIL PROTEC

Re: [PHP] 2 Qs: Passing current URL with session and how to avoidsession timeout???

1. If you require the back button to work forever, then do not use sessions, because they're not designed to be a forever thing. 2. I do this sort of stuff by building my own URL from $_SERVER components: The reason why I base64_encode() it is so that the vars=values of the previous page don't

Re: [PHP] Auto Incrementing in PHP

on 19/01/03 9:59 AM, John W. Holmes ([EMAIL PROTECTED]) wrote: >> Is there a way for a php page to automatically increment a number and >> store >> it every time the page is loaded. >> >> I want to generate an invoice number that goes up 1 everytime the HTML >> form >> is sent to it. > > I assum

Re: [PHP] SQL+php

where the F*** are you getting july from??? which number do you want to convert to a month, or am i totally missing it? you need to be DESCRIPTIVE in what you want to acheive. we're not a mind readers! Justin on 19/01/03 11:59 AM, Paul Marinas ([EMAIL PROTECTED]) wrote: > i am trying to sel

Re: [PHP] 2 Qs: Passing current URL with session and how to avoidsession timeout???

on 19/01/03 2:45 PM, -<[ Rene Brehmer ]>- ([EMAIL PROTECTED]) wrote: > I haven't found the server array in the manual (yet anyway), so I'm not > sure what exactly it is you're doing ... so a bit of 'splaining would be > nice ... I'm only on my 4th month of PHP'ing afterall ... http://www.php.net/

Re: [PHP] How know how many sessions are active?

If you're on a dedicated server (no other sites on the server), you could just count the session files in /tmp. Otherwise, the general consensus seems to be that you need to decide how long a user is "active" for (say a minute, or 3, or an hour?), and save (eg) the SID and timestamp in a file or M

Re: [PHP] php.ini: how to load different ini file depending onhost?

You can override parts of your php.ini on a per-directory level with a .htaccess file... eg: php_flag register_globals off php_flag magic_quotes_gpc on php_flag magic_quotes_runtime on php_flag magic_quotes_sybase on Justin French on 20/01/03 2:14 PM, Jean-Christian

Re: [PHP] Mass Mailing with PHP & MySQL

A while() loop will, at some point, break. this is because the script will timeout on the server before you send to any large lists... when I say large, this could be 100 address', or could be 10,000 -- it all depends on your server/ISP and server load at certain times. A better/simpler solution

Re: [PHP] How know how many sessions are active?

on 21/01/03 2:07 AM, Jeremías Grunge ([EMAIL PROTECTED]) wrote: > Another question > > Do you know a way to close a session when client closes the explorer? > Perhaps with a client script? Apart from what everyone else has said about cookie lifetime, there is probably some javascript foolery you

Re: [PHP] PHP and Sessions?

on 21/01/03 8:33 AM, John Nichel ([EMAIL PROTECTED]) wrote: > But he said that it's working in 4.2.2 (default off), but not working in > 4.1.2 (default on). If I remember correctly, > $HTTP_POST_VARS['whatever'] worked before 4.2.x, right? What about > things like $_POST $_SERVER, etc. did those

Re: [PHP] simple date question

why not just call date('m') to get the month? justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How know how many sessions are active?

on 21/01/03 9:12 AM, Jeremías Grunge ([EMAIL PROTECTED]) wrote: > Any examples of call logout.PHP from javascript (I know that's not a > Scripting forum) I already told you! Pop-up a new window with javascript on window close, with the URL 'logout.php'. If you need more than that, best find a ja

Re: [PHP] PHP & Sessions generates Segment Faults

Hi, I had this problem a few weeks back. The host changed the sessions from 'mm' to 'files' in php.ini and restarted, and all was ok... not sure of the reasons behind the faults, but I had this EXACT problem (with standard session stuff). Justin on 21/01/03 2:29 AM, Blaster ([EMAIL PROTECTED

Re: [PHP] Time code!!!

Please post in raw text, not HTML. look in the manual to decide what format you need to replace 'd m y' with: http://php.net/date The welcome back bit all depends on cookies, sessions, how your login scripts work, etc etc. Justin on 20/01/03 12:46 PM, Karl James ([EMAIL PROTECTED]) wrote:

Re: [PHP] Header Error message i think!!

PLEASE don't post in HTML/Rich Text sheeesh! Justin on 20/01/03 2:18 PM, Karl James ([EMAIL PROTECTED]) wrote: > http://www.ultimatefootballleague.com/Create_Account.phps > > > > Warning: Cannot add header information - headers already sent by (output > started at /home/virtual/site12/fst/v

Re: [PHP] PHP Sessions

on 21/01/03 9:25 PM, Tim Thorburn ([EMAIL PROTECTED]) wrote: > There is some discussion as to whether my globals are on or not ... I am > using session_register to name my sessions, and then the global command > later on on the individual pages to remember which session it is we're > looking for.

Re: [PHP] PHP & Sessions generates Segment Faults

handler. So, if you wrote it yourself, perhaps it's got a bug. If it's a library script, perhaps it has a bug, or has a FAQ, or some support. There's also the option that there's a bug with PHP in this/these version(s) which is causing the problems. Is there a reason why you c

Re: [PHP] writing a newsletter program in php?

Yes, this is a reasonable candidate for a PHP project, however: 1. why reinvent the wheel? 2. There are some serious issues with using PHP's mail() command: a) large mailing lists will time out on individual emails b) the alternative to a is to use Bcc. Your ISP will probably set the maximum t

[PHP] query caching & caching in general

anyone got any links to decent tutorials on sql caching, and caching in general? they don't have to be mysql/php specific, but that would of course help :) general theory tutorials are fine too :) Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.n

Re: [PHP] get current username from the windows system

So, you want the server (PHP) to probe the client (user's) remote machine to find out the windows username? Can't be done. First thing to remember is that PHP is server side. SOME LIMITED information is sent to the server by the browser, but I doubt this would ever be considered -- or even secur

[PHP] nested queries/loops

e theory or tutorial that shows me the light on how I might reduce the number of queries, perform smarter, more complex queries, or something like that. Otherwise, I can see myself writing some really sluggish code :) Or perhaps my problem is back at the database level, with too many tables, o

Re: [PHP] nested queries/loops

Thanks Marek, That put me right on track :) Justin on 23/01/03 11:24 PM, Marek Kilimajer ([EMAIL PROTECTED]) wrote: > SELECT * FROM partner p LEFT JOIN pid_to_sid p2s ON p.id=p2s.pid LEFT > JOIN service s ON p2s.sid=s.id LEFT JOIN category c ON s.categoryid=c.id > WHERE $your_conditions ORDER

Re: [PHP] image source from PHP

can you copy & paste a little bit of the HTML source of what you're doing? justin on 24/01/03 10:05 AM, Karina S ([EMAIL PROTECTED]) wrote: > Hello, > > I want to make a sit where an image comes from a database. In the db I store > only the filename and path. I have the following code: > ech

Re: [PHP] Login and sessions?

Start here http://www.WebmasterBase.com/article/319 Sure, it isn't perfect, and doesn't do everything you want it to do (and it currently relies in register_globals ON), but I found it educating, and formed the basis of my own user/admin/clearance/membership/session management system which I use o

Re: [PHP] IP address

cts with the requested URL (your 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://ww

Re: [PHP] multiple entry forms !!

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 t

Re: [PHP] PHP Page Refresh on Redirection

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 t

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

thod of POSTing data. With all these client-side options, there's zero hope of getting them to correct missing fields though :) Decide if this is something 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 p

Re: [PHP] register_globals

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 > Finansiering > If($id==1){ > echo " color=\"#0

Re: [PHP] Advice on uploaded files

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

Re: [PHP] best way to pass variables to

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 > . To point out the obvious, you can pass variables to any URL by using GET: iframes c

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

The W3.org site is down at the moment, so I can't confirm this, but I'm pretty sure... ... 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, Justin on 27/01/03 1:02 PM, Durwood Gafford ([EMAIL P

Re: [PHP] Context

AFAIK, PHP "skips" over anything out side the ... 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 before: Just

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

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

Re: [PHP] .php extensions versus .html

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: ForceType application/x-httpd-php But you should check the apache manual, list or some tu

Re: [PHP] need some guidance

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 lis

Re: [PHP] PHP & Apache

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

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 PROT

Re: [PHP] Exclusion in Regex not working

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] php and Mac running 8.6

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 (http://www.php

Re: [PHP] index.php

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

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

Re: [PHP] question

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: http://www.php.n

Re: [PHP] Client Side PHP

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] Vars in URL

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 > acces

Re: [PHP] Who's Online

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

Re: [PHP] numerics

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

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. "; e

Re: [PHP] restricting access to files using PHP

t good with regexp at all!! Justin French on 12/02/03 8:46 PM, Shams ([EMAIL PROTECTED]) wrote: > Hi, > > i've written a secure PHP login script which will allow users to login to a > directory such as this: > > smezone.com/members/index.php > > however, how

Re: [PHP] restricting access to files using PHP

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 (http://www.p

Re: [PHP] Templates

Go for a complex situation if that's what you want, or consider the basics: home.php tag // include('inc/header_html.php'); ?> Welcome to our website! contact.php tag // include('inc/header_html.php'); ?> Contact us: [EMAIL PROTECTED] If you update any code in any of the 3 include files, yo

Re: [PHP] Templates

> 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 ac

Re: [PHP] Templates

comfortable with. eg: In otherwords, I execute any code that I need to BEFORE the headers are sent, to ensure that I CAN set cookies, sessions, or use header()... I set some simple triggers like $show_form to decide what I want to do in the body. Each to their own, but it works great f

Re: [PHP] Date formating

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 stamp, which is what date() needs to work. All this is available in the manu

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

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: Order Allow,Deny Deny from all

Re: [PHP] URL of calling page

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 >

Re: [PHP] Protecting files

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. Personally,

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