Re: [PHP-WIN] $_Post doesn´t work

2003-03-05 Thread Cam Dunstan
Quite right - variable names are most definitely case sensitive. Functions are not. CD - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, March 05, 2003 7:40 PM Subject: RE: [PHP-WIN] $_Post doesn´t work > I believe it's called

Re: [PHP-WIN] Configuration Trouble

2003-02-25 Thread Cam Dunstan
uary 24, 2003 6:50 AM Subject: Re: [PHP-WIN] Configuration Trouble > Hi guys > > Did you manage to fix this for simpleserver? I'm stuck! Thanks! > > -- > From: Cam Dunstan ([EMAIL PROTECTED]) > Date: 10/19/02 > > > Next message: Nino V: "[PHP-

Re: [PHP-WIN] String Compare

2003-02-12 Thread Cam Dunstan
Brennan You should confine those sorts of comparisons to numbers if($num == 1000) For strings, use strcmp() if (strcmp($s1, $s2) ==0){echo "these strings are identical"; } be aware that it is case sensitive. - Original Message - From: "Brennan Mann" <[EMAIL PROTECTED]> To: <[EMAIL P

Re: [PHP-WIN] MySQL: some script I must do

2003-02-10 Thread Cam Dunstan
; I want to put the database on the server. > They told me that I must do a Dump and then run some kind of script that I > dont quite get it. > The problem is that I don't know how to run/make the script. > > Thanks > > "Cam Dunstan" <[EMAIL PROTECTED]> escrev

Re: [PHP-WIN] MySQL: some script I must do

2003-02-10 Thread Cam Dunstan
Not sure if I fully understand your problem Rui but I would think your ISP means an SQL statement type dump - that is, the data you have is put in the form of a giant SQL statement - a collection of INSERT statements, one for each record you want to insert. Perhaps this might need to be preceeded

Re: [PHP-WIN] script not allowing login after generating new password

2003-02-03 Thread Cam Dunstan
There`s no such thing as a stupid question - unless of course we are trying to dramatically reduce the number of posts on this list. Jim, just echo the password before and after it gets inserted and before/after comparison and you`ll soon see where you going wrong. Echo - the greatest debugging

Re: [PHP-WIN] Looping through the mysql_field_name function

2003-02-03 Thread Cam Dunstan
Davy put this into a script and run it ... $dbase = "somedatabase";// change this to suit !! $db = mysql_connect("localhost", "root"); // change this also!! mysql_select_db($dbase,$db); $result = mysql_list_tables($dbase); $rowcount = mysql_num_rows($result); for ($j = 0; $j <

Re: [PHP-WIN] Something like trim()

2003-02-01 Thread Cam Dunstan
Yep, that`s better still - a nice succinct little one liner Jill. I avoid the ereg_ function family like the plague myself but that`s my problem, your solution is entirely correct. - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, February 01, 2003

Re: [PHP-WIN] Something like trim()

2003-02-01 Thread Cam Dunstan
Cybot, try this function string_dryclean($dirtystring) { $cleanstring = str_replace("\n", " ", $dirtystring); $cleanstring = trim(str_replace("\t", " ", $cleanstring)); do { $cleanstring = str_replace(" ", " ", $cleanstring); } while (strpos($cleanstring, " ") > 0); return $cleanstring; }

[PHP-WIN] Something like trim()

2003-01-31 Thread Cam Dunstan
Cybot, try this function string_dryclean($dirtystring) { $cleanstring = str_replace("\n", " ", $dirtystring); $cleanstring = trim(str_replace("\t", " ", $cleanstring)); do { $cleanstring = str_replace(" ", " ", $cleanstring); } while (strpos($cleanstring, " ") > 0); return $cleanstring; }

Re: [PHP-WIN] Something like trim()

2003-01-30 Thread Cam Dunstan
check out str_replace()- you`ll find it in the "string functions" section of the manual. - Original Message - From: "Bobo Wieland" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 30, 2003 6:26 PM Subject: [PHP-WIN] Something like trim() > Is there an easy way t

Re: [PHP-WIN] MySQL - question

2003-01-30 Thread Cam Dunstan
bobo I doubt that the table will be too big myself given the limitations which you will find in the mysql manual (far above your requirements). Spend a bit of time and calculate the actual size of the table - while it sounds huge you might be pleasantly surprised. A database of properties in a lo

Re: [PHP-WIN] Is this possible

2003-01-28 Thread Cam Dunstan
Don`t think so Wade, the posted data would be sent only to whateverB dot com. Which domain was going to respond to the user by the way? since only one can, the other is purely for the collection of data presumably - have a look at fopen() and fsockopen() in the manual, a solution might come to mi

Re: [PHP-WIN] Submit without Submit

2003-01-28 Thread Cam Dunstan
Only possible with javascript as far as I now wherein you do the calcs or validation at the browser end. Other possibility is a java applet but PHP being server side does not have any inherent ability beyond ordinary html at the users end. nothing to stop you using php to generate the aforementi

Re: [PHP-WIN] Mail newbie Question

2003-01-28 Thread Cam Dunstan
Yep - check out the mail() function which will do exactly that. If you are developing on your own machine which may not be running a mail server, configure php to use your ISP`s mail server. - Original Message - From: "Duncan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday,

Re: [PHP-WIN] Politely?

2003-01-27 Thread Cam Dunstan
I must be missing something here, but what IS all this chatter about politeness, blaphemy and profanity all about pray tell and what has it got to do with php? If someone is posting dirty ditties can they send again because I missed them completely. - Original Message - From: "Per Lun

Re: [PHP-WIN] PHP and Win95

2003-01-25 Thread Cam Dunstan
Conny, This is not a solution to your kernal32 problem necessarily though I suspect it might be by default, but try to upgrade to Win98 if you can, Second Edition if possible. and run PHP in CGI mode. For development purposes (but not production of course) this is the by far easiest platform to w

Re: [PHP-WIN] strpos and wildcards

2003-01-24 Thread Cam Dunstan
within a do while loop, check for a '>' with the strpos() function if the next character isn`t a < or a & then you have found the spot to start extracting from, otherwise... jettison all of the string up to and including the found '>' with the substr() function and repeat the process (loop) on the

Re: [PHP-WIN] Cookies and redirect issues with XP

2003-01-23 Thread Cam Dunstan
Hm - I`ve had some suspicious problems with XP myself. In my paranoia I thought it was muckrosoft`s first awkward attempt to screw up the rapidly expanding php community - but I think it is some kind of weird caching issue in the OS itself. Try setting the browser to the LEAST caching possi

Re: [PHP-WIN] SQL-query

2003-01-20 Thread Cam Dunstan
Wow! thanks fellas I really enjoyed that! except when Sean fired me! Hey Sean can I get my Mars Bars and stuff out of my drawer or is it straight out onto the street? Nothing like the subject of auto increment to cause a few hot flushes hey girls!! Proof indeed you have all had your moments wi

Re: [PHP-WIN] SQL-query

2003-01-17 Thread Cam Dunstan
Amen to that - I really believe you are better off (if you have the freedom to do so) changing autoincrement fields to an integer type and managing the incrementing yourself. In addition to the problem Dash mentions there is yet another "gotcha" - if you are ever faced with having to combine t

Re: [PHP-WIN] Looking for something simple

2003-01-15 Thread Cam Dunstan
john, Some time ago I sent via the list a lump of code that did this, but it was fairly highly customised to my weird way of doing things. You really should have a go at doing this yourself to suit your own style of programming, however if you get stuck mail me back and I shall send you something.

Re: [PHP-WIN] loop through string

2003-01-05 Thread Cam Dunstan
Welcome to the list Greg, There are thousand ways - try converting the string to an array then looping through the array with either a for() loop, a do-while or a foreach() $my_array = explode(",", $mylist); foreach ($my_array as $one_element) { echo $one_element.""; } - or - $my_array =

Re: [PHP-WIN] general survey.... php.ini config gui

2002-12-22 Thread Cam Dunstan
I think AnalogX, (the makers of "Simple-Server") have already put out something along those lines mate. Check their site. Such an app might be handy for a while, but in the end you`ll probably revert back to Microsoft Notepad, the world`s most popular php.ini file tool. - Original Message

Re: [PHP-WIN] Arrays - I may have gone blind

2002-12-16 Thread Cam Dunstan
aidal Maybe the array_walk() function is for you - but in general terms it is perhaps better to have a crack at a clever SQL statement if you are pulling stuff out of a database in any case. Look at nested SELECT statements and the MAX() function. Or, if not that, creating a temporary table with

Re: [PHP-WIN] auto increment

2002-12-05 Thread Cam Dunstan
another gotcha with auto increment fields - you can`t combine contents of two tables, each with their own auto incrementing fields which dis-allow duplicates - oughta be a law against them. do a query for the largest (max() function ) in an integer field, add one and then INSERT new value. store

Re: [PHP-WIN] Fast Web server

2002-12-04 Thread Cam Dunstan
go to http://www.apache.org Rado Rad rasho matie, half the world runs on it, you`ll never use IIS again. - Original Message - From: "Radovan Radic" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 05, 2002 7:05 AM Subject: [PHP-WIN] Fast Web server > Hi > > Can you

Re: [PHP-WIN] data format..

2002-12-04 Thread Cam Dunstan
bit "off topic" here, this PHP-Windows list may not be the right arena methinks. - Original Message - From: "Sandeep Murphy" <[EMAIL PROTECTED]> To: "Leon" <[EMAIL PROTECTED]>; "Cam Dunstan" <[EMAIL PROTECTED]> Cc: <[EMAIL PR

Re: [PHP-WIN] data format..

2002-12-03 Thread Cam Dunstan
sands, comma delimited text (or tab delimited) will do for all of them, unless the dbase app does not have import facility, in which case you could structure up the data into genereic dbase format yourself, its a fairly simple format, a header with info about fieldnames, sizes and types, followed b

Re: [PHP-WIN] question about session PHP

2002-11-27 Thread Cam Dunstan
Franco, I`m not so sure if unlink() can be relied on to work on a windoze server, never actually tried it but have hazy recollections of some "windows only" issue with it. Check the FAQs or manual. - Original Message - From: "Franco Pozzer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>

Re: [PHP-WIN] Redirect browser to another URL?

2002-11-27 Thread Cam Dunstan
Jack, here is another quick and dirty function to stick in your library, yet another way to redirect from anywhere in your script function redirect($url){ echo "window.location.replace(\"".$url."\")"; } usage: blah blah redirect("any_url"); exit; > > -Original Message- > From: Jack K

Re: [PHP-WIN] Installation question about : PHP4TS.DLL & PHP4TS.LIB

2002-11-26 Thread Cam Dunstan
Franco Yes it is entirely possible to get PHP to work in CGI mode with NOTHING in your windows or system directory. I often set up win machines with everything under the C:\PHP directory including the php.ini file and all DLLs, sessiondata and uploadtemp dirs and it works a treat and is a cleaner

Re: [PHP-WIN] measuring space

2002-11-24 Thread Cam Dunstan
DaMouse, Here is a copy of a previous mail for a related problem, with filesizes and a little arithmetic you should be able to adapt this to your needs (Copy of mail to Darren) Darren, As others have said, PHP is not really the right tool for client side work even if the client machine is also t

Re: [PHP-WIN] documentation questions

2002-11-22 Thread Cam Dunstan
Darren, As others have said, PHP is not really the right tool for client side work even if the client machine is also the server. Having said that, the general style of task you are trying to achieve is frequently tackled by the use of Recursive functions - functions that call themselves from "wit

Re: [PHP-WIN] Question from a total newb

2002-11-21 Thread Cam Dunstan
hey Joe, You ought to try some of those tools for MySQL Dash recommends, there`s some beauties amongst them, especially phpmyadmin. In the meantime, here is a little script, quick and dirty that will let you look at a database and generate some basic queries and forms for you. Just copy and paste

Re: [PHP-WIN] how to unsubscribe?

2002-11-19 Thread Cam Dunstan
You can`t Alvin - once you`ve joined the list, you`re not allowed to program in any other language except PHP for the rest of your life. Go here - http://www.php.net/unsub.php > - Original Message - > From: "Alvin Tan" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday,

Re: [PHP-WIN] parse error

2002-11-19 Thread Cam Dunstan
zeus, I notice you start your code with On Tue, 19 Nov 2002, zeus wrote: > > > Nope! i try that one too, but the parse error thing still exist > > > > > > Howard, Robert P wrote: > > > > >change your else($submit) statement to else > > > -- PHP Windows Mailing List (http://www.php.net/) T

Re: [PHP-WIN] PHP4 installation-problem, getting download-screen

2002-11-17 Thread Cam Dunstan
quot; type errors it will almost certainly be a permissions issue. Read back through the list for lots of good advice from contributers on permissions and security issues in general before you go "live". cheers. - Original Message - From: "Kalle" <[EMAIL PROTECTED]&

Re: [PHP-WIN] PHP4 installation-problem, getting download-screen

2002-11-16 Thread Cam Dunstan
Andreas, Seems like you need to tell Apache to EXECUTE any php files asked for rather than offer them up for download. Do this by editing your httpd.conf file (C:\Program Files\Apache Group\Apache\conf\httpd.conf) as follows ScriptAlias /php/ "c:/php/" AddType application/x-httpd-php .php A

Re: [PHP-WIN] set up mysql without winmysqladmin?

2002-11-15 Thread Cam Dunstan
A.J. A.J. Dash`s solution says it all - you certainly don`t need Winmysqladmin to start and stop mySQL - I just have a couple of shortcuts to batch files to start and stop apache and mysql on the desktop. You don`t need the "start" command in fact though it does no harm. stop mySQL with cd

Re: [PHP-WIN] php - login and password

2002-11-15 Thread Cam Dunstan
Rui, There are a hundred ways of doing this, popup windows are often simple client side javascript routines, but most often, serious passwording involves the use of databases. So get yourself a copy of mySQL and start by familiarlising yourself with that and PHPs unrivalled set of db connection

Re: [PHP-WIN] PHP and Windows 98

2002-11-12 Thread Cam Dunstan
Dean A PHP APache mySQL combo works fine on a win98SE box, probably the least troublesome of all. While win98 is not a serious or secure platform for WWW or business intranet, for home development its quick and easy. Are you saying your scripts don`t work at all or just won`t add records to mys

Re: [PHP-WIN] Php Setup - begginer

2002-11-12 Thread Cam Dunstan
Hey Rob, Its tough getting started, even with the manual at your side, but you will make it. Lots of folk do fine with IIS but I suspect Apache is less bothersome - one or two small additions to the config file and you are up and away. If you change to Apache and still have problems, mail me for

Re: [PHP-WIN] gettext

2002-11-11 Thread Cam Dunstan
Gary, Have you tried putting the DLLs in the same directory as PHP.EXE itself? (typically C:\PHP) On any win system from 98 to XP I always put them here rather than the win or systems directories and never have a drama. - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]

Re: [PHP-WIN] Print or Echo?

2002-11-09 Thread Cam Dunstan
Stephen I use echo, but that is not to say there is anything wrong with using print. I`ve never really appreciated the difference, guess it gets back to the very first script one ever wrote when trying to learn the language - I still use $result and $myrow and $sqlstatement to this day purely out

[PHP-WIN] RE: [PHP] How to echo the end marker '?>'

2002-11-08 Thread Cam Dunstan
john, creating script snippits on the fly is generally not much use in an echo statement because echos just stream to the clients browser - nothing in that stream is actually ever going to be "executed" The various solutions offered by other list members are particularly relevant to the creatio

Re: [PHP-WIN] Re: [PHP] How to echo the end marker '?>'

2002-11-08 Thread Cam Dunstan
Ernest, your solution is quite correct, I write lots of scripts that "write scripts" and it works fine. just concatenate little strings together "<"."?"."php" and "?".">" pretty much as you suggested to Philipp. If you have a really sick and twisted mind you can create functions that do this in

Re: [PHP-WIN] Help on \t \r \n

2002-11-03 Thread Cam Dunstan
dee, Use the string function nl2br($myblahstring) This converts ordinary linebreaks (newline chars) to html tags on the fly when displaying text out of a database for instance. In your example though with straight echos you have to expicitly echo at end of each blah echo, no matter what browse

Re: [PHP-WIN] Please Guide me ( Unix and Windows Severs)

2002-11-01 Thread Cam Dunstan
raheel, Script wise you should have no dramas at all running them on unix box (or linux). Just ftp them straight across and let em rip. the only changes would be of course logging onto a different database server perhaps. Most environments typically do not have session_autostart set to on (1) b

Re: [PHP-WIN] Problem with php-script, possible a php.ini a fault ....

2002-11-01 Thread Cam Dunstan
- Original Message - From: "Michael Hazelden" <[EMAIL PROTECTED]> To: "'Asendorf, John'" <[EMAIL PROTECTED]>; "Svensson, B.A.T. (HKG)" <[EMAIL PROTECTED]>; "Php-Windows (E-mail)" <[EMAIL PROTECTED]> Sent: Saturday, November 02, 2002 3:23 AM Subject: RE: [PHP-WIN] Problem with php-script, p

Re: [PHP-WIN] Date Increment Problem

2002-10-30 Thread Cam Dunstan
raheel The method Constantin suggests is a good solution for your problem, but also have a thorough read of the manual under date functions, there is a lot of additional useful info there with the use of several of the functions in unison - for example... $tomorrow = mktime (0,0,0,date("m") ,dat

Re: [PHP-WIN] PHP IIS 5.0 Include files and baldness

2002-10-29 Thread Cam Dunstan
Craig, Do you really need an include file?? Why not a simple IF statement in the same script that treats the form? if(isset($missing) == false){ echo "Please go back to the form and fill out the $missing field. Thank you "; } else { // process the form data normally } otherwise, if missing.i

Re: [PHP-WIN]

2002-10-27 Thread Cam Dunstan
Jason, I know there is no restriction on using

Re: [PHP-WIN] Switching dbs in midstream

2002-10-27 Thread Cam Dunstan
John, Theres nothing to stop you doing aother query within then loop of the first provided that you don`t send the result to the same result handle or the same row array - in other words . $result =mysql_query($sqlstatement); while ($row = mysql_fetch_array($result)) { // do stuff mysql_sele

Re: [PHP-WIN] Best PHP clients out there

2002-10-27 Thread Cam Dunstan
John, By clients do you mean source code editors?? If so, there are plenty of good ones, I like Plaven Parvenov`s CR-Edit myself - has line numbering and PHP syntax awareness (optionally), loads reasonably quickly. goto http://www.praven3.com/credit/ CD - Original Message - From: "Jo

Re: [PHP-WIN] Configuration Trouble

2002-10-19 Thread Cam Dunstan
Max, I too have tried to get SimpleServer to work without success - it is the cutest little server and would be great for adhoc work on other PCs. Apache is the main game of course and I use it without drama all the time but your mail has prompted me to dust off simpleserver again and have anothe

Re: [PHP-WIN] IIS \ Apache and header(location: errors

2002-10-19 Thread Cam Dunstan
Bob, To redirect I use a simple little function which doesn`t need URLEncode and works thru Apache without drama although it is a bit of a "cheat" since it is sending a small chunk of client side script... function redirect($url){ echo "window.location.replace(\"".$url."\")"; } (put this near t

Re: [PHP-WIN] RE: [PHP] Re: Need help with HTTP-Authentication

2002-10-18 Thread Cam Dunstan
David and Davy, My two bobs worth - I like to use sessions myself usually, I suppose because it means my scripts are controlling access rather than the server or the operating system. With sessons you can store all sorts of variables such as exactly what the user can do in a list of tasks rather

Re: [PHP-WIN] PHP for Billing App

2002-10-16 Thread Cam Dunstan
Madeliene, A combination you might like to put to them which I think would work well - PHP MySQL at the server with some Delphi or VB windows apps at the client end for data entry. There are quite a few Delphi components out there (many are free and open source) to connect to MySQL directly or y

Re: [PHP-WIN] PHP_SELF

2002-10-15 Thread Cam Dunstan
Sven, Noticed the semi colon in your query string - I don`t think you should be including that. db says he uses it with no problems - but if you look up mysql_query in the manual - it says "The query string should not end with a semicolon." Either that, or maybe you lose the database connection

Re: [PHP-WIN] graphs in php ???? urgent plz ! ! ! !

2002-10-14 Thread Cam Dunstan
Jezz toby!! you don`t give us much warning! 2 hours? I think by the time I saw your email you had already been shafted - if not, do a quick and dirty one by echoing some image tags - use some little coloured gifs or jpegs and stretch them to the right length according to the values in

Re: [PHP-WIN] PHP_SELF

2002-10-13 Thread Cam Dunstan
John, are you SURE you have been using the semi colon without errors John?? Check your old code, I think you`ll find a semi colon definitely isn`t allowed in any reasonably current version of mysql / PHP. You may be thinking of queries that you enter into such utilities as mysql-Front or mysqlAdm

Re: [PHP-WIN] Re: passing variables part 2

2002-10-13 Thread Cam Dunstan
db Far as I know it would - without the quotes of course. - Original Message - From: "db" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, October 12, 2002 7:40 AM Subject: [PHP-WIN] Re: passing variables part 2 > another roadblock: how would you pass a variable containing

Re: [PHP-WIN] passing variables part 2

2002-10-10 Thread Cam Dunstan
db - a small word of caution on using the ampersand to send variables within the URL - it works just like Dash said it would but don`t try and send huge lumps of data this way - there are limits (possibly a couple of hundred bytes or so) to the length of the URL allowed. Limits you wouldn`t have

Re: [PHP-WIN] mail programs

2002-10-04 Thread Cam Dunstan
Dean, try www.impchat.com for a very nifty little mail app for win98 called HermMail - freeware. Haven`t been there for a long while so can`t be certain it is still there - worth a try. Cam D - Original Message - From: "Dean Hayes" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Satur

Re: [PHP-WIN] Number of bytes in a field?

2002-10-02 Thread Cam Dunstan
kieran, try this ... $fieldresult = mysql_list_fields($some_database, $some_table); $fieldcount = mysql_num_fields($fieldresult); for ($my_counter = 0; $my_counter < $fieldcount; $my_counter++} { $fieldsize = mysql_field_len($fieldresult, $my_counter); echo "fieldsize = ".$fieldsize; echo

Re: [PHP-WIN] Query to MySQL

2002-09-25 Thread Cam Dunstan
Marlene You need to convert the current date to a string of the form "yyy-mm-dd hh:mm:ss" and write your query as follows $datestring = date("Y-m-d H:i:s", $some_time_stamp_integer); - or for this very day today $datestring = date("Y-m-d H:i:s"); // returns today if no optional timestamp gi