Re: [PHP] Re: What's faster using if else or arrays?

2011-04-28 Thread Jim Giner
a powerful use of the array constuct. Geoff Lane ge...@gjctech.co.uk wrote in message news:1286892056.20110429010...@gjctech.co.uk... On Thursday, April 28, 2011, Jim Giner wrote: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] files outside of the web tree

2011-04-27 Thread Jim Giner
I have managed to build include files and store them above my public folder and the called pages manage to find them from the public folder and properly include them. My problem is with the html src= attribute. I have uploaded photos to be included in my web pages and I didn't want them in

[PHP] Re: files outside of the web tree

2011-04-27 Thread Jim Giner
I think I see what you mean but I guess if that's the way it's meant to be there must not be a great risk to my uploaded files. Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] refreshing pages in the cache

2011-04-27 Thread Jim Giner
Im trying to make my webpages display random photos on a border. Got it all working now but have a question about the IE cache. Seems that once the page has been displayed, no amount of refresh will make the page rebuild and thus show 'different' pics the second time around. Can php do

Re: [PHP] refreshing pages in the cache

2011-04-27 Thread Jim Giner
thanks for the input but your first link is invalid and the second I don't understand why you sent me. Perhaps you could explain? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] refreshing pages in the cache

2011-04-27 Thread Jim Giner
ok - I'm lost. What do I do with this knowledge? - Original Message - From: Sean Greenslade zootboys...@gmail.com Sure. In order to tell the browser to not cache a page, you need to set the header Cache-Control: no-cache. This can be done by the PHP command header(Cache-Control:

Re: [PHP] refreshing pages in the cache

2011-04-27 Thread Jim Giner
So - it's not an html attribute - it's a PHP command that precedes ALL my html headers? Ross Hansen hansen.r...@live.com.au wroteYou need to still put in the standard PHP tags as you would normally and it is just another line of code. e.g ?php header(Cache-Control: no-cache); ? -- PHP

Re: [PHP] refreshing pages in the cache

2011-04-27 Thread Jim Giner
Must be doing something wrong. Besides not helping my pages to re-build, it actually ruins the presentation of a couple of my pages, even tho they are all using the exact same includes with only some dummy content in one div different than all the other pages. I added this line to my existing

Re: [PHP] str_replace

2011-04-25 Thread Jim Lucas
On 4/24/2011 8:44 AM, Ron Piggott wrote: I am trying to figure out a syntax that will replace each instance of % with a different letter chosen randomly from the string $puzzle_filler. $puzzle_filler is populated with the letters of the alphabet, roughly in the same ratio as they are

[PHP] trouble using is_file()

2011-04-24 Thread Jim Giner
I've got a d/e screen that collects a path and a file name. My script then attempts to verify that the file exists before moving on to do things with it. I've displayed the combined fields and they are showing correctly - ie, c:\temp\emax.pdf as well as c:/temp/emax.pdf . But when I use that

Re: [PHP] trouble using is_file()

2011-04-24 Thread Jim Giner
Hmmm... did not realize that. From all the code I examined I thought it was looking at the client. So how does one do a file upload from the client to the host? Preferably with ftp rather than http. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] trouble using is_file()

2011-04-24 Thread Jim Giner
because I've seen many comments in my research that ftp is better for larger files. I'm trying to upload photos so I know that they can be big. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] trouble using is_file()

2011-04-24 Thread Jim Giner
Well, I'll take your word for it. As well as that of all the examples on Google that come up when looking for php ftp uploads which are NOT doing ftp uploads at all. Seems that many people are calling the 'move' of their file from one host folder to another an 'upload'. Thanks! -- PHP

Re: [PHP] combining PHP with JS

2011-04-20 Thread Jim Giner
Sounds like you need to have the user make a decision before you go to this php script that is processing the case statement. Since the script's process is predetermined by this time (when you want the user's input) you should be able to have the user make his input before the script begins.

Re: [PHP] JavaScript Injection ???

2011-04-18 Thread Jim Giner
ad...@buskirkgraphics.com wrote in message news:005501cbfdeb$457839c0$d068ad40$@com... Javascript:alert(Hello World); The browsers have had many updates since last I seen this work. ?? You're saying that alert doesn't work on your browse? Gee - it works on mine. -- PHP General Mailing

Re: [PHP] $_POST vars

2011-04-14 Thread Jim Giner
Guys - the problem has been solved. Give it a rest. (sent only to the list) (remainder deleted for the benefit of all :) ) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] $_POST vars

2011-04-13 Thread Jim Giner
Can one create a set of $_POST vars within a script or is that not do-able? My display portion of my script utilizes the POST array to supply values to my input screen - this works well for the first display of an empty screen, and any following re-displays if there's an error in the user's

Re: [PHP] $_POST vars

2011-04-13 Thread Jim Giner
When you say assign that array to $_POST do you mean $_POST = $qrslt; Not sure about this assigning an array thing. - Original Message - From: Stuart Dallas stu...@3ft9.com Newsgroups: php.general To: Jim Giner jim.gi...@albanyhandball.com Cc: PHP General php-general@lists.php.net Sent

Re: [PHP] $_POST vars

2011-04-13 Thread Jim Giner
No need to email me AND send to the list. Is that the standard practice on this forum? Not encountered it before. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $_POST vars

2011-04-13 Thread Jim Giner
in message news:4962044e8a244fc28719d97746759...@3ft9.com... On Wednesday, 13 April 2011 at 19:12, Jim Giner wrote: When you say assign that array to $_POST do you mean $_POST = $qrslt; Not sure about this assigning an array thing. Yup, nothing more complicated than that. -Stuart

[PHP] Re: Newbi Question with calculate

2011-04-06 Thread Jim Giner
I think you want to use the FOR loop to process each record in your table. You query (?) the table and then process each row in the result using the FOR and all your calculations on each one. Look up FOR. Silvio Siefke li...@silvio-siefke.de wrote in message

Re: [PHP] the best 1 book for php

2011-04-06 Thread Jim Lucas
-- Jim Lucas www.cmsws.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] randomly random

2011-04-05 Thread Jim Lucas
be done in one line: ?php echo array_rand(@file(@$filename), 1); # if you wanted to do a couple checks, you could do the following if ( is_file(@$filename) filesize($filename) 0 ) echo array_rand(file($filename), 1); ? Jim Lucas -- PHP General Mailing List (http://www.php.net

[PHP] Last Name extraction in query

2011-04-04 Thread Jim Giner
having a problem posting this message - forgive any duplication please. Hi, I'm trying to use sql to extract the last name from a person's name field in my table. Here's my Select: $q = SELECT race_winner,count(race_date) as wins, substr(race_winner,FIELD(' ',race_winner)) as last_name etc.,,,

Re: [PHP] Last Name extraction in query

2011-04-04 Thread Jim Giner
good point. So wrapped up in making my php script work that I didn't think about that. Ashley Sheridan a...@ashleysheridan.co.uk wrote in message news:1301936583.2288.3.camel@localhost... On Mon, 2011-04-04 at 11:50 -0400, Jim Giner wrote: having a problem posting this message - forgive any

Re: [PHP] Last Name extraction in query

2011-04-04 Thread Jim Giner
Actually - I can't seem to find a mysql newsgroup anywhere. The ones that come up in google search are all dead and buried. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Last Name extraction in query

2011-04-04 Thread Jim Giner
Thanks - will do! I found a mailing list that might work for you: To subscribe to the list, send an empty message to mysql-subscr...@lists.mysql.com Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Last Name extraction in query

2011-04-04 Thread Jim Giner
no - that address came back undeliverable. To subscribe to the list, send an empty message to mysql-subscr...@lists.mysql.com Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] newbie - function is undefined

2011-04-01 Thread Jim Giner
Thanks - now I see. the message means that it can't find a php function called getText. Doh! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] newbie - function is undefined

2011-04-01 Thread Jim Giner
function. Try something like: ... echo 'heaading contains: scriptgetText(h2)/script'; ... I tried it - no better. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] newbie - function is undefined

2011-04-01 Thread Jim Giner
And the way to do this is? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to check if remote machines are running using PHP and Eclipse-Require Urgent Help

2011-04-01 Thread Jim Giner
your boss is asking you to write something in PHP, but it sounds to me like you are not very knowledgable in it, or even in creating a text file. Why is he doing this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: echo?

2011-03-23 Thread Jim Giner
news:20110323034621.go1...@quillandmouse.com... On Tue, Mar 22, 2011 at 10:50:54PM -0400, Jim Giner wrote: Yes - it is J and I. I tried using $i+1 in the echo originally but it wouldn't run. That's why I created $j. Yes, the substitution creates a syntax error unless surrounded

[PHP] Re: echo?

2011-03-23 Thread Jim Giner
...@gjctech.co.uk wrote in message news:1278073104.20110323074...@gjctech.co.uk... Hi Jim, On Wednesday, March 23, 2011, 1:42:18 AM, you wrote: ok - here's the code in question. $q = 'select * from director_records '; $qrslt = mysql_query($q); $rows = mysql_num_rows($qrslt); for ($i=0; $i

Re: [PHP] Re: echo?

2011-03-23 Thread Jim Giner
not the concern in this posting Richard Quadling rquadl...@gmail.com wrote in message news:aanlktindqu7bzeamtcwh6y9f3m9yjxqpt-ime9ysh...@mail.gmail.com... On 23 March 2011 07:46, Geoff Lane ge...@gjctech.co.uk wrote: Hi Jim, On Wednesday, March 23, 2011, 1:42:18 AM, you wrote: ok - here's

Re: [PHP] Re: echo?

2011-03-23 Thread Jim Giner
it was as complete as need be to demonstrate my dilemma, as Richard has discovered above Frank Arensmeier farensme...@gmail.com wrote in message news:7cfb015a-c530-4712-9ebc-fbdf5b0ed...@gmail.com... 23 mar 2011 kl. 02.42 skrev Jim Giner: ok - here's the code in question. $q = 'select * from

Re: [PHP] Re: echo?

2011-03-23 Thread Jim Giner
Very Interesting - '\n' doesn't work, but \n does work. Steve Staples sstap...@mnsi.net wrote in message news:1300883645.5100.973.camel@webdev01... On Wed, 2011-03-23 at 08:28 -0400, Jim Giner wrote: I am outputting to a textarea on an html page. A br doesn't work, nor does \n, hence

[PHP] Re: echo?

2011-03-23 Thread Jim Giner
As Richard proved my problem was caused by my use of the archaic cr/lf character pair. Once I found the correct syntax for using \n my output of the loop counter worked. thanks for all the suggestions. My first experience on a PHP newsgroup and it was a postiive one. I've spent the last 12+

Re: [PHP] Re: echo?

2011-03-23 Thread Jim Giner
2011 at 12:39, Jim Giner wrote: Very Interesting - '\n' doesn't work, but \n does work. Steve Staples sstap...@mnsi.net wrote in message news:1300883645.5100.973.camel@webdev01... On Wed, 2011-03-23 at 08:28 -0400, Jim Giner wrote: I am outputting to a textarea on an html page. A br doesn't

[PHP] looking for a newsgroup for JS

2011-03-23 Thread Jim Giner
Anyone know of a working Javascript newsgroup? I googled and tried adding several to my OE newsgroups but couldn't find the servers. comp.lang.javascript pl.lang. mozilla.. All of these (can't remember their names now) came up with the same error message. As part of learning php, I

[PHP] echo?

2011-03-22 Thread Jim Giner
Kinda new to this, but I've been puttering/writing for about 3 weeks now and have some good working screens up. Ran into something new while I was debuggina script today. Tried to echo the $i value within a for loop as part of the list of items I was building Something like for

[PHP] Re: echo?

2011-03-22 Thread Jim Giner
ok - here's the code in question. $q = 'select * from director_records '; $qrslt = mysql_query($q); $rows = mysql_num_rows($qrslt); for ($i=0; $i$rows; $i++) { $j = $i+1; $row = mysql_fetch_array($qrslt); echo $j.'-'.$row['userid']; if ($row['user_priv'] ) echo '

Re: [PHP] Re: echo?

2011-03-22 Thread Jim Giner
:521bdb9d-adbf-45d7-b759-acd315b19...@gmail.com... On Mar 22, 2011, at 8:42 PM, Jim Giner wrote: ok - here's the code in question. $q = 'select * from director_records '; $qrslt = mysql_query($q); $rows = mysql_num_rows($qrslt); for ($i=0; $i$rows; $i++) { $j = $i+1; Am i reading

[PHP] problem compiling 5.3 with postgresql

2011-03-19 Thread Jim White
: In function `php_parserr': /usr/local/php-5.3.5/ext/standard/dns.c:418: undefined reference to `__dn_expand' and more lines like the last one. How can I fix this? I am using Ubuntu 10.10. JIm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Deleting elements from the middle of an array

2011-03-15 Thread Jim Lucas
On 3/14/2011 2:02 PM, Jim Lucas wrote: On 3/14/2011 1:31 PM, Paul M Foster wrote: Here's what I need to do: I have an indexed array, from which I need to delete elements in the middle. Once completed, the indexes should be numerically in sequence, as they were when I first encountered

Re: [PHP] Re: $_POST variable

2011-03-11 Thread Jim Lucas
=radio name=radio_?php echo $result_from_mysql; ? value=1 /One Then I would do the following: foreach ($_POST as $k = $v) { if ( strpos(trim($k), 'radio_') === 0 ) { echo $k.' is a match, and it\'s value is '.$v.'.br/'.PHP_EOL; } } Jim Lucas -- PHP General Mailing List (http://www.php.net

Re: [PHP] Can´t upload files bigger than 50KB

2011-03-09 Thread Jim Lucas
On 3/9/2011 6:28 AM, Gotzon Astondoa wrote: Hi all: On my website I have an Ajax form. From this form user can upload files. My guess would be that you have an HTML form. Not AJAX Server side is a PHP script. This form works properly on my development server. Is this on localhost or is

Re: [PHP] Help translating PHP5 code to PHP4.

2011-03-08 Thread Jim Lucas
will probably have to make is to set the following in your php.ini file. allow_url_include = On and/or allow_url_fopen = On This would allow fopen to open the external URL and grab the data returned. Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] Re: Possible bug in PHP 5.3.5 with OAuth extension?

2011-03-04 Thread Jim Lucas
On 3/4/2011 5:18 PM, Daniel Hong wrote: Correction: I stated the incorrect version of PHP that does not seem to have this issue. The version of PHP that works correctly is 5.3.2, not 5.3.3. Can you give us an example of what you are doing? Jim Lucas Thanks, daniel On Fri, Mar 4

Re: [PHP] Help needed with mysql import

2011-03-02 Thread Jim Lucas
until you want to do a restore of your data. With a restore, you will probably want to retain your auto-increment IDs since they are probably used else where in your DB. Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Help needed with mysql import

2011-03-02 Thread Jim Lucas
On 3/2/2011 9:48 AM, Ashley Sheridan wrote: Jim Lucas li...@cmsws.com wrote: On 3/2/2011 4:25 AM, Alex wrote: You shouldn't have a default value in an auto increment field. You can set AUTO_INCREMENT to 0 and start with 1, but as auto increment is a unique field and its automagically

Re: [PHP] Sorting an array

2011-03-01 Thread Jim Lucas
://dev.mysql.com/doc/refman/5.0/en/select.html and http://dev.mysql.com/doc/refman/5.0/en/order-by-optimization.html Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Why is this array_walk_recursive action not working?

2011-02-24 Thread Jim Lucas
, $key) { $item = $key holds $item\n; } array_walk_recursive($karamohArray, 'test_print'); print_r($karamohArray); Give this a try and let us know. Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Dynamically Created Checkboxes

2011-02-23 Thread Jim Lucas
, you would do this. ?php ... if ( !empty($_POST['county']) foreach ( $_POST['county'] AS $id = $name ) echo {$id} {$name}\n; ... ? Hope this clears things up for you a little. Enjoy. Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] Manipulating variables

2011-02-23 Thread Jim Lucas
}; } ? -- Jim Lucas http://www.cmsws.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] code quest

2011-02-14 Thread Jim Lucas
other HTML tags to present data. Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] using BOTH GET and POST in the same page.

2011-02-12 Thread Jim Lucas
] = Jim Lucas ) Array ( [page_id] = 22 [action] = DelUser [FullName] = Jim Lucas ) Check out the example that I wrote here http://www.cmsws.com/?page_id=5 Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Simplifying MySql queries

2011-02-12 Thread Jim Lucas
() LIMIT 4 This will probably do the distinct after the ORDER BY RAND(), but again, completely untested. YMMV Give them a whirl and let us know how it works out. Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] file upload utility ?

2011-02-07 Thread Jim Lucas
scenario you can possibly think of. Just one thing, do not try and be a cut/paste god here. Actually take time to read the examples and understand what they do before you put them into production. This will now end my How to use Google segment for the day. Jim Lucas -- PHP General Mailing List

Re: [PHP] override built-in mail()

2011-02-04 Thread Jim Lucas
as though it was sendmail, accept the same arguments, etc... but do all the phpmailer stuff inside. Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PEAR PHP

2011-01-30 Thread Jim Lucas
extension? Again, http://www.google.com Enter what is a dynamic extension ... Here is a good result from the list returned http://www.atnf.csiro.au/computing/software/karma/programmer-manual/node17.html Thanks. Ethan I hope this gets you headed down the right path. Jim Lucas -- PHP

Re: [PHP] Counting Online users, but not using a Session Table in MySQL

2011-01-28 Thread Jim Lucas
WHERE logged_in = 't' AND last_activity FROM_UNIXTIME( UNIX_TIMESTAMP() - 1800 ) Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Counting Online users, but not using a Session Table in MySQL

2011-01-28 Thread Jim Lucas
in a query on the users table, but it causes performance issues. David cron it. Setup a cron script that runs every 5 minutes. A seconds work every 5 minutes isn't too much is it? Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Formatting

2011-01-25 Thread Jim Lucas
/manual/en/function.header.php#92620 If in cli... well, you wouldn't be having this problem... :) Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] preg_replace question

2011-01-24 Thread Jim Lucas
you have control over the building of the initial phrase = link assoc? If so, reverse the order of these two items. Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Script mysteriously restarting

2011-01-21 Thread Jim Lucas
restart itself like this? FWIW, I'm running PHP5 with Apache 2 on a Linux server. Clarification please. Is this cli or browser based? Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] [PHP]: permission problem www-data

2011-01-18 Thread Jim Lucas
On 1/18/2011 1:44 AM, Moses wrote: Hi Everyone, I am creating a file in PHP script which takes a value from a form and writes it to a file. However, i don't have the mode permission for the file instead it is owned by www-data.What can i do to ensure that the file is owned by me.

Re: [PHP] [PHP]: permission problem www-data

2011-01-18 Thread Jim Lucas
use that PHP instance for your web site to process all PHP requests. This is how we have our servers at the office setup. Works great. Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] email list 101

2011-01-16 Thread Jim Lucas
() ) header('Location: http://www.example.com/done.php'); ? -- Jim Lucas DISCLAIMER: Unless otherwise noted, all code is untested! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] [security] PHP has DoS vuln with large decimal points

2011-01-16 Thread Jim Lucas
The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies with Suhosin v0.9.20, Copyright (c) 2002-2006, by Hardened-PHP Project No infinite loop. I like my system... :) Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] which php file is sending emails?

2011-01-15 Thread Jim Lucas
find: unknown option -- a find: unknown option -- m find: unknown option -- e formmail.php $ grep -l mail $(find ./ -name *.php) Output a big long list of files... Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] which php file is sending emails?

2011-01-15 Thread Jim Lucas
On 1/15/2011 10:51 AM, Nilesh Govindarajan wrote: On 01/15/2011 11:13 PM, Daniel Brown wrote: On Sat, Jan 15, 2011 at 12:21, Nilesh Govindarajannil...@itech7.com wrote: On 01/15/2011 10:22 PM, Jim Lucas wrote: Um, I use OpenBSD and that command gives me an error or two... $ grep -l mail

Re: [PHP] Stripping carriage returns

2011-01-11 Thread Jim Lucas
' after the second / also. So... $content = preg_replace(/p.*/isU, p, $content); YMMV Let us know how this works out for you. Jim Lucas PS: you might want to swap the order of these two statements. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] HTML errors

2011-01-11 Thread Jim Lucas
', 'gallery', 'about_us', 'contact_us', 'testimonials'); foreach($categorys as $category){ $replace = str_replace(_, , $category); echo lia href='index.php?page=$category'$replace/a/li; Try this instead echo 'lia href=index.php?page=',$category,'',$replace,'/a/li'; Jim Lucas } Validator Error

Re: [PHP] Two forms on one page

2011-01-04 Thread Jim Lucas
in the email client. Most of the code is cut/paste from your examples. But, it should give you a good starting point for a multi-step form type. Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Two forms on one page

2011-01-04 Thread Jim Lucas
type=submit name=submit value=Submit / /form Form 'B': form method=post action= input type=hidden name=next_step value=step3 / Enter your kitten's name: br / input type=text name=cat / input type=submit name=submit value=Submit Kitten / /form Anyways, that is the idea. Let us know. Jim Please

Re: [PHP] Two forms on one page

2011-01-04 Thread Jim Lucas
Sorry for top posting! FYI: You might want to check the math in your calculations. It says that I am 41 when my birthday is tomorrow and I will be 36... On 1/4/2011 10:08 AM, Jim Lucas wrote: On 1/4/2011 7:53 AM, Ethan Rosenberg wrote: At 03:45 AM 1/4/2011, you wrote: Ethan, Ok, I would do

Re: [PHP] Two forms on one page

2011-01-04 Thread Jim Lucas
On 1/4/2011 12:53 PM, Paul M Foster wrote: On Tue, Jan 04, 2011 at 10:08:47AM -0800, Jim Lucas wrote: [snip] If this isn't it, I think you should explain (in sudo code) exactly the steps you are expecting things to. Example sudo code [snip] Normally I wouldn't comment

Re: [PHP] Regex for telephone numbers

2010-12-31 Thread Jim Lucas
]{1}[0-9]{2}\-[0-9]{4}$ 1 http://us.php.net/manual/en/regexp.reference.repetition.php Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Fwd: Fwd: Re: [PHP] goto - My comments

2010-12-27 Thread Jim Lucas
On 12/27/2010 10:42 AM, Ethan Rosenberg wrote: Jim - Thank you ever so much. At 01:58 PM 12/24/2010, you wrote: Here you are using two different arrays. Yes, I know, they are basically the same, but they are truly not the same. In your case, use $_POST This is what I used. As per

Re: Fwd: Fwd: Re: [PHP] goto - My comments

2010-12-24 Thread Jim Lucas
On 12/23/2010 10:39 AM, Ethan Rosenberg, PhD wrote: Jim - Thanks ever so much! Here is the code I used, as you suggested. == $query = select * from Intake3 where ; Maybe I missed it, but you need to have a 1 after the where part in your select. So... $query = SELECT * FROM

Re: [PHP] goto - My comments

2010-12-21 Thread Jim Lucas
On 12/18/2010 9:17 PM, Ethan Rosenberg wrote: Dear List - Thanks to all for your EXCELLENT comments. I definitly agree that goto is a command to be avoided at all costs. In this case, I could not figure out how to acheive the desired result without the goto. So being a newbie, I humbly

Re: [PHP] HTML id attribute and arrays

2010-12-18 Thread Jim Lucas
What are you trying to accomplish? What do you think it wrong with the code below? On 12/17/2010 8:19 AM, Martin C wrote: Hi, PHP converts x[a]=b parameter of the HTTP request as an array named x with its item named a set to value b. So, it seems possible to have the following (X)HTML code:

Re: [PHP] array question

2010-12-18 Thread Jim Lucas
will get displayed. Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] array_multisort into Natural order?

2010-12-13 Thread Jim Lucas
On 12/13/2010 11:59 AM, George Langley wrote: Hi all. Can use natsort($array1) to sort a single array of filenames into a natural alphanumeric order - 1.php, 2.php, 5.php, 10.php, 20.php, etc. But using array_multisort($array1, $array2, $array3) doesn't offer a natsort option, so I end up

Re: [PHP] new keyword combined with other things...

2010-12-07 Thread Jim Lucas
On 12/7/2010 7:40 AM, Alexandru Patranescu wrote: In many other languages this will work: *$result = new Object() - method();* But in php, it fails at parsing. I've tried with parenthesis around new but nothing. Anyhow, as I saw later, *new* operator has precedence over others so this

Re: [PHP] code quest

2010-12-01 Thread Jim Lucas
'); foreach ( glob('./*', GLOB_ONLYDIR) AS $dir ) print('lia href=\'.$dir.'\'.$dir.'/a/li'); print('/ul'); Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to code in PHP an onchange event in a select?

2010-11-05 Thread Jim Lucas
On 11/4/2010 1:23 PM, Tomás Corrales Lemoine wrote: Hi, List, I have this two files (“index.php” and “include.php”). They both work fine, but I want to substitute the code for de onchange event in the select tag. Can I use PHP to code this event? How? Looks to me that you are looking for

Re: [PHP] Apache mod_pagespeed

2010-11-03 Thread Jim Jagielski
://www.php.net/unsub.php -- === Jim Jagielski [|] j...@jagunet.com [|] http://www.jaguNET.com/ Great is the guilt of an unnecessary war ~ John Adams -- PHP General Mailing List (http://www.php.net

Re: [PHP] PHP Question

2010-10-28 Thread Jim Lucas
Paulo Work wrote: Hello my name is Paulo Carvalho and I am struggling with the following: I am building a website with basic CMS functionality. My problem is that in one of the pages I am using Easyslider to display small comments about the clients. These comments are divided in 3 per

Re: [PHP] Returning results

2010-10-21 Thread Jim Lucas
Daniel P. Brown wrote: On Wed, Oct 20, 2010 at 21:04, Bastien phps...@gmail.com wrote: Yeah, it's got a few downsides! The next app for the iPhone should be a modification to the spell-check to verify PHP functions in emails. +1 -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] require_once

2010-10-19 Thread jim
I am following an example. Also, doesn't that require the class name to be something like models_members? Jim On 10/19/2010 09:40 AM, chris h wrote: I'm having a problem including files using Zend Framework. I have in a controller file this Jim why not use the Zend autoloader

[PHP] require_once

2010-10-18 Thread jim
I'm having a problem including files using Zend Framework. I have in a controller file this require_once models/Member.php; and it doesn't work ,nor does require_once ../models/Member.php; Anyone know what's going on with this? Jim W. -- PHP General Mailing List (http://www.php.net

Re: [PHP] open .zip from memory...

2010-10-04 Thread Jim Lucas
or php://memory will work for you instead of a file on the file system. Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] version_compare

2010-09-30 Thread Jim Lucas
is happening. Thank you. Personally, I would change that to be if ( function_exists('filter_var') ) { $text = filter_var($text, FILTER_SANITIZE_URL); } Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] version_compare

2010-09-30 Thread Jim Lucas
Brian Smither wrote: Personally, I would change that to be if ( function_exists('filter_var') ) { So would I: *But it's not my code. *I wish to learn and understand the cause of the problem - not walk around it. It means condition (PHP_VERSION = 5.2.0) I understand that. There was a

Re: [PHP] Checking file type when uploading

2010-09-17 Thread Jim Lucas
Catherine Madsen wrote: Hi! I have created a form following the PHP manual to upload files and need to restrict the upload to only PDF. How do I check the file type ($_FILES['userfile']['type']?) and where: on the form page or on the validation page? I want to be able to tell the users

Re: [PHP] Disabling an extension on a perdir basis.

2010-09-11 Thread Jim Lucas
Richard Quadling wrote: Hi. Can't seem to see a way to do this. Is there a way to do this? Are you talking about a PHP extension or a file extension? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Disabling an extension on a perdir basis.

2010-09-11 Thread Jim Lucas
Richard Quadling wrote: On 11 September 2010 17:56, Jim Lucas li...@cmsws.com wrote: Richard Quadling wrote: Hi. Can't seem to see a way to do this. Is there a way to do this? Are you talking about a PHP extension or a file extension? I sat there for about a minute reading Ashley's

Re: [PHP] Elegance is the goal... Sticky form submit help

2010-09-11 Thread Jim Lucas
[] = 'option value='.(int)$m.''.$sel.''. htmlspecialchars($mname).'/option'; } $select_month_options = join(\n, $o); echo HTML select name=month id=month {$select_month_options} /select HTML; ? Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

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