RE: [PHP] multiple line text area

2003-02-26 Thread John W. Holmes
> I need to be able to preserve line breaks when a user types in multiple > lines in a multitple line test area. Right now if I echo > $_POST['textarea'] > I get everything on one line. Is there any way to do this? Thanks! > -Greg www.php.net/nl2br ---John W. Hol

RE: [PHP] multiple line text area

2003-02-26 Thread John W. Holmes
The newlines are preserved. Do a view source of your page where you're displaying it and you'll see what I'm talking about. HTML just doesn't render newlines, only . If you're seeing something different, then show your code and explain this more. ---John W. Holmes...

RE: [PHP] php_flag session.auto_start 0 not working

2003-02-27 Thread John W. Holmes
sion_start(); > if ( isset($_GET['style']) ) { > $_SESSION['style'] = $_GET['style']; > } elseif ( !isset($_SESSION['style']) ) { > $_SESSION['style'] = 'styles'; > } You're calling session_start(), so of course the ses

RE: [PHP] post xml

2003-02-27 Thread John W. Holmes
. > Is there a way to send it by method post but without having to use a form? > Thank you Make sure you urlencode() the data before you tack it into the URL. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ --

RE: [PHP] Preventing the "hijacking" of pictures

2003-02-27 Thread John W. Holmes
use readfile() to send the image data. If it's not, send the data for another image or nothing. The downside to this is it's harder to manage and all images requests will be running through PHP pages. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Profession

RE: [PHP] form with multiple lines to insert

2003-02-27 Thread John W. Holmes
gt; get multiple lines from the form to INSERT into the database. You'll need to do 3 inserts, one after the other. Or, format your insert such as: INSERT INTO table (col) VALUES (val1),(val2),(val3); Which will create 3 rows. ---John W. Holmes... PHP Architect - A monthly magazine for PHP

RE: [PHP] Emacs?

2003-02-27 Thread John W. Holmes
I'm fairly certain we decided not to count you anyhow. ;) John > Nope. It's 41 (I don't use Emacs) > > At 15:30 27.02.2003, Larry Brown spoke out and said: > [snip] > >Oops...I stand corrected. > > > >Larry S. Brown > >Dimension Networks, Inc. > >(727) 72

RE: [PHP] Preventing the "hijacking" of pictures

2003-02-27 Thread John W. Holmes
u just stored the files outside of the web root. ---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

[PHP] virtual() test

2003-02-27 Thread John W. Holmes
Can anyone with Apache verify that you can pass arguments inside of a virtual() call? Something like: Virtual("script.pl?id=1") And have $id available within script.pl. I don't have access to an Apache server right now to test, so thank you very much. ---John W. Holmes... PH

RE: [PHP] Re: PHP+COM (formating excel)

2003-02-28 Thread John W. Holmes
> thanx for no response. > forget it. > It was realy so simple. You're welcome. Really, it was nothing. How about sharing the solution with the group that way you help other people? ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your co

RE: [PHP] Capitalising Personal Names

2003-02-28 Thread John W. Holmes
matches one of the $st_words elements, upper case the first letter, then the next character after the strlen() of the $st_words element that matches. Add that part to the final name and go onto the next part. 4. If the part is a non-alpha character, just add it to the final name and move onto the nex

RE: [PHP] virtual() test

2003-02-28 Thread John W. Holmes
> At 03:09 28.02.2003, John W. Holmes said: > [snip] > >Can anyone with Apache verify that you can pass arguments inside of a > >virtual() call? Something like: > > > >Virtual("script.pl?id=1") > > > >And

RE: Re[2]: [PHP] virtual() test

2003-02-28 Thread John W. Holmes
id available within script.pl. > > JWH>> I don't have access to an Apache server right now to test, so thank > you > JWH>> very much. > > JWH>> ---John W. Holmes... > > JWH>> PHP Architect - A monthly magazine for PHP Professionals. Get your

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 w

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

2003-03-01 Thread John W. Holmes
u using Apache2? IIRC, there was a bug where data would get added to the POST data, or something along those lines... What if you just 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 w

RE: [PHP] A JS problem

2003-03-01 Thread John W. Holmes
; border="0" alt="Image 1 of 64"> ")} Shouldn't you be escaping some quotes here? The "string" your sending to document.write() is delineated by double quotes, but there are double quotes within the string itself. I'm sure that'll cause a Jav

RE: [PHP] Date question

2003-03-01 Thread John W. Holmes
ted like: > 2002-08-29 10:53:09 > > what function would I use 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

RE: [PHP] Just to ask knowledgable ppl

2003-03-02 Thread John W. Holmes
een accessed? I'm sure you could do a number of things 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 p

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 monthl

RE: [PHP] html parsing question

2003-03-02 Thread John W. Holmes
NAME attribute of your CANTR tag. Act accordingly to it. . You are on page right now.'; function callback($matches) { switch($matches[1]) { case 'name': $retval = 'John'; break; case 'main': $retval = 'Index

RE: [PHP] PHP SQL Code

2003-03-02 Thread John W. Holmes
C"; > > This one returns a 'Could not get Query' warning ... so thats out. Sorry, 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

RE: [PHP] Just to ask knowledgable ppl

2003-03-02 Thread John W. Holmes
hp 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" <[EM

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

2003-03-02 Thread John W. Holmes
ot;X-Priority: 1\r\n"; > $headers .= "X-MSMail-Priority: High\r\n"; > $headers .= "X-Mailer: Server Text here"; > > mail($contactemail, $subject, $message, $headers); You're constantly building up $headers with each loop. You're first line should be $headers

RE: [PHP] File array mailing What to do

2003-03-02 Thread John W. Holmes
headers .= "Reply-To: ".$myname." <$myreplyemail>\r\n"; > $headers .= "X-Priority: 1\r\n"; > $headers .= "X-MSMail-Priority: High\r\n"; > $headers .= "X-Mailer: Server here"; > mail($contactemail, $subject, $message, $headers); > echo "

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

RE: [PHP] fread problem

2003-03-02 Thread John W. Holmes
< END test.php > > > When I run this, I get a blank page with my php code as my HTML source > code. > Not good. If you want the result of your PHP file, then open it through HTTP. $filename = "http://www.yourdomain.com/test.php";; and everything else remains

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

2003-03-02 Thread John W. Holmes
it where you want. ---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_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 PRO

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

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

RE: [PHP] MySQL Query

2003-03-05 Thread John W. Holmes
and pluggable into other web sites 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.php

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 m

RE: [PHP] preg_match fails to fill $matches

2003-03-05 Thread John W. Holmes
character, independent of the setting of this modifier." ---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] updating pages with php

2003-03-05 Thread John W. Holmes
ySQL will allow any characters; the problem 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
have to use a path to the file on your 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
Array ( ) > [16] => Array ( [0] => the [1] => the ) > [17] => Array ( ) > [18] => Array ( [0] => and [1] => and ) > [19] => Array ( ) > [20] => Array ( ) > > So how do you interpret that a sort of instant 2D array. What that tells me is that

RE: [PHP] Log In

2003-03-05 Thread John W. Holmes
e, preferably with their windows >> log 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. H

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

2003-03-05 Thread John W. Holmes
$recordsarray); > > http://www.php.net/manual/en/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 o

RE: [PHP] random -n lines array problem

2003-03-06 Thread John W. Holmes
] => b [2] => [3] => [4] => c [5] => [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
-- > > This is fine for such a short message, but lengthy messages would 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

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
y, you'll get the next highest ID number based on the last ID number you saved in a cookie. Keep track of the ID number 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 a

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

RE: [PHP] php trouble

2003-03-08 Thread John W. Holmes
n't work (if it doesn't), then try echo $_GET['sort']; echo $_GET['var2']; 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:

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 != '') > { > $whe

RE: [PHP] More array syntax

2003-03-08 Thread John W. Holmes
onal array , how can i get 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_t

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

2003-03-09 Thread John W. Holmes
ndexes though, as it makes it harder for other people to follow your code. When you see $row['f_title'], it gives you a good idea of what you're displaying. When you see $row[0], you have no idea what it is and you have to go find the query that was run in order to determine what column zero 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
eate the page. > But When I run the page, it shows an error. I don't how to reform it. WHAT'S THE ERROR? It helps us tremendously if you 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. Holme

RE: [PHP] stripslashes()

2003-03-09 Thread John W. Holmes
ipslashes($value); } and the same for $_POST, etc. ---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
the user notes on the manual page, 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 L

RE: [PHP] Form input security

2003-03-09 Thread John W. Holmes
e very vague answer is that you have 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
arr[] = $value; // this is the line causing the error $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
e date() function in PHP to format 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

RE: [PHP] Enabling HTTP_REFERER

2003-03-10 Thread John W. Holmes
ed server, how can I enable this > variable 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... PH

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

2003-03-10 Thread John W. Holmes
for this function > (just > this), so 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

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() unserialize(). ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professional

RE: [PHP] quick question

2003-03-10 Thread John W. Holmes
sing to another site, so that when the user is sent back from that > other site, i can put the values in the form fields of a new page. Well, if the site doesn't 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 i

RE: [PHP] sessions terminating randomly please help

2003-03-10 Thread John W. Holmes
.) Note that your session files will never 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

RE: [PHP] newbie: contents will not output

2003-03-10 Thread John W. Holmes
> > $file_handler = fopen("http://www.weather.com";, "r"); > $contents = fread($file_handler, filesize($file)); > fclose($file_handler); > echo $contents; > ?> > > filesize() won't work on remote files (through http) and like Justi

RE: [PHP] md5 encrypt problem

2003-03-11 Thread John W. Holmes
l_id > = $x"); > > } > > For some reason, when I attempt to login with my 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 wi

RE: [PHP] replace question

2003-03-11 Thread John W. Holmes
> how do we replace this out of an array element > > "~nl~" with " " 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.

RE: [PHP] string validating

2003-03-12 Thread John W. Holmes
uot;,"_",$data); Replace _ 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/) T

RE: [PHP] Follow-up to Hacker problem

2003-03-12 Thread John W. Holmes
r one of the functions Ernest (I think 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
it will verify the code 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

RE: [PHP] php errors while displaying database fields

2003-03-12 Thread John W. Holmes
;re using a variable, $page, that is not defined. These are warnings. 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 month

RE: [PHP] Form Validation: Surnames with Apostrophe

2003-03-12 Thread John W. Holmes
\\'] to no avail. Any idea what I am doing wrong? > that could work but the user may now submit one or more apostrophes > as the Last Name. Watch out for magic_quotes. If "O'Reilly" is submitted, unless you stripslash() it, you're validating against "O\'Relly"

RE: [PHP] Hacker problem

2003-03-12 Thread John W. Holmes
they will hopefully fail. 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. :)

RE: [PHP] session variables

2003-03-13 Thread John W. Holmes
s down. 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
triggered. It could take quite a while longer 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] 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:/

RE: [PHP] What do I do wrong?

2003-03-13 Thread John W. Holmes
e called $msg on line 202 in script.php... but I could be wrong. ---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] Will this do what I think it will?

2003-03-13 Thread John W. Holmes
e's time when you could have just run the function yourself. ---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] ^M in PHP

2003-03-13 Thread John W. Holmes
;s NOT get into a text-editor-suggestion-what-I-use-is-best-and-it-does-this-and-that-whic h-the-other-ones-don't-oh-and-by-the-way-mine-is-free/cheap/easy/opensou rce-too war, okay. Search the archives, there are plenty of recommendations. :) ---John W. Holmes... PHP Architect - A monthly magazi

RE: [PHP] ^M in PHP

2003-03-13 Thread John W. Holmes
be smarter to eliminate them before it was saved on Windows? You could read in the file and get rid of all of the \r characters with str_replace(). ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General M

RE: [PHP] preg_replace question,

2003-03-13 Thread John W. Holmes
numbers that'll be between [ and ]? Are you replacing all matches with the same $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] Checkboxes

2003-03-13 Thread John W. Holmes
e items I check but no value! What is $fskill? Did you forget to update your code? echo "{$_POST['skill'][$i]}\n"; ---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] date

2003-03-14 Thread John W. Holmes
> If I have a date in this format :19-MAR-03 how do I get the next date (the > date plus 1)? echo strtoupper(date('d-M-y',strtotime("$date +1 day"))); But why do you have it in that format to begin with? ---John W. Holmes... PHP Architect - A monthly magazine for P

RE: [PHP] preg_replace question,

2003-03-14 Thread John W. Holmes
> the current function been put in place replaces [f1253f] with a file, for > inside cms content , where 1253 is the key or the id of the filename in > the > database , therefore to denote its an ftool they added f's around the keys > , > so maybe i could get away with [1253], what else i'm asking

RE: [PHP] PHP User Groups

2003-03-15 Thread John W. Holmes
ive in Southern New Jersey (USA) Check http://php.meetup.com/ for your area. ---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] Encoding /'s

2003-03-15 Thread John W. Holmes
gpc setting in php.ini. ---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] Arrays

2003-03-16 Thread John W. Holmes
'AU' => array ( > 'Description' => 'Author(s): (AU)', > 'ReferenceURL' => 'AU__Author(s).jsp', > ) > ) > > What I want to get is the keys 'AN' and 'AU' as va

RE: [PHP] Scrolling through values sent from a form[scanned]

2003-03-16 Thread John W. Holmes
Don't rely on checkboxes. If they are not checked, as you've found out I think, then the value is not set at all. Use a hidden value to carry over a key for each field, then check the checkbox to see whether it was checked or not. ---John W. Holmes... PHP Architect - A monthly magazi

RE: [PHP] passing values from one script to another script

2003-03-16 Thread John W. Holmes
is with a session. Remember, each request is unique, so if you want to carry something over, you have to include it in the next request. This means adding it to the URL ($_GET) or adding it to a form ($_POST), adding it to a cookie ($_COOKIE), or putting it in the session ($_SESSION). ---John W. Holmes...

RE: [PHP] RE: ignore html

2003-03-16 Thread John W. Holmes
match only what's between and tags and apply nl2br() to the data. It will leave everything else along. Adapt to your needs, there may be better methods... ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP G

RE: [PHP] fopen

2003-03-16 Thread John W. Holmes
> if ( $fp ) > { > $mappic = " } > else > { > $mappic = ""; > > } > @fclose ( $fp ); > > echo $mappic; How about using file_exists() to check, rather than trying to open it? ---John W. Holmes... PHP Architect - A monthly magazine for PHP Pr

RE: [PHP] Really simple string search question

2003-03-16 Thread John W. Holmes
> Here's 3 examples: > $var="www.google.com"; > $var="blah blah google blah"; > $var="google rules"; > > Now I just want to see if $var contains the word 'google' in it - which www.php.net/strstr ---John W. Holmes... PHP Architect

RE: [PHP] regex problem

2003-03-16 Thread John W. Holmes
e then //replace placeholder with word from $matches //otherwise an empty string $replace = ($cpy & 1) ? $matches[1][$y] : ''; $text3 = str_replace("<#$y#>",$replace,$text3); //shift bits in $cpy one to the right $cpy = $cpy

Re: [PHP] Text boxes posted to MySQL record that contain quotes

2003-07-09 Thread John W. Holmes
Vernon wrote: I know that using stripslashes will remove \ using php but I'm having trouble with posting quotation marks in a text record field. Anyone know how I can get them to post to the database? It's basically like an email and I'd like anything written to be able to post. Use htmlentities()

Re: [PHP] REGULAR EXPRESSION HELP

2003-07-12 Thread John W. Holmes
John wrote: I need to match a pattern, not in a single-line but from a HTML page, which obviously has loads of lines. I need to match 2 lines from this HTML page: 1) FirstVariable - Second Variable 2) (newline) ThirdVariable... I tried this code: 1) preg_match("/(\S+) - (\S+)/", $html_page,

Re: [PHP] Weird Date problem driving me crazy...

2003-07-13 Thread John W. Holmes
Boaz Yahav wrote: I have two date strings coming out from MySQL. Both fields are defined as datetime. When i come to print them like this : Echo"Ticket Opened : " . date("l, F jS Y H:i",$row->OpenDate) . ""; Echo"Problem Start : " . date("l, F jS Y H:i",$row->ProblemStart) . "";

Re: [PHP] MySql Rollback in PHP within a website

2003-07-13 Thread John W. Holmes
bruce wrote: I have a question. I need to be able to try to perform a database update, but if it doesn't succeed, I need to be able to rollback the changes, and to inform the user that the changes didn't succeed. I've looked at the MySql site, and can see somewhat how the Commit/RollBack functions

Re: [PHP] Missing php.ini file

2003-07-14 Thread John W. Holmes
Chris Blake wrote: My php.ini file has gone awol, how or why I don`t know You can normally just get a new php.ini from here: http://cvs.php.net/co.php/php4/php.ini-dist but it's giving a 505 error right now. May have to wait a bit. First, create a PHP page with just the function on it. Lo

Re: [PHP] Problem with sessions

2003-07-17 Thread John W. Holmes
Peda wrote: Warning: session_start(): open(tmp/sess_41e301350c11c38d0249bc8c72ffb2ec, O_RDWR) failed: Permission denied (13) in /home2/pena/public_html/listing1.php on line 3 Can anyone tell me what is wrong? PHP is trying to save session data in /tmp by writing a file there, but permission is den

Re: [PHP] MySQL datetime extraction

2003-07-19 Thread John W. Holmes
Yasir Malik wrote: Given a date in MySQL datetime format, how do I extract the elements? That is get the month, day, year, hour, ... You could do it in the query using DATE_FORMAT(), MONTH(), YEAR(), etc. You can do it in PHP by sending the MySQL timestamp through strtotime() and then using date(

Re: [PHP] TESTERS Needed!

2003-07-19 Thread John W. Holmes
Andu wrote: --On Saturday, July 19, 2003 20:02:52 +0100 Mark Clarkstone <[EMAIL PROTECTED]> wrote: Hey Guys I need People to test out My Program, Mini serve to find out more go to www.mini-networks.uni.cc The black text on dark-blue background is really inviting, did you try black on black?? A

Re: [PHP] Re: TESTERS Needed!

2003-07-19 Thread John W. Holmes
Mark Clarkstone wrote: If any one finds any bugs or anything please let me know! Got this: Warning: readfile(content/subcats/Products.html): failed to open stream: No such file or directory in /home/britspy/public_html/mnet/index.php on line 76 -- ---John Holmes... Amazon Wishlist: www.amazon.

Re: [PHP] Auto session timeout

2003-07-20 Thread John W. Holmes
Tan Ai Leen wrote: Hi, Can someone confirm that php does not have a auto timeout feature? Meaning something like session will auto expire irregardless of whether the browser is close or not? If you're using the default session handler and storing the session files in the location specified in php.

Re: [PHP] Jumping between HTTP and HTTPS

2003-07-20 Thread John W. Holmes
Curt Zirzow wrote: On and advanced note, there are ways to protect a users password on a normal http connection. The authentication program I helped developed and use has the abilty to make a hash of the password on the client side then send the hash value to the authentication script. The authen

Re: [PHP] Jumping between HTTP and HTTPS

2003-07-20 Thread John W. Holmes
John Manko wrote: You dont need to touch any php code, just modify the html so the properlinks point to https where needed. I tried that. However, the session is different when going from 80 to 443. You'll have to pass the SID through the form or URL when switching from HTTP to HTTPS. -- -

Re: [PHP] Auto session timeout

2003-07-20 Thread John W. Holmes
Hardik Doshi wrote: Hi, I have implemented the Auto session timeout after the specific period of time. What i am doing is..At the time of login to the system, my script is storing the current unix time into the session and later on at every user click, It (my script) is checking the stored unix

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