RE: [PHP] Upper and lower case.

2003-03-01 Thread John W. Holmes
is it better to store user names as upper and lower case? should they bee converted to one case? Store it where? It depends if the place you store it in and the comparisons there are going to be case sensitive or not. Most database fields are going to be case sensitive while a PHP comparison

RE: [PHP] Garbage at beginning of uploaded Text File

2003-03-01 Thread John W. Holmes
look at the file with a regular text editor? Do you see that data there after it's uploaded and written to the server, or does it just appear into the data when it's fread()? ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com

RE: [PHP] A JS problem

2003-03-01 Thread John W. Holmes
=\NewWindow(this.href,'popup','1000','672','no');return false;\img src=\/pics/2003-01-January/image1-thumb.jpg\ border=\0\ alt=\Image 1 of 64\/anbsp;)} ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General

RE: [PHP] Date question

2003-03-01 Thread John W. Holmes
in this case, date() ? If so, how would I do the same exact thing? SELECT column - INTERVAL 24 HOUR FROM your_table WHERE ... ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http

Re: [PHP] Little help please

2003-02-27 Thread 1LT John W. Holmes
I'm looking for a webbased interface that will allow me to managae mysql databases. However, phpmyadmin has been ruled out due to the fact it requires the username and password to be stored in the config file No it doesn't. and that it doesn't have any security to protect the average joe

RE: [PHP] Just to ask knowledgable ppl

2003-03-02 Thread John W. Holmes
with them. It could even be a PHP script that does some logging of it's own with sessions or cookies or whatever and then outputs the data for a single pixel gif. So you could have a plain HTML page that'll still access a .php page when it's loaded to track what users are doing. ---John W. Holmes

RE: [PHP] PHP SQL Code

2003-03-02 Thread John W. Holmes
I would like yo show the users in a list that have a date that is more than 60 days old. $sql = SELECT * FROM stompers WHERE sUpdated CUR_DATE() - INTERVAL 60 DAY AND sActive = 'Y' ORDER BY sUpdated DESC; ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get

RE: [PHP] html parsing question

2003-03-02 Thread John W. Holmes
','callback',$text); echo hr; echo $new_text; ? ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] PHP SQL Code

2003-03-02 Thread John W. Holmes
, it's CURDATE(), not CUR_DATE(). Maybe you shouldn't be so quick to rule things out... ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

RE: [PHP] Just to ask knowledgable ppl

2003-03-02 Thread John W. Holmes
the .php page gets/sets whatever data it wants, it then sends the appropriate image header and the data for a single pixel image. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com From: John W. Holmes [EMAIL PROTECTED] Reply

RE: [PHP] File array mailing Loop problem. Help needed urgently

2003-03-02 Thread John W. Holmes
. You're first line should be $headers = MIME-Version: 1.0\r\n; so that it starts from an empty string and adds the rest. Or, clear $headers after you call mail(), so the next loop starts with an empty variable. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get

RE: [PHP] File array mailing What to do

2003-03-02 Thread John W. Holmes
: 1.0\r\n; so that it starts from an empty string and adds the rest. Or, clear $headers after you call mail(), so the next loop starts with an empty variable. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com

RE: [PHP] File array mailing list

2003-03-02 Thread John W. Holmes
) { list ($User, $UserN, $Pass, $Date, $Realf, $RealL, $Email,$Street, $City, $State, $Postal, $Country, $Phone, $Webaddress, $ex1, $ex2, $ex3,$ex4, $ex53, $ex7 ) = explode(|, $buffer); //send emails } ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your

RE: [PHP] fread problem

2003-03-02 Thread John W. Holmes
of your PHP file, then open it through HTTP. $filename = http://www.yourdomain.com/test.php;; and everything else remains the same. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http

RE: [PHP] Deciding the directory for the uploaded file?

2003-03-02 Thread John W. Holmes
. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP on IIS session problems

2003-03-03 Thread 1LT John W. Holmes
I get these errors from a simple session_start(); script. Warning: session_start() [function.session-start]: open(/tmp\sess_f4aa3ef3c537bb6327d5e7b991e91be7, O_RDWR) failed: No such file or directory (2) in c:\inetpub\wwwroot\picoblog\admin.php on line 2 Do you have a /tmp folder on your

Re: [PHP] File array mailing list pharse error

2003-03-03 Thread 1LT John W. Holmes
I worked on it so long now I have to come back to you it gives me an Parse error: Parse error: parse error, expecting `'('' in members_read_send.php on line 5 Iam so sorry to bug u so much but can u help me finish here please? ?php $lines = file(data/default2.users); for each ($lines as

Re: [PHP] Automatic Table Creation

2003-03-03 Thread 1LT John W. Holmes
The easiest way would be nested tables. Your three columns would each have a nested table within them where you loop through 1/3 of the results. Some simple math functions and the result of mysql_num_results() should tell you how many to loop through in each table. table tr td table

Re: [PHP] PHP Oracle

2003-03-03 Thread 1LT John W. Holmes
i have one big Oracle database, 20GB. Is it better to comunicate directly to Oracle with PHP, or to export data to MySQL. How secure is PHP Oracle, can they communicate well? Why would you send it to MySQL? Just get PHP and Oracle talking and go with that. ---John Holmes... -- PHP General

Re: [PHP] PHP on IIS session problems

2003-03-03 Thread 1LT John W. Holmes
You need to restart IIS. c:\ net stop iisadmin c:\ net start w3svc or use the control panel. ---John Holmes... - Original Message - From: Victor Stan [EMAIL PROTECTED] To: 1LT John W. Holmes [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, March 03, 2003 12:54 PM Subject: RE: [PHP

Re: [PHP] changing colors on buttons

2003-03-03 Thread 1LT John W. Holmes
is there a way you can change the text color on buttons as well as the background color for a button? i have a button that looks like: input type=button name=edit value=edit onclick=window.location='edit.php'; onkeypress=window.location='edit.php' so is there a way to change text color and

Re: [PHP] Keeping existing data in textarea's

2003-03-03 Thread 1LT John W. Holmes
Hi, I have a developed a simple Helpdesk for our small company. When users log calls they get an alert message warning them that they must fill in all the fields if they have missed a field. At the moment if they happen to forget a field, they receive the alert message, but then have to start

Re: [PHP] ICQ # validation

2003-03-03 Thread 1LT John W. Holmes
Use single quotes around your pattern. if(ereg('^[0-9]{7,9}$',... With the double quotes, PHP is probably seeing the $ and looking for a variable, even though it's at the end of the string. ---John Holmes... - Original Message - From: Liam Gibbs [EMAIL PROTECTED] To: [EMAIL PROTECTED]

RE: [PHP] preg_match_all()

2003-03-03 Thread John W. Holmes
Use a U modifier in your pattern. http://www.php.net/manual/en/pcre.pattern.modifiers.php ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -Original Message- From: Vania Smrkovski [mailto:[EMAIL PROTECTED

RE: [PHP] date range assistance needed

2003-03-03 Thread John W. Holmes
What does $qAnnouncement look like if you echo it out? Does it look correct? Are you sure the variables you're passing to strtotime() are correct? What does mysql_error() say after you run this query? ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy

RE: [PHP] working with file and mail

2003-03-03 Thread John W. Holmes
Care to enlighten us as to what the problem was? Inquiring minds want to know. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -Original Message- From: WebDev [mailto:[EMAIL PROTECTED] Sent: Monday, March 03

Re: [PHP] strange problem

2003-03-04 Thread 1LT John W. Holmes
Look for anything outside of the tr or td tags in the rest of your table. That's generally what causes things like this. ---John Holmes... - Original Message - From: Denis L. Menezes [EMAIL PROTECTED] To: PHP general list [EMAIL PROTECTED] Sent: Tuesday, March 04, 2003 10:40 AM Subject:

Re: [PHP] inserting date() into MySQL

2003-03-04 Thread 1LT John W. Holmes
If I am going to use date('U') to insert an epoch timestamp into a mysql table, what is the appropriate field type to use? Integer. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: php forgetting variables very easily

2003-03-05 Thread 1LT John W. Holmes
I am still having problems with variables not being remembered by included files. I've tried using the global command and it still doesn't work. I've cut down my two pages to contain the main stuff so you can see what's happening. Basically main.php includes the file new.php and I want

Re: [PHP] Getting error REG_EMPTY

2003-03-05 Thread 1LT John W. Holmes
Way does this give me this error It's a warning, not an error. Warning: REG_EMPTY: in emailusers.php on line 52 $lines = file(data/members.txt); foreach($lines as $line){ list ($logged_email,$logged_title,$logged_first_name,$logged_last_name) = split(|, $line); if ($logged_email==$email)

Re: [PHP] i got a problem

2003-03-05 Thread 1LT John W. Holmes
Try $result = mysql_query($sql) or die(mysql_error()); to see what the problem is. ---John Holmes... - Original Message - From: Luis A [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 04, 2003 9:29 PM Subject: [PHP] i got a problem hi every one here o got one problem

Re: [PHP] preg_match fails to fill $matches

2003-03-05 Thread 1LT John W. Holmes
$ts = '/(' . $trigger_string .')/is'; echo trigger_string is $ts br; $matches = array(); $hit = array(); In the loop $hit[] = preg_match ($ts, $line_in,$matches); Now the $hit array fills up correctly, if the trigger string is on the line just read in, putting 1 or 0 in $hits. But

Re: [PHP] Re: php forgetting variables very easily

2003-03-05 Thread 1LT John W. Holmes
Thanks, John- that works brilliantly. Just wandering how I can include a file in a different directory so that it still remembers variables. for example what if I want to include the file www.example.com/two/example.php in the file: www.example.com/one/example.php ? would

Re: [PHP] TO Bryan LipscyRe: [PHP] i got a problem

2003-03-05 Thread 1LT John W. Holmes
He probably needs register_globals turned ON in your php.ini file. ---John Holmes... - Original Message - From: Luis A [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 04, 2003 11:49 PM Subject: [PHP] TO Bryan LipscyRe: [PHP] i got a problem HE show me this INSERT INTO

Re: [PHP] preg_match fails to fill $matches

2003-03-05 Thread 1LT John W. Holmes
What's your actual code? How are you looking for the match in $matches? If something was matched, then it'll be there. The full cod in the loop is. $cnt = 0; while(!feof($fp)) { // Get body $line_in = fgets($fp,4096); $cnt++; // looking for the other end of the

Re: [PHP] Need help with ? vs. php?

2003-03-05 Thread 1LT John W. Holmes
I've installed the Apache v2.0.44 with PHP4.3.1., under Windows. My pages starting and ending with ?? don't work anymore. I would have to change them to ?php...php?. php? is not valid. It's ?php ... ? or ? ... ? Do you know if there is a way for keeping ? running? enable short_tag in

RE: [PHP] MySQL Query

2003-03-05 Thread John W. Holmes
as possible. Any ideas would be greatly appreciated. Use a separate table to control permissions and bounce each action off of that. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http

RE: [PHP] RE: Need help with ? vs. php?

2003-03-05 Thread John W. Holmes
That's fixed. Thanks. Now, another problem. The data I capture in a form (web page 1) are not received by the PHP page (web page 2). Is there something different with the previous version of PHP? Register_globals ---John W. Holmes... PHP Architect - A monthly magazine for PHP

RE: [PHP] preg_match fails to fill $matches

2003-03-05 Thread John W. Holmes
: If this modifier is set, a dot metacharacter in the pattern matches all characters, including newlines. Without it, newlines are excluded. This modifier is equivalent to Perl's /s modifier. A negative class such as [^a] always matches a newline character, independent of the setting of this modifier. ---John W

RE: [PHP] updating pages with php

2003-03-05 Thread John W. Holmes
is in your code. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Re: php forgetting variables very easily

2003-03-05 Thread John W. Holmes
filesystem. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] preg_match fails to fill $matches

2003-03-05 Thread John W. Holmes
of preg_match before you try to save the value. Then you won't end up with all of those empty arrays inside of $matches. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net

RE: [PHP] Log In

2003-03-05 Thread John W. Holmes
in. No. Umm... Yes. $_SERVER['LOGON_USER'] is sometimes set, depending on your web server setup. If you're using IIS, I think you have to enable NT level access control for the site, instead of anonymous access. Good luck. ---John W. Holmes... PHP Architect - A monthly magazine for PHP

RE: [PHP] remove a line from a text list

2003-03-05 Thread John W. Holmes
/function.implode.php Please read the manual page you provided a link to: Note: implode() can, for historical reasons, accept its parameters in either order. For consistency with explode(), however, it may be less confusing to use the documented order of arguments. ---John W. Holmes... PHP Architect

Re: [PHP] Uploading file problem

2003-03-06 Thread 1LT John W. Holmes
Well, I have a statement that says: if ([EMAIL PROTECTED]($photo, $long_path . speakers/ . $photo_name)) { echo an error }else{ proceed with renaming the file } The error that is echoed after the copy is the one that pops up. So, it could be some other problem, but I'm not

Re: [PHP] reading last -n lines array is emty

2003-03-06 Thread 1LT John W. Holmes
Holy crap looks like I was wrong! I just tested it and sure enough '|' does return an error.. how do you like that. So use split(\|, $file[$i]). For a regular expression | means OR. You could use explode(|,$file[$i]) for the sam effect. Benchmark split() vs. explode() and see which is

RE: [PHP] random -n lines array problem

2003-03-06 Thread John W. Holmes
] = [6] = d ) ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Line breaks

2003-03-06 Thread John W. Holmes
be horrid to read if all the line breaks were taken out... Not to mention an unprofessional appearance... You must be sending HTML mail?? Try the nl2br() function. HTML doesn't understand newlines, only br elements. ---John W. Holmes... PHP Architect - A monthly magazine for PHP

RE: [PHP] Array - Newbie question

2003-03-08 Thread John W. Holmes
You need to have this $EricCodesArray = array ( CO = array(Description, Input Name, Select Name, Option Name,

RE: [PHP] Part PHP part MySQL question

2003-03-08 Thread John W. Holmes
in a cookie so that you'll always get the next ID whenever you come to the site. Have a method where you can reset the ID if you need to, also. Once the above query returns no rows then there is no one left to edit and you'll want to reset it also. ---John W. Holmes... PHP Architect - A monthly magazine

RE: [PHP] wont display anything but a white page!!!

2003-03-08 Thread John W. Holmes
http://66.12.3.67/webdb/webdb13/assignment_1.phps Can anyone tell me why I only get a white page And no text to be on the browser? Is display errors turned on in php.ini? Usually you get a page like then when there was an error, but displaying it is not activated in php.ini. ---John W

RE: [PHP] php trouble

2003-03-08 Thread John W. Holmes
']; and read up on the register_globals setting in your php.ini file. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] variable string names

2003-03-08 Thread John W. Holmes
I have: if ($where1 != '') { $whereArray = array_push($whereArray, $where1); } and I want to repeat for $where1 up to $where8 but rather than write it out 8 times, I'd rather use a loop for ($i=1; $i=8 i++) { if ($where1 != '') { $whereArray =

RE: [PHP] More array syntax

2003-03-08 Thread John W. Holmes
this to work in php3 i have to call the microtime seed function first before shuffle it works for one dimensional arrays? Can't you just count the array and then choose a random number below the count? Won't SELECT *, RAND() r FROM your_table ORDER BY r; work for you? ---John W. Holmes

RE: [PHP] What am i doing wrong? SQL Query in PHP

2003-03-09 Thread John W. Holmes
was. Hope that helps. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] A PHP UPDATE problem

2003-03-09 Thread John W. Holmes
actually tell us what the error is, what line it's on, and then show the relevant line with 5 or so lines before it also. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net

RE: [PHP] stripslashes()

2003-03-09 Thread John W. Holmes
. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Re: Member function as error_handler

2003-03-09 Thread John W. Holmes
, there are a few suggestions on how you can do this. http://www.php.net/manual/en/function.set-error-handler.php ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net

RE: [PHP] Form input security

2003-03-09 Thread John W. Holmes
to clean EVERYTHING. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] dynamic/multidimensional arrays in classes

2003-03-09 Thread John W. Holmes
$this-arr[] = $value ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] timestamp to english

2003-03-09 Thread John W. Holmes
a Unix timestamp. You'd use the DATE_FORMAT() function in MySQL to format a MySQL timestamp. You'd use the TO_UNIXTIME() function to convert a MySQL timestamp into a Unix timestamp. Does that help? ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today

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] Enabling HTTP_REFERER

2003-03-10 Thread John W. Holmes
again? HTTP_REFERER (is that the right spelling?) is set by the browser, not the server. So if you're not seeing a value, then your browser is not setting it. Or something is stripping it on the way out from your computer. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals

RE: [PHP] How to set a timeout limit for a call of a connection?

2003-03-10 Thread John W. Holmes
that it won't stay very long to wait for a result, but just quit if the call take a time longer than timeout limit, and then go on for next steps. You can't control the timeout with fopen(). Try looking at fsockopen(). You can set a timeout for that. ---John W. Holmes... PHP Architect - A monthly magazine

RE: [PHP] arrray

2003-03-10 Thread John W. Holmes
you can 'serialize' it and pass it as POST or GET variable too, then deserialize it again. Check out these PHP functions : serialize() and deserialize() cough unserialize(). ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http

RE: [PHP] quick question

2003-03-10 Thread John W. Holmes
return the number back to you, then you can't do it with the method you're using. You could use sockets or cURL to POST the info yourself from within a script and then you'd still maintain all of the $_POST information when you get the result back... ---John W. Holmes... PHP Architect - A monthly

RE: [PHP] sessions terminating randomly please help

2003-03-10 Thread John W. Holmes
be cleaned up if you use session_save_path(), unless you do it yourself. This means that a file will be created each time someone comes to your site and it won't be erased. Only the path specified in php.ini will be cleaned up... which is what you want. ---John W. Holmes... PHP Architect

RE: [PHP] newbie: contents will not output

2003-03-10 Thread John W. Holmes
://www.weather.com;, r); $contents = fread($file_handler, filesize($file)); fclose($file_handler); echo $contents; ? /body /html filesize() won't work on remote files (through http) and like Justin said... what's $file?? ---John W. Holmes... PHP Architect - A monthly magazine

RE: [PHP] md5 encrypt problem

2003-03-11 Thread John W. Holmes
md5'd user supplied password I get no match. Bizarre, haven't had this problem before... Is the 'password' column in your database a CHAR or VARCHAR column with a length of 32? If it is, then show the code where you validate someone logging in. ---John W. Holmes... PHP Architect

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] replace question

2003-03-11 Thread John W. Holmes
how do we replace this out of an array element ~nl~ with nbsp; How about str_replace()? Or are you talking about replacing that value in each and every element in the array? If so, use array_walk() or loop through the array and use str_replace(). ---John W. Holmes... PHP Architect

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] string validating

2003-03-12 Thread John W. Holmes
_ with whatever you want to replace anything that's not (^) a-z or 0-9. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Follow-up to Hacker problem

2003-03-12 Thread John W. Holmes
it was him) or I posted... ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Random String Generation

2003-03-12 Thread John W. Holmes
against the database and activate their account. Does anyone know an easy way to create this string? Use uniqid(). The manual page shows you how to create one along with md5() that'll be 32 chars (128 bits) long. Pretty hard for someone to guess. ---John W. Holmes... PHP Architect - A monthly

RE: [PHP] php errors while displaying database fields

2003-03-12 Thread John W. Holmes
. If you want to fix them, then give your variables a value before you use them. Otherwise adjust the error reporting level in php.ini or with the error_reporting() function. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com

RE: [PHP] Form Validation: Surnames with Apostrophe

2003-03-12 Thread John W. Holmes
is submitted, unless you stripslash() it, you're validating against O\'Relly. preg_match(/[a-z](\\')?[a-z-]+/i,$_POST['Last_Name']) ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http

RE: [PHP] Hacker problem

2003-03-12 Thread John W. Holmes
. You'd have to be protecting something good to really make this worthwhile, though. And since the original question was for a shoutbox, I doubt you'd want to be creating an image for every post to a shoutbox. User registration, yeah, but not for a shoutbox. :) ---John W. Holmes... PHP Architect

RE: [PHP] session variables

2003-03-13 Thread John W. Holmes
. If it's your only option, then use it. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] sessions garbadge

2003-03-13 Thread John W. Holmes
if there is not a whole lot of traffic to your site. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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] Country???

2003-03-13 Thread John W. Holmes
Hello people. I want to know from where Country is the visitor that access to my page in PHP. So ask them. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net

<    9   10   11   12   13   14   15   16   17   18   >