[PHP] Re: May i?
ask. -- Best regards, George Nicolae IT Manager ___ PaginiWeb.com - Professional Web Design www.PaginiWeb.com ::: Flavio Bastos Amiel:: [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... May i ask for help about a subejct on MySQL here? thanks, Flavio Bastos Amiel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Date Function in Php
try mktime() function. -- Best regards, George Nicolae IT Manager ___ PaginiWeb.com - Professional Web Design www.PaginiWeb.com Vinod Palan [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hi , Do any one have date functions like that we have in asp 1) Dateadd() 2) Datediff() etc? Thanks Vinod -- Vinod Palan A Calypso Technology, Inc. [EMAIL PROTECTED] (415) 817-2463 Phone -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php problem
I have the same problem long time ago -- Best regards, George Nicolae IT Manager ___ PaginiWeb.com - Professional Web Design www.PaginiWeb.com Johnny1b1g [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: randomize?
yes. you can. ;) -- Best regards, George Nicolae IT Manager ___ PaginiWeb.com - Professional Web Design www.PaginiWeb.com Hawk [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have a group table with 16 items, and I want them to be randomly put in 4 different groups, with 4 in each group, I've seen the $rand(x,x) thing, but is there any way to limit to 4 in each group without 47839 rows of code? :P Håkan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: strtotime failure
strtotime returns a timestamp of a data type(ex 05/07/2002) strtotime(05/07/2002) you can't recevie a timpstamp from a time of a day. -- Best regards, George Nicolae IT Manager ___ PaginiWeb.com - Professional Web Design www.PaginiWeb.com Jennifer Koenig [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hallo, Why would strtotime fail (i.e. return a -1)? I check the type with gettype, which tells me that the argument I'm passing in is a string. I cast it to a string before passing it in, with the same results (returns a -1). The only thing that seems to do anything is to settype it to string before calling strtotime, which ends up with bizarre results. The arguments I'm passing in are, for example 11:00, 13:00, 14:30, etc, and are coming out of a database. Only SOME of this data results in a -1 when I call strtotime on it. Other records (the same numbers - 11:00, 13:00, etc.) come out fine. Could the data that's failing strtotime have been corrupted on data-entry? Why does is_string on this data tell me it's a string? --Jennifer Koenig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: help!!!
If you find someone pls tell him to write for me a new portal with secure user authentication and a webmail system with Oracle backend. tanx. -- Best regards, George Nicolae IT Manager ___ PaginiWeb.com - Professional Web Design www.PaginiWeb.com J. H. [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Can anyone here help me write a simple auto shop scheduling program? Would really appreciate it if you would help me out. Jane H. __ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Variable scope
I have the following code: ? function a($var_a) { b(); } function b() { global $var_a; echo $var_a; } a(hello word!); ? why function b() don't echo anything? can I resolve this problem without calling b($var_a)? Best regards, George Nicolae IT Manager ___ PaginiWeb.com - Professional Web Design www.PaginiWeb.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Variable scope
Jason Wong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... On Thursday 14 March 2002 21:53, George Nicolae wrote: I have the following code: ? function a($var_a) { b(); } function b() { global $var_a; echo $var_a; } a(hello word!); ? why function b() don't echo anything? Because $var_a has not, at any point, been defined in the global scope. how i declare $var_a as global? can I resolve this problem without calling b($var_a)? I'm curious as to what you're trying to achieve. Could you enlighten me? I have a big(=many lines) function a() and a little one b(). I call function b() from function a() and alsow from many other php files. I need to midify the function b() without modify any other php files. That's why I don't want to use b($var_a). -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* I will make no bargains with terrorist hardware. -- Peter da Silva */ Best regards, George Nicolae IT Manager ___ PaginiWeb.com - Professional Web Design www.PaginiWeb.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Help php MySql link
$db = (localhost,databasename,databasepassword); mysql_select_db(your name?,$db); $result = mysql_query(select column1, column2 from domain, $db); while ($myrow=mysql_fetch_array($result)) echo $myrow[column1]. - .$myrow[column2].br; -- Best regards, George Nicolae IT Manager ___ PaginiWeb.com - Professional Web Design www.PaginiWeb.com Rodrigo [EMAIL PROTECTED] wrote in message 000401c1f2cf$28b83f00$d86bbbac@rodirgo">news:000401c1f2cf$28b83f00$d86bbbac@rodirgo... Hi guys, what I need is how to make the link between the php and the Database. Is this the code for it? ro something like that? Help me guys... If you could tell me what each command line do I'd appreciate it, cause I got almost all from a friend, but is incomplete. The code follows this message. $db = (localhost,databasename,databasepassword); mysql_select_db(your name?,$db); $result = mysql_query(select column1, column2 from domain, $db); echo column 1 - column 2; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: date format
try ? $date=2002-04-27; echo date(d-m-Y,strtotime($date)); ? -- Best regards, George Nicolae IT Manager ___ PaginiWeb.com - Professional Web Design www.PaginiWeb.com Ananth Rajaraman [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi all, I'm trying to query a date field from mySQL and display in a differnet format. the mysql date is in the format -MM-DD and I want to convert it to DD-MM- how do I do that? TIA Ananth = visit www.locustechnologies.com __ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PhP Javascript Mixed Repost Fields
in fooa.php for each textfield ? if (!empty($field1)) $value=$value; else $value=; ? input type=text name=textfield value=?echo $value;? so, when you come back from foob.php if a $field !empty the respective textfiel will have a value in html form; -- Best regards, George Nicolae IT Manager ___ PaginiWeb.com - Professional Web Design www.PaginiWeb.com Simos Varelakis [EMAIL PROTECTED] wrote in message 000401c1d9a2$afd6bde0$9b00a8c0@simos">news:000401c1d9a2$afd6bde0$9b00a8c0@simos... Here is a problem :-) A php post form fooa.php Submit all form fields to a page foob.php Page foob.php do some mysql db check and in one condition I want to Return to fooa.php without losing any field value... I made this from foob.php with header:(location:fooa.php?field1=$field1field2=$field2.etc) But this is more complex esspecially when in fooa.php there are radio buttons + checkboxes. I thing that if I could with Javascript in foob.php create an (invisble) form and take all posted fields from Fooa.php And resubmit it with form.submit method to fooa.php I will have best results But I dont know how to do this since I am a begginer.. Anyone can help please send me an email Thanks in advnace for your time help and excuse me if is off topic Best Regads simos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PhP Javascript Mixed Repost Fields
sorry the correct code is: in fooa.php for each textfield ? if (!empty($field1)) $value=$field1; ^^^ else $value=; ? input type=text name=textfield value=?echo $value;? so, when you come back from foob.php if a $field !empty the respective textfiel will have a value in html form; -- Best regards, George Nicolae IT Manager ___ PaginiWeb.com - Professional Web Design www.PaginiWeb.com Simos Varelakis [EMAIL PROTECTED] wrote in message 000401c1d9a2$afd6bde0$9b00a8c0@simos">news:000401c1d9a2$afd6bde0$9b00a8c0@simos... Here is a problem :-) A php post form fooa.php Submit all form fields to a page foob.php Page foob.php do some mysql db check and in one condition I want to Return to fooa.php without losing any field value... I made this from foob.php with header:(location:fooa.php?field1=$field1field2=$field2.etc) But this is more complex esspecially when in fooa.php there are radio buttons + checkboxes. I thing that if I could with Javascript in foob.php create an (invisble) form and take all posted fields from Fooa.php And resubmit it with form.submit method to fooa.php I will have best results But I dont know how to do this since I am a begginer.. Anyone can help please send me an email Thanks in advnace for your time help and excuse me if is off topic Best Regads simos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] header() question
The _top option send you to the top of a page. When you open a new location you go on top by default.Maybe you ask about _blank? I don't have the answer for this last question. -- Best regards, George Nicolae IT Manager ___ PaginiWeb.com - Professional Web Design www.PaginiWeb.com Patrick Hartnett [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Is it possible to user the target=_top reference when using a header(Location = ...)? If so, anyone have an example. Thanks -patrick _ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: A variable with a variable
$v=Var_.$Nums._Stat; $Var_Call=$$v; -- Best regards, George Nicolae IT Manager ___ X-Playin - Professional Web Design www.x-playin.f2s.com Yoed [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I never really found the trick to this one yet, and wanted to see what you guys say is the best methods to call a variable that needs a variable. Say I have variables called $Var_1_Stat, $Var_2_Stat, and $Var_3_Stat and I have a variable called $Nums thats value is either 1, 2, or 3. How then would I go about calling $Var_Call=$Var_$Num_Stat ? Or $Var_Call=$Var_$Num_State hmm not hat wouldn't work? So what do you guys suggest? No if statements... since I want to know a way that can be used if I have more then just 3 or a limited ammount of varaibles. Thank you for your time, Yoed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: counting with dates (help!)
$today=mktime(0,0,0,date(m),date(d),date(Y)); $last_week=mktime(0,0,0,date(m,mktime(0,0,0,date(m),date(d)-7,date(Y ))),date(d,mktime(0,0,0,date(m),date(d)-7,date(Y))),date(Y,mktime( 0,0,0,date(m),date(d)-7,date(Y; echo date(d,$today)-date(d,$last_week); -- Best regards, George Nicolae IT Manager ___ X-Playin - Professional Web Design www.x-playin.f2s.com Sander Peters [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, This is my problem: $today = date(Ymd, mktime(0,0,0, date(m),date(d),date(Y))); $last_week = date(Ymd, mktime(0,0,0, date(m),date(d)-7,date(Y))); echo ($today - $last_week); The result is a number like 8876 (20020107-20011231 = 8876) But in date thinking it should be 7! How can I let php count in real days/month/years in stead of numbers? Maybe this is a silly question, but anyone who has the answer would help me very much! Thanks in advance! -- Met vriendelijke groet / With Greetings, Sander Peters site: http://www.visionnet.nl/ email: mailto:[EMAIL PROTECTED] webmail: mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: distinct element from array
array_keys(array_count_values($foo)); -- Best regards, George Nicolae IT Manager ___ X-Playin - Professional Web Design www.x-playin.f2s.com Kancha . [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... An array contains various values eg: list of fruits. Now i want to retrieve only unique fruits from the array. The array may contain duplicate names. How can i achieve this? __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: setcookie()
man first of all look in the manual. there it is very clear... http://www.php.net/manual/en/function.setcookie.php -- Best regards, George Nicolae IT Manager ___ X-Playin - Professional Web Design www.x-playin.f2s.com Tyler Longren [EMAIL PROTECTED] wrote in message 000901c196e7$71df35b0$0101a8c0@nightengale">news:000901c196e7$71df35b0$0101a8c0@nightengale... Hello, I need to set a cookie to store a username, password, and passcode forever (never expires). I don't really know how to use the setcookie() function. Could someone show me the proper way to use the setcookie() function to do this? Thanks, Tyler -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Printing return value of array_count_values?
array_count_values() returns an array using the values of the input array as keys and their frequency in input as values ? $array = array (1, hello, 1, world, hello); $a=array_count_values ($array); // returns array (1=2, hello=2, world=1) while ($b = each($a)) echo $b[0].=.$b[1]. ; ? -- Best regards, George Nicolae IT Manager ___ X-Playin - Professional Web Design www.x-playin.f2s.com Daniel alsén [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi! How do i echo the return values of array_count_values? Regards # Daniel Alsén| www.mindbash.com # # [EMAIL PROTECTED] | +46 704 86 14 92 # # ICQ: 63006462 | +46 8 694 82 22 # # PGP: http://www.mindbash.com/pgp/ # -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: A compress function?
take a look at http://www.php.net/manual/en/function.bzcompress.php -- Best regards, George Nicolae IT Manager ___ X-Playin - Professional Web Design www.x-playin.f2s.com Gaylen Fraley [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... With all the wonderful String functions in PHP, I haven't been able to find a str_compress(). Is there such an animal? Let's say I have a string like this: $myString = First_word 30 spaces second_word 10 spaces etc... I need to do one of two things. Either compress the multiple spaces to one and then use explode to break the string on a single space, or can someone explain another way to break $myString into only those pieces that contain usable text w/o spaces? Thanks! -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com/ PHP KISGB v3.02 Guest Book http://www.gaylenandmargie.com/phpwebsite/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: win2k..grrr
i tell you why. because on instalation you use php.ini-optimized. file. copy in your win2k director the php.ini-dist as php.ini. After that the script will work. I don't know what is set in optimized ini file and your script not work. -- Best regards, George Nicolae IT Manager ___ X-Playin - Professional Web Design www.x-playin.f2s.com Kunal Jhunjhunwala [EMAIL PROTECTED] wrote in message 015501c19547$82434d70$0301a8c0@CONFUSED">news:015501c19547$82434d70$0301a8c0@CONFUSED... Hey, Does anyone know WHY form scripts, that submit to themselves, dont work on windows boxes?? Example : I have a script called mail.php. The first part of the script displays the form whos action states, mail.php. When the form is submitted, the second part of the script mails the form details out.. this works fine on linux.. but on windows, only part one is displayed again and again... when i seperate the 2 components, it works fine. Regards, Kunal Jhunjhunwala -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: If Statement with more than one conclusion
if (($text==com)||($text==net)||($text==org)||($text==info)) { } -- Best regards, George Nicolae IT Manager ___ X-Playin - Professional Web Design www.x-playin.f2s.com [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... How can I do an if statement with more than one conclusions Something like this I know this is not correct just an example of what I what to do If($ext==comornetororgorinfo){ Then do this } If($ext==com.ukorme.ukororg.uk){ Then do this } -- Best regards, rdkurth mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: mktime and variables not working
mktime have the folloing format int mktime (int hour, int minute, int second, int month, int day, int year) I don't understand what represent $x[stop]. maybe time in hh:mm:ss format? if is that you ca use $reformat_stop=explode(:,$x[stop].:.1:1:2001) stop=mktime($reformat_stop[0],$reformat_stop[1],$reformat_stop[2],$reformat_ stop[3],$reformat_stop[4],$reformat_stop[5]) be careful $stop is a timpstamp and you must use in combination with date() function. look in manual for more details about function date(); -- Best regards, George Nicolae IT Manager ___ X-Playin - Professional Web Design www.x-playin.f2s.com Tom Beidler [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I'm trying to calculate elapsed time and I'm having trouble using mktime with variables. Here's my code; $reformat_stop = str_replace(:, ,, $x[stop]) . ,1,1,2002; $stop=mktime($reformat_stop); I don't know how to format the code for mktime to use a variable. I keep getting -1 for $stop but if I hard code a value in mktime it works fine. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: how can I add a variable to this sample
$x[$key.'service_type']; -- Best regards, George Nicolae IT Manager ___ X-Playin - Professional Web Design www.x-playin.f2s.com Tom Beidler [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... So far nothing seems to work which leads me to believe there's something else wrong. Here's what I've tried $service_type_insert = $x['926service_type']; //works fine when I hard code a value in and returns proper value $service_type_insert = $x[$$keyservice_type]; //returns empty even though I know a value is there $service_type_insert = $x['${key}service_type']; //returns empty even though I know a value is there $service_type_insert = eval($x['$keyservice_type']); //returns empty even though I know a value is there. I added single quotes because without it returned a parse error. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: connect
look at http://www.phpbuilder.com/columns/siddarth2228.php3 for a good tutorial. -- Best regards, George Nicolae IT Manager ___ X-Playin - Professional Web Design www.x-playin.f2s.com Gendeng [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... halo... i want to know about connect to database. can php (for windows) connect to MS Access ?. Mpu Strees IncrediMail - Email has finally evolved - Click Here -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Listing files
$path=c:/;//your path function GetDirArray($sPath) { //Load Directory Into Array $handle=opendir($sPath); while ($file = readdir($handle)) if(($file!=.)($file!=..)) $retVal[(isset($retVal))?count($retVal):0] = $file; //Clean up and sort closedir($handle); sort($retVal); return $retVal; } $a=GetDirArray($path); //echo test.count($a); //for ($i=0;$icount($a);$i++) echo $a[$i].br; ? select name=select ? for ($i=0;$icount($a);$i++) { ? option value=test onchange='location=//go to the specific location and/or file'?echo $a[$i];?/option ? } ? /select -- Best regards, George Nicolae IT Manager ___ X-Playin - Professional Web Design www.x-playin.f2s.com Todd Cary [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I would like to present the surfer with a list of files in a directory (I'll probably put then into a drop-down) and then I want to send the file to the surfer if one is selected. I am not sure of the syntax to 1) List the files in a directory 2) Send a selected file to the surfer Many thanks for any help in getting the correct syntax to do this.. Todd -- Todd Cary Ariste Software [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Listing files
I am very honour of your suggestion but I am not the author of the function GetDirArray($sPath). The author is [EMAIL PROTECTED] (I don't know him). It isn't ethic to publish this function under my name. Best regards, George Nicolae IT Manager ___ X-Playin - Professional Web Design www.x-playin.f2s.com - Original Message - From: Boaz Yahav [EMAIL PROTECTED] To: George Nicolae [EMAIL PROTECTED] Sent: Monday, December 31, 2001 9:05 PM Subject: RE: [PHP] Re: Listing files This looks like a great example to add to weberdev. Care to spend 3 minutes and let other PHP developers enjoy from your experience? You are one click away from doing a good deed :) http://www.weberdev.com/index.php3?GoTo=addexample.php3 Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: George Nicolae [mailto:[EMAIL PROTECTED]] Sent: Monday, December 31, 2001 7:00 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: Listing files $path=c:/;//your path function GetDirArray($sPath) { //Load Directory Into Array $handle=opendir($sPath); while ($file = readdir($handle)) if(($file!=.)($file!=..)) $retVal[(isset($retVal))?count($retVal):0] = $file; //Clean up and sort closedir($handle); sort($retVal); return $retVal; } $a=GetDirArray($path); //echo test.count($a); //for ($i=0;$icount($a);$i++) echo $a[$i].br; ? select name=select ? for ($i=0;$icount($a);$i++) { ? option value=test onchange='location=//go to the specific location and/or file'?echo $a[$i];?/option ? } ? /select -- Todd Cary [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I would like to present the surfer with a list of files in a directory (I'll probably put then into a drop-down) and then I want to send the file to the surfer if one is selected. I am not sure of the syntax to 1) List the files in a directory 2) Send a selected file to the surfer Many thanks for any help in getting the correct syntax to do this.. Todd -- Todd Cary Ariste Software [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Getting elapsed time between two MySQL time fields
? $d1=mktime(13,44,20,1,1,2002);//first three variables are your time and last are a random day $d2=mktime(13,49,25,1,1,2002); echo date(i:s,$d2-$d1); ? -- Best regards, George Nicolae IT Manager ___ X-Playin - Professional Web Design www.x-playin.f2s.com Tom Beidler [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have some records in a MySQL database that store a start and stop time. In my display page that displays the record info I would like to use PHP to find the elapsed time between the two fields. So if I had; Start 13:44:20 Stop 13:49:25 Possibly use a function to calculate Elapsed 5:05 Do I need to do this in MySQL? Thanks, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Happy new year!
A happy new year with a lot of dynamic sites to all php community! -- Best regards, George Nicolae IT Manager ___ X-Playin - Professional Web Design www.x-playin.f2s.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: array in email
the mail function looks like : mail($to,$subject,$body) (in a simplistic manner) you can use $to=[EMAIL PROTECTED]; $subject=test; for ($i=0;icount(a)/*your array*/;$i++) $body.=a[i]; //and then, of course mail($to,$subject,$body); -- Best regards, George Nicolae IT Manager ___ X-Playin - Professional Web Design www.x-playin.f2s.com Jordan [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I've searched the archive but can't seem to find anything on the mail() function of PHP. I've got the whole function working in a simplistic manner but I can't do one thing. How is it possible to print arrays inside the body of the message. I can't seem to run a loop or anything and all I have are session variables to use. Thanks in advance for the help. -Jordan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Handling checkboxs (MySQL+PHP)
//you must make some change : echo tdinput type=\checkbox\ name=\frm_.$pid.\ value = \$pid\/td; ^^ //you must find the max pid from database with query //select pid from catalog order by pid desc limit 1 for ($i=0;$imax_pid;$i++) { $v=pid_.$i; if(isset($$v)) ... make what you want to do .; } -- Best regards, George Nicolae IT Manager ___ X-Playin - Professional Web Design www.x-playin.f2s.com David Jackson [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... ALL -- The snipet below is used to generate the table containing product info (product_id(pid), title, amount) and checkboxs. When submit is clicked the data is passed to instert into sql statement. My question is how do I process checkbox when multi boxes have been check. I keep thinking a array is created by check boxes? -- David order_form.php // Define table echo brtable bgcolor=\gray\ border=\1\ ; // Generate book listing $result = mysql_query(SELECT pid,date,title,subtitle,author,amount FROM catalog ) or die(Dis ain't right !!); while ( list($pid,$date,$title,$subtitle,$author,$amount)=mysql_fetch_row($result)){ echo tr\n; echo tdinput type=\checkbox\ name=\frm_pid\ value = \$pid\ /td; echo td$title/td; echo tdPrice: $amount/td; echo /tr\n; } echo /table; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Time function question/
try date(d-M-Y,rand (mktime(0,0,0,1,1,1970),mktime(0,0,0,12,31,1985))) mktime works only from January 1 1970 -- Best regards, George Nicolae IT Manager ___ X-Playin - Professional Web Design www.x-playin.f2s.com Mehmet Kamil Erisen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, Can anybody suggest a function that will generate a random date between 01-Jan-1967 31-Dec-1985 thanks. = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Send your FREE holiday greetings online! http://greetings.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php code beautifier
do you know if exist a php code beautifier for win32? pls tell me the address. -- Best regards, George Nicolae IT Manager ___ X-Playin - Professional Web Design www.x-playin.f2s.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: spliti
$word=exlode( ,$line); -- Best regards, George Nicolae IT Manager ___ X-Playin - Professional Web Design www.x-playin.f2s.com Yamin Prabudy [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... hi guys, I need help here. I got this $line = no more words to say; then I want to split them all I used spliti( ,$line); Then want to print it out say echo $word[0] $word[1] $word[$i]; how can I do this.. Thanks in Advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Email files as attachments
look at http://phpmailer.sourceforge.net for a useful class. -- Best regards, George Nicolae IT Manager ___ X-Playin - Professional Web Design www.x-playin.f2s.com Andrew V. Romero [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I was wondering if it is possible to attach a file using the php mailing functions? I currently am using mail([EMAIL PROTECTED],My email subject Line,$emailMessage, From: [EMAIL PROTECTED]\nReply-To: [EMAIL PROTECTED]\nX-Mailer: PHP/ . phpversion()); to email simple messages, but I haven't run across a way to attach a file to it. Thanks for any information, Andrew V. Romero -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Does mail() can be used to send attachments?
look at http://phpmailer.sourceforge.net for a useful class. -- Best regards, George Nicolae IT Manager ___ X-Playin - Professional Web Design www.x-playin.f2s.com Dasmeet Singh Arora [EMAIL PROTECTED] wrote in message 1009010971.1987.7.camel@linux">news:1009010971.1987.7.camel@linux... Is it possible to send attachments using mail() command? If yes then how is it done. Thanks for any help. -- http://www.pluginjokes.com Add FREE Dynamic Jokes To Your Site! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Php Directory structures
u can use the function function GetDirArray($sPath) { //Load Directory Into Array $handle=opendir($sPath); while ($file = readdir($handle)) if(($file!=.)($file!=..)) $retVal[(isset($retVal))?count($retVal):0] = $file; //Clean up and sort closedir($handle); sort($retVal); return $retVal; } //and then count($a=GetDirArray($sPath)) -- Best regards, George Nicolae IT Manager ___ X-Playin - Professional Web Design www.x-playin.f2s.com Bogdan Stancescu [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Just a suggestion: use exec(ls -1 root/articles/??_head.xml,$article_files) to find out the files -- then walk $article_files, parse the file and echo whatever you please. :-) Bogdan Martin Hughes wrote: Heya, Can PHP count the number of a certain ftile in a directory and then print the result to the screen? I have articles on my site that are in XML/XSL format like: root/articles/00_head.xml 00_body.xml 01_head.xml 01_body.xml 02_head.xml 02_body.xml etc... (with appropriate XSL stylesheets too...) and I want to have a main article page with the head.xml info on it: Article 00: By: author Date: whatever date Subject: subject and then a link to the article itself (which will be an XSL stylesheet loading both the header info and the article body.xml). Can php count the number of articles etc in the dir and then automatically create the page? (or can anyone think of a better way of doing this :-)) Cheers, Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]