Re: [PHP] htaccess / php

2003-12-02 Thread Ashley M. Kirchner
Ed Lazor wrote: What do I put in .htaccess for Apache to process a named archive as a PHP file? I did it before and can't seem to find what I did. Requests to http://myhost.com/archive/page1.php would get processed by the file named archive and page1.php would just be a parameter that I could

[PHP] Generate automatic list of dates

2003-12-02 Thread Tommi Virtanen
Hi! $first_date = 2003-12-01 $end_date = 2004-01-15 while ( $first_date = $end_date) { $sql = INSERT INTO time_table (id, date, person_id) VALUES (35,$first_date,0); $result = mysql_query($sql, $conn); [next date] WHAT CODE TO HERE } eg. first insert row is 35, 2003-12-01,0 next

[PHP] combo box

2003-12-02 Thread chan hweefarn saputra
hi :) i am creating a webpage. i use a combo box to let user choose which folder they want. after they choose, it will be saved into the database. the next time they load this page, it will retrieve the data from database and appear at the combo box. i already done that. but now the problem

Re: [PHP] Generate automatic list of dates

2003-12-02 Thread Nitin
- Original Message - From: Tommi Virtanen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 2:27 PM Subject: [PHP] Generate automatic list of dates Hi! $first_date = 2003-12-01 $end_date = 2004-01-15 while ( $first_date = $end_date) { $sql = INSERT

Re: [PHP] Generate automatic list of dates

2003-12-02 Thread Nitin
- Original Message - From: Nitin [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Tommi Virtanen [EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 3:12 PM Subject: Re: [PHP] Generate automatic list of dates - Original Message - From: Tommi Virtanen [EMAIL PROTECTED] To: [EMAIL

[PHP] Re: Generate automatic list of dates

2003-12-02 Thread Pavel Jartsev
Tommi Virtanen wrote: Hi! $first_date = 2003-12-01 $end_date = 2004-01-15 while ( $first_date = $end_date) { $sql = INSERT INTO time_table (id, date, person_id) VALUES (35,$first_date,0); $result = mysql_query($sql, $conn); [next date] WHAT CODE TO HERE 1) Convert

RE: [PHP] include-problem

2003-12-02 Thread Wouter van Vliet
On maandag 1 december 2003 15:23 Rasmus Lerdorf told the butterflies: On Mon, 1 Dec 2003, Wouter van Vliet wrote: ?php print !!!; ob_start(); include 'http://server.com/test/echo.php'; $XML = ob_get_clean(); // or use ob_get_contents(); and ob_end_clean() for PHP 4.3 print ???;

[PHP] Problem with $_POST[] and header();

2003-12-02 Thread Shaun
Hi, I have an include file which I use to check all input. if there is a problem the user is redirected to the page they came from if(!mysql_query($query)){ $error = Could not complete query; header(Location: file.php?error=$error); exit; } However in file.php I have included $_POST[]

RE: [PHP] date() function doesn't seem to work right...

2003-12-02 Thread Wouter van Vliet
On maandag 1 december 2003 21:04 Curt Zirzow told the butterflies: * Thus wrote Scott Fletcher ([EMAIL PROTECTED]): When I do this script, I didn't get a : and numbers in second. --snip-- date(Y-m-d H:i:s); --snip-- works fine with phpversion() 4.2.2 Curt -- If eval() is the

RE: [PHP] Error message trying to include a file

2003-12-02 Thread Wouter van Vliet
On maandag 1 december 2003 23:17 Curt Zirzow told the butterflies: * Thus wrote Matthias Wulkow ([EMAIL PROTECTED]): I have an array filled with urls of javascript files and then I include them one by one in a loop. for( $i = 0 ; $i sizeof($this-page-javascript) ; $i++ ){

RE: [PHP] Picture Width and Height in $_FILES

2003-12-02 Thread Wouter van Vliet
On dinsdag 2 december 2003 3:40 Dimitri Marshall told the butterflies: Hi there, I've seen the code somewhere but can't remember what it is exactly. Basically I need to know what the PHP is to get the picture width and height. I tried: $pic = $_FILES[$objectNumber]; $width =

Re: [PHP] Problem with $_POST[] and header();

2003-12-02 Thread David Otton
On Tue, 2 Dec 2003 10:26:08 -, you wrote: if(!mysql_query($query)){ $error = Could not complete query; header(Location: file.php?error=$error); exit; } The Location: header requires an absolute URI. See RFC 2616, 14.30 However in file.php I have included $_POST[] variables sent

Re: [PHP] Working as a PHP/database developer..

2003-12-02 Thread Video Populares et Optimates
Hi! First of all, thanks for the input! What's the matter with re-using the code and charging the same rate for it? You're a business, and you're supposed to make money. I currently charge by the hour, but I'm trying whereever possible to move away from hourly rates into fixed price

Re: [PHP] 12 seconds!?!?

2003-12-02 Thread Burhan Khalid
Comex wrote: I have a script that replicates a human on a message board, and its logs (logging in, going to inventory, etc.) occur every 12 (no more no less) seconds. Do you know why? Probably because the board that you are trying to spam ... err ... login to is configured to allow a delay

[PHP] XML, strings and foreign (swedish/danish) characters

2003-12-02 Thread Victor Spång Arthursson
I'm on the point of almost giving up trying to get XML and PHP to sing along, but I'll throw out a question here first. I'm having severe problems getting PHP and XML to work with XML-files that contains foreign characters. Doesnt matter if i type the foreign characters in by myself hardcoded

[PHP] Re: XML, strings and foreign (swedish/danish) characters

2003-12-02 Thread Manuel Lemos
Hello, On 12/02/2003 09:05 AM, Victor spng arthursson wrote: I'm on the point of almost giving up trying to get XML and PHP to sing along, but I'll throw out a question here first. I'm having severe problems getting PHP and XML to work with XML-files that contains foreign characters. Doesnt

Re: [PHP] file uploads

2003-12-02 Thread Jon Bennett
Hi, I'm working on a class and when a user submits a form to add a new product, I'm calling the addProduct method and within that method I call another method of the class 3 times. Once for a thumbnail image, once for a preview image and once for the full image, is this considered the correct

Re: [PHP] Working as a PHP/database developer..

2003-12-02 Thread Justin French
On Tuesday, December 2, 2003, at 09:45 PM, Video Populares et Optimates wrote: What's the matter with re-using the code and charging the same rate for it? You're a business, and you're supposed to make money. I currently charge by the hour, but I'm trying whereever possible to move away

[PHP] forms and mysql

2003-12-02 Thread BigMark
Hi i am very new to PHP so need some help ! i have a form which allows the user to put in 2 team names and then displays them, at the moment it displays them side by side but i need to insert V (versus) in the middle--how can i do that. I am guessing it goes in the lines of the code below

[PHP] Upload issue - The 2MB barrier...

2003-12-02 Thread Kim Steinhaug
As the default setting for file upload is set to 2MB, we usually get a problem since we cant always access the php.ini on every server our scripts should be run from. After looking in the php.ini file on one of my webhosting partners I noticed an interesting (in my opinion) thing with the post

Re: [PHP] Upload issue - The 2MB barrier...

2003-12-02 Thread Richard Davey
Hello Kim, Tuesday, December 2, 2003, 12:34:22 PM, you wrote: KS As the default setting for file upload is set to 2MB, we usually get KS a problem since we cant always access the php.ini on every server KS our scripts should be run from. Can you modify the httpd.conf for your site? If so you

[PHP] Re: forms and mysql

2003-12-02 Thread David Robley
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... Hi i am very new to PHP so need some help ! i have a form which allows the user to put in 2 team names and then displays them, at the moment it displays them side by side but i need to insert V (versus) in the middle--how can i do

Re: [PHP] Upload issue - The 2MB barrier...

2003-12-02 Thread Kim Steinhaug
Hmm 1. We can rule out the ini_set() 2. We can now rule out the .htaccess Tried the following : .htaccess php_value upload_max_filesize 5M testfile.php print 'upload_max_filesize = ' . ini_get('upload_max_filesize') . \n; The testfile succesfully states the

Re: [PHP] Upload issue - The 2MB barrier...

2003-12-02 Thread Marek Kilimajer
Kim Steinhaug wrote: That leaves me with the httpd.conf settings which is supposed to work, also according to the PHP documentation. Just need to locate this file first... $ locate httpd.conf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Best way to split a string of numbers into segments.

2003-12-02 Thread Tom
Hi. Is there an easy, non expensive way to do the perl-equivalent of: $date=20031202; ($year, $month, $day) = ($date =~ /(\d{4})(\d{2})(\d{2})/; I looked through the preg_* functions online, but couldn't see anything to help me. Am I stuck with substr() :P ? Thanks. -- PHP General Mailing List

[PHP] Re: combo box

2003-12-02 Thread Seung Hwan Kang
If I were you, I do this way. // in your HTML form. select name=flag option value=1 Husband/option ... /select // DB then insert 1, 2, 3, 4. //it will be one of them from flag variable. // when you retrieve it... if (flag == 1) echo Husband if ... and so on. :) Kang Chan Hweefarn

Re: [PHP] Upload issue - The 2MB barrier...

2003-12-02 Thread Kim Steinhaug
I found the file, but since im on a Cpanel server I do have to do some checking with the admin so that I dont mess up for other users. I wouldnt want my experimenting resulting in an unstable server for other users, :) It looks like this is the only way to alter the settings. Thanks for replies.

Re: [PHP] Best way to split a string of numbers into segments.

2003-12-02 Thread Mike
preg_match should do it... $mydate = 20031202; $date = array(); preg_match(/(\d{4})(\d{2})(\d{2})/, $mydate, $date); print_r($date); substr would be much quicker though On Tue, 2003-12-02 at 13:14, Tom wrote: Hi. Is there an easy, non expensive way to do the perl-equivalent of: $date

Re: [PHP] PHP Community Site - Volunteers Needed

2003-12-02 Thread Sophie Mattoug
The French php community has its site already : http://www.communautephp.com. Myabe it can give you some ideas... Chris Shiflett wrote: PHP has one of the largest developer communities in the world, yet we have no community gathering place like those you can find for other languages (Perl has

Re: [PHP] Best way to split a string of numbers into segments.

2003-12-02 Thread David Otton
On Tue, 02 Dec 2003 13:14:20 +, you wrote: Is there an easy, non expensive way to do the perl-equivalent of: $date=20031202; ($year, $month, $day) = ($date =~ /(\d{4})(\d{2})(\d{2})/; I looked through the preg_* functions online, but couldn't see anything to help me. Am I stuck with substr

[PHP] reload farmes

2003-12-02 Thread Christian Jancso
Hi there I have some problems with PHP. I have a website with different frames where different actions take place. One frame needs a button (here: Delete) which: 1. reloads another frame 2. reloads itself The code looks like: if (isset($_POST['action'])) { if ($_POST['action'] ==

Re: [PHP] Best way to split a string of numbers into segments.

2003-12-02 Thread Tom
I agree that preg_match generates an array, but I cannot assign to it directly, and in your example I have 4 elements in the array, not three. Array ( [0] = 20031202 [1] = 2003 [2] = 12 [3] = 02 ) I suppose something like preg_match(/(\d{4})(\d{2})(\d{2})/, $mydate, list($y,$m

Re: [PHP] Best way to split a string of numbers into segments.

2003-12-02 Thread Tom
David Otton wrote: On Tue, 02 Dec 2003 13:14:20 +, you wrote: Is there an easy, non expensive way to do the perl-equivalent of: $date=20031202; ($year, $month, $day) = ($date =~ /(\d{4})(\d{2})(\d{2})/; I looked through the preg_* functions online, but couldn't see anything to help me. Am

Re: [PHP] reload farmes

2003-12-02 Thread Mike
you cannot change the page after you have started sending it.. this is a limitation of HTTP not PHP. You will probably need to send some javascript along with your php to do the frame reloading, or find a neater way to do it On Tue, 2003-12-02 at 14:12, Christian Jancso wrote: Hi there I

Re: [PHP] Best way to split a string of numbers into segments.

2003-12-02 Thread Mike
list ($a, $b, $c) = preg_split (/(\d{4})(\d{2})(\d{2})/); note the 's list ($a, $b, $c) = preg_split (/(\d{4})(\d{2})(\d{2})/); parse error, unexpected '/', expecting ')' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Best way to split a string of numbers into segments.

2003-12-02 Thread Marek Kilimajer
list(, $year, $month, $day) = Tom wrote: I agree that preg_match generates an array, but I cannot assign to it directly, and in your example I have 4 elements in the array, not three. Array ( [0] = 20031202 [1] = 2003 [2] = 12 [3] = 02 ) I suppose something like

Re: [PHP] (More Information) was Problems with ldap_modify() and very large entries

2003-12-02 Thread Peter J Hartman
Here's a followup to my problem with ldap_mod_replace and ldap_modify. Attached is a simple program demonstrating the problem. Basically, if you try to fill an attribute in ldap that is something around 17000 characters or above, ldap_mod_replace hangs. I've determined it is definately a PHP

[PHP] printer_end_page() not ending page

2003-12-02 Thread Chris Pecor
Hey guys, I'm writing a small script that will print pick lists for our online orders using the printer functions provided with the stock extension. The problem is I can't get it to span across multiple pages. I've tried checking the Y position and using end_page and start_page accordingly but

Re: [PHP] (More Information) was Problems with ldap_modify() and very large entries

2003-12-02 Thread Peter J Hartman
Just to note: the problem holds true for: ldap_mod_add, ldap_modify, and ldap_mod_replace. Also, adding ldap_set_option($conn, LDAP_OPT_SIZELIMIT, 20) doesn't resolve the problem (or setting it to 0). Peter On Tue, 2 Dec 2003, Peter J Hartman wrote: Here's a followup to my problem with

Re: [PHP] forms and mysql

2003-12-02 Thread Tom Rogers
Hi, Tuesday, December 2, 2003, 9:54:33 PM, you wrote: B Hi i am very new to PHP so need some help ! B i have a form which allows the user to put in 2 team names and then displays B them, at the moment it displays them side by side but i need to insert V B (versus) in the middle--how can i do

[PHP] Finding array in MySQL (I'm not asking the right question)

2003-12-02 Thread Dave G
PHP Gurus, What I'm trying to do must be both common and simple, but I'm not asking the question right because I can't find the answers in Google or the online PHP manual using the search words like array, find, PHP, MySQL, etc... I have an array, and I want to select the fields in

Re: [PHP] Finding array in MySQL (I'm not asking the right question)

2003-12-02 Thread Sophie Mattoug
You can do something like $str = '.implode(', ', $arr).'; $query = SELECT * FROM table WHERE id IN ($str); Hope this helps, -- Cordialement, --- Sophie Mattoug Développement web dynamique [EMAIL PROTECTED] --- Dave G wrote: PHP Gurus, What I'm

Re: [PHP] XML, strings and foreign (swedish/danish) characters

2003-12-02 Thread Marek Kilimajer
Victor Spng Arthursson wrote: I'm on the point of almost giving up trying to get XML and PHP to sing along, but I'll throw out a question here first. I'm having severe problems getting PHP and XML to work with XML-files that contains foreign characters. Doesnt matter if i type the foreign

RE: [PHP] Finding array in MySQL (I'm not asking the right question)

2003-12-02 Thread Jay Blanchard
[snip] Well, SELECT email FROM table WHERE id = . $array . ); [/snip] $arrayUser[1] = 'bob'; $arrayUser[2] = 'cindy'; $arrayUser[1] = 'mark'; $countUser = count($arrayUser); for($i = 0; $i $countUser; $i++){ $sql = SELECT email FROM table WHERE id = ' . $arrayUser[$i] . ' ; }

Re: [PHP] Finding array in MySQL (I'm not asking the right question)

2003-12-02 Thread Marek Kilimajer
SELECT email FROM table WHERE id IN (' . implode(',',$array) . '); And don't forget to check if $array really contains only numeric values. Dave G wrote: PHP Gurus, What I'm trying to do must be both common and simple, but I'm not asking the question right because I can't find the

Re: [PHP] Finding array in MySQL (I'm not asking the right question)

2003-12-02 Thread Chris Boget
$arrayUser[1] = 'bob'; $arrayUser[2] = 'cindy'; $arrayUser[1] = 'mark'; $countUser = count($arrayUser); for($i = 0; $i $countUser; $i++){ $sql = SELECT email FROM table WHERE id = ' . $arrayUser[$i] .' ; } Is this method faster than just using IN and implode()? ie, WHERE id IN ( ' .

Re: [PHP] Best way to split a string of numbers into segments.

2003-12-02 Thread Mike
From the manual preg_split Returns an array containing substrings of subject split along boundaries matched by pattern. since you dont have any borders, this is unlikely to help you the only was i can see to do it is a quite long way $mydate = 20031202; $date = array(); preg_match(/(\d{4

RE: [PHP] Finding array in MySQL (I'm not asking the right question)

2003-12-02 Thread Jay Blanchard
[snip] $arrayUser[1] = 'bob'; $arrayUser[2] = 'cindy'; $arrayUser[1] = 'mark'; $countUser = count($arrayUser); for($i = 0; $i $countUser; $i++){ $sql = SELECT email FROM table WHERE id = ' . $arrayUser[$i] .' ; } Is this method faster than just using IN and implode()? ie, WHERE id IN ( '

RE: [PHP] Finding array in MySQL (I'm not asking the right question)

2003-12-02 Thread Dave G
Is this method faster than just using IN and implode()? Thanks to all who replied. I believe I have found what I'm looking for in using the implode() command. My assumption is that it was faster and more efficient to try and do as much processing on the PHP side and make as few queries to the

Re: [PHP] Finding array in MySQL (I'm not asking the right question)

2003-12-02 Thread Sophie Mattoug
Dave G wrote: Is this method faster than just using IN and implode()? Thanks to all who replied. I believe I have found what I'm looking for in using the implode() command. My assumption is that it was faster and more efficient to try and do as much processing on the PHP side and make as few

[PHP] Dealing with large classes over several files

2003-12-02 Thread Callum Urquhart
This may well have come up before as it is an obvious problem/question. Coming from a C++ background, I define a class in a header file and define the functions for that class in a seperate source file. Now the question: is this possible in PHP4? I have tried the obvious: // myclass.inc.php

RE: [PHP] Dealing with large classes over several files

2003-12-02 Thread Sam Masiello
This URL might be of some assistance to you: http://www.php.net/manual/en/ref.classobj.php It is a page on how to write classes and its associated member functions in PHP. There are a couple of other pages in the documentation which may be of assistance to you as well. HTH! --Sam

[PHP] Quick ereg_replace question

2003-12-02 Thread Grant Rutherford
Hi, I need a regular expression which will eliminate all characters except numbers, period, and +, -, *, or / I am currently using: $new_value = ereg_replace('[^0-9\.-/+*]', , $value); However, this seems to eliminate - as well. Any help would be appreciated. Also, any good references for

Re: [PHP] Quick ereg_replace question

2003-12-02 Thread Lowell Allen
I need a regular expression which will eliminate all characters except numbers, period, and +, -, *, or / I am currently using: $new_value = ereg_replace('[^0-9\.-/+*]', , $value); However, this seems to eliminate - as well. Any help would be appreciated. Try listing the - as the first

Re: [PHP] Problem with $_POST[] and header();

2003-12-02 Thread Shaun
it works fine as it is though? David Otton [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Tue, 2 Dec 2003 10:26:08 -, you wrote: if(!mysql_query($query)){ $error = Could not complete query; header(Location: file.php?error=$error); exit; } The Location: header

Re: [PHP] Working as a PHP/database developer..

2003-12-02 Thread Galen
A few suggestions here, from my experience. I offer a variety of computer services freelance, and have been focusing on building my web development side of things. Customers love flat rates, but you WILL eat the time WHEN, not if, you go over. I offer flat rates for mostly HTML web design

[PHP] header function, I'm stumped

2003-12-02 Thread Chris Hubbard
All, dealing with header(location:...) again. and trying to understand what's happening. I've got the following code: writeMessage($id); header(Location:http://www.mysite.com/cp/ad/ad_details.php?id=;. $id); writeMessage() is a debugging function that writes the value of the variable to a

Re: [PHP] header function, I'm stumped

2003-12-02 Thread Chris Shiflett
--- Chris Hubbard [EMAIL PROTECTED] wrote: header(Location:http://www.mysite.com/cp/ad/ad_details.php?id=;. $id); There should be a space after the first colon there. Then I used LiveHTTPHeaders in Mozilla and it give me some interesting information, though I'm not quite sure how to

RE: [PHP] Parse WebCT quiz

2003-12-02 Thread Chris Hubbard
John, I think your best option is to convert their format to XML and then use the XML to drive your quiz system. Should be pretty straightforward to convert to XML, cause you don't have to worry about exploding stuff. You just have to match patterns and use str_replace. Chris -Original

Re: [PHP] Working as a PHP/database developer..

2003-12-02 Thread David T-G
Video, et al -- I've been an independent SysAdmin for about seven years, but have only been doing independent programming for a couple, so others will certainly have more coding guidance and experience than I. All I can definitely say is that I'm still working on the knack of properly estimating

[PHP] sendmail vs smpt

2003-12-02 Thread Pablo Gosse
Hi all. I'm curious as to the performance difference between scripts that use sendmail vs. smtp for their mailing abilities. I use the following class for delivering emails, http://phpmailer.sourceforge.net http://phpmailer.sourceforge.net/ , and since I don't have sendmail running on my

Re: [PHP] sendmail vs smpt

2003-12-02 Thread David T-G
Pablo -- ...and then Pablo Gosse said... % % Hi all. I'm curious as to the performance difference between scripts % that use sendmail vs. smtp for their mailing abilities. Using sendmail will almost always be very very much faster because - you're talking to the local machine - you're

[PHP] Re: sendmail vs smpt

2003-12-02 Thread Manuel Lemos
Hello, On 12/02/2003 07:50 PM, Pablo Gosse wrote: Hi all. I'm curious as to the performance difference between scripts that use sendmail vs. smtp for their mailing abilities. I use the following class for delivering emails, http://phpmailer.sourceforge.net http://phpmailer.sourceforge.net/ ,

[PHP] replace %rand[x]-[y]% macro in string with random string

2003-12-02 Thread daniel hahler
Hello PHP-list, I'm building a script, that provides a honeypot of invalid email addresses for spambots.. for this I want to provide a macro for the templates that looks like %rand[x]-[y]%, where [x] and [y] are integers, that specify the length of the random script. My first thoughts were about

Re: [PHP] replace %rand[x]-[y]% macro in string with random string

2003-12-02 Thread Richard Davey
Hello Daniel, Tuesday, December 2, 2003, 10:46:33 PM, you wrote: dh For generation of a random string with length 1.000.000 it takes about dh 13 seconds on my xp 1600+.. that's quite a lot, imho, so suggestions dh are very welcome.. Just so we're clear on this - you're creating a string (an

[PHP] Re: replace %rand[x]-[y]% macro in string with random string

2003-12-02 Thread Luke
result on my laptop for default script settings (P4 2.66, 512mb ram) 20 loaded in: 1.3158s please tell me what you think of this? if you like it i can email it to you (as a php file) --begin php code--- ?php class honeyPot { //define word lengths var $umin; var

Re: [PHP] replace %rand[x]-[y]% macro in string with random string

2003-12-02 Thread Robert Cummings
On Tue, 2003-12-02 at 18:33, Richard Davey wrote: Hello Daniel, Tuesday, December 2, 2003, 10:46:33 PM, you wrote: dh For generation of a random string with length 1.000.000 it takes about dh 13 seconds on my xp 1600+.. that's quite a lot, imho, so suggestions dh are very welcome.. I

[PHP] Re: replace %rand[x]-[y]% macro in string with random string

2003-12-02 Thread Luke
i forgot to mention, that being a class, you should be able to set any of the variable you want (either on class creation: new honeyPot($value1, $value2, etc); or with the class variables, $spambot = new honeyPot; $spambot-addresses = 50; //amount to create) Luke -- PHP General Mailing List

Re: [PHP] replace %rand[x]-[y]% macro in string with random string

2003-12-02 Thread daniel hahler
on Tue, 2 Dec 2003 23:33:47 + Richard Davey wrote: RD Just so we're clear on this - you're creating a string (an email RD address) of a million characters? I don't know my mail RFC's that well, but RD I'm sure this is well beyond what it considers standard. We're not clear.. ;) the function

Re: [PHP] Re: replace %rand[x]-[y]% macro in string with random string

2003-12-02 Thread daniel hahler
on Wed, 3 Dec 2003 10:54:10 +1100 Luke wrote: L result on my laptop for default script settings L (P4 2.66, 512mb ram) L 20 L loaded in: 1.3158s thanks for the test.. L please tell me what you think of this? if you like it i can email it to you L (as a php file) Looks good, I have already

Re: [PHP] replace %rand[x]-[y]% macro in string with random string

2003-12-02 Thread daniel hahler
on 02 Dec 2003 18:56:28 -0500 Robert Cummings wrote: RC I missed the original post, and I'm too lazy to go looking, but the RC following code runs in approx. 2.75 seconds on my Athlon 2400 running RC linux: it is 4.3 seconds on xp 1600+.. RC $chars = '0123456789' RC

[PHP] Re: replace %rand[x]-[y]% macro in string with random string

2003-12-02 Thread Luke
final note, for anyone who finds this interesting in the class, if you update the following 2 variables, this is the proper list $this-countrys = array(,.ac,.ad,.ae,.af,.ag,.ai,.al,.am,.an,.ao,.aq, .ar,.as,.at,.au,.aw,.az,.ba,.bb,.bd,.be,.bf,.bg,.bh

RE: [PHP] Finding array in MySQL (I'm not asking the right question)

2003-12-02 Thread Dave G
Totally wrong ! It's always better to have maximum work done by MySQL So does that mean that this: $countUser = count($arrayUser); for($i = 0; $i $countUser; $i++){ $sql = SELECT email FROM table WHERE id = ' . $arrayUser[$i] . ' ; } ... is faster than this: SELECT email FROM

[PHP] Simple table sorting

2003-12-02 Thread Tommi Virtanen
Hi! I have simple table like: namedepartment [data: first name] [data: dep. no] [data: second name] [data: dep. no] Now I have only sorting which sorts using ORDER BY name. How I make header name / department active link, which I can change sorting order Department

Re: [PHP] Simple table sorting

2003-12-02 Thread Robert Cummings
On Tue, 2003-12-02 at 21:30, Tommi Virtanen wrote: Hi! I have simple table like: name department [data: first name][data: dep. no] [data: second name] [data: dep. no] Now I have only sorting which sorts using ORDER BY name. How I make header name / department

[PHP] news service

2003-12-02 Thread BigMark
Hi i had your php news account setup on my outlook express buti lost it what do i put as the address Mark

[PHP] Re: news service

2003-12-02 Thread Luke
news.php.net and subscribe to the group php.general make sure you have all your email addresses and stuff setup in the account because it may ask you to send a confirmation no user/pass required -- Luke Bigmark [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi i had your php news

[PHP] Unicode translation

2003-12-02 Thread Louie Miranda
Guys, A problem arised on my application when a user enters a Unicode format code on the site. Well, we really catch every information and i really need to get some explanation about it. ex: C = U+0108: Latin Capital Letter C With Circumflex Now this unicode character does not have any

[PHP] Conditional anchor href value

2003-12-02 Thread Eric Blanpied
I'm working on a page which displays details for a given record, and allows the user to flip back and forth through a large set of records, much like a set of index cards. Previous and Next buttons reload the card with the new record id. It is important that the URLs for the cards be very simple

RE: [PHP] Conditional anchor href value

2003-12-02 Thread Martin Towell
, and then the js function uses the correct one. Does anyone have any advice? Thanks -eric -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Information from NOD32 1.568 (20031202) __ This message was checked by NOD32

[PHP] in a Variable

2003-12-02 Thread Dimitri Marshall
Hi there, I'm sure this is an easy fix, but how do you either prevent users from being able to input in a field or make it so that it doesn't affect the code? Thanks in advance, Dimitri Marshall -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Conditional anchor href value

2003-12-02 Thread Chris Shiflett
--- Eric Blanpied [EMAIL PROTECTED] wrote: Still the js approach has been closest to what we need: the php script puts all the possible links from that card into the page, and then the js function uses the correct one. Does anyone have any advice? Let PHP choose the correct one? Maybe

Re: [PHP] in a Variable

2003-12-02 Thread Chris Shiflett
--- Dimitri Marshall [EMAIL PROTECTED] wrote: how do you either prevent users from being able to input in a field or make it so that it doesn't affect the code? Can you give an example of affecting the code? You can store spaces in variables just fine. Chris = Chris Shiflett -

Re: [PHP] in a Variable

2003-12-02 Thread Dimitri Marshall
Sorry, what I mean is... I have a field in a form where users input text. If the user inputs something like: Hi there, this is a quote and you should know it. Then only... Hi there, get's inserted because of the double quotes. Is that more clear? Dimitri Marshall Chris Shiflett [EMAIL

Re: [PHP] in a Variable

2003-12-02 Thread Richard Davey
Hello Dimitri, Wednesday, December 3, 2003, 3:28:19 AM, you wrote: DM I'm sure this is an easy fix, but how do you either prevent users from being DM able to input in a field or make it so that it doesn't affect the code? Assuming you mean the double quote marks, and not a blank space, use

Re: [PHP] in a Variable

2003-12-02 Thread Jason Sheets
Try using htmlentities() to convert the characters to the html entities that can be stored and displayed. http://www.php.net/htmlentities Jason Dimitri Marshall wrote: Sorry, what I mean is... I have a field in a form where users input text. If the user inputs something like: Hi there,

[PHP] Re: Unicode translation

2003-12-02 Thread Luke
Yeah, i had a similar problem, i dont know if its the same, but i found that adding meta http-equiv=content-type content=text/html; charset=UTF-8 in the head of the html output fixed it Luke - Original Message - From: Louie Miranda [EMAIL PROTECTED] Newsgroups: php.general To: [EMAIL

Re: [PHP] Re: Unicode translation

2003-12-02 Thread Leif K-Brooks
Luke wrote: Yeah, i had a similar problem, i dont know if its the same, but i found that adding meta http-equiv=content-type content=text/html; charset=UTF-8 in the head of the html output fixed it Even better, use header('Content-Type: text/html; charset=UTF-8') at the beginning of your PHP

[PHP] Re: reload farmes

2003-12-02 Thread Luke
i use echo SCRIPT language=\JavaScript\\n; echo javascript:top.location.href='{$placetogo}';\n; echo /SCRIPT; and if you want to refresh a specific frame, replace top in the script for the frame name -- Luke Christian Jancso [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi

Re: [PHP] Re: Unicode translation

2003-12-02 Thread Louie Miranda
Does all unicode characters have an equivalent key-stroke? and in even different fonts? -- - Louie Miranda http://www.axishift.com - Original Message - From: Leif K-Brooks [EMAIL PROTECTED] To: Luke [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 11:52 AM

[PHP] Virtual Directory Support

2003-12-02 Thread Ralph Guzman
I have a new installation of PHP 4.1.2 and it appears I cannot run php scripts outside of apache root directory. I look at phpinfo() and I saw Virtual Directory Support is set to disabled. I'm suspecting this could me the problem, but I have not been able to find anything on google or the lists

[PHP] Re: Generate automatic list of dates

2003-12-02 Thread Luke
that should do it :) ? $first_date = 2003-12-01; $end_date = 2004-01-15; $ufirst = strtotime($first_date); $uend = strtotime($end_date); echo ufirst: . $ufirst; echo bruend: . $uend; while($ufirst = $uend){ //do other stuff here, insert into database etc $ufirst = strtotime(+1 day, $ufirst);

Re: [PHP] Re: Unicode translation

2003-12-02 Thread Luke
no, but on windows, you should be able to access most of them (depending on the font) by using ALT+(number pad code) eg ALT+(num pad)0169 gives you - © Luke -- Luke Louie Miranda [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Does all unicode characters have an equivalent

Re: [PHP] Re: Unicode translation

2003-12-02 Thread Louie Miranda
Yes, i just learned that windows uses a decimal code and there is a hex value too. Well, since some unicode characters dont have a decimal value, its really getting harder to solve this kind of problems. :( -- - Louie Miranda http://www.axishift.com - Original Message - Luke [EMAIL

[PHP] refresh data

2003-12-02 Thread BigMark
At the moment this code accepts changes and deletes from the Db but when the submit button is pressed it echos- 'Record updated/edited' and i have to go back and refresh to view the updated list, how can i just have it refresh. When you open the file it shows the list but when editing

Re: [PHP] refresh data

2003-12-02 Thread Richard Davey
Hello BigMark, Wednesday, December 3, 2003, 6:04:03 AM, you wrote: B At the moment this code accepts changes and deletes from the Db but when the B submit button is pressed it echos- 'Record updated/edited' and i B have to go back and refresh to view the updated list, how can i just

RE: [PHP] Re: Unicode translation

2003-12-02 Thread Chris
I'm not quite following this and I'm not sure what exactly you're having a problem with, but I'll try to explain some stuff that it looks like will help. Unicode(UTF-8) is a variable multi-byte format. Each character is represented by 1 to 4 bytes, UTF-8 character number 0x108(264) happens to

[PHP] Re: refresh data

2003-12-02 Thread BigMark
Nope that didnt work! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Conditional anchor href value

2003-12-02 Thread Eric Blanpied
Chris Shiflett wrote: --- Eric Blanpied [EMAIL PROTECTED] wrote: Still the js approach has been closest to what we need: the php script puts all the possible links from that card into the page, and then the js function uses the correct one. Does anyone have any advice? Let PHP

Re: [PHP] Conditional anchor href value

2003-12-02 Thread Eric Blanpied
Martin Towell wrote: you might be able to put the id of the next/prev card as the value of the option and then use javascript to generate the url. the only reliance then would be that the browser as JS enabled, as the above should be possible with the most basic of JS That's not all

  1   2   >