[PHP] array_filter
I suspect this can't be done in PHP. However... Is it possible to pass additional parameters to the callback function used by array_filter()? I guess I'm looking for something functionally equivalent to this Python code: from string import count list = ('apple', 'avacado', 'banana', 'blueberry', 'peach', 'persimmon') strings = ['a', 'b', 'c', 'd', 'e', 'f'] for string in strings : print filter(lambda x : count(x, string), list) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] .NET to PHP+NuSOAP
Hi all, I have software developed with ASP.NET. The program is web service program who communicates with client side - windows application using SOAP messages developed with VB .NET. I have all of the source files from web service project developed with ASP.NET. My question: Is a possible usign same WSDL file from old dotNET version of this web service, to develop my php+nuSOAP web service with the same SOAP message as old web service? I don't have the source code for client side. The basically question is possible keeping the old WSDL file and developing the new web service in php usign old WSDL file. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] cookie problemes (solved with javascript)
I not a expert in javascript but this code is working. I guess it is easy to change some line of code to work for your neads. Kale // kale's code _ ? $ID = kale; $n_sessid = $ID._Sessid; session_start(); $sessid = session_id(); if(isset($Read)){ print $HTTP_COOKIE_VARS[$n_sessid]; } ? script language=JavaScript function setCookie(name, value) { var the_name = name; var the_value = value; var the_cookie = the_name + = + escape(the_value); var the_date = new Date(December 31, 2050); var the_cookie_date = the_date.toGMTString(); the_cookie = the_cookie + ;expires= + the_cookie_date; document.cookie = the_cookie; alert(Thanks, now go to the next page.); } /script form name=insertCookie method=post input type=submit name=Cookie value=Cookie onClick=setCookie('?print $n_sessid;?', '?print $sessid;?') input type=submit name=Read value=Read /form __ // end kale's code __ -Original Message- From: Awlad Hussain [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 11:15 AM To: kale Subject: Re: [PHP] cookie problemes Hi Kale, I have the same problem with cookie, i would appericiate if you can share the java script code you used to create the cookie and how it solved the problem. -awlad - Original Message - From: kale [EMAIL PROTECTED] To: Php. Net [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 7:59 AM Subject: RE: [PHP] cookie problemes The clock is ok. I write cookie with javascript and read with php. For moment is the best solution i have. In future i hope to resolve this problem and i find solution i post it here. Thanks for help. kale -Original Message- From: Gonzo [mailto:[EMAIL PROTECTED] Sent: Monday, February 24, 2003 8:11 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [PHP] cookie problemes $path = /; $domain = .mydomain.ro; And in my cookie folder i find a cookie named: [EMAIL PROTECTED] But other computer (with problems) i don't have any cookie with same name. And if i reload the page and print $HTTP_COOKIE_VARS[$n_sessid] it's nothing. I have 12 computers and 10 are ok. Check the clocks on the 2 machines that do not have the cookies. Gonzo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] reminder mail when date is within a month of today.
HI I'm having a bad thinking day. I know it's going to be a very easy solution, but please humour me. I have a mysql table with a bunch of subscribers and the date that they subscribed. I want to query the table to find all the subscribers who will come up for renewal within the current month. So, each time I access the page, it must generate a table with those who's subscription is going to expire in this month, as well as those who might already be past the renewal date. I can handle the generation of the table and all, I'm just not coping with the query string. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] reminder mail cont.
Sorry, forgot to mention, the subscription is annual, so the subscription date I have for the subscriber is lets say 2002-02-28 , so I want to capture that he will need to renew by 2003-02-28 as well as all people past today's date... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] cookie problemes (solved with javascript)
Thanks Kale, I'll have a go with your code - Original Message - From: kale [EMAIL PROTECTED] To: Php. Net [EMAIL PROTECTED] Cc: 'Awlad Hussain' [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 9:29 AM Subject: RE: [PHP] cookie problemes (solved with javascript) I not a expert in javascript but this code is working. I guess it is easy to change some line of code to work for your neads. Kale // kale's code _ ? $ID = kale; $n_sessid = $ID._Sessid; session_start(); $sessid = session_id(); if(isset($Read)){ print $HTTP_COOKIE_VARS[$n_sessid]; } ? script language=JavaScript function setCookie(name, value) { var the_name = name; var the_value = value; var the_cookie = the_name + = + escape(the_value); var the_date = new Date(December 31, 2050); var the_cookie_date = the_date.toGMTString(); the_cookie = the_cookie + ;expires= + the_cookie_date; document.cookie = the_cookie; alert(Thanks, now go to the next page.); } /script form name=insertCookie method=post input type=submit name=Cookie value=Cookie onClick=setCookie('?print $n_sessid;?', '?print $sessid;?') input type=submit name=Read value=Read /form __ // end kale's code __ -Original Message- From: Awlad Hussain [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 11:15 AM To: kale Subject: Re: [PHP] cookie problemes Hi Kale, I have the same problem with cookie, i would appericiate if you can share the java script code you used to create the cookie and how it solved the problem. -awlad - Original Message - From: kale [EMAIL PROTECTED] To: Php. Net [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 7:59 AM Subject: RE: [PHP] cookie problemes The clock is ok. I write cookie with javascript and read with php. For moment is the best solution i have. In future i hope to resolve this problem and i find solution i post it here. Thanks for help. kale -Original Message- From: Gonzo [mailto:[EMAIL PROTECTED] Sent: Monday, February 24, 2003 8:11 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [PHP] cookie problemes $path = /; $domain = .mydomain.ro; And in my cookie folder i find a cookie named: [EMAIL PROTECTED] But other computer (with problems) i don't have any cookie with same name. And if i reload the page and print $HTTP_COOKIE_VARS[$n_sessid] it's nothing. I have 12 computers and 10 are ok. Check the clocks on the 2 machines that do not have the cookies. Gonzo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] reminder mail when date is within a month of today.
well... $query=mysql_query(select * from TableName where month(FieldNameForDate)=month(FieldOfDate)+1); that should do it.. or at least it does on mine anyways... - Original Message - From: Petre Agenbag [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 4:07 AM Subject: [PHP] reminder mail when date is within a month of today. HI I'm having a bad thinking day. I know it's going to be a very easy solution, but please humour me. I have a mysql table with a bunch of subscribers and the date that they subscribed. I want to query the table to find all the subscribers who will come up for renewal within the current month. So, each time I access the page, it must generate a table with those who's subscription is going to expire in this month, as well as those who might already be past the renewal date. I can handle the generation of the table and all, I'm just not coping with the query string. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Newbie Security Questions...
Hi all, First thankx for reading this !. I'm a Newbie in PHP, previously i was doing web stuff in perl. I want to do a site were you login, and depending on the login account the user receives a given set of permissions. From what i have studid the session management, were you start a session id, and can put in several variables... My question is this, this variables remain were ? on the user browser (cookies, url enconding ?) or does the user just receive the single session id, and the rest remain on the server ? This is a important security consideration for me. Any help will be great Stay well ! Miguel Angelo e-mail: [EMAIL PROTECTED] http://migas.mine.nu -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to get tree structure into an array?
Hi all! i have to solve one problem, but i have no idea how to make this. I have got a tree strucutre in mysql table, id - parent - name. I need make function, which return array which will contains a strucutre of this tree-menu, table example: ID Parent Name -- -- -- 1 0 Components 4 1 Main boards 5 1 HD 7 5 IDE 8 5 SCSI and result: $array = Array( id = 1, name = Components, sub = array( id = 4, name = Mainboards, sub = no_array (no sub pages)), array( id = 5, name = HD, sub = Array( id = 7, name = IDE, sub = no_array (no sub pages)), Array( id = 8, name = SCSI, sub = no_array (no sub pages)) ) ); an so on, source table has got about 300 items, so i need function which make an array for next work with this tree structure. thanks a lot for some help! jiri.nemec at menea.cz http://www.menea.cz ICQ: 114651500 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] phpmyadmin duplication of sql
have you attempted to simply create the table and column using the sql text box (ie not using the create table interface)? eg pasting and submitting something like: CREATE TABLE t2 ( y varchar(5) ) TYPE=MyISAM; (I appreciate this does not address the reason behind the actual problem you are having but it should get the job done) David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Newbie Security Questions...
on 25/02/03 1:10 PM, Miguel Angelo ([EMAIL PROTECTED]) wrote: From what i have studid the session management, were you start a session id, and can put in several variables... My question is this, this variables remain were ? on the user browser (cookies, url enconding ?) or does the user just receive the single session id, and the rest remain on the server ? This is a important security consideration for me. The session ID is stored on the browser (either with cookies or URL). The session var/value pairs are stored on the server. Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to get tree structure into an array?
At 11:16 25-2-03, you wrote: Hi all! i have to solve one problem, but i have no idea how to make this. I have got a tree strucutre in mysql table, id - parent - name. I need make function, which return array which will contains a strucutre of this tree-menu, table example: ID Parent Name -- -- -- 1 0 Components 4 1 Main boards 5 1 HD 7 5 IDE 8 5 SCSI and result: $array = Array( id = 1, name = Components, sub = array( id = 4, name = Mainboards, sub = no_array (no sub pages)), array( id = 5, name = HD, sub = Array( id = 7, name = IDE, sub = no_array (no sub pages)), Array( id = 8, name = SCSI, sub = no_array (no sub pages)) ) ); an so on, source table has got about 300 items, so i need function which make an array for next work with this tree structure. thanks a lot for some help! jiri.nemec at menea.cz http://www.menea.cz ICQ: 114651500 hi jiri, i found this an interesting question, so i tried to think up some rough function to do it. But while writing that, i wondered why you wanted to make the array with the structure you propose. Are you sure this is the easiest way to do it? The problem with your proposal is in my eyes that for instance the SCSI name will be in $array['sub']['sub']['sub']['name']; So i stopped trying to finish this function because my problem is i cannot think of an elegant way to indicate where the subarray should be glued to. The rough idea of this could be an iterative function that does a query every time: function buildtree($parentID=0, $arrayposition) { global $Tree; $result=query(SELECT ID, Parent,Name FROM sourcetable WHERE Parent=$parentID) or die('error:'.mysql_error()); walkthrough $result //use your favourite loop to go through the result set { $branch=array($ID,$Name, 'sub'= (buildtree( $ID, $arrayposition )) ); } return $branch; } It may be quicker to just load in the entire table in a simpe array in the same format as the table, and then use it in a smart way. So q: could you elaborate on the why of the array structure you proposed? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] explode( , $pizza)
Hi, i found something like: var s = This,is,a,String; lenght = s.lenght; document.write(s.bold()); t = s.substring(2,4); a = s.split(,); // This line is the most interesting one ;)) document.write(a[1]); // should write the word 'is' Dont know if it works, i just looked in one of my old books. The Book where i found the answer is from O'Reilly: Javascript the defenetive reference or some like that, another very very good book is Dynamic HTML from O'Reilly, you should find all infor- mation you need there. Good luck! Sascha - Original Message - From: John Taylor-Johnston [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 7:21 AM Subject: [PHP] explode( , $pizza) Off topic :) ? Anyone know how to explode using javascript? $pieces = explode( , $pizza); John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] explode( , $pizza)
The following example illustrates the use of the split method. function SplitDemo(){ var s, ss; var s = The rain in Spain falls mainly in the plain.; // Split at each space character. ss = s.split( ); return(ss); } HTH t. -Message d'origine- De : John Taylor-Johnston [mailto:[EMAIL PROTECTED] Envoye : mardi 25 fevrier 2003 07:22 A : [EMAIL PROTECTED] Objet : [PHP] explode( , $pizza) Off topic :) ? Anyone know how to explode using javascript? $pieces = explode( , $pizza); John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Zend Encoder
Hi, Allow me to clear the air: 1. Zend does not have a way to decode a php file that was encoded using Zend Encoder. (For those of you paying attention to details, note the word decode, not decrypt. Zend Encoder does not encrypt. US gov't lawyers, please take note :) 2. Even the inherent knowledge that Zend has about our own product would not enable us to access encoded software. At most, we theoretically could develop code that could access some of the string elements in a script, but definitely not any actual code. (As a comparison, it would be like looking at a .EXE file in Windows, but even more convoluted.) Needless to say, even this minor capability has never and will never be developed or utilized by Zend. 3. Zend Encoder is the most secure way to deliver php code. That said, no protection scheme is absolutely 100% protected. Brad __ Brad Young Director, Product Marketing [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] www.zend.com http://www.zend.com Zend - The PHP Company -Original Message- From: Thomas Johnsson [mailto:[EMAIL PROTECTED] Sent: Monday, February 24, 2003 6:51 PM To: [EMAIL PROTECTED] Subject: [PHP] Zend Encoder This might sound a bit paranoid, but since I don't know how it works, i'll ask anyway. If I encrypt a file using the Zend Encoder, is there anyone at zend who can view it, or it it an unreversable encryption? // Thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Live chat screen
Try to take a look at PHP Socketprogramming and Flash XML Sockets, this is one of the most usable ways of handling things like that. - Original Message - From: Sami Kyösti [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 24, 2003 2:34 PM Subject: [PHP] Live chat screen Hi! Is it possible to create a chat screen that updates screen in some kind of loop from the database? So if someone sends a message to database it immediately shows on chat screen? Kind regards, Sami -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] reminder mail when date is within a month of today.
Thanks for the quick response. Just to clarify: $query=mysql_query(select * from TableName where month(FieldNameForDate)=month(FieldOfDate)+1); Which one of the dates in your query is the system's date and which is the one from the db? Also, I need not just the ones that are true, but also the ones that are already past, so I presume you should have a then? On Tue, 2003-02-25 at 12:10, Sunfire wrote: well... $query=mysql_query(select * from TableName where month(FieldNameForDate)=month(FieldOfDate)+1); that should do it.. or at least it does on mine anyways... - Original Message - From: Petre Agenbag [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 4:07 AM Subject: [PHP] reminder mail when date is within a month of today. HI I'm having a bad thinking day. I know it's going to be a very easy solution, but please humour me. I have a mysql table with a bunch of subscribers and the date that they subscribed. I want to query the table to find all the subscribers who will come up for renewal within the current month. So, each time I access the page, it must generate a table with those who's subscription is going to expire in this month, as well as those who might already be past the renewal date. I can handle the generation of the table and all, I'm just not coping with the query string. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to get tree structure into an array?
the longer i stare at it the more i think it may do the job. i'm not sure. expecially about the 'sub'=buildtree($ID) part. function buildtree($parentID=0) { $result=query(SELECT ID, Parent,Name FROM sourcetable WHERE Parent=$parentID) or die('error:'.mysql_error()); walkthrough $result //use your favourite loop to go through the result set, make fields available as e.g. $ID and $Name { if ($ID==0) {echo 'loop danger, exiting';exit();} $branch[]=array($ID,$Name, 'sub'= (buildtree( $ID)) ); } return $branch; } It should iteratively call itself, adding the branches, untill it exhausted all branches, then finally return the entire array. You might like to check Google for iterative functions in PHP with arrays. At 12:09 25-2-03, Chris Hayes wrote: At 11:16 25-2-03, you wrote: Hi all! i have to solve one problem, but i have no idea how to make this. I have got a tree strucutre in mysql table, id - parent - name. I need make function, which return array which will contains a strucutre of this tree-menu, table example: ID Parent Name -- -- -- 1 0 Components 4 1 Main boards 5 1 HD 7 5 IDE 8 5 SCSI and result: $array = Array( id = 1, name = Components, sub = array( id = 4, name = Mainboards, sub = no_array (no sub pages)), array( id = 5, name = HD, sub = Array( id = 7, name = IDE, sub = no_array (no sub pages)), Array( id = 8, name = SCSI, sub = no_array (no sub pages)) ) ); an so on, source table has got about 300 items, so i need function which make an array for next work with this tree structure. thanks a lot for some help! jiri.nemec at menea.cz http://www.menea.cz ICQ: 114651500 hi jiri, i found this an interesting question, so i tried to think up some rough function to do it. But while writing that, i wondered why you wanted to make the array with the structure you propose. Are you sure this is the easiest way to do it? The problem with your proposal is in my eyes that for instance the SCSI name will be in $array['sub']['sub']['sub']['name']; So i stopped trying to finish this function because my problem is i cannot think of an elegant way to indicate where the subarray should be glued to. The rough idea of this could be an iterative function that does a query every time: It may be quicker to just load in the entire table in a simpe array in the same format as the table, and then use it in a smart way. So q: could you elaborate on the why of the array structure you proposed? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] creating flat versions of php pages
alright mate, I've never used php or perl to trawler through a site like that before, although I'm sure it is possible, what with have done is made a perl script to create static html pages with a template text file and inserting the relevant information on the page from the database, I'm guessing you are using a database to make the dynamic pages anyway, so it is simply a case of replacing some text in a standard file and writing it to a page name you decide. so example code is below (Some of the text has been replaced): #!/usr/bin/perl #use strict; use DBI; my $fileName; my $title; my $body; my $desc; my $keywords; my $htmlCode; my $htmlCodeNew; my $dbh; my $sth; my $otbl; my $otblt; my $ctbl; my $dateser; my $day; my $daytype; my $month; my $siteDir; $siteDir = the directory on the server your site is stored; ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); $day = (Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday)[$wday]; if ($mday == 1) {$daytype = st} elsif ($mday == 2) {$daytype = nd} elsif ($mday == 3) {$daytype = rd} else {$daytype = th} $year = ($year + 1900); $month = (January,February,March,April,May,June,July,August,September,October,Novembe r,December)[$mon]; $fileName = ''; $title = ''; $body = ''; $htmlCode = ''; $htmlCodeNew = ''; $dateser = $day, $mday$daytype $month $year; $otbl = TRTD width=10/TDTD; $otblt = TRTD width=10/TDTD class=title2; $ctbl = /TDTD/TD/TR\n; open (standardHTML, text/page.txt) or die Can't Open Standard HTML File\r\n; ($dev, $ino, $mode, $nLink, $uid, $gid, $rdev, $size, $atime, $mtime, $ctime, $blksize, $blocks) = stat standardHTML; read(standardHTML, $htmlCode, $size); close(standardHTML); $dbh = DBI-connect ( dbi:Pg:dbname=Welcome-SW, username, password); if ( !defined $dbh ) { die Cannot connect to database!\n; } $sth = $dbh-prepare(SELECT * FROM companies); if ( !defined $sth ) { die Cannot prepare statement: $DBI::errstr\n; } $sth-execute; my($id, $name, $address1, $address2, $town, $pcode, $county, $phone, $fax, $domain, $email, $contact, $description, $type, $level); $sth-bind_columns(\$id, \$name, \$address1, \$address2, \$town, \$pcode, \$county, \$phone, \$fax, \$domain, \$email, \$contact, \$description, \$type, \$level); while( $sth-fetch() ) { $htmlCodeNew = ''; $body = 'BR'; $title = ''; $fileName = ''; $keywords = ''; $desc = ''; $fileName = $siteDir.places/$id.htm; $title = $name, $city, $county, site title; if (open (Picture, $siteDir/images/places/$id.jpg)) { close(Picture); $body = $body.$otblt $name/TDTD rowspan=\6\IMG SRC=\/images/places/$id.jpg\ WIDTH=200 HEIGHT=140 BORDER=0 ALT=\$name\ ALIGN=RIGHT/TD/TR\n; } else { $body = $body.$otblt $name $ctbl; } if ($address1 ne '') { $body = $body.$otbl $address1BR\n; } else { $body = $body.$otbl\n; } if ($address2 ne '') { $body = $body.$address2BR\n; } if ($city ne '') { $body = $body.$cityBR\n; } if ($pcode ne '') { $body = $body.$pcode\n; $body = $body. \(A HREF=\http://uk.multimap.com/p/browse.cgi?pc=.$pcode.\scale=1\; target=\_blank\MAP/A\)\nBR\n; } if ($county ne '') { $body = $body.$county; } if ($address1 ne '') {$body = $body.$ctbl $otbl $ctbl; } if ($phone ne '') { $body = $body.$otbl Tel: $phone $ctbl; } if ($fax ne '') { $body = $body.$otbl Fax: $fax $ctbl; } if ($email ne '') { $body = $body.$otbl SCRIPT\nfunction email()\n{\nvar win2 = window.open(\/cgi-bin/mail.cgi?id=$id\, \second\, \resizable=no,height=270,width=450\);\n}\n/SCRIPT\nIMG SRC=\/images/email.gif\ onClick=\email()\ $ctbl; } if ($domain ne '') { $body = $body.$otbl A href=\/cgi-bin/site.cgi?id=$id\ target=\_blank\IMG SRC=\/images/website.gif\ border=\0\/a $ctbl; } $body = $body.$otbl SCRIPT\nfunction comm()\n{\nvar win2 = window.open(\/cgi-bin/comm.cgi?id=$id\, \second\, \resizable=no,height=270,width=450\);\n}\n/SCRIPT\nIMG SRC=\/images/comment.gif\ onClick=\comm()\ $ctbl; if ($description ne '') { $body = $body.$otbl $description $ctbl; } $sth2 = $dbh-prepare(SELECT commauthorname, commcomment, commrating, commdate FROM comments WHERE compid='$id' and commApproved='1'); if ( !defined $sth2 ) { die Cannot prepare statement: $DBI::errstr\n; } $sth2-execute; my($auth_name, $comment, $rating, $commdate); $sth2-bind_columns(\$auth_name, \$comment, \$rating, \$commdate); while( $sth2-fetch() ) { $commdate =~ /^([0-9]{4})-([0-9]{2})-([0-9]{2})/; $commmonth = (0,January,Februrary,March,April,May,June,July,August,September,October,Nove mber,December)[$2]; $commyear = $1; if ($3 == '01') {$cdaytype = st;} elsif ($3 == '02') {$cdaytype = nd;} elsif ($3 == '03') {$cdaytype = rd;} else {$cdaytype = th;} $commdateser = $3$cdaytype $commmonth $commyear; $comment =~ s/\. /\.\rBR\n/g ; $comment =~ s/\, /\,\rBR\n/g ; $comment =~ s/\! /\!\rBR\n/g ; $comment =~ s/\? /\?\rBR\n/g ; $comment = \n.$comment.\n; if ($auth_name eq '')
[PHP] FormatDateTime in PHP
Please, How do I make to format my date in the my format? For Example: ## I filter $filter = SELECT DTVECTO FROM CLIENTS; $result = mysql_query($filter); $rows = mysql_num_rows($result); while($rows = mysql_fetch_array($result)) { ## I get date to the data base $my_date = $rows[DTVECTO]; ## I print print($my_date); } I want to show my date in format: 01/12/2003 (dd/mm/). For Example DateValue 01/09/2003 $ 50.00 01/10/2003 $ 60.00 01/11/2003 $ 70.00 thanks
Re: [PHP] FormatDateTime in PHP
At 13:25 25-2-03, you wrote: Please, How do I make to format my date in the my format? For Example: you forgot to tell how the date in the database is formatted, that is quite important. did you read the php manual on date() ? http://www.php.net/manual/en/function.date.php ## I filter $filter = SELECT DTVECTO FROM CLIENTS; $result = mysql_query($filter); $rows = mysql_num_rows($result); while($rows = mysql_fetch_array($result)) { ## I get date to the data base $my_date = $rows[DTVECTO]; ## I print print($my_date); } I want to show my date in format: 01/12/2003 (dd/mm/). For Example DateValue 01/09/2003 $ 50.00 01/10/2003 $ 60.00 01/11/2003 $ 70.00 thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] FormatDateTime in PHP
No don't use the PHP date function, MySQL has an inbuilt function exactly for this. See DATE_FORMAT http://www.mysql.com/doc/en/Date_and_time_functions.html HTH Adrian www.phpscriptsearch.com -Original Message- From: Chris Hayes [mailto:[EMAIL PROTECTED] Sent: 25 February 2003 12:32 To: [EMAIL PROTECTED] Subject: Re: [PHP] FormatDateTime in PHP At 13:25 25-2-03, you wrote: Please, How do I make to format my date in the my format? For Example: you forgot to tell how the date in the database is formatted, that is quite important. did you read the php manual on date() ? http://www.php.net/manual/en/function.date.php ## I filter $filter = SELECT DTVECTO FROM CLIENTS; $result = mysql_query($filter); $rows = mysql_num_rows($result); while($rows = mysql_fetch_array($result)) { ## I get date to the data base $my_date = $rows[DTVECTO]; ## I print print($my_date); } I want to show my date in format: 01/12/2003 (dd/mm/). For Example DateValue 01/09/2003 $ 50.00 01/10/2003 $ 60.00 01/11/2003 $ 70.00 thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP PDF attachment
Can anyone help. I have code which will send email with an attachment via PHP however when it arrives to the destination email the PDF file is empty. I have come across a few emails where people have had the same problem but no answers. Any ideas? Using the normal mail() function with the code below: $to = $email; $from= [EMAIL PROTECTED]; $subject = Thank you for downloading the document; $message = Dear $username,br Thank you for taking the time to subscribe for our free document.br Please find the document attached to this email.; // Obtain file upload vars $fileatt = db/; // Location of file on server $fileatt_type = application/pdf;// Type of file being sent $fileatt_name = webopman.pdf;// Name of file $headers = From: $from; // If the file exists... if (file_exists($fileatt)) { // Read the file to be attached ('rb' = read binary) $file = fopen($fileatt,'rb'); $data = fread($file,filesize($fileatt)); fclose($file); // Generate a boundary string $semi_rand = md5(time()); $mime_boundary = ==Multipart_Boundary_x{$semi_rand}x; // Add the headers for a file attachment $headers .= \nMIME-Version: 1.0\n . Content-Type: multipart/mixed;\n . boundary=\{$mime_boundary}\; // Add a multipart boundary above the plain message $message = This is a multi-part message in MIME format.\n\n . --{$mime_boundary}\n . Content-Type: text/html; charset=\iso-8859-1\\n . Content-Transfer-Encoding: 7bit\n\n . $message . \n\n; // Base64 encode the file data $data = chunk_split(base64_encode($data)); // Add file attachment to the message $message .= --{$mime_boundary}\n . Content-Type: {$fileatt_type};\n . name=\{$fileatt_name}\\n . //Content-Disposition: attachment;\n . // filename=\{$fileatt_name}\\n . Content-Transfer-Encoding: base64\n\n . $data . \n\n . --{$mime_boundary}--\n; } $ok = @mail($to, $subject, $message, $headers); Real stuck here. Steve Jackson Web Developer Viola Systems Ltd. http://www.violasystems.com [EMAIL PROTECTED] Mobile +358 50 343 5159 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Fputs including php syntax?
Is it possible to use 'fputs' to write to a text file and include php code within it? That way the generated page will have working php syntax within. How do I make it so the php code is treated like text and not code? -- Mike Yrabedra President 323, Inc. Home of The MacDock and The MacSurfshop [http://macdock.com] : [http://macsurfshop.com] VOICE: 770.382.1195 iChat/AIM: ichatmacdock ___ Whatever you do, work at it with all your heart, as working for the Lord, not for men. ~Colossians 3:23 {{{ -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] FormatDateTime in PHP
thanks to all Adrian Portsmouth [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] No don't use the PHP date function, MySQL has an inbuilt function exactly for this. See DATE_FORMAT http://www.mysql.com/doc/en/Date_and_time_functions.html HTH Adrian www.phpscriptsearch.com -Original Message- From: Chris Hayes [mailto:[EMAIL PROTECTED] Sent: 25 February 2003 12:32 To: [EMAIL PROTECTED] Subject: Re: [PHP] FormatDateTime in PHP At 13:25 25-2-03, you wrote: Please, How do I make to format my date in the my format? For Example: you forgot to tell how the date in the database is formatted, that is quite important. did you read the php manual on date() ? http://www.php.net/manual/en/function.date.php ## I filter $filter = SELECT DTVECTO FROM CLIENTS; $result = mysql_query($filter); $rows = mysql_num_rows($result); while($rows = mysql_fetch_array($result)) { ## I get date to the data base $my_date = $rows[DTVECTO]; ## I print print($my_date); } I want to show my date in format: 01/12/2003 (dd/mm/). For Example DateValue 01/09/2003 $ 50.00 01/10/2003 $ 60.00 01/11/2003 $ 70.00 thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 25 Feb 2003 14:37:45 -0000 Issue 1904
php-general Digest 25 Feb 2003 14:37:45 - Issue 1904 Topics (messages 137026 through 137068): Re: Passing emails to database 137026 by: Justin French Re: PHP Script 137027 by: Leo Spalteholz 137029 by: Stephen Craton Re: PHP_SELF syntax 137028 by: Justin French derive function that called a function? 137030 by: Shawn McKenzie Re: preg_replace with /e modifier 137031 by: John W. Holmes Re: button and /button 137032 by: John W. Holmes 137034 by: Sunfire Re: Live chat screen 137033 by: Jason Sheets 137059 by: Sascha Braun having php auto load a page 137035 by: Antoine 137036 by: Matt Honeycutt dummy variable 137037 by: Sebastian 137038 by: John W. Holmes explode( , $pizza) 137039 by: John Taylor-Johnston 137056 by: Sascha Braun 137057 by: Tim Re: Memory used by script... 137040 by: Lord Loh. Re: Page per page 137041 by: Adriaan Nel Using a PHP mime email attachment 137042 by: Steve Jackson Re: cookie problemes 137043 by: kale array_filter 137044 by: David Otton .NET to PHP+NuSOAP 137045 by: Hilmi Hilmiev Re: cookie problemes (solved with javascript) 137046 by: kale 137049 by: Awlad Hussain reminder mail when date is within a month of today. 137047 by: Petre Agenbag 137050 by: Sunfire 137060 by: Petre Agenbag reminder mail cont. 137048 by: Petre Agenbag Newbie Security Questions... 137051 by: Miguel Angelo 137054 by: Justin French How to get tree structure into an array? 137052 by: Konference 137055 by: Chris Hayes 137061 by: Chris Hayes Re: phpmyadmin duplication of sql 137053 by: David Eisenhart Re: Zend Encoder 137058 by: Brad Young Re: creating flat versions of php pages 137062 by: Mark Cubitt FormatDateTime in PHP 137063 by: Skyhawk 137064 by: Chris Hayes 137065 by: Adrian Portsmouth 137068 by: Skyhawk PHP PDF attachment 137066 by: Steve Jackson Fputs including php syntax? 137067 by: MIKE YRABEDRA Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- ---BeginMessage--- Please keep the emails on-list, so that others can learn, and search the answers in the archive -- that's the whole point of the list. on 25/02/03 12:14 AM, Alberto Brea ([EMAIL PROTECTED]) wrote: Justin, Thanks for your answer The only real problem seems to be how to capture the different parts of an incoming email (from, date, message, etc) somehow into PHP variables. Did you even read the IMAP page on php.net? http://www.php.net/manual/en/ref.imap.php I doubt it, because it clearly shows a list of imap functions, including imap_body(), imap_subject(), etc etc. Please at least do SOME research before asking questions. Then you INSERT them into the (e.g.MySQL) database or do anything else with them. Is there an easy way to do this? I have never used IMAP functions, but I can learn if this is the way. I doubt you've got imap functions installed at the moment... it requires extra components, so that may be your first issue. As to your comment, my PHP is installed as an Apache module (on Windows), not as CGI. Well then that rules out one of the two options (using .forward to pass the emails to a PHP script). You'll need either PHP as CGI, OR the IMAP functions AFAIK -- your choice. Justin ---End Message--- ---BeginMessage--- Hm. Looks pretty nice. Cool page and the demos are pretty slick. But I can't really see what it would be useful for. Maybe I missed something but it seems to be a sort of InstallShield for php scripts. While this sounds like a good idea, its actually quite useless. What is normally involved in installing a php script? If its simple you just upload it to the server and if its complex you upload it and then do some script specific configuration. So what exactly does this installer of yours do? Apparently it just runs through a few screens, yet does nothing constructive, and then starts the main script. So you set some variables but where are these used? The only configuration a php script may need will be so specific that a general interface cannot handle it. Leo PS: Microsoft copyrighted images. Commercial app. Bad idea. Seriously. On February 24, 2003 12:05 pm, Stephen Craton wrote: It may do some good to give you the URL to the website, won't it? Sorry... http://piw.melchior.us Thanks, Stephen Craton http://www.melchior.us - Original Message - From: Stephen Craton [EMAIL PROTECTED] To: PHP List [EMAIL PROTECTED] Sent: Monday, February 24, 2003 3:04 PM Subject:
[PHP] Send mail with hidden copy.
How do I make to I send mail with hidden copy? What the correct sintax?? thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Fputs including php syntax?
fput($fp, '? phpinfo(); ?'); should work else try fput($fp, '' . '?' . \n); fput($fp, 'phpinfo() . \n); fput($fp, '?' . '' . \n); Greetz At 09:27 25-2-03 -0500, MIKE YRABEDRA wrote: Is it possible to use 'fputs' to write to a text file and include php code within it? That way the generated page will have working php syntax within. How do I make it so the php code is treated like text and not code? -- Mike Yrabedra President 323, Inc. Home of The MacDock and The MacSurfshop [http://macdock.com] : [http://macsurfshop.com] VOICE: 770.382.1195 iChat/AIM: ichatmacdock ___ Whatever you do, work at it with all your heart, as working for the Lord, not for men. ~Colossians 3:23 {{{ -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Send mail with hidden copy.
add an etra header (see mail function) and use the bcc: email header Gr At 11:39 25-2-03 -0300, Skyhawk wrote: How do I make to I send mail with hidden copy? What the correct sintax?? thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] editing field value using selectbox with options
Hello friends. In an edit form, I need the following select box. select name=MemPicSalutation id=MemPicSalutation option value=Mr.Mr./option option value=Ms.Ms./option option value=Mrs.Mrs./option option value=Dr.Dr./option option value=Capt.Capt./option /select My problem is : since I am getting the selected value from the database and showing it (for editing the option value and later updating), I do not know how to show the selected value(value of the option from the existing field value in the database) in the edit form(when opening the edit form) along with the other option values. Can someone help? I am using PHP and $row. Thanks denis
[PHP] Re: preg_replace with /e modifier
Thanks John! Sorry to pester you any more, but how can I match all Ascii characters? I can't seem to find it on 'http://www.php.net/manual/en/pcre.pattern.syntax.php' (The period is matching Ascii characters and giving me this) Unexpected character in input: ' ' (ASCII=23) state=2 Also how many ascii characters are there? Would it be feasible to add them into the array? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] editing field value using selectbox with options
$titles = array(Mr.,Ms.,Mrs.,Dr.,Capt.); print select name=\MemPicSalutation\ id=\MemPicSalutation\\n; foreach($titles as $value) { if($row['title]==$value) $sel=SELECTED; else unset($sel); print option value=\$value $sel$value/option\n; } print /select\n; - Original Message - From: Denis L. Menezes [EMAIL PROTECTED] To: PHP general list [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 9:08 AM Subject: [PHP] editing field value using selectbox with options Hello friends. In an edit form, I need the following select box. select name=MemPicSalutation id=MemPicSalutation option value=Mr.Mr./option option value=Ms.Ms./option option value=Mrs.Mrs./option option value=Dr.Dr./option option value=Capt.Capt./option /select My problem is : since I am getting the selected value from the database and showing it (for editing the option value and later updating), I do not know how to show the selected value(value of the option from the existing field value in the database) in the edit form(when opening the edit form) along with the other option values. Can someone help? I am using PHP and $row. Thanks denis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] getting data from a HTML table
I use a website to get data that I would like with the following code: !--- code start --- function StockLookup($company) { $LookupUrl = http://quote.yahoo.com/l?s=$company;; $Results = implode('', file($LookupUrl)); list($split1, $split2) = split('!--- Background table---', $Results); list($Final, $split3) = split('!--- End of Background Table ---', $split2); print $Final\n; } !--- code end --- The problem is that I get the HTML left after splitting up the page is in a HTML table. The table has some columns and rows I do not want. What is the easiest way to extract the data I want. The table contains 5 columns, but I only want the first 4. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Processing Form Input and MySQL - Best Practices?
I was hoping someone could point me to an article about some recommended best practices with respect to taking form data (entered by a user), storing it in MySQL, extracting it again and displaying it back on a web page. In particular, I want to make sure someone isn't entering data that could potentially be harmful when it is displayed however I also want to allow links stored in the database to be displayed correctly (as a valid link) when displayed on a web page. Thanks, Mike - mike_walsh at mindspring dot com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] page shown, but browser keeps doing something
hi list, i'm working on my local WAMP on a PHP module to fit in a cms, and i fail to understand what is taking the browser so much time _after_ the page is completely visible. Statusbar says still loading the page. Javascript links and the refresh function of the browser are reluctant. When i stop downloading, and look at the source, the page is in untill the last tag. This is what i checked: * with Phoenix (small version of mozilla) i loked at 'page info': as far as i can tell all images seem to exist. * the table and page structure is ok, Dreamweaver has no complaints. * it happens also when i turn off javascript in the internet explorer, so it is not a javascript on-the-run. If i save the entire page to disk and open it as a file:, it is very quick. Any ideas where to look now? Chris PS OT but while i tried to debug this situation, i changed several IE security settings and options and now it wants to download files from localhost in stead of show them. it starts asking whether want to open it, then choice open/save and then it asks with what i want to open it. Pretty annoying! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: new to php, need help..
Jonathan [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] all the suggestions didn't work though, could it be as what chris said, my IE doesn't support php? PHP is server-side. IE has no issues whatsoever with loading HTML generated from PHP. The PHP constructs are dealt with on the server-side and never make it to the client. Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] My server cannot displayed a php extension file.
Hi All; I am new to PHP.I have manually installed it to my Windows 2000 server that runs on IIS 5.0 . But also it included a .php file if i write correct url it could not displayed the file on E5.5. What is the problem? Any recomendation will be appreciated. Thanks. Mahmut
RE: [PHP] page shown, but browser keeps doing something
are you preloading graphics using JavaScript? * Cal Evans * Stay Plugged Into Your Audience * http://www.christianperformer.com -Original Message- From: Chris Hayes (SENSE) [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 9:13 AM To: [EMAIL PROTECTED] Subject: [PHP] page shown, but browser keeps doing something hi list, i'm working on my local WAMP on a PHP module to fit in a cms, and i fail to understand what is taking the browser so much time _after_ the page is completely visible. Statusbar says still loading the page. Javascript links and the refresh function of the browser are reluctant. When i stop downloading, and look at the source, the page is in untill the last tag. This is what i checked: * with Phoenix (small version of mozilla) i loked at 'page info': as far as i can tell all images seem to exist. * the table and page structure is ok, Dreamweaver has no complaints. * it happens also when i turn off javascript in the internet explorer, so it is not a javascript on-the-run. If i save the entire page to disk and open it as a file:, it is very quick. Any ideas where to look now? Chris PS OT but while i tried to debug this situation, i changed several IE security settings and options and now it wants to download files from localhost in stead of show them. it starts asking whether want to open it, then choice open/save and then it asks with what i want to open it. Pretty annoying! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] My server cannot displayed a php extension file.
At 16:54 25-2-03, you wrote: I am new to PHP.I have manually installed it to my Windows 2000 server that runs on IIS 5.0 . But also it included a .php file if i write correct url it could not displayed the file on ÝE5.5. What is the problem? * does the server work with html files? * which installation instructions did you follow? * what url did you use (please show the complete url) and what did you see? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Send mail with hidden copy.
Or just make another mail() function with new variables. Denis - Original Message - From: Wico de Leeuw [EMAIL PROTECTED] To: Skyhawk [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 10:41 PM Subject: Re: [PHP] Send mail with hidden copy. add an etra header (see mail function) and use the bcc: email header Gr At 11:39 25-2-03 -0300, Skyhawk wrote: How do I make to I send mail with hidden copy? What the correct sintax?? thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] server problem?
i made some adjustments to the internet settings via internet explorer on win98, and now when i try to access a file on the localhost (apache) i get with every browser a file download dialog. ie's dialog says when i try http://137.224.157.67 (used to work) filename 137.224.157[1] filetype 157[1] type from: 137.224.157.67 when i try http://localhost (used to work) filename localhost filetype from: localhost and opera said it was of the text/x-server-something type What on earth did i do wrong? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] page shown, but browser keeps doing something
At 17:01 25-2-03, you wrote: are you preloading graphics using JavaScript? well, i turned javascript off so that can't be it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Splitting a date string
Hello friends, I have a date string in the format -mm-dd in the MySQL database. In my edit form I need to split this date string to get $Year as , $month as mm and $day as dd . Can someone please help me with the code? Thanks Denis
[PHP] Re: Memory exceeding
Markas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi... I got a big site, which is not very well constructed inside, and the script began to throw (rather often, but NOT always) a fatal error Fatal error: Allowed memory size of 8388608 bytes exhausted , every time in different places. I wonder how should I debug that, as there is pretty much code inside, and I hardly got aqcuainted with it in a whole. SO THE QUESTION: Are there any functions or smth., to check, how much memory is used at some particular moment of execution of the script??? If I could state, that for example after some class instantiaton memory usage greatly increases, I would be able to localise the problem. I would first guess that there's a session-related memory creep issue. I would check how much data is being placed into session vars and how long sessions are being cached. Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Splitting a date string
At 17:13 25.02.2003, Denis L. Menezes said: [snip] I have a date string in the format -mm-dd in the MySQL database. In my edit form I need to split this date string to get $Year as , $month as mm and $day as dd . [snip] list($y,$m,$d) = explode('-',$date); -- O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] server problem?
At 17:06 25-2-03, you wrote: i made some adjustments to the internet settings via internet explorer on win98, and now when i try to access a file on the localhost (apache) i get with every browser a file download dialog. ie's dialog says when i try http://137.224.157.67 (used to work) filename 137.224.157[1] filetype 157[1] type from: 137.224.157.67 when i try http://localhost (used to work) filename localhost filetype from: localhost additionaly when i try http://localhost/index.html, this file is copied to C:\WINDOWS\Temporary Internet Files\Content.IE5\SDYFWTA7\index[1].html and shown from there in a new browser window and opera said it was of the text/x-server-something type What on earth did i do wrong? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Trouble Passing Variables On Test Server
Hi guys, I have installed a test sever from those guys are FirePages.com.au on my Windows XP Machine at home to test websites on http://localhost. The only problem is the forms are not passing on the variables. I have used the same scripts on a webserver and they work fine. Could anyone tell me what I should check so that these variables are passed thru? Has anybody come across this problem before? Regards, Ian. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Trouble Passing Variables On Test Server
At 17:49 25.02.2003, Randum Ian said: [snip] Hi guys, I have installed a test sever from those guys are FirePages.com.au on my Windows XP Machine at home to test websites on http://localhost. The only problem is the forms are not passing on the variables. I have used the same scripts on a webserver and they work fine. Could anyone tell me what I should check so that these variables are passed thru? Has anybody come across this problem before? [snip] Check your php.ini for register_globals. This defaults to off in the later versions of PHP (and should be left as-is). Use the $_REQUEST, $_GET, or $_POST superglobals to access form data. You may also extract() these variables, but do yourself a favour and do some checks before that no unintended variables have been passed. -- O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Trouble Passing Variables On Test Server
At 17:49 25-2-03, you wrote: Hi guys, I have installed a test sever from those guys are FirePages.com.au on my Windows XP Machine at home to test websites on http://localhost. The only problem is the forms are not passing on the variables. I have used the same scripts on a webserver and they work fine. Could anyone tell me what I should check so that these variables are passed thru? Has anybody come across this problem before? The most likely reason is that PHP has more secure way of making form variables available since PHP 4.10. To use the old way i think you had to edit php.ini and set register_globals=On. Check this by having a page after a form with element name 'test' with this line echo $_POST['test']; because that is the new way. Explained on http://www.php.net/release_4_1_0.php [gee, the net is slow now, can all these Americans please go back to bed :) ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Zend Encoder
1. Zend does not have a way to decode a php file that was encoded using Zend Encoder. (For those of you paying attention to details, note the word decode, not decrypt. Zend Encoder does not encrypt. US gov't lawyers, please take note :) Are you not allowed, according to US laws, to encrypt files using something like the Zend Encoder, if that was a feature? 2. Even the inherent knowledge that Zend has about our own product would not enable us to access encoded software. At most, we theoretically could develop code that could access some of the string elements in a script, but definitely not any actual code. (As a comparison, it would be like looking at a .EXE file in Windows, but even more convoluted.) Needless to say, even this minor capability has never and will never be developed or utilized by Zend. So, an encoded script does not decode to plain text and then execute? 3. Zend Encoder is the most secure way to deliver php code. That said, no protection scheme is absolutely 100% protected. What is the acual difference between Zend Encoder and say ioncube (http://www.ioncube.com), security-wise? Thanks for clearing the air, and sorry for polluting it with more questions :) // Thomas -Original Message- From: Thomas Johnsson [mailto:[EMAIL PROTECTED] Sent: Monday, February 24, 2003 6:51 PM To: [EMAIL PROTECTED] Subject: [PHP] Zend Encoder This might sound a bit paranoid, but since I don't know how it works, i'll ask anyway. If I encrypt a file using the Zend Encoder, is there anyone at zend who can view it, or it it an unreversable encryption? // Thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] derive function that called a function?
This is not possible, but future version of zend engine should provide a function stack. Shawn McKenzie wrote: Is there any way to determine what function (if any) called a particular function??? Example: function myFuncA() { myFuncB(); } function myFuncB() { some stufff; } In myFuncB() can I find out that I was called by myFuncA()??? FYI... I am trying to write some code that integrates with other peoples' code and don't want to modify their functions (e.g. what args they call my function with). But in certain cases I need to take certain actions if my function was called by a particular function. TIA Shawn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Editors
HI Pierre et al On Sunday 23 February 2003 11:14, Pierre Vaudrey wrote: Hi, The site is http://www.maguma.com Pierre This interested me too. So I looked at the site but was only able to find an exe file. Do you know where I can get a Linux tar ball or RPM file? Thanks JIM -Message d'origine- De : Karl James [mailto:[EMAIL PROTECTED] Envoye : dimanche 23 fevrier 2003 10:19 A : [EMAIL PROTECTED] Objet : [PHP] Editors Anyone have the link on where I can download maguma php editor? Whatever the latest version is. I need if for my class. I tried to do a search on google and they are were dead links. Karl -- Jim Hatridge Linux User #88484 -- BayerWulf Linux System # 129656 The Recycled Beowulf Project Looking for throw-away or obsolete computers and parts to recycle into a Linux super computer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Editors
A search on rpmfind.net produced no results Perhaps it has not been ported to linux Quoting James Hatridge [EMAIL PROTECTED]: ### HI Pierre et al ### ### On Sunday 23 February 2003 11:14, Pierre Vaudrey wrote: ### Hi, ### ###The site is http://www.maguma.com ### ### Pierre ### ### This interested me too. So I looked at the site but was only able to find ### an ### exe file. Do you know where I can get a Linux tar ball or RPM file? ### ### Thanks ### ### JIM ### ### ### ### ### -Message d'origine- ### De : Karl James [mailto:[EMAIL PROTECTED] ### Envoye : dimanche 23 fevrier 2003 10:19 ### A : [EMAIL PROTECTED] ### Objet : [PHP] Editors ### ### Anyone have the link on where I can download maguma php editor? ### Whatever ### the latest version is. ### I need if for my class. ### I tried to do a search on google and they are were dead links. ### ### ### Karl ### ### -- ### Jim Hatridge ### Linux User #88484 ### -- ### BayerWulf ###Linux System # 129656 ### The Recycled Beowulf Project ### Looking for throw-away or obsolete computers and parts ###to recycle into a Linux super computer ### ### ### -- ### PHP General Mailing List (http://www.php.net/) ### To unsubscribe, visit: http://www.php.net/unsub.php ### ### -- Richard Whitney * Transcend Development Producing the next phase of your internet presence. [EMAIL PROTECTED] * http://xend.net* 602-971-2791 * * * * * *__** _/ \___ * * / *\** */ * * \ **/\_ |\ / \_ / \ / \/\ / \ /\ / \ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help me please
Hello all, I am having problems with a script. The script works great on one of my sights, however, when I transferred it to another site, it does not function. I contacted my hosting company (both sites are on the same server), they told me that I needed to check the script and that it has nothing to do with them, since they ran a test.php and it worked fine. Here is the script: ?PHP $ToEmail = [EMAIL PROTECTED]; $ToSubject = Flash Contact Form; $EmailBody = Sent By: $FirstName\nSenders Email: $Email\n\nMessage Sent:\n$ToComments\n; mail($ToName. .$ToEmail.,$ToSubject, $EmailBody, From: .$FirstName. .$Email.); ? Please if anyone knows anything about this stuff (Im a newbie to this) You help is greatly appreciated! Thanks in advance, mark johnson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Please help me with this .php file
Hello all, I am having problems with a script. The script works great on one of my sights, however, when I transferred it to another site, it does not function. I contacted my hosting company (both sites are on the same server), they told me that I needed to check the script and that it has nothing to do with them, since they ran a test.php and it worked fine. Here is the script: ?PHP $ToEmail = [EMAIL PROTECTED]; $ToSubject = Flash Contact Form; $EmailBody = Sent By: $FirstName\nSenders Email: $Email\n\nMessage Sent:\n$ToComments\n; mail($ToName. .$ToEmail.,$ToSubject, $EmailBody, From: .$FirstName. .$Email.); ? Please if anyone knows anything about this stuff (Im a newbie to this) You help is greatly appreciated! Thanks in advance, mark johnson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help please
Hello all, I am having problems with a script. The script works great on one of my sights, however, when I transferred it to another site, it does not function. I contacted my hosting company (both sites are on the same server), they told me that I needed to check the script and that it has nothing to do with them, since they ran a test.php and it worked fine. Here is the script: ?PHP $ToEmail = [EMAIL PROTECTED]; $ToSubject = Flash Contact Form; $EmailBody = Sent By: $FirstName\nSenders Email: $Email\n\nMessage Sent:\n$ToComments\n; mail($ToName. .$ToEmail.,$ToSubject, $EmailBody, From: .$FirstName. .$Email.); ? Please if anyone knows anything about this stuff (Im a newbie to this) You help is greatly appreciated! Thanks in advance, mark johnson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help please
Hello all, I am having problems with a script. The script works great on one of my sights, however, when I transferred it to another site, it does not function. I contacted my hosting company (both sites are on the same server), they told me that I needed to check the script and that it has nothing to do with them, since they ran a test.php and it worked fine. Here is the script: ?PHP $ToEmail = [EMAIL PROTECTED]; $ToSubject = Flash Contact Form; $EmailBody = Sent By: $FirstName\nSenders Email: $Email\n\nMessage Sent:\n$ToComments\n; mail($ToName. .$ToEmail.,$ToSubject, $EmailBody, From: .$FirstName. .$Email.); ? Please if anyone knows anything about this stuff (Im a newbie to this) You help is greatly appreciated! Thanks in advance, mark johnson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Editors
The download address is : http://www.maguma.com/products/download.php Pierre -Message d'origine- De : James Hatridge [mailto:[EMAIL PROTECTED] Envoyé : mardi 25 février 2003 15:40 À : Pierre Vaudrey; Karl James; [EMAIL PROTECTED] Objet : [PHP] Re: Editors HI Pierre et al On Sunday 23 February 2003 11:14, Pierre Vaudrey wrote: Hi, The site is http://www.maguma.com Pierre This interested me too. So I looked at the site but was only able to find an exe file. Do you know where I can get a Linux tar ball or RPM file? Thanks JIM -Message d'origine- De : Karl James [mailto:[EMAIL PROTECTED] Envoye : dimanche 23 fevrier 2003 10:19 A : [EMAIL PROTECTED] Objet : [PHP] Editors Anyone have the link on where I can download maguma php editor? Whatever the latest version is. I need if for my class. I tried to do a search on google and they are were dead links. Karl -- Jim Hatridge Linux User #88484 -- BayerWulf Linux System # 129656 The Recycled Beowulf Project Looking for throw-away or obsolete computers and parts to recycle into a Linux super computer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP] help me please
You don't have to break up the strings: mail($ToName $ToEmail,$ToSubject, $EmailBody, From: $FirstName $Email); What are values of $ToName and $FirstName? why did you submit tghis 3 times? - Original Message - From: bionicegg [EMAIL PROTECTED] To: Sent: Tuesday, February 25, 2003 11:38 AM Subject: [PHP] help me please Hello all, I am having problems with a script. The script works great on one of my sights, however, when I transferred it to another site, it does not function. I contacted my hosting company (both sites are on the same server), they told me that I needed to check the script and that it has nothing to do with them, since they ran a test.php and it worked fine. Here is the script: ?PHP $ToEmail = [EMAIL PROTECTED]; $ToSubject = Flash Contact Form; $EmailBody = Sent By: $FirstName\nSenders Email: $Email\n\nMessage Sent:\n$ToComments\n; mail($ToName. .$ToEmail.,$ToSubject, $EmailBody, From: .$FirstName. .$Email.); ? Please if anyone knows anything about this stuff (Im a newbie to this) You help is greatly appreciated! Thanks in advance, mark johnson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fwd: Re: [PHP] help please
There is no need to post this thrice. Anyway. What went wrong? Did you get an error message? Are both sites on the same machine? At 18:40 25-2-03, you wrote: Hello all, I am having problems with a script. The script works great on one of my sights, however, when I transferred it to another site, it does not function. I contacted my hosting company (both sites are on the same server), they told me that I needed to check the script and that it has nothing to do with them, since they ran a test.php and it worked fine. Here is the script: ?PHP $ToEmail = [EMAIL PROTECTED]; $ToSubject = Flash Contact Form; $EmailBody = Sent By: $FirstName\nSenders Email: $Email\n\nMessage Sent:\n$ToComments\n; mail($ToName. .$ToEmail.,$ToSubject, $EmailBody, From: .$FirstName. .$Email.); ? Please if anyone knows anything about this stuff (Im a newbie to this) You help is greatly appreciated! Thanks in advance, mark johnson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Uploading Images
Hey guys I need to make a place for people to upload images and then I need to make sure the file size is alright and the pixel size too... Could someone please send me in the right direction? -steven
[PHP] Re: help please
Please don't multi post. How you getting the $ToName $FirstName etc fields ? Are they submitted via a form? If so, check the register_globals setting on the server where it is not working. You need to set it on or use $_POST /$_GET variables. HTH R'twick Bionicegg [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello all, I am having problems with a script. The script works great on one of my sights, however, when I transferred it to another site, it does not function. I contacted my hosting company (both sites are on the same server), they told me that I needed to check the script and that it has nothing to do with them, since they ran a test.php and it worked fine. Here is the script: ?PHP $ToEmail = [EMAIL PROTECTED]; $ToSubject = Flash Contact Form; $EmailBody = Sent By: $FirstName\nSenders Email: $Email\n\nMessage Sent:\n$ToComments\n; mail($ToName. .$ToEmail.,$ToSubject, $EmailBody, From: .$FirstName. .$Email.); ? Please if anyone knows anything about this stuff (Im a newbie to this) You help is greatly appreciated! Thanks in advance, mark johnson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help please
Mark, you've GOT to give us something to work on. We're not ESP, well, at least I am not. Try debugging a bit. Echo all values just before you do the mail(), see whether they really are what you thought they were. Try a simple script that will only send a mail, take the example from the manual (www.php.net/mail) Try setting the error warning level high for a while, by adding this to the file: error_reporting (E_ALL); PS please keep the discussion in the list At 19:15 25-2-03, you wrote: Chris, Im so sorry about the posting three times, I didnt know how to do it, then I subscribed after I sent it twice. I cant figure out what is wrong with the script. I do not get an error message. Basically, I am suppsed to get an email with the info that the user entered. I get the email from http://www.bionicegg.com/html/Mail.html , but It doesnt work for http://www.nypalet.com/Mail.html . I do not know jack about PDP, I got the script from www.flashkit.com. Thanks so much for the response. Mark J - Original Message - From: Chris Hayes [EMAIL PROTECTED] To: bionicegg [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 1:07 PM Subject: Re: [PHP] help please There is no need to post this thrice. Anyway. What went wrong? Did you get an error message? Are both sites on the same machine? At 18:40 25-2-03, you wrote: Hello all, I am having problems with a script. The script works great on one of my sights, however, when I transferred it to another site, it does not function. I contacted my hosting company (both sites are on the same server), they told me that I needed to check the script and that it has nothing to do with them, since they ran a test.php and it worked fine. Here is the script: ?PHP $ToEmail = [EMAIL PROTECTED]; $ToSubject = Flash Contact Form; $EmailBody = Sent By: $FirstName\nSenders Email: $Email\n\nMessage Sent:\n$ToComments\n; mail($ToName. .$ToEmail.,$ToSubject, $EmailBody, From: .$FirstName. .$Email.); ? Please if anyone knows anything about this stuff (Im a newbie to this) You help is greatly appreciated! Thanks in advance, mark johnson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help please
Do you need an answer for each of the times that you posted it? 1) Posting code is good, however telling us it doesn't work is no good. What are the error messages, if any? Why is it not working, ie what did you expect it to do? 2) What version of php on the old site as compared to the new site? 3) Where are your variables coming from? Like $Firstname and $Email? 4) Did you look at this http://www.php.net/manual/en/language.variables.scope.php http://www.php.net/manual/en/language.variables.external.php bionicegg wrote: Hello all, I am having problems with a script. The script works great on one of my sights, however, when I transferred it to another site, it does not function. I contacted my hosting company (both sites are on the same server), they told me that I needed to check the script and that it has nothing to do with them, since they ran a test.php and it worked fine. Here is the script: ?PHP $ToEmail = [EMAIL PROTECTED]; $ToSubject = Flash Contact Form; $EmailBody = Sent By: $FirstName\nSenders Email: $Email\n\nMessage Sent:\n$ToComments\n; mail($ToName. .$ToEmail.,$ToSubject, $EmailBody, From: .$FirstName. .$Email.); ? Please if anyone knows anything about this stuff (Im a newbie to this) You help is greatly appreciated! Thanks in advance, mark johnson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] help please
It would be helpful to find out what error messages you are getting when you run the script. if(!mail($ToName. .$ToEmail.,$ToSubject, $EmailBody, From: .$FirstName..$Email.)) die(Unable to send message); would be a good start. I'm not sure if there is a system error you could replace unable to send message with. Robbert van Andel -Original Message- From: bionicegg [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 9:41 AM To: [EMAIL PROTECTED] Subject: [PHP] help please Hello all, I am having problems with a script. The script works great on one of my sights, however, when I transferred it to another site, it does not function. I contacted my hosting company (both sites are on the same server), they told me that I needed to check the script and that it has nothing to do with them, since they ran a test.php and it worked fine. Here is the script: ?PHP $ToEmail = [EMAIL PROTECTED]; $ToSubject = Flash Contact Form; $EmailBody = Sent By: $FirstName\nSenders Email: $Email\n\nMessage Sent:\n$ToComments\n; mail($ToName. .$ToEmail.,$ToSubject, $EmailBody, From: .$FirstName. .$Email.); ? Please if anyone knows anything about this stuff (Im a newbie to this) You help is greatly appreciated! Thanks in advance, mark johnson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Uploading Images
http://www.php.net/manual/en/ sections 18. Handling file uploads XXX. http://www.php.net/manual/en/features.file-upload.phpFilesystem functions XLI. http://www.php.net/manual/en/ref.filesystem.phpImage functions http://www.php.net/manual/en/ref.image.php clarionhaze wrote: Hey guys I need to make a place for people to upload images and then I need to make sure the file size is alright and the pixel size too... Could someone please send me in the right direction? -steven -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help please
My guess is that register globals is turned off on your new site. Or maybe, the new site isn't set up to parse php with *.html extensions. Being that it's all embedded flash, I can't give you much more than that. bionicegg wrote: John, Im so sorry about the posting three times, I didnt know how to do it, then I subscribed after I sent it twice. I cant figure out what is wrong with the script. I do not get an error message. Basically, I am suppsed to get an email with the info that the user entered. I get the email from http://www.bionicegg.com/html/Mail.html , but It doesnt work for http://www.nypalet.com/Mail.html . I do not know jack about PDP, I got the script from www.flashkit.com. Thanks so much for the response. Mark J - Original Message - From: John Nichel [EMAIL PROTECTED] To: bionicegg [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 1:20 PM Subject: Re: [PHP] help please Do you need an answer for each of the times that you posted it? 1) Posting code is good, however telling us it doesn't work is no good. What are the error messages, if any? Why is it not working, ie what did you expect it to do? 2) What version of php on the old site as compared to the new site? 3) Where are your variables coming from? Like $Firstname and $Email? 4) Did you look at this http://www.php.net/manual/en/language.variables.scope.php http://www.php.net/manual/en/language.variables.external.php bionicegg wrote: Hello all, I am having problems with a script. The script works great on one of my sights, however, when I transferred it to another site, it does not function. I contacted my hosting company (both sites are on the same server), they told me that I needed to check the script and that it has nothing to do with them, since they ran a test.php and it worked fine. Here is the script: ?PHP $ToEmail = [EMAIL PROTECTED]; $ToSubject = Flash Contact Form; $EmailBody = Sent By: $FirstName\nSenders Email: $Email\n\nMessage Sent:\n$ToComments\n; mail($ToName. .$ToEmail.,$ToSubject, $EmailBody, From: .$FirstName. .$Email.); ? Please if anyone knows anything about this stuff (Im a newbie to this) You help is greatly appreciated! Thanks in advance, mark johnson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Out of Range
here is my code $Query = SELECT Last_Login and Current_Login from Security where PM_ID=$_SESSION[ID]; $Getdates = odbc_do($link, $Query); while(odbc_fetch_row($Getdates)) { $Last=odbc_result($Getdates, 1); $Now=odbc_result($Getdates, 2); Now I get an error that tells me that #2 is out of the range Any suggestions
[PHP] browscap file problem?
Hi all I am trying to use the get_browser() function It relies on the browscap directive in php.ini to be set to the absolute path location of the browscap.ini file. I have no control over the php.ini file as I am on a shared server. My hosting company have put the browscap.ini file on the server and set the path to /etc/browscap.ini It is not finding it.. Any ideas why not? solex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] line number
What function can I use to find out the current line number?
[PHP] simple problem about authentication
Hi, I'm trying to set up a password section on my website. But I don't want a window popping up asking for a username and password. I'd rather like to have a form that submits the data. I did that and it works fine, but the browser seems to not save the username and password, because if i click on any link, it returns an unauthorized message... any ideas? thnx, Olli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Running system commands
Before I ask, I have read the documentation but nothing seems to work. I want to run a system command from behind the scenes (totally secure area of my server) that creates a directory and changes permissions on it. i.e. system (mkdir $path); Example above uses a value from a form passed to the script and is assigned from $_POST['path']; When I run it no directory is created. Ideas?? Thanks, Ed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] line number
The constant __LINE__ works well. ---John Holmes... - Original Message - From: Chandler, Jacob R [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 2:21 PM Subject: [PHP] line number What function can I use to find out the current line number? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: line number
http://www.php.net/manual/en/language.constants.predefined.php Justin Garrett Jacob R Chandler [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] What function can I use to find out the current line number? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] line number
Use the __LINE__ magic constant. Chandler, Jacob R wrote: What function can I use to find out the current line number? -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Output Numerical Month as String?
Hey all. Easy question here (can't find the answer in php manual) In Cold Fusion I'm able to format a given numerical month value, say the third month, as #MonthAsString(3)# and it returns March What's the equivalent in PHP? Thanks for any ideas.. --Noah -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Submit buttons
Is there any way that I can have a form submit to different pages depending on the submit button that is pressed? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Submit buttons
Greg schrieb: Is there any way that I can have a form submit to different pages depending on the submit button that is pressed? Thanks! dont use submit buttons, but buttons... (type=button) calling a script that submits the form to whatever page you want it to. Olli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Submit buttons
using JavaScript you can use an INPUT type='IMAGE' and in the onClick call a function that sets the form's target and then calls document.formname.submit(); =C= * Cal Evans * Stay Plugged Into Your Audience * http://www.christianperformer.com -Original Message- From: Greg [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 2:11 PM To: [EMAIL PROTECTED] Subject: [PHP] Submit buttons Is there any way that I can have a form submit to different pages depending on the submit button that is pressed? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Submit buttons
I'm horrible at javascript, does anyone have a script that will do this? Thanks again!! Oliver Witt [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Greg schrieb: Is there any way that I can have a form submit to different pages depending on the submit button that is pressed? Thanks! dont use submit buttons, but buttons... (type=button) calling a script that submits the form to whatever page you want it to. Olli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Output Numerical Month as String?
[code] date (F, mktime(0,0,0,6,1,2000)); [\code] Replace 6 with the month number and your on your way -Original Message- From: CF High [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 5:54 PM To: [EMAIL PROTECTED] Subject: [PHP] Output Numerical Month as String? Hey all. Easy question here (can't find the answer in php manual) In Cold Fusion I'm able to format a given numerical month value, say the third month, as #MonthAsString(3)# and it returns March What's the equivalent in PHP? Thanks for any ideas.. --Noah -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submit buttons
Yes, you can. Simply give the buttons differnt names: INPUT type=submit name=submit1 value=Submit This INPUT type=submit name=submit2 value=Submit That in the PHP script: extract($HTTP_POST_VARS); is( isset($submit1) ) { } else if( isset($submit2) ) { } - Original Message - From: Greg [EMAIL PROTECTED] To: Sent: Tuesday, February 25, 2003 2:11 PM Subject: [PHP] Submit buttons Is there any way that I can have a form submit to different pages depending on the submit button that is pressed? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Empty Query
### I have this: ### ### [serial] ### [model] ### [yr_blt] ### [km] ### [price] ### [hours] ### [details] ### [location] ### double[style] All of the 1 are the variables being passed, the word is hardcoded for clarity What I get half the time: Couldn't insert dataQuery was empty ### ### The variables are obviously being passed ### ### Here's my insert query: ### ### if($img == ){$sql = INSERT INTO vehicles ( `id` ,`serial`, `model` , ### `yr_blt` , `km` , `price` , `hours` , `details` , `location` , `img`, ### `tstamp`, ### `style`) ### VALUES ('', '$serial', '$model', '$yr_blt', '$km', '$price', ### '$hours', ### '$details', '$location', '0', '$tstamp', '$style');; ### } ### else ### { ### ### $file_dir=/services/webpages/o/f/offroad-imports.com/public/uploads/mogs/$serial; ### if (!is_dir($file_dir)){ ### umask(000); ### mkdir($file_dir,0777); ### } ### else{ ### umask(000); ### ### $path = $file_dir . /1.jpg; ### move_uploaded_file($img, $path)or die('Could not upload photo'); ### $sql = INSERT INTO vehicles ( `id` ,`serial`, `model` , `yr_blt` , `km` ### , ### `price` , `hours` , `details` , `location` , `img`, `tstamp`, `style`) ### VALUES ('', '$serial', '$model', '$yr_blt', '$km', '$price', ### '$hours', ### '$details', '$location', '1', '$tstamp', '$style');; ### } ### ### } Any thoughts? Enlightenment? Thanks -- Richard Whitney * Transcend Development Producing the next phase of your internet presence. [EMAIL PROTECTED] * http://xend.net* 602-971-2791 * * * * * *__** _/ \___ * * / *\** */ * * \ **/\_ |\ / \_ / \ / \/\ / \ /\ / \ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submit buttons
INPUT type=submit name=submit1 value=Submit This INPUT type=submit name=submit2 value=Submit That in the PHP script: extract($HTTP_POST_VARS); if( isset($submit1) ) header(location: thispage.php); else if( isset($submit2) ) header(location: thatpage.php); - Original Message - From: Rick Emery [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 2:25 PM Subject: Re: [PHP] Submit buttons Yes, you can. Simply give the buttons differnt names: INPUT type=submit name=submit1 value=Submit This INPUT type=submit name=submit2 value=Submit That in the PHP script: extract($HTTP_POST_VARS); is( isset($submit1) ) { } else if( isset($submit2) ) { } - Original Message - From: Greg [EMAIL PROTECTED] To: Sent: Tuesday, February 25, 2003 2:11 PM Subject: [PHP] Submit buttons Is there any way that I can have a form submit to different pages depending on the submit button that is pressed? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Output Numerical Month as String?
Cool. I'll check it out. Thanks! --Noah - Original Message - From: Dennis Cole [EMAIL PROTECTED] To: CF High [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, February 14, 2001 12:21 PM Subject: RE: [PHP] Output Numerical Month as String? [code] date (F, mktime(0,0,0,6,1,2000)); [\code] Replace 6 with the month number and your on your way -Original Message- From: CF High [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 5:54 PM To: [EMAIL PROTECTED] Subject: [PHP] Output Numerical Month as String? Hey all. Easy question here (can't find the answer in php manual) In Cold Fusion I'm able to format a given numerical month value, say the third month, as #MonthAsString(3)# and it returns March What's the equivalent in PHP? Thanks for any ideas.. --Noah -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Output Numerical Month as String?
http://www.zend.com/manual/function.date.php --- CF High [EMAIL PROTECTED] wrote: Hey all. Easy question here (can't find the answer in php manual) In Cold Fusion I'm able to format a given numerical month value, say the third month, as #MonthAsString(3)# and it returns March What's the equivalent in PHP? Thanks for any ideas.. --Noah -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Running system commands
[EMAIL PROTECTED] wrote: Before I ask, I have read the documentation but nothing seems to work. I want to run a system command from behind the scenes (totally secure area of my server) that creates a directory and changes permissions on it. i.e. system (mkdir $path); Example above uses a value from a form passed to the script and is assigned from $_POST['path']; When I run it no directory is created. Ideas?? Does the user that the webserver is running as have permissions to make that directory? HTH Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Output Numerical Month as String?
http://www.zend.com/manual/function.date.php --- CF High [EMAIL PROTECTED] wrote: Hey all. Easy question here (can't find the answer in php manual) In Cold Fusion I'm able to format a given numerical month value, say the third month, as #MonthAsString(3)# and it returns March What's the equivalent in PHP? Thanks for any ideas.. I know you can use date() and mktime(), but wouldn't it be easier to just make an array? $MonthAsString = array (1='January',2='February',3='March',...); and then just echo $MonthAsString[3] when you need it? ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Javascript
I have tried this 3 different ways and none of them worked... I am trying to get javascript to generate a popup, with a variable passed along in the url. echoa class=white href='javascript.openpopup()' $Unique_Id; this doesn't work, neither does stopping PHP and then restarting... Blah, any advice on how to embed javascript?
[PHP] NEED AN ADVICES: The best way for sending a huge amount of emails
Hi everyone! We will appreciate some advices. We are new to PHP, thus, please, be patient! :) We want to make a script which needs to send a huge amount of emails (The emails are stored in a MySQL DB). We would like to take control of sending errors and put these in a log file. The script needs to send TXT, HTML,images, and even small files. Both the email content and the settings will be prepared through a HTML interface. We will need a sort of queue where we would be able to put some Bad emails on it in order to resend them as much times as it was set in the settings (HTML). So, How is the best way for making that PHP script, considering security, reliability (Handling email errors) and speed? Thanks in advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript
Nothing to do with PHP at all but, Pretty sure you have to tack on the URL variables within the window.open() function. When you specify the name of the file to open, try putting the variable there. ---John Holmes... - Original Message - From: Todd Barr [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 7:10 PM Subject: [PHP] Javascript I have tried this 3 different ways and none of them worked... I am trying to get javascript to generate a popup, with a variable passed along in the url. echoa class=white href='javascript.openpopup()' $Unique_Id; this doesn't work, neither does stopping PHP and then restarting... Blah, any advice on how to embed javascript? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] WE NEED SOME ADVICES: What is the best way for sending a huge amountof emails?
Hi everyone! We will appreciate some advices. We are new to PHP, thus, please, be patient! :) We want to make a script which needs to send a huge amount of emails (The emails are stored in a MySQL DB). We would like to take control of sending errors and put these in a log file. The script needs to send TXT, HTML,images, and even small files. Both the email content and the settings will be prepared through a HTML interface. We will need a sort of queue where we would be able to put some Bad emails on it in order to resend them as much times as it was set in the settings (HTML). So, How is the best way for making that PHP script, considering security, reliability (Handling email errors) and speed? Thanks in advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript
Usually you would have the actual page between the () so it would be: echo a class=\white\ href=\javascript.openpopup('whatever.php?Unique_Id')\; -Scott At 04:10 PM 2/25/2003 -0800, Todd Barr wrote: I have tried this 3 different ways and none of them worked... I am trying to get javascript to generate a popup, with a variable passed along in the url. echoa class=white href='javascript.openpopup()' $Unique_Id; this doesn't work, neither does stopping PHP and then restarting... Blah, any advice on how to embed javascript? --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.456 / Virus Database: 256 - Release Date: 2/18/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.456 / Virus Database: 256 - Release Date: 2/18/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Auto Incrementing a Variable name?
Hi, I've been playing with this for a while now. Say I had the following variables: $name1 = joe; $name2 = janis; $name3 = joanne; Is there a way in php to increment the variable name not the value? Something like this for ($i = 1; $i = 3; $i++) { $arr_name[$i] = $name.$i; // I want $name1,$name2,$name3 etc } This way say if I had 500 database queries that need to be updated I could just loop through each and just change the record id. for ($i = 1; $i = 500; $i++) { $query_update = UPDATE table SET name=' $arr_name[$i]', WHERE person_id='$i; $result_update = mysql_query($query_update) or die(Query failed); } instead of doing something like this: $query_update1 = UPDATE table SET name=' $name1', WHERE person_id='1; $result_update1 = mysql_query($query_update1) or die(Query failed); $query_update2 = UPDATE table SET name=' $name2', WHERE person_id='2; $result_update2 = mysql_query($query_update2) or die(Query failed); $query_update3 = UPDATE table SET name=' $name3', WHERE person_id='3; $result_update3 = mysql_query($query_update3) or die(Query failed); etc. Anybody? There has to be a way of doing this... Thanks, Jeff
Re: [PHP] Empty Query
From what I can tell, if $img is an empty string, and $file_dir is not a directory, $sql will not be assigned a value. This could be what's causing your error when you try to run an empty query. ---John Holmes... - Original Message - From: Richard Whitney [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 3:25 PM Subject: [PHP] Empty Query ### I have this: ### ### [serial] ### [model] ### [yr_blt] ### [km] ### [price] ### [hours] ### [details] ### [location] ### double[style] All of the 1 are the variables being passed, the word is hardcoded for clarity What I get half the time: Couldn't insert dataQuery was empty ### ### The variables are obviously being passed ### ### Here's my insert query: ### ### if($img == ){$sql = INSERT INTO vehicles ( `id` ,`serial`, `model` , ### `yr_blt` , `km` , `price` , `hours` , `details` , `location` , `img`, ### `tstamp`, ### `style`) ### VALUES ('', '$serial', '$model', '$yr_blt', '$km', '$price', ### '$hours', ### '$details', '$location', '0', '$tstamp', '$style');; ### } ### else ### { ### ### $file_dir=/services/webpages/o/f/offroad-imports.com/public/uploads/mogs/$s erial; ### if (!is_dir($file_dir)){ ### umask(000); ### mkdir($file_dir,0777); ### } ### else{ ### umask(000); ### ### $path = $file_dir . /1.jpg; ### move_uploaded_file($img, $path)or die('Could not upload photo'); ### $sql = INSERT INTO vehicles ( `id` ,`serial`, `model` , `yr_blt` , `km` ### , ### `price` , `hours` , `details` , `location` , `img`, `tstamp`, `style`) ### VALUES ('', '$serial', '$model', '$yr_blt', '$km', '$price', ### '$hours', ### '$details', '$location', '1', '$tstamp', '$style');; ### } ### ### } Any thoughts? Enlightenment? Thanks -- Richard Whitney * Transcend Development Producing the next phase of your internet presence. [EMAIL PROTECTED] * http://xend.net* 602-971-2791 * * * * * *__** _/ \___ * * / *\** */ * * \ **/\_ |\ / \_ / \ / \/\ / \ /\ / \ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] simple problem about authentication
I'm trying to set up a password section on my website. But I don't want a window popping up asking for a username and password. I'd rather like to have a form that submits the data. I did that and it works fine, but the browser seems to not save the username and password, because if i click on any link, it returns an unauthorized message... any ideas? thnx, Show some code... the possibilities are endless for what you're doing wrong. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Out of Range
Probably means that only one row was returned from your query, so 2 is out of range. ---John Holmes... - Original Message - From: Todd Barr [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 5:11 PM Subject: [PHP] Out of Range here is my code $Query = SELECT Last_Login and Current_Login from Security where PM_ID=$_SESSION[ID]; $Getdates = odbc_do($link, $Query); while(odbc_fetch_row($Getdates)) { $Last=odbc_result($Getdates, 1); $Now=odbc_result($Getdates, 2); Now I get an error that tells me that #2 is out of the range Any suggestions -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Auto Incrementing a Variable name?
Variable variables allows you to define a variable name from a string. http://www.php.net/manual/en/language.variables.variable.php - Kevin - Original Message - From: Jeff Pauls [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 2:18 PM Subject: [PHP] Auto Incrementing a Variable name? Hi, I've been playing with this for a while now. Say I had the following variables: $name1 = joe; $name2 = janis; $name3 = joanne; Is there a way in php to increment the variable name not the value? Something like this for ($i = 1; $i = 3; $i++) { $arr_name[$i] = $name.$i; // I want $name1,$name2,$name3 etc } This way say if I had 500 database queries that need to be updated I could just loop through each and just change the record id. for ($i = 1; $i = 500; $i++) { $query_update = UPDATE table SET name=' $arr_name[$i]', WHERE person_id='$i; $result_update = mysql_query($query_update) or die(Query failed); } instead of doing something like this: $query_update1 = UPDATE table SET name=' $name1', WHERE person_id='1; $result_update1 = mysql_query($query_update1) or die(Query failed); $query_update2 = UPDATE table SET name=' $name2', WHERE person_id='2; $result_update2 = mysql_query($query_update2) or die(Query failed); $query_update3 = UPDATE table SET name=' $name3', WHERE person_id='3; $result_update3 = mysql_query($query_update3) or die(Query failed); etc. Anybody? There has to be a way of doing this... Thanks, Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] WE NEED SOME ADVICES: What is the best way for sending a huge amount of emails?
Get mailing list software such as majordomo / mailman. PHP isn't the best way to do these kind of things... -- me - Original Message - From: Jean Fábio Barros [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 10:59 PM Subject: [PHP] WE NEED SOME ADVICES: What is the best way for sending a huge amount of emails? Hi everyone! We will appreciate some advices. We are new to PHP, thus, please, be patient! :) We want to make a script which needs to send a huge amount of emails (The emails are stored in a MySQL DB). We would like to take control of sending errors and put these in a log file. The script needs to send TXT, HTML,images, and even small files. Both the email content and the settings will be prepared through a HTML interface. We will need a sort of queue where we would be able to put some Bad emails on it in order to resend them as much times as it was set in the settings (HTML). So, How is the best way for making that PHP script, considering security, reliability (Handling email errors) and speed? Thanks in advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Auto Incrementing a Variable name?
You're on the right track: for ($i = 1; $i = 3; $i++) { $arr_name[$i] = $name$i; // I want $name1,$name2,$name3 etc } - Original Message - From: Jeff Pauls [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 3:18 PM Subject: [PHP] Auto Incrementing a Variable name? Hi, I've been playing with this for a while now. Say I had the following variables: $name1 = joe; $name2 = janis; $name3 = joanne; Is there a way in php to increment the variable name not the value? Something like this for ($i = 1; $i = 3; $i++) { $arr_name[$i] = $name.$i; // I want $name1,$name2,$name3 etc } This way say if I had 500 database queries that need to be updated I could just loop through each and just change the record id. for ($i = 1; $i = 500; $i++) { $query_update = UPDATE table SET name=' $arr_name[$i]', WHERE person_id='$i; $result_update = mysql_query($query_update) or die(Query failed); } instead of doing something like this: $query_update1 = UPDATE table SET name=' $name1', WHERE person_id='1; $result_update1 = mysql_query($query_update1) or die(Query failed); $query_update2 = UPDATE table SET name=' $name2', WHERE person_id='2; $result_update2 = mysql_query($query_update2) or die(Query failed); $query_update3 = UPDATE table SET name=' $name3', WHERE person_id='3; $result_update3 = mysql_query($query_update3) or die(Query failed); etc. Anybody? There has to be a way of doing this... Thanks, Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php