[PHP] Re: smarty vs. patTemplate vs. inclu

2003-02-21 Thread David Eisenhart
! David "David Caplan" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > > I'm designing a site with about 100 different pages. I'm debating whether to > use a template mechanism such as smarty or patTemplate v

Re: [PHP] session emergency

2003-02-21 Thread David Otton
On Fri, 21 Feb 2003 08:05:47 -0800 (PST), you wrote: >Where can I set the session data size? AFAIK, the only limit to the amount of data stored in a session is the filesize limit of the underlying OS. What's the problem exactly? -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Dynamic Dropdowns

2003-02-21 Thread David Otton
On Fri, 21 Feb 2003 10:37:42 -0700, you wrote: >>Quoting Steven Kallstrom <[EMAIL PROTECTED]>: >> I am creating dynamic drop down lists... I would like to have an >> option appear in the drop down list, but have it greyed-out and not be >> selectable... I know you can disable selects, but I

Re: [PHP] Array instead of Switch

2003-02-21 Thread David Otton
On 22 Feb 2003 03:28:22 -, you wrote: >Let's say I need to take one of 20 actions depending on a form selection. I >could use a switch statement with 20 cases, but I could also do something >like: > >// Pretend this comes from a form >$formchoice = "mars"; > > >$response = array( > "mars" =>

Re: [PHP] forward to a html file

2003-02-22 Thread David Otton
On Sat, 22 Feb 2003 15:25:36 +0300, you wrote: >I need forward a html file in my php. > >If I use include, it comes a part of .php result. In the navigation window >shows that myscript.php > >But I want to show that destination.html. Not absolutely sure what you're asking for, but I think you wan

Re: [PHP] Another Logging Question

2003-02-23 Thread David Otton
On Sun, 23 Feb 2003 10:30:27 -0600, you wrote: >1. Have the counter dump visitor info to a text file, then run a cron job on >that nightly to process the data and perform a full analysis. Consider what will happen when two people hit the counter at exactly the same time. You'll have to code to de

RE: [PHP] Another Logging Question

2003-02-23 Thread David Freeman
> Right now, it's logging the client's IP, the page that > they're viewing, > the page that they came from, the time of the visit, and their system > and browser info. Ummm, you do understand that, for Apache at least, all of this information can be made available through it's logging? You a

RE: [PHP] Locality from URL

2003-02-23 Thread David Freeman
> Does anyone know of an intelligent way to establish a user's location > (roughly) from either IP address or some other variable > available to the > server from the browser? (Other than polling the user) Not really - the problems you face are: 1. Processing Delays - if you need to do who

Re: [PHP] PHP_SELF syntax

2003-02-23 Thread David Otton
On Sun, 23 Feb 2003 18:55:06 -0500, you wrote: >Could someone tell me why this code prompts a parse error. I have tried it >several different way. The statement is called from within a function: > >print "action=\"$_SERVER['PHP_SELF']\">\n"; echo ('' . "\n"); works for me (moved the variable out

[PHP] array_filter

2003-02-25 Thread David Otton
I suspect this can't be done in PHP. However... Is it possible to pass additional parameters to the callback function used by array_filter()? I guess I'm looking for something functionally equivalent to this Python code: from string import count list = ('apple', 'avacado', 'banana', 'blueberry'

Re: [PHP] phpmyadmin duplication of sql

2003-02-25 Thread David Eisenhart
having but it should get the job done) David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Include files

2003-02-26 Thread David Eisenhart
the number of times it is subsequently called to do so (thereby preventing such errors arising). I would imagine (but am not certain) that there may be a slight speed penalty in using require_once as opposed to require. David "Jinky Otacan Cocalon" <[EMAIL PROTECTED]> wrote in

[PHP] question on text file reading.

2003-02-26 Thread David Banning
The company I am working with is using an old database, which doesn't even support memo field beyond 256 characters, so it is probably too difficult, and not worth trying to interface the database with php. I was wondering how easy it would be to have php access the database via SQL. The data we

Re: [PHP] question on text file reading.

2003-02-26 Thread David Banning
On Wed, Feb 26, 2003 at 08:58:43AM -0800, Chris Shiflett wrote: > --- David Banning <[EMAIL PROTECTED]> wrote: > > The company I am working with is using an old database, which > > doesn't even support memo field beyond 256 characters, so it is probably > > too di

[PHP] Best way to accept donations online - Can't use paypal

2003-02-26 Thread David Caplan
Hi, I'm making a site for a non-profit and I need to be able to handle donations online. I can't use paypal because the donations need to be seamlessly integrated with the site, also I will need to do a fair amount of customization to the donation forms, like matching funds, gift in another person

[PHP] Re: classes and functions in include files

2003-02-27 Thread David Eisenhart
on they'll have global scope David Eisenhart "Sunfire" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > just a fast question here.. and the lotic probably isnt to bright on my part > and i think i know the answer to this question too but just to make sure...

[PHP] rand/mt_rand oddity

2003-02-28 Thread David Otton
I wrote a simple function to randomize the order of an array. In pseudo-code, it looks like this : def _array_rand (a) : for i = 0 to len (a) j = rand (len (a)) temp = a[i] a[i] = a[j] a[j] = temp return(a) Can anyone tell me if I'm missing the obvious here

Re: [PHP] ICQ # validation

2003-03-03 Thread David Otton
On Mon, 3 Mar 2003 14:00:43 -0500, you wrote: >Maybe I'm off my rocker, but I don't see how this can't work. I'm trying to validate >an ICQ number, and assuming a valid one is between 7 and 9 numbers. My line of code >is this: > >if(ereg("^[0-9]{7,9}$", $_REQUEST["icqnumber"])) { >print("a-o

Re: [PHP] News Content

2003-03-03 Thread David Otton
On Mon, 03 Mar 2003 13:09:39 -0500, you wrote: >Anyone know of any pre-built modules or whatnot that provide some news >content and/or links and captions via PHP/MySQL that can be integrated with >minimal disruption to a site? (A prerequisite being that it acts legally in >terms of gathering t

Re: [PHP] All Code Executing Even After header() Redirect

2003-03-03 Thread David Otton
On Mon, 03 Mar 2003 14:50:00 -0500, you wrote: >I thought the code below the header() redirect would not actually be >executed unless the user was logged in and allowed to proceed. Is this how >PHP is supposed to work? Is there any way to prevent the script from header() isn't a goto - it just ou

Re: [PHP] Help with SQL statement

2003-03-03 Thread David Otton
On Mon, 03 Mar 2003 12:04:37 -0800, you wrote: >I have a database that holds a start date and an end date and I have a form >with a start date and an end date. The report would be to get everything in >the database's date ranges that overlap the form's date range. I am having >trouble figuring out

RE: [PHP] Populate var with function output string?

2003-03-03 Thread David Freeman
> *** > function write_string(count) { > > for ($x = 0; $x < $count; $x++) { > > echo " Row $x"; > > } > > } > > $my_string = write_string(5); > > echo $my_string; > *** 8<-Untested Code-8<- f

[PHP] Re: question about smarty

2003-03-04 Thread David Eisenhart
You just put the smarty files on the server like you would load up your php files. Note that a common gotcha is when safe mode is enabled on the server - smarty will not ,by default, run in this case; the resolution is simple and is explained in the smarty manual. David Eisenhart "Su

Re: [PHP] Browser Sniffing

2003-03-04 Thread David Otton
On Tue, 04 Mar 2003 18:32:33 -0700, you wrote: >I know, it can't be done in PHP. That's not exactly what I'm here >for. I have a client who would like to redirect people to a polite >'upgrade your browser' page whenever people visit his site (which has >been developed in PHP no less). My

[PHP] Re: MySQL Query

2003-03-05 Thread David Eisenhart
; as mentioned above) Hope this helps David Eisenhart "Shaun" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > Is there a way of updating a table so that I can add some sort of identifier > to each field, something as simple as x=1 will do. I want

[PHP] File Download

2003-03-06 Thread David Miller
statement after the download to indicate the no more data goes into the file but is to be displayed by the browser. I can't figure out how to get this to work. Thanks David Miller -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] javascript

2003-03-07 Thread David Miller
You might be checking it 6 or 8 times if the user can't get all the fields filled in correctly. Creates a lot of traffic that isn't necessary between server and client. If javascript isn't enabled, there isn't a choice but if it is then the client side can prompt the 6 or 8 times until the user

Re: [PHP] Text>Image

2003-03-08 Thread David Rice
elp with this would be helpful. Thank-you for your time! HTH. David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: pagination help

2003-03-09 Thread David Eisenhart
This is a good article on pagination: http://www.phpfreaks.com/tutorials/43/0.php David Eisenhart "Denis L. Menezes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hello friends. My records on one page are bout 200. So I wish to paginate them and show only abou

[PHP] Re: Member function as error_handler

2003-03-09 Thread David Eisenhart
()) - very handy indeed! Of course rather than doing this on every page place such code in a single file and include this file (using the include construct or variation on this) within all your site pages. Hope this helps. David Eisenhart "Nik Makepeace" <[EMAIL PROTECTED]> wr

[PHP] Sessions problem

2003-03-10 Thread David Chamberlin
Hey all, Some of my users have reported a problem with my site and it's taken a while to debug it, but I think I've finally tracked it down. If they go to the site as: http://www.mysite.org/ Then it works But if they go as: http://mysite.org/ It doesn't. I believe it has to do with my use

[PHP] Re: sessions terminating randomly please help

2003-03-10 Thread David Chamberlin
It's possible you're being afflicted with the same problem I am. See the message just one or two above this about "Sessions problem". What I found in my debugging is that it had to do with how I was mix-and-matching the way I specified links. Short version of the problem is that http://mysite

[PHP] displaying data base information in a website

2003-03-11 Thread David E.S.V.
Hello folks I am learning php and would like to know how to display the information I already have in a mysql database in a homepage... is there is any script, I would like to know it. thanks David. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

[PHP] Re: Message Board Question

2003-03-11 Thread David Eisenhart
This is a good article on pagination: http://www.phpfreaks.com/tutorials/43/0.php David Eisenhart "Conbud" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, this is kind of a complex question, Im making a message board, now I > dont want list, lets say,

[PHP] Re: reversing attribute in array of objects

2003-03-11 Thread David Eisenhart
if I've understood you correctly how about something like: $valArr = array(); for($i=0;$ilevel); } $valArr = array_reverse($valArr); for($i=0;$ilevel = $valArr[$i]; } David Eisenhart "Neko" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have a bit of

[PHP] Little Problem :)

2003-03-11 Thread David Soler
Hello, Perhaps my question don't fit on a php mailing list and perhaps do it better in a html mailing list, but sure there are people here who knows how to solve my little problem: I have made a little web (1) page using php where the users can write their messages in a . The add.php take the

Re: [PHP] Little Problem :)

2003-03-11 Thread David Soler
On Mar/11/2003, CPT John W. Holmes wrote: > > Use wordwrap() > Thx John, Warren and Clint. This was just what I was looking for :). I haven't seen the string functions in the manual :\. My fault! Be Happy! ++ __ __ (, /

Re: [PHP] mysql and php

2003-03-11 Thread David E.S.V.
great tutorial to do what you want: http://www.freewebmasterhelp.com/tutorials/phpmysql/4 regards, David. On Tue, 11 Mar 2003, Joseph Bannon wrote: > How can I have php give me all the data in a table as > I would using the prompt in mysql? >

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

2003-03-11 Thread David E.S.V.
je="server not valid"; // checking DNS if(!checkdnsrr(substr(strstr($check[0], '@'), 1),"ANY")) $mensaje="server not valid"; } David. On Wed, 12 Mar 2003, Philip J. Newman wrote: > Required: Help for checking for a valid email string. > > ---

[PHP] foro php

2003-03-12 Thread David E.S.V.
hello folks do you know any site where I can download a free php foro to install? thanks David. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] foro php

2003-03-12 Thread David E.S.V.
that's it... I just forgot the english word..."forum"... even it sounds latin origin regards David. On Wed, 12 Mar 2003, CPT John W. Holmes wrote: > > do you know any site where I can download a free php foro to install? > > wtf is a "foro"? > > A

[PHP] Re: PHP Books

2003-03-12 Thread David Eisenhart
presented throughout the book. Well worth buying though. 2) Web Application Development with PHP 4.0; this is an interesting read though is not so good if you are just starting out due to its advanced nature; it also shows its age in places Happy reading!! David Eisenhart. -- PHP General Mai

Re: [PHP] Splitting a string

2003-03-13 Thread David Otton
On Thu, 13 Mar 2003 09:13:35 -0500, you wrote: >Then split the variable where there is a "S". The problem showed up when >there is another "S" in the field. I only want to split the first "S" at the >beginning of the field. Isn't there an additional value to add to the split $line = 'S12345'; if

Re: [PHP] Splitting a string

2003-03-13 Thread David Rice
Then split the variable where there is a "S". The problem showed up when there is another "S" in the field. I only want to split the first "S" at the beginning of the field. Isn't there an additional value to add to the split $line = 'S12345'; if ($line[0] == 'S') { /* do stuff */ } $st

Re: [PHP] PHP/HTML table layout?

2003-03-13 Thread David Eisenhart
ive column.(with a height of, say, 1 pixel) David Eisenhart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Redirect to a new page?

2003-03-13 Thread David E.S.V.
this > > if yes - goto thispage.php > > if no - goto thatpage.php > > Thanks > > > > -- David Elías Sánchez Vásquez Bachiller en Educación PUCP [EMAIL PROTECTED] telf. (51)-1-5255601 -- PH

Re: [PHP] Redirect to a new page?

2003-03-13 Thread David E.S.V.
btw in your case would be just if/else cheers David. On Thu, 13 Mar 2003, David E.S.V. wrote: > > you can use javascript instead.. > > for example in a jump menu: > > > function seleccionPerfil(form) { > >if (for

[PHP] Re: PHP XML Reference

2003-03-14 Thread David Eisenhart
check out the book XML and PHP by Vikram Vaswani, News Riders; a well written and concise treatment of xml and php. David Eisenhart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Collating Values from database fields

2003-03-14 Thread David Eisenhart
ppearances tables (check out GROUP BY in the MySQL (I assume you are using MySQL) online manual.) Then simply print out the results of the respective select queries. David Eisenhart "Matt Macleod" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I'

Re: [PHP] Rotating text

2003-07-01 Thread David Otton
On Tue, 1 Jul 2003 15:41:47 -0700, you wrote: >What would the best way to rotate text 90 degrees? Using php's image >generator? Some fancy HTML I don't know about? Or something else? CSS http://www.ssi-developer.net/css/vertical-text.shtml But as to browser support *shrug*. -- PHP Gen

[PHP] php and gd

2003-07-01 Thread David Miller
GD Version 1.6.2 or higher. I tried uninstalling and reinstalling the php but this didn't help. Thanks David Miller -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] cookie question

2003-07-03 Thread David R
Hello, I have a cookie question. I have the following code is a file called tc.php I have no problem retrieving the value cookie value ( 123 ) on my local machine but when I post to the internet I can't get the cookie value. Any ideas why? Thanks. David R -- PHP General Mailing

Re: [PHP] cookie question

2003-07-03 Thread David R
I have never read anything about a production server domain. How do I set the cookie for it? Thanks. David R "Leif K-Brooks" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > David R wrote: > > >Hello, > >I have a cookie question. > > >

Re: [PHP] cookie question

2003-07-04 Thread David R
I tried it that way, and variations on it. I still have had no luck. Any other ideas? Thanks again David R Thanks for you he "Boaz Yahav" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Try setcookie("auth","$val",time() + 3600,"/

[PHP] Re: Weird Problem

2003-07-04 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] sketchbook.org says... > Hey, > > I've got a script which disables a banner image when it's time is up, the script > also sends an e-mail to both me and the banners owner when the time is up > > I've got a problem which is really weird.. > > Eve

[PHP] Re: Optional form variables (IDEA?)

2003-07-04 Thread David Robley
In article <[EMAIL PROTECTED] manila-usia.gov>, [EMAIL PROTECTED] says... > Hello, im doing a form that when you pass it will generate a preview report. > My problem is some fields are optional the optional fields are 5. And for > those fields I need to make it fit when it generate what idea or cod

Re: [PHP] echo not working!!!

2003-07-06 Thread David Nicholson
s not understand and displaying the "); ?> as text. If this is the case you need to check your httpd.conf. David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professio

Re: [PHP] Having problems with an IF statement, just doesn't make sense

2003-07-06 Thread David Otton
On Mon, 7 Jul 2003 10:18:04 -0700, you wrote: >if (isset($theme)) { > print("Current theme is $theme"); > require "content/header_$theme.php"; >} else { > print("$theme"); > require "content/header.php"; >} > >now one would think that if it didn't return true that the else >statement wouldn't

Re: [PHP] Call by reference to function arguments

2003-07-07 Thread David Otton
On Mon, 7 Jul 2003 17:36:26 +0100, you wrote: >I want to write a function (as I have written in several other languages) that >obtains it's arguments dynamically (using func_get_arg()) and then assigns to that >argument. Think of the way that scanf() works -- that sort of thing. > >I have distille

Re: [PHP] Advise needed - rateing/voteing system

2003-07-07 Thread David Otton
On Mon, 7 Jul 2003 21:07:14 +0100, you wrote: >check sessions >if session is not set >check cookie >if cookie is not set >checkip >if ip is not set >do a reverse ip check >if that too comes clean then allow the person a vote > >as you can see i am trying my best to make sure that the visitor only

Re: [PHP] Call by reference to function arguments

2003-07-07 Thread David Otton
On Mon, 7 Jul 2003 23:37:58 +0100, you wrote: >On Mon, Jul 07, 2003 at 06:20:42PM +0100, David Otton wrote: >> On Mon, 7 Jul 2003 17:36:26 +0100, you wrote: >> >> >I want to write a function (as I have written in several other languages) that >> >obtains

[PHP] Re: multiple select box not showing values

2003-07-08 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > I have a select box that is filled with multiple values and when the user > clicks submit, it hightlights all the values in the select box and then > sends this to my PHP file. > > I did a simple: > > echo ($_POST["imgList"]); > > to s

Re: [PHP] include like function

2003-07-08 Thread David Otton
On Tue, 8 Jul 2003 09:35:10 +0100, you wrote: >> Hello, i need a function that gets a internal file say news.php, and >follows >> the urls from its copied location, >> >> say if i am in >> /pages/ >> and i need a file from >> /pages/php/wow >> >> i put >> include('php/wow/news.php') >> But the new

[PHP] Re: Retaining formatting problem

2003-07-08 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > Hello everyone, > > I have a long running problem that i just want to get covered, I have a standard > text box for people to insert long lengths of text. > > This text box is in a standard but when I insert it into the > database th

Re: [PHP] how to force variables declaration??

2003-07-08 Thread David Nicholson
> var $var2 = array(); > $var2 = bla,bla.. > and issue error when a variable is instanced without declare, some > idea???: Check out: http://uk2.php.net/error_reporting You want to use E_ALL to do what you described. David. -- phpmachine :: The quick and easy to use service prov

[PHP] Re: PHP forum

2003-07-09 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > Ok some of you might not like this, others of you will know exactly what I > mean, but it just reminded me so much of this forum that I am sure some of > you will catch the humor in it: > > http://www.mac-forums.com/forums/showpost.php?p

[PHP] Re: Create a Report

2003-07-09 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > I'm using MySQL and PHP for building a website, however now I need to create > a report with something like this: > > - > {Title} > {Description} > > {Zone1} > Detail Zone1.Topic1 > Detail

Re: [PHP] Form being filled out automatically....

2003-07-09 Thread David Otton
On Wed, 09 Jul 2003 07:00:38 -0500, you wrote: >I've got a problem. I have a form that the user fills out and then >hits submit on and it sends an e-mail. My problem is that I have one >AOL user that claims that when ever he goes back to the form, it >doesn't present the form - it just sends the

Re: [PHP] Antithesis to array_unique

2003-07-09 Thread David Nicholson
] = 1; } } $dupes = array(); foreach($valuecount as $value=>$count){ if($count>1){ array_push($dupes,$value); } } // $dupes now contains all duplicate values. There may be a quicker way of doing it though... David. -- phpmachine :: The quick and easy to use service pr

Re: [PHP] linking with home directory path

2003-07-09 Thread David Nicholson
computer. Remote browsers will not be able to access the style sheet as you are referencing it as a file on your server machine. Is this what you intended? David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmach

Re: [PHP] Returning values from functions

2003-07-09 Thread David Nicholson
= auth_user($_SESSION['login']); var_dump($username); David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://w

Re: [PHP] proxy... of a sorts.

2003-07-09 Thread David Nicholson
take a guess at them from the file name and send them using the header() function. All the best, David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development b

Re: [PHP] Using PHP with windows logon

2003-07-09 Thread David Otton
On Wed, 9 Jul 2003 19:02:21 +0930, you wrote: >can you use your windows logon as set it as a variable in php?? > >eg I log onto a windows machine using brenton can i use a php script to set >that as a variable, I have seen a similar type function before but i have no >idea how it works, I know win

[PHP] Re: MySQL Results - display issue :S

2003-07-09 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > I know im probibly getting irritating to most of you :P but i thought i may > ask another thing that is on my mind! > > I have a sql query bringing back 200 rows for arguments sake, From this i > would like an answer to 2 issues i have.

Re: [PHP] Get previous folder

2003-07-10 Thread David Nicholson
= dirname($folder); // $folder now contains "/path/to/folder/" For more info look at: http://uk2.php.net/manual/en/function.dirname.php HTH David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.

Re: [PHP] newbie array question

2003-07-10 Thread David Nicholson
$allnames = array(); while($thisname = sybase_fetch_row($result)){ $allnames[] = $thisname[0]; } I have never used the sybase db functions though so I may be incorrect. All the best, David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP

Re: [PHP] nlist

2003-07-10 Thread David Nicholson
PHP 5 you can use scandir() http://uk.php.net/manual/en/function.scandir.php In lower versions AFAIK you will have to use the system function to call either ls (on *nix) or dir (on windows). David. -- phpmachine :: The quick and easy to use service providing you with professional

Re: [PHP] What did I do wrong to cause a parse error?

2003-07-10 Thread David Otton
On Fri, 11 Jul 2003 00:53:32 -0400, you wrote: >foreach ($profileArray[$i][attributes] as $key => $val) { > $singleProfileHTML .= $key . "=\"" . str_replace("'", ''', str_replace('"', > '"', $val)) . "\"\n"; >} > >The parsing error occurs in the "$singleProfileHTML.." line. I'm completel

Re: [PHP] Unknown Syntax

2003-07-11 Thread David Nicholson
t; elses > script and they use this instead. Does anyone know if this works or > any > problems with it? > Cheers This compares type as well as content, for example: 2 !== "2" evaluates to true but 2 != "2" evaluates to false David. -- phpmachine :: The quick and

Re: [PHP] Writing to files

2003-07-11 Thread David Nicholson
to the data you wish to add and saving the entire file again (which will obviously take longer than appending to the end of the file). David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professi

Re: [PHP] Writing to files

2003-07-11 Thread David Nicholson
order echo $filelines[$i] . "\n"; } -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnichols

Re: [PHP] Is it possible to test an uploaded file to check the type?

2003-07-13 Thread David Otton
On Sun, 13 Jul 2003 13:32:00 -0400, you wrote: >The upload process, already collects info on file types when you upload. > From the manual -> > >> $_FILES['userfile']['type'] >> >> The mime type of the file, if the browser provided this >> information. An example would be "image/gif". >> >

Re: [PHP] Replacing newlines (\n) with smething else

2003-07-13 Thread David Otton
On 13 Jul 2003 17:01:24 -0400, you wrote: >I'm trying to replace newlines with something else. For this example >I'll use as the thing to replace a newline with. This is what I >tried and it doesn't work. nl2br() in the specific case >$article = str_replace("\n", "", $article); > >What am I d

Re: [PHP] Replacing newlines (\n) with smething else

2003-07-13 Thread David Otton
On 13 Jul 2003 17:27:04 -0400, you wrote: >Perhaps. When getting text from a form field, what is substituted for a >newline (i.e. when someone hits enter). You can work it out for yourself. Run over the string, displaying each character as it's ASCII equivalent with ord(). Eg for ($i =

Re: [PHP] Replacing newlines (n) with smething else

2003-07-13 Thread David Nicholson
f can be used to cause a line break and if that is being done your code will not be detecting it. David -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by Da

Re: [PHP] Is it possible to test an uploaded file to check the type?

2003-07-14 Thread David Otton
On Mon, 14 Jul 2003 00:24:03 -0400, you wrote: >Looking for opinions. Can a spoofed uploaded file hurt a script or a >webserver?? >Reason why Im asking is because, I looked over the magic.mime file on my >server, and I see that it >doesn't support flash files (I may be wrong), of which I curren

Re: [PHP] Validating two variables

2003-07-14 Thread David Otton
On Mon, 14 Jul 2003 12:04:54 +0200, you wrote: > if ($user!='monganl') is what I have > >this is what I want to do > if ($user!='monganl' or 'wilsonma') > >what would be the proper format for this! if ($user != 'monganl' || $user != 'wilsonma') however, this condition would never fire, as $user

Re: [PHP] BigEndian to integer

2003-07-14 Thread David Nicholson
; $bits = array_reverse($bits); $value = 0; $columnvalue = 1; foreach($bits as $thisbit){ $value = $value + ($columnvalue * $thisbit); $columnvalue = $columnvalue * 2; } return $value; } HTH David -- phpmachine :: The quick and easy to use service providing you

Re: [PHP] elegant way of doing something else the last time through a loop?

2003-07-14 Thread David Otton
On 14 Jul 2003 13:11:11 +0200, you wrote: >Anyway, as you can see my problem lies with the SQl when the last >element is reached, then it should NOT add another "and" or "or". The short answer is "implode()". >Any help with my "logic", ie, how do/would you guys do this? if ($_POST[any_all] == "

Re: [PHP] How do I dump a blob or text into a mySQL Database?

2003-07-14 Thread David Nicholson
t; and it works. Change your line of code to something like this: mysql_query("INSERT INTO table (field) VALUES ('{$buffer}')") or die(mysql_error()); to find out what is going wrong. Has the data in $buffer been escaped, reay to go straight into the query? if not add the line: $buffer

Re: [PHP] Eval var from query

2003-07-14 Thread David Nicholson
I have: > $name = "Shawn"; > After fetching a query result as an associative array I have the > contents of > the `name` field in $data > If I echo $data I get: hi my name is $name > I would like to get: hi my name is Shawn Use eval($data) See http://uk.php.net/eval

Re: [PHP] What is wrong??????

2003-07-14 Thread David Nicholson
in any included files before the session_start(); line. You may have accidentally sent a space or a newline if http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually kn

Re: [PHP] Eval var from query

2003-07-14 Thread David Nicholson
line 1 What are the exact contents of data? David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ Q

Re: [PHP] socket programming

2003-07-15 Thread David Nicholson
e program has to do is send it's output to the standard output (use echo in the case of PHP). David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development

Re: [PHP] variable sized arrays & global vars - another newbie question

2003-07-15 Thread David Nicholson
bal $counter; $counter++; } IncCounter(); echo $counter; // 1 is displayed === works fine, maybe it is a problem with your particular code? David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/

Re: [PHP] simple imap functions

2003-07-15 Thread David Nicholson
ctions and use them: http://uk2.php.net/imap David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/

Re: [PHP] How can I display an image within a script?

2003-07-15 Thread David Nicholson
s advice would be to make sure you do some sort of validation of $_GET['file'] before you use it within the readfile() function or you have a security problem. For example people could send a request for /showimage.php?file=yourscript.php and they would be presented with the source code to your

Re: [PHP] Exec command not working through php

2003-07-15 Thread David Nicholson
with exec commands before or can suggest a > different way to run this command, I would love to hear it! Put this line of code in your script: echo "/bin/sed -f $GLOBALS[TMP_MAIL_DIR]"."cmdfile $GLOBALS[TMP_MAIL_DIR]"."$mailid > $GLOBALS[TMP_MAIL_DIR]"."$

Re: [PHP] Exec command not working through php

2003-07-15 Thread David Nicholson
mater for the exec function to retrieve the return status of the command you are executing. David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nichol

Re: [PHP] socket programming

2003-07-15 Thread David Nicholson
Hello, This is a reply to an e-mail that you wrote on Wed, 16 Jul 2003 at 01:34, lines prefixed by '>' were originally written by you. > I've already opened opened port for > this as > what David said but i cant see the output in the web. > He'res what i'

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