Re: [PHP] Re: Difference between $_POST[foo] and $_POST['foo']?

2003-06-17 Thread CPT John W. Holmes
At 16:19 17-6-03, you wrote: $sql = 'select * from db where apple = \'' . $_POST['foo'] . '\';'; Like that? you missed some quotes: $sql = 'select * from db where apple = \''' . $_POST['foo'] . '\''; Go back and count the quotes again. The original post is correct as far as quotes go. Yours

Re: [PHP] sorting an array

2003-06-17 Thread CPT John W. Holmes
array[numrooms] = Array ( [3] = 2 [2] = 5 [1] = 1 ) I want to get a result like this: 2=5 3=2 1=1 ( I want the keys to stay attached to the results) perhaps asort()? This function sorts an array such that array indices maintain their correlation with the array elements they are

Re: [PHP] cron job

2003-06-17 Thread CPT John W. Holmes
Is there a way to run a script (to check a table for new fields, or to check time..etc) evrey few hours, without using programes souch as crontab. In addition to what others have said, you don't _have_ to set up the cron job (or any scheduled job) on the same computer as your scripts. If you

Re: [PHP] PHP.net Manual Magic?

2003-06-17 Thread CPT John W. Holmes
One of the coolest things I have seen online, and some of you may not even know this works, but if you type in the url: http://www.php.net/foo; you'll be taken straight to the foo page of the php manual, if one exists. If foo doesn't exist, you pull up a Google search-within-the-site page. I

Re: [PHP] Problems with quotes in URL - SOLVED - plz FLAME me!!!

2003-06-18 Thread CPT John W. Holmes
No, I'm all for a public flaming... let him serve as an example to others!! :) In all honesty, I have posted about the htmlentities/htmlspecialchars() requirement when putting data in form inputs quite a lot recently. You should have picked up on it sooner. :) Oh well, though... at least you know

Re: [PHP] Session filesize limit

2003-06-18 Thread CPT John W. Holmes
Does anyone know about the ideal session filesize limit? I am using the common functionality in the entire application. So i am thinking to store data into the session file once user logs into the system rather retrieving the information from database on each user request. But i dont know

[PHP] Re: Fatal error: Call to undefined function: str_word_count()

2003-06-18 Thread CPT John W. Holmes
nabil [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... when i use str_word_count() i got the following : Fatal error: Call to undefined function: str_word_count() and my PHP is Version 4.2.3 What is the problem ??? Reading English? us2.php.net/str_word_count PHP

Re: [PHP] Calling c function from php

2003-06-18 Thread CPT John W. Holmes
Anyway, can any make a suggestion on how to connect to a c function from a php app? I have to connect to a sales tax calculation software. The function is being written for me but I have to figure how to call it - get the variable - and use it again in my php app. I've been told there's

Re: [PHP] Software Testing and Internationalization - Free book by LISA/Lemoine International

2003-06-18 Thread CPT John W. Holmes
LISA, in collaboration with Lemoine International has made Software Testing and Internationalization by Galileo Computing freely available for download. [snip] To download a copy, please visit http://www.lisa.org/interact/2003/swtestregister.html How about a privacy statement on

Re: [PHP] Validating a money input

2003-06-18 Thread CPT John W. Holmes
What is the best way to validate a money input? For example, 3452.67 versus 3452..67. if($value == (string)round((float)$value,2)) or if(preg_match('/^[0-9]*\.?[0-9]+$/',$value)) appear to work. :) Assuming your value is a string to start with. ---John Holmes... -- PHP General Mailing

Re: [PHP] direct access to file uploads

2003-06-18 Thread CPT John W. Holmes
I am new to PHP and am trying to get access to files that are uploaded. I have RTFM ;-) and have noticed that PHP writes the file to disk in a temporary location and provides a method/class with all of the information needed to access it. I am loading (PDF's) into a binary field in mySQL and

Re: [PHP] [Newman] Passing an image through a php file.

2003-06-19 Thread CPT John W. Holmes
try this: ?php header(Content-type: image/jpeg); fopen (d:/crushme/images/1.jpg, r); Just my opinion, but maybe you should try reading the file and echoing the data instead of just opening it. :) ---John Holmes... I would like to pass an image throught

Re: [PHP] Trapping PHP Errors

2003-06-19 Thread CPT John W. Holmes
How do I trap a PHP error and display my own error message instead? I have two PHP scripts - one that creates tables on MSSQL and one that deletes tables on MSSQL. I wish to capture the message that appears if the user attempts to create tables that already exist, or delete ones that do not

Re: [PHP] unique random id

2003-06-19 Thread CPT John W. Holmes
How do i generate a unique random number? You can use rand(), but there's no guarantee it'll be unique unless you remember every number you've ever generated ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Session Vars

2003-06-19 Thread CPT John W. Holmes
setting up some pages to allow users to log in, and store their userID in a session var. for development purposes, i've installed AMP on my windows box. -everything parses fine -register globals is on. problem: session vars do not seem to be carrying over pages, even when i set the

Re: [PHP] php https file download

2003-06-19 Thread CPT John W. Holmes
Apache 2.0.40 PHP 4.2.2 Linux I have a single php script for downloading requested files. It works beautifully on http over port 80. It does NOT work at all over https on port 443. I am using the exact same script (the very same file) for both http and https connections. Apache has the

Re: [PHP] Empty Page problems

2003-06-19 Thread CPT John W. Holmes
Can anyone tell me what is wrong with my PHP script? I am trying to add information to an MSSQL database from a separate HTM file. The script it as follows: How about you tell us what the problem is? What is the result of this script? What are you expecting the result to be? Take away the @

Re: [PHP] PHP: cannot configure SMTP_port....

2003-06-19 Thread CPT John W. Holmes
i am trying to send mail from a script, but i receive these error message: Warning: mail() [function.mail]: Failed to connect to mailserver at localhost port 25, verify your SMTP and smtp_port setting in php.ini or use ini_set() in c:\apacheserver\apache\htdocs\work-net\serial.php on line

Re: [PHP] Re: error handling

2003-06-19 Thread CPT John W. Holmes
I looked in the manual (twice now). I want to keep logging to the log file but print to browser on this one script. I have in my script: error_reporting (E_ALL); error_reporting (E_ERROR | E_WARNING | E_PARSE); but they're still only being logged to file. I dont have access to php.ini.

Re: [PHP] Month loop

2003-06-19 Thread CPT John W. Holmes
Is there any way I could loop thru and print all the month names (i.e. January, February)? Just make an array and loop through the array. You know the rest of the names, right? :) ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Cookies- peanut butter or chocolate??

2003-06-19 Thread CPT John W. Holmes
1. How do you setup a cookie that will not expire?? You can't. 2. How do you put 2 items that you want to save in the cookie and retrieve?? Examples in the PHP manual only show how to work with a single value. You can't. Use an array or two cookies. ---John Holmes... -- PHP General

Re: [PHP] Is there an RTFM for 'use strict' ?

2003-06-23 Thread CPT John W. Holmes
Done a lot of Perl PHP coding over the years and one thing I _really_ liked about Perl is its 'use strict;' directive. For those of you not familiar with Perl, this made the script die if you don't (among other things) declare your variables before using them. Once the fingers are flying,

Re: [PHP] sending headers

2003-06-23 Thread CPT John W. Holmes
I try to include a redirect header in my script, but is fails with the familiar ( headers already sent) error. I KNOW you should put the headers call where it will cause the first output, and I do that, the only thing happening infront of the headers call is an include statement to my main

Re: [PHP] Performance question

2003-06-23 Thread CPT John W. Holmes
I have a question regarding retrieving the information. I have the functionlity in which on every user click, system needs to retrieve information for particular user and display the page according to the retrieved information. Now question is which is the scalable solution? (1) Retrieve

Re: [PHP] ?xml version=1.0 encoding=UTF-8

2003-06-23 Thread CPT John W. Holmes
When I include ?xml version=1.0 encoding=UTF-8? in my html code, I get a parse error. The version is 4.1.2; phpinfo() reports that XML support is turned on. Can anyone help with this? The first two characters are opening up a PHP block of code, so you get a parse error. Either disable short

Re: [PHP] header() issues....

2003-06-23 Thread CPT John W. Holmes
Does anyone know if there are issues with using the header() function inside frames? Is there extra stuff that needs to be added to it to get it to work correctly? No... each frame is it's own HTTP request. PHP operates server side so it has no idea of frames. It simply processes the code and

Re: [PHP] php.ini

2003-06-25 Thread CPT John W. Holmes
- Original Message - From: Jay Blanchard [EMAIL PROTECTED] [snip] I am running a red hat 9 linux box with Apache 1.3.27 with PHP 4 what is the default location for the php.ini file [/snip] Create a page with just the following... ?php phpinfo(); ? place the page in your

Re: [PHP] cannot get php through apache to write to my home dir on shared server

2003-06-26 Thread CPT John W. Holmes
From: frank reeves [EMAIL PROTECTED] I have an account on shared server and am trying to write a logfile (a dump of an email which i use mail() to send) to a logfile in my home dir. This logfile will grow with all emails send by my app and will thus give me an archive of sorts. However,

Re: [PHP] Capturing Windows Login Details

2003-07-11 Thread CPT John W. Holmes
I need to capture the username and password used to login to Windows 2000/XP with PHP. Does anybody know how to do this? You can get the username, that's it. $_SESSION['LOGON_USER'] ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Capturing Windows Login Details

2003-07-11 Thread CPT John W. Holmes
CPT John W. Holmes wrote: You can get the username, that's it. $_SESSION['LOGON_USER'] Don't you mean $_SERVER['LOGON_USER']? Yeah :) See what I get for giving up caffeine... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] Capturing Windows Login Details

2003-07-11 Thread CPT John W. Holmes
Everything I try I get undefined index what does this mean? It is vital also that I can grab the user and the pass before somebody can access a certain part of the website, like the authentication dialogs that appear in Internet Explorer. Like Lief said, it's $_SERVER['LOGON_USER']... That's

Re: [PHP] Capturing Windows Login Details

2003-07-11 Thread CPT John W. Holmes
Well here is some more information so you can understand what I am trying to do: I need to display their username in html/php document. This document has a form which they fill out. It is to stop people changing who they are when they fill out the form (for example joe bloggs filling out a

Re: [PHP] php mysql array question

2003-07-11 Thread CPT John W. Holmes
Is there any php function to pull a query into an array? I know there is a way to get the first row of the results in an array, but I'm having to loop through each row pushing the row onto an array to get the result I'm looking for and it seems like a lot of code for something that I would

Re: [PHP] Writing to files

2003-07-11 Thread CPT John W. Holmes
Any ideas on how I can print the lines of my file in reverse order, then? Does fgets() always process from the beginning of the file even if you open the file with the pointer at the end? I tried to get the line count of the file and go through each line of the file backwards but that

Re: [PHP] Missing php.ini file

2003-07-14 Thread CPT John W. Holmes
You'll be waiting a long time, until the end of time :) Because the php4 module is now named php-src, so change that in the url and you'll be set. Thanks. Someone needs to change the link in the Configuration chapter of the manual, too, b/c that's how I always find it. :) ---John Holmes...

Re: [PHP] Re: reposting in textarea

2003-07-14 Thread CPT John W. Holmes
Artoo wrote: How do you repost data in a textarea field of a form? I've set up a session variable named old_data and want to repost the data into the textarea of a form so it can be re-editied. You can use the $_POST variavle in the text area eg textarea name=my_field?php echo

Re: [PHP] PHP POS program

2003-07-16 Thread CPT John W. Holmes
Angelo Zanetti napsal(a): Anyone know where I can download a demo point-of-sale program from? preferably written in php and preferably a point-of-sale designed for restaurants? any links etc will be great NO-FLAME This problem (POS) is too serious to be written in PHP(via browser). Maybe

Re: [PHP] KEEP IMAGE RATIO

2003-07-16 Thread CPT John W. Holmes
Ok, before you go responding with percentages, I should note this. consider this: Image1 : 100x100 (Ratio = 1:1) Image2 : 100x200 (Ratio = 1:2) Space available for display : 75x75 now, i can say width=75% height=75%, but this will only work for Image1, since Image2 will end up as

Re: [PHP] Mail From option in PHP.ini

2003-07-18 Thread CPT John W. Holmes
Ok, I want to specify who the mail is coming from by using the sendmail_path option in the PHP.ini. I've added the [EMAIL PROTECTED] to it, but I want to be able to dynmaically change [EMAIL PROTECTED] to [EMAIL PROTECTED] or whatever else. Anyone have any ideas how I can do this? I'm

Re: [PHP] explode and escape character for string separator

2003-07-18 Thread CPT John W. Holmes
On Friday 18 July 2003 02:42 pm, Chris Shiflett wrote: --- Reuben D. Budiardja [EMAIL PROTECTED] wrote: Suppose I have a long string like $myStr = $string1:$string2:$string3; I can obviously explode them using : as the separator. But what if $string1 contains the character : by

Re: [PHP] explode and escape character for string separator

2003-07-18 Thread CPT John W. Holmes
From: Reuben D. Budiardja [EMAIL PROTECTED] This is a hypothetical situation. The real situation is that I am trying to have a protocol for data sent by client using Flash. But the basic question remains. So FLASH is creating the string that you must decode in PHP? Is there any way to URL

Re: [PHP] need help with MySQL full text searching!!!!

2003-07-21 Thread CPT John W. Holmes
I think you need to make a second index that just consists of the one column ALTER TABLE biblio ADD FULLTEXT (title) if you want to search on just that one column. ---John Holmes... - Original Message - From: Angelo Zanetti [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July

Re: [PHP] need help with mysql union

2003-07-21 Thread CPT John W. Holmes
hi, i'm trying to select * through 3 tables - is the following syntax correct? $sql=(SELECT * FROM mjp_cc); $sql=UNION; $sql=(SELECT * FROM imc_cc); $sql=UNION; $sql=(SELECT * FROM pmp_cc); $sql.= ORDER BY savedccactivity DESC; i basically just want to spit out the contents of these

Re: [PHP] Passing Serialized Array via Hidden field

2003-07-21 Thread CPT John W. Holmes
--- Andrei Verovski [EMAIL PROTECTED] wrote: I am need to pass serialized assotiative array via form hidden field (not GET or POST). This is impossible. A hidden form field is simply a form field that is not displayed to the user. Form actions must be GET or POST. In order to do it, I

Re: [PHP] can't restart session

2003-07-21 Thread CPT John W. Holmes
You have the same session id, but there is no data in it, so what's the problem? You should still consider the user logged out since the session is empty, right? If you really want, upon logout, make a new session id with session_id(), md5() and uniqid(). ---John Holmes... - Original

Re: [PHP] can't restart session

2003-07-21 Thread CPT John W. Holmes
From: Chris W. Parker [EMAIL PROTECTED] CPT John W. Holmes mailto:[EMAIL PROTECTED] on Monday, July 21, 2003 12:39 PM said: You should still consider the user logged out since the session is empty, right? Right, but the server isn't thinking of it this way. Then something is wrong

Re: [PHP] filesize comparison for upload

2003-07-21 Thread CPT John W. Holmes
I have an upload form that will be used for some really large files. I need to ask a couple of questions about the ways of improving the success rate that I have using it. (1) what is the best and most stable method for uploading a large file. Sometimes the transfer peters out. (2) how can I

Re: [PHP] can't restart session

2003-07-21 Thread CPT John W. Holmes
What is the point of having a unique ID for each session if the only thing that matters is the data stored within it? Why have a session id at all if it can't be used to uniquely track a user? Well, it can, and it does. I guess it's all in how you use it. If my session id is abcd, then when I

Re: [PHP] Problem with Adding info into an array

2003-07-21 Thread CPT John W. Holmes
I have 7 checkboxes, which make up the array information. I currently use implode to make the array, however that array only consists of the information that it checked. What I need to do now is make it so the array will always be 7 items, but if there isnt a checkbox for the item, I want

Re: [PHP] can't restart session

2003-07-21 Thread CPT John W. Holmes
In my first post I showed that one of the versions of the logout page that I used had this line in it. setcookie(user_info,,(time()-3600),/); Shouldn't that take care of the cookie? Like someone else said, that'll take care of a cookie called user_info. Your session cookie is named

Re: [PHP] Multiple Select Form

2003-07-22 Thread CPT John W. Holmes
I have a form that has a select form object with where I can select multiple values. The select is called number. When I post the form, I get a lot of variables called $number with the various values I selected. Is there a way that I can make this an array of values? name it number[]

Re: [PHP] Hi

2003-07-22 Thread CPT John W. Holmes
Quit spamming us. We don't want to visit your lousy poker site. ---John Holmes... - Original Message - From: Rausch Alexandru [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 22, 2003 4:42 AM Subject: [PHP] Hi MYSQL problems problems. I want to install an user login

Re: [PHP] quick question

2003-03-10 Thread CPT John W. Holmes
I'm sending credit card info to a 3rd party credit card processing site. I would like to keep the inputted values and, after the approval, have them appear in the value part of the form so that they don't have to re-input the same values they had just put in for the credit card. how can i

Re: [PHP] delete from array

2003-03-10 Thread CPT John W. Holmes
Not sure if there is a function that I missed when I did a search on this at php.net, but here is the situation: I have an array that looks something like this: 12:00:00 12:05:00 12:10:00 12:15:00 Bascially, it just has all times in it for a day in 5 minute increments. This is more of

Re: [PHP] A question of time...

2003-03-10 Thread CPT John W. Holmes
[snip] If it turns out that I am incompetent, then I will happily send them a bill for zero hours, otherwise I would like to take comfort that I am not ripping them off. Just my humble opinion, of course, but I think you did the job quickly considering what you were given to start with.

Re: [PHP] A question of time...

2003-03-10 Thread CPT John W. Holmes
[snip] Thanks, I did estimate 20 to 30 hours for them after I had set up the mirror server and before the actual work began. At the same time I asked if they wanted me to stop to which they replied that I should continue. Offer them some cheese with their whine and tell them to pay up!

Re: [PHP] Multi-select inputs and naming

2003-03-10 Thread CPT John W. Holmes
To others on the list: how do perl, jsp, asp, etc. handle the passing of multiple selects? What is their equivalent of php's var[] syntax for handling form values? From what I've picked up, if there are multiple variables in the query string / post data with the same name, the scripting

Re: [PHP] header function

2003-03-10 Thread CPT John W. Holmes
Use INCLUDE(), not virtual(). virtual() isn't supposed to be used with PHP files. ---John Holmes... - Original Message - From: Barry Gould [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 10, 2003 4:26 PM Subject: Re: [PHP] header function I'm starting to think this is a

Re: [PHP] Little Problem :)

2003-03-11 Thread CPT John W. Holmes
[snip] The web Page (1) uses a TEXTAREA to permit the users write their things. If one user writes something like and the sentence has 200 characters 'a' without any br or enter '\n' then in web page (2) the table becomes too fat (like table with=2000, for example). [snip] Use

Re: [PHP] Little Problem :)

2003-03-11 Thread CPT John W. Holmes
You can use a regular expression for this task. This is what I use for my CMS routines: function make_maxlen($string, $maxlen) { $re = '/(.*?)([^\s]{' . $maxlen . ',})(.*)/'; $out = null; while (preg_match($re, $string,

Re: [PHP] what the hell in this sql

2003-03-12 Thread CPT John W. Holmes
Nevertheless the $ looks weard ... Yeah, it looks weird, too. :) You're probably getting an error because $cont_id doesn't have a value. Show the SQL in context and do some debugging... ---John Holmes... This isn't a php question and should be directed at a sql list or to php-db Have

Re: [PHP] Hacker problem

2003-03-12 Thread CPT John W. Holmes
Who cares where it comes from, just validate it. You can use POST and HTTP_REFERRER (check spelling) to stop lazy people from messing with it if that makes you feel better. ---John Holmes... - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL

Re: [PHP] foro php

2003-03-12 Thread CPT John W. Holmes
do you know any site where I can download a free php foro to install? wtf is a foro? Ah... gotta love google. In italian it means I pierce, but in spanish it means forum, so I'll assume it's a forum you're looking for instead of some piercing PHP script. phpbb and phorum are two good ones.

Re: [PHP] Array syntax not covered in documentation

2003-03-12 Thread CPT John W. Holmes
I want to do the following: $u=preg_replace(/[^$chars]/e,'%.unpack(H2, $0)', $u); However, as you know, unpack returns an array. I tried this instead: $u=preg_replace(/[^$chars]/e,'%.(unpack(H2, $0)[])', $u); but that isn't syntactically correct. I know that this is possible to remedy

Re: [PHP] Hacker problem

2003-03-12 Thread CPT John W. Holmes
If you are really that strict about it coming from you site, have your form page create an image with five letter of number on it - like 4Y6O7. Have it create a new one each time. Then use crypt to encrypt it and put the encrypted one into a form value, have the person that is submitting the

Re: [PHP] http-https-http redirection causes browser to show alert dialog

2003-03-13 Thread CPT John W. Holmes
I have a login page with a form where users enter there login and password. The form's action is https://mysite.com/login.php;. login.php authenticates the user and if the authentication is successful it ends with a: header(Location: http://mysite.com/welcome.html?a=bc=etc...;); The

Re: [PHP] sessions garbadge

2003-03-13 Thread CPT John W. Holmes
My gc_maxlifetime = 3600 (1 hour) and my probability = 100 , just for testing . When i create a session on my site and i dont log out , the session var will still remain on the server , ok , after an hour (not exactly an hour) , when i surf the site , the collector destroys

Re: [PHP] Is there any reason...

2003-03-13 Thread CPT John W. Holmes
If the software on this list has the facility I think the Reply-To field should be set to the list. What do others think? There is already enough traffic on the list. Just use Reply-All if you want to include the list in your reply. This is how most lists I've seen are, you just have to get

Re: [PHP] form/text area input problem

2003-03-13 Thread CPT John W. Holmes
[snip] My problem is, for the text area. [snip] www.php.net/nl2br ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Is there any reason...

2003-03-13 Thread CPT John W. Holmes
There is already enough traffic on the list. Just use Reply-All if you want to include the list in your reply. This is how most lists I've seen are, you just have to get used to it. The way I see it, part of the point in a mailing list is for people with the same question to only have to ask

Re: [PHP] form/text area input problem

2003-03-13 Thread CPT John W. Holmes
for 2, yes nl2br() will do it. THanks. but for 1, if the user don't press enter (yes they were typing a long paragraph), then the variable will contain one LONG string. ANd if I retrieve this data and put it in the html page, it would appear as a one lined long string. DO you know what I

Re: [PHP] http_session_vars

2003-03-13 Thread CPT John W. Holmes
do the session vars get treated with magic quotes? The last comment at the bottom of: http://www.php.net/manual/en/function.get-magic-quotes-gpc.php Seems to think so. He's written good code, but I have my doubts as to whether it should be applied to session vars. The gpc stands for GET,

Re: [PHP] regex problem

2003-03-13 Thread CPT John W. Holmes
suppose there's a string $string=I like my(hot) coffee with sugar and (milk)(PHP); I would like to get an output of all possible combinations of the sentence with the words between brackets: eg. I like my hot coffee with sugar and I like my hot coffee with sugar and milk I like my hot

Re: [PHP] table cell space under image in IE

2003-03-13 Thread CPT John W. Holmes
Has anyone had to address this problem before? I've created a table and placed an image inside. The image is around 12 pxl high and when the table is displayed in Mozilla the cell border is up against the image on all sides. On IE however, the top of the image is up against the cell border

Re: [PHP] Will this do what I think it will?

2003-03-14 Thread CPT John W. Holmes
How didn't it work? How did you test it? I'd be more than willing to help you test it, but everything is sort of vague right now. ---John Holmes... - Original Message - From: Dennis Gearon [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, March 14, 2003 12:20 AM Subject: Re: [PHP]

Re: [PHP] php/mySQL time comparison

2003-03-14 Thread CPT John W. Holmes
$timeFrom and $timeTo need to be surrounded by quotes within your SQL query for the format you're using. $query = select * from Job_TB where teamNo = $teamNo AND startTime = '$timeFrom' AND endTime = '$timeTo'; ---John Holmes... - Original Message - From: Brad Wright [EMAIL PROTECTED]

Re: [PHP] php/mySQL time comparison

2003-03-14 Thread CPT John W. Holmes
Try quoting your dates - you could also edit your code by using the BETWEEN SQL keywors. Using the less than / greater than method is slightly faster and probably more portable. I don't know how many databases implement BETWEEN. ---John Holmes... -- PHP General Mailing List

Re: [PHP] Newbie MySQL INSERT Q

2003-03-14 Thread CPT John W. Holmes
Can I have a single SQL string do INSERTS into multiple tables? No. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Problem with sessions expiring?

2003-03-14 Thread CPT John W. Holmes
Session files will be cleaned up after 24 minutes by default. So if they take longer than that, and the garbage collection deletes their session file, then they are no longer logged in. Increase the session.gc_maxlifetime parameter in php.ini ---John Holmes... - Original Message - From:

Re: [PHP] What is the difference: include()

2003-03-17 Thread CPT John W. Holmes
What is the difference as in... why one or the other? include('somefile.php'); include(somefile.php); Just wondering... No difference as far as include() goes. Read the manual on strings to see how PHP treats strings in single and double quotes differently. ---John Holmes... -- PHP

Re: [PHP] What is the difference: include()

2003-03-17 Thread CPT John W. Holmes
If you had a constant named somefile or php and you use the second syntax, the constant would be interpolated/evaluated to the value of the constant. Generally I always use single quoted strings unless there's some need for double-quoted strings (like if I want to embed a variable) so

Re: [PHP] copy ...

2003-03-17 Thread CPT John W. Holmes
What about eregi(TI(.*)¶,$line,$m) might want to use eregi(TI([^¶]*)¶,$line,$m) so it's not greedy. ---John Holmes... - Original Message - From: John Taylor-Johnston [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, March 17, 2003 2:31 PM Subject: Re: [PHP]

Re: [PHP] copy ...

2003-03-17 Thread CPT John W. Holmes
, March 17, 2003 2:54 PM Subject: Re: [PHP] copy ... Captn John, What the difference? I recognise the code from my attempts at Perl. What's the diff between ^ and *? Is there a doc I can read up more on? ;) Swabbie John Cpt John W. Holmes wrote: What about eregi(TI(.*)¶,$line,$m) might

Re: [PHP] How to manipulate a Access database(MDB file) with PHP.

2003-03-17 Thread CPT John W. Holmes
How to manipulate a Access database(MDB file) with PHP. How do I do it? I was expecting a link or something to help me. Or is that your question... ?? Notice the question marks at the end of my questions? ;) ---John Holmes... PS: This question was already asked today... search google or the

Re: [PHP] What's this _FILE junk?

2003-03-17 Thread CPT John W. Holmes
Is enable file uploads turned on in php.ini?? ---John Holmes... - Original Message - From: Pete James [EMAIL PROTECTED] To: Liam Gibbs [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, March 17, 2003 3:33 PM Subject: Re: [PHP] What's this _FILE junk? Is your form enctype set? Like

Re: [PHP] Ereg sass

2003-03-18 Thread CPT John W. Holmes
If you want to look for a dash (-), you always place it last in the brackets, other wise the regex machine will be looking for a range. So just move the - to the last character. [A-Za-z0-9_.-]* ---John Holmes... - Original Message - From: Liam Gibbs [EMAIL PROTECTED] To: php list [EMAIL

Re: [PHP] what's the best way to handle this?

2003-03-18 Thread CPT John W. Holmes
When a user 'registers' with our site, I want to generate their personal webpage for them. Currently, I have a webpage where the contents are generated from their personal info in the db and I have a drop down to view client pages but it is just the same page but I pass in the clientid so it

Re: [PHP] Register_globals question

2003-03-18 Thread CPT John W. Holmes
I found a class that allows you to have a multiple page listing, where it displays a certain number of items, and then you click on the next page to show the next results. I found that it needs to have register_globals turned on. I am learning, and would like to have someone look at the class

Re: [PHP] Mysql Query Question

2003-03-18 Thread CPT John W. Holmes
$string = ' . implode(',',$group) . '; $query = SELECT * FROM table WHERE groupname IN ($string); ---John Holmes... - Original Message - From: Van Andel, Robbert [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 18, 2003 3:51 PM Subject: [PHP] Mysql Query Question I am

Re: [PHP] Posting Query Results to an HTML form

2003-03-19 Thread CPT John W. Holmes
No, there's no PHP function, but there is an HTML trick that you can use: putting quotes around your values! input type=text name=name value=value That's not a trick, that's actually required with HTML 4 and up. And XML... Umm.. yeah, got that. I was being sarcastic. ;) ---John

Re: [PHP] PHP and IIS 5.0

2003-03-19 Thread CPT John W. Holmes
I am putting together a website for a customer who insists on using IIS running on Windows XP and I'm running into some problems. It appears that no matter what PHP script I run, I'm getting tons of errors saying this variable or that variable is undefined. I have global variables turned on in

Re: [PHP] PHP and IIS - More info

2003-03-19 Thread CPT John W. Holmes
Further note that it is not just this script, but many PHP scripts that I run on IIS - they all work perfectly on Apache (on Windows and Linux).. HOW DOES IT NOT WORK!? ---John Holmes... - Original Message - From: John W. Holmes [EMAIL PROTECTED] To: 'Beauford.2002' [EMAIL

Re: [PHP] $array_nam[$variable][0]

2003-03-19 Thread CPT John W. Holmes
$var = $array_name[$var2][0]; where $var2 is an integer. I've got this array from a database and I want to use a variable in the array... what's the exact syntax of this? That is the correct syntax. Use print_r() on $array_name to see what it contains. ---John Holmes... -- PHP General

Re: [PHP] Cleaning user data

2003-03-20 Thread CPT John W. Holmes
--- John W. Holmes [EMAIL PROTECTED] wrote: I disagree. I think stripping HTML from my text is a horrible thing. If I want to put a b in my text, then use htmlentities() and show me a b when I look at it. Obviously you don't want to evaluate HTML, but the end result should be that I

Re: [PHP] Built in source encode function..

2003-03-21 Thread CPT John W. Holmes
There are programs out there that do this for you. Buy/use them if you feel you need to. I don't. ---John Holmes... - Original Message - From: Awlad Hussain [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, March 21, 2003 8:58 AM Subject: [PHP] Built in source encode function.. I

Re: [PHP] detecting end of line - php 4.1.2

2003-03-21 Thread CPT John W. Holmes
I am trying to get php 4.1.2 to read a Mac file (exported from FileMaker Pro) and split it into different lines using the following but php does not recognize the end of line. For some tech reason I cannot upgrade php now but I need to be able to read my Mac files now. What is the easiest

Re: [PHP] Hidden new line markers?

2003-03-24 Thread CPT John W. Holmes
nl2br() doesn't remove the newlines, it simply adds in the br / in before them. The str_replace should work, how are you trying to use it? ---John Holmes... - Original Message - From: Jeff Lewis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 24, 2003 2:56 PM Subject: [PHP]

Re: [PHP] looking for advice on PHP server

2003-03-24 Thread CPT John W. Holmes
My server has cURL built into its php module, but it doesn't support SSL, and thus doesn't support requests to secure servers, i.e. https. It was an effort in itself to get them incorporate cURL, and I was just wondering if I should move immediately to a new host - if this were just

Re: [PHP] Hidden new line markers?

2003-03-24 Thread CPT John W. Holmes
The data is being entered into a textarea and is being stored as it is entered but with an addslashes right before insertion. On the extract I am doing the following: $row[description] = stripslashes($row[description]); You don't have to use stripslashes() on data coming out of a database

Re: [PHP] mail() Bcc:

2003-03-24 Thread CPT John W. Holmes
From: Oden Odenius [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 24, 2003 3:44 PM Subject: [PHP] mail() Bcc: How can send bcc: with mail()? - Original Message - From: Bryan Brannigan [EMAIL PROTECTED] To: Oden Odenius [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent:

<    1   2   3   4   5   >