Re: [PHP] exploding strings
At 05:54 20.11.2002, Michael P. Carel said: [snip] >Hi to all, > >I have a problem regarding exploding string. I want to explode string >sepated by "+" sign, but i want it also the first variable in the array be >distinc in terms of collor or whatever when viewed in the page. > >ex. > >$no=("1+2+3"); >$number=explode("+", $no); > >how could i echo $no with the first no. "1" be in colored. [snip] You need to handle the first element separately, then chime in with the rest: $string = '1+2+3'; $as = explode('+',$string); echo '',array_shift($as), ', ', join(', ', $as); -- >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] date
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 2 fonction for that ;) written specially for the same pb as you ;) // transformation de la date jj/mm/ -> -mm-jj function modate ( $date ) { $inter= split("/",$date) ; $date=$inter[2]."-".$inter[1]."-".$inter[0] ; return $date ; } // transformation de la date -mm-jj -> jj/mm/ function revmodate( $date ) { $inter= split("-",$date) ; $date=$inter[2]."/".$inter[1]."/".$inter[0] ; return $date ; } Le Mardi 19 Novembre 2002 15:10, Edward Peloke a ¨¦crit : > I am pulling from a datetime field in mysql. The actual data looks like > this: 2002-11-30 00:00:00 When I output the data to the page, I want it to > appear as 11/30/2002. I want to use a php date format. I do not want it > formatted as it comes out of the db. But date("m/d/y", $myrow[departdate]) > returns 12/31/69. How can I do this? > > THanks, > Eddie - -- __ / Matthieu Le Corre | Service Informatique | | Inspection Academique de la Sarthe | 72000 LE MANS | | Tel : 02 43 61 58 91 | Mail : [EMAIL PROTECTED] \ -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE921i5iQG6YxCcev4RAu1jAJ0UFm1XAp7C8zKeOPc/CEA32jZpdgCfReBY 3uhaeYd614pugiecRDDCYOM= =7f9l -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] using move_uploaded_file
can anyone give me a hint as to how to use a file upload script any kind of code will be good.. I am using IIS5.0 with PHP 4.2.3. Regards Nirat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] using move_uploaded_file
http://www.php.net/manual/sk/features.file-upload.php found in 2 seconds searching the PHP site for "Uploaded File". -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 20 November 2002 05:32 To: [EMAIL PROTECTED] Subject: [PHP] using move_uploaded_file can anyone give me a hint as to how to use a file upload script any kind of code will be good.. I am using IIS5.0 with PHP 4.2.3. Regards Nirat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ This message has been checked for all known viruses by the MessageLabs Virus Control Centre. This message has been checked for all known viruses by the MessageLabs Virus Control Centre. * Notice: This email is confidential and may contain copyright material of Ocado Limited (the "Company"). Opinions and views expressed in this message may not necessarily reflect the opinions and views of the Company. If you are not the intended recipient, please notify us immediately and delete all copies of this message. Please note that it is your responsibility to scan this message for viruses. Company reg. no. 3875000. Swallowdale Lane, Hemel Hempstead HP2 7PY * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] using move_uploaded_file
thanks will give it a try "Michael Hazelden" <[EMAIL PROTECTED]> wrote in message C1260EE72F22C44F833D033A17524AD702A4D1A2@lhoexc1">news:C1260EE72F22C44F833D033A17524AD702A4D1A2@lhoexc1... > http://www.php.net/manual/sk/features.file-upload.php > > found in 2 seconds searching the PHP site for "Uploaded File". > > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: 20 November 2002 05:32 > To: [EMAIL PROTECTED] > Subject: [PHP] using move_uploaded_file > > > can anyone give me a hint as to how to use a file upload script any kind of > code will be good.. I am using IIS5.0 with PHP 4.2.3. > > Regards > Nirat > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > _ > This message has been checked for all known viruses by the > MessageLabs Virus Control Centre. > > This message has been checked for all known viruses by the MessageLabs Virus Control Centre. > > > * > > Notice: This email is confidential and may contain copyright material of Ocado Limited (the "Company"). Opinions and views expressed in this message may not necessarily reflect the opinions and views of the Company. > If you are not the intended recipient, please notify us immediately and delete all copies of this message. Please note that it is your responsibility to scan this message for viruses. > > Company reg. no. 3875000. Swallowdale Lane, Hemel Hempstead HP2 7PY > > * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] catching a robot or spider - asking too
check out the url for aother big list of user agents. I guess the only way to catch a robot is to use this list and compate them to the incoming user agent and then do your thingie. http://www.browserlist.browser.org/browser_mappings_list_big.html regards Wilbert - Original Message - From: "Steve Vernon" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, November 19, 2002 11:18 PM Subject: Re: [PHP] catching a robot or spider - asking too > >From what I think I heard on another group was that it dosent matter what > stylesheet you use, it will just read the file, getting words and following > links. Cant remember where I read this, think it was a forum, and they were > argueing about robots and whether they follow links specified in JavaScript. > > One person said he was going to do a link to a page which only robots will > follow, say do it on a 1*1 pixel so no chance of a user to follow it. And on > that page do list of keywords as most robots ignore to many keywords in meta > tags. This would mean doing the limit robot meta tags to only the home page > and the robot page. > > So you could do a page with your links on, that is linked from the home page > but hard to click on! And do the meta tags on other pages to stop robots. > > Could work?! > > Love, > > Steve > XX > > > > > > > > does anybody know a way to make a distinction > > > between robots and users? > > > should I use the user agent? Or is this not a safe method. > > > If the visitor is a spider/robot I want to include some script > > > containing extra URL's for the robot. > > > > I am very interested too in this, as I received visits from a site with a > > rather strange user agent (well, at least, that I did not expect) on a web > > site of mine. The user agent was something like > > > > "SurveyBot/2.2 http://www.whois.sc\'>Whois Source" > > > > I really don't know how I should generate my pages in this case, what kind > > of stylesheet I should include to make the page correct (if I even have > to). > > > > Anyway, the real question behind is : > > > > Is there a good way to handle the user agent info? > > > > > > Vincent Vandemeulebrouck > > http://www.leguerriersorde.com/ > > > > > > -- > > 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 - Pas de Deux Van Mierisstraat 25 2526 NM Den Haag tel 070 4450855 fax 070 4450852 http://www.pdd.nl [EMAIL PROTECTED] - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with browscap.ini
I've recently installed php 4.2.3 on Apache 2.0.43. (windows2000) I downloaded a browscap.ini file from GaryKeith.com and copied it to c:\WINNT\system32\browscap.ini In php.ini the value for browscap is set to c:\WINNT\system32\browscap.ini This doesn't work... For example: the variable $HTTP_USER_AGENT is empty. I've also tried to put the the browscap file in system32\inetsrv\
Re: [PHP] Problem with browscap.ini
At 10:09 20.11.2002, Martin Magnusson said: [snip] >I've recently installed php 4.2.3 on Apache 2.0.43. (windows2000) >I downloaded a browscap.ini file from GaryKeith.com and copied it to >c:\WINNT\system32\browscap.ini >In php.ini the value for browscap is set to c:\WINNT\system32\browscap.ini > >This doesn't work... For example: the variable $HTTP_USER_AGENT is empty. > >I've also tried to put the the browscap file in system32\inetsrv\ [snip] Do you have register_globals set to "On"? Try $_SERVER['HTTP_USER_AGENT']. This variable exists independent from the browscap.ini file. You only need browscap.ini for the get_browser() function to work correctly. This should work: $browser = get_browser($_SERVER['HTTP_USER_AGENT']); -- >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] Help with functions()
Beauford 2002 wrote: Hi, I have form that a user would input information and that info is sent to a function, but I need to be able to return a result of this function and is where I am having a problem. For example: testfunction($var1, $var2, $var3, $var4); //the form fills these values. echo $meat; function testfunction($a, $b, $c, $d) { The $meat of the function goes here; Now I need to return the result of $meat; return $meat; } $return_value = testfunction ( echo $return_value; HTH Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem whith query in query
you can use temporary tables: CREATE TEMPORARY TABLE tmp_name SELECT SELECT MAX(ii.identifiseringid) AS max_ii FROM identifisering as ii GROUP BY dprosjekt then: SELECT * FROM identifisering as i, tmp WHERE i.identifiseringid='123' AND i=identifiseringid=tmp.max_id; Lars Espelid wrote: Hello, I need some help whith a mysql-query. Can anyone help? Is there a good newsgroup for mysql? Identifiseringid is the primary key of the table identifisering and is autoincrement. There is also a coloumn named dprosjekt in identifisering and some other coloumns. dprosjekt has the same value for several tuples. For each unike dprosjekt I want to print the record where identifiseringid is max. I tought this would work, but it won't: SELECT * FROM identifisering as i WHERE i.identifiseringid=(SELECT MAX(ii.identifiseringid) FROM identifisering as ii GROUP BY dprosjekt); also tried: SELECT * FROM identifisering as i WHERE i.identifiseringid IN (SELECT MAX(ii.identifiseringid) FROM identifisering as ii GROUP BY dprosjekt); When I split the query they work: SELECT * FROM identifisering as i WHERE i.identifiseringid='123'; SELECT MAX(ii.identifiseringid) FROM identifisering as ii GROUP BY dprosjekt; Thanks, Lars -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Fw: [PHP] Loooooooooonnnnnnnnnnggggggggg
Yes, I got it wrong, use strpos instead of strrpos Tristan Carron wrote: yes it does returns the string before the first * Your script returns string before the last * How to inverse that ? - Original Message - From: "Marek Kilimajer" <[EMAIL PROTECTED]> Newsgroups: php.general To: "PHP" <[EMAIL PROTECTED]> Sent: Tuesday, November 19, 2002 2:30 PM Subject: Re: Fw: [PHP] Loonng Your function seems to return string before first occurence of '*'. This should be faster: function conte($string) { return substr($string,0,strrpos($string,'*')); } Tristan Carron wrote: - Original Message - From: "Justin French" <[EMAIL PROTECTED]> To: "Tristan Carron" <[EMAIL PROTECTED]> Sent: Tuesday, November 19, 2002 12:23 PM Subject: Re: [PHP] Loonng You should post this to the list, not me direct :) Justin on 19/11/02 10:10 PM, Tristan Carron ([EMAIL PROTECTED]) wrote: sorry i forgot the script (excuse me, but i'm dumb) As the full code is too long, i'll just give u a function that i think could be better, there you go (good luck): function conte($string){ $number=l($string); $i=0; $url_modif=""; while($i<$number-1){ if($string[$i]=="*"){ for($j=0;$j<=$i-1;$j++){ $url_modif=$url_modif.$string[$j]; } return $url_modif; break; } else{ $i++; } } if(($string!=$url_modif) && ((strlen($url_modif))=="0")){ return $string; } else { return $url_modif; } } - Original Message - From: "Justin French" <[EMAIL PROTECTED]> Newsgroups: php.general To: "Hacook" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, November 19, 2002 12:09 PM Subject: Re: [PHP] Loonng on 19/11/02 10:00 PM, Hacook ([EMAIL PROTECTED]) wrote: Do you have any tips to make it faster ? The answers will come in faster if you tell us how you're "processing" it. Justin French http://Indent.com.au Web Developent & Graphic Design Justin French http://Indent.com.au Web Developent & Graphic Design -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP Application Framework
Hello, You could check Krysalis, http://www.interakt.ro/products/Krysalis/ It's GPL, and it has a lot of powerful features included, as it's based on XML and XSL. Alexandru > Hi all, > > > Does anyone have a recommendation for a stable yet flexible application > framework for PHP? > > Something similar to Midgard that will run on Windows would be nice. > > Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem whith query in query
At 04:57 18.11.2002, Lars Espelid said: [snip] >I tought this would work, but it won't: > >SELECT * FROM identifisering as i >WHERE i.identifiseringid=(SELECT MAX(ii.identifiseringid) >FROM identifisering as ii >GROUP BY dprosjekt); > >also tried: > >SELECT * FROM identifisering as i >WHERE i.identifiseringid IN (SELECT MAX(ii.identifiseringid) >FROM identifisering as ii >GROUP BY dprosjekt); [snip] The only thing I can say the second form (using IN) works like a charm in PostgreSQL: select * from identifisering as i where i.identifiseringid in ( select max(ii.identifiseringid) from identifisering as ii group by ii.dprosjekt ); If it doesn't work in MySQL it must be one of the unfortunately numerous shortcomings of MySQL. I always suggest using PostgreSQL in favour of MySQL; it's OS as well, it's mature, it's fast (faster than MySQL AFAIK), etc etc. And it comes bundled with at least RedHat, but I believe it's available with most Linux distros. -- >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
[PHP] RE: exploding strings
heh does the job :) $value){ if ($value==1) { print ''.$value.''; } } ?> -Original Message- From: Michael P. Carel [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 20, 2002 5:54 AM To: Subject: exploding strings Hi to all, I have a problem regarding exploding string. I want to explode string sepated by "+" sign, but i want it also the first variable in the array be distinc in terms of collor or whatever when viewed in the page. ex. $no=("1+2+3"); $number=explode("+", $no); how could i echo $no with the first no. "1" be in colored. Any idea. thanx in advance Regards, mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Simple Question on Date conversion
Dear all Can anyone pls tell me how i can turn number : 10 to Oct? i counting on the month, that's why i won't to convert the result to month! Thx a lot Jack -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] editing .htaccess / .htpasswrd
Hi everyone, I'm looking for a script that enables users of password demanding web sites to change their password, in other words a script, that can write into the .htpsswrd file. Thanks for help, Olli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Simple Question on Date conversion
> Dear all > Can anyone pls tell me how i can turn number : 10 to Oct? > i counting on the month, that's why i won't to convert the result to > month! $months = array(1=>'January',2=>'February',3=>'March',...); echo $months[$your_month_number]; You could also use a combo of date() and mktime(). echo date('F',mktime(0,0,0,$your_month_number,15,2002); The day and year part of mktime() can be anything. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: isapi mod on iis
The Internet Guest user needs to have permissions to the foler the script's are located. This should remove the auth request. "Chris Edwards" <[EMAIL PROTECTED]> wrote in message 04f901c28ffa$a75867e0$4300a8c0@development">news:04f901c28ffa$a75867e0$4300a8c0@development... > is anyone running the isapi mod on iis? why does it ask for authenitcation > when I run a script? > > -- > Chris Edwards > Web Application Developer > Outer Banks Internet, Inc. > 252-441-6698 > [EMAIL PROTECTED] > http://www.OuterBanksInternet.com > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP/ASP - ODBC - CHARSET - PROBLEM
Hello, In ASP i access my MSSQL using ODBC. With PHP i not access the MSSQL using ODBC but all accents of my DB they are shown strangers. //-- example In ASP: Estudo de renegociação/acordo da dívida em andamento na GITER In PHP: Estudo de renegociaÆo/acordo da d¡vida em andamento na GITER How i correct this error? PS.: Sorry my english... ass.: Augusto Flavio __ Do you Yahoo!? Yahoo! Web Hosting - Let the expert host your site http://webhosting.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] flush() issue
Having an issue getting flush to work. Browser version is IE 6 sp1. I am not using mod_gzip on Apache. In the following code sample you can see that I am looping through a mysql result array and using a different include each time. At the end of the foreach loop I am attempting to flush to the browser. I am taking into consideration the buffer size that must be met for flush to work (str_pad) and all other considerations I came across in the php manual... http://www.php.net/manual/en/function.flush.php. Despite the below my browser does not show results until the entire script has completed (~10 minutes). Any idea on how I can get this to work? Anything to take into consideration that I am not... considering... below? Thanks! Jock Pereira _ Code_Sample_Below__ $result = mysql_query("SELECT * FROM DEALER_Inventory WHERE DealerID = '$this_dealer' AND Car_Type != 'new'"); foreach ($themalls as $thismall) { logExportResults("$this_dealer", "$thismall", "Exporting..."); Print (" $this_dealer: Sending to $thismall"); include('include/EXPORT_'.$thismall.'.php'); mysql_data_seek($result,0); logIt("7","",$thismall); logExportResults("$this_dealer", "$thismall", "Export Done..."); echo str_pad(" ", 300); flush(); } ___ End_Code_Sample__
Re: [PHP] flush() issue
I don't see an y newlines, try adding some. Is it working with other browsers? Jock Pereira wrote: Having an issue getting flush to work. Browser version is IE 6 sp1. I am not using mod_gzip on Apache. In the following code sample you can see that I am looping through a mysql result array and using a different include each time. At the end of the foreach loop I am attempting to flush to the browser. I am taking into consideration the buffer size that must be met for flush to work (str_pad) and all other considerations I came across in the php manual... http://www.php.net/manual/en/function.flush.php. Despite the below my browser does not show results until the entire script has completed (~10 minutes). Any idea on how I can get this to work? Anything to take into consideration that I am not... considering... below? Thanks! Jock Pereira _ Code_Sample_Below__ $result = mysql_query("SELECT * FROM DEALER_Inventory WHERE DealerID = '$this_dealer' AND Car_Type != 'new'"); foreach ($themalls as $thismall) { logExportResults("$this_dealer", "$thismall", "Exporting..."); Print (" $this_dealer: Sending to $thismall"); include('include/EXPORT_'.$thismall.'.php'); mysql_data_seek($result,0); logIt("7","",$thismall); logExportResults("$this_dealer", "$thismall", "Export Done..."); echo str_pad(" ", 300); flush(); } ___ End_Code_Sample__ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] flush() issue
What do the include/EXPORT_*.php files do? ---John Holmes... > -Original Message- > From: Jock Pereira [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, November 20, 2002 8:28 AM > To: [EMAIL PROTECTED] > Subject: [PHP] flush() issue > > Having an issue getting flush to work. Browser version is IE 6 sp1. I am > not using mod_gzip on Apache. In the following code sample you can see > that I am looping through a mysql result array and using a different > include each time. At the end of the foreach loop I am attempting to flush > to the browser. I am taking into consideration the buffer size that must > be met for flush to work (str_pad) and all other considerations I came > across in the php manual... > http://www.php.net/manual/en/function.flush.php. > > Despite the below my browser does not show results until the entire script > has completed (~10 minutes). Any idea on how I can get this to work? > Anything to take into consideration that I am not... considering... below? > > Thanks! > > Jock Pereira > _ Code_Sample_Below__ > > $result = mysql_query("SELECT * FROM DEALER_Inventory WHERE DealerID = > '$this_dealer' AND Car_Type != 'new'"); > > foreach ($themalls as $thismall) > > { > > logExportResults("$this_dealer", "$thismall", "Exporting..."); > Print (" serif\"> $this_dealer: Sending to > $thismall"); > > > > include('include/EXPORT_'.$thismall.'.php'); > mysql_data_seek($result,0); > logIt("7","",$thismall); > logExportResults("$this_dealer", "$thismall", "Export Done..."); > > echo str_pad(" ", 300); > flush(); > > } > ___ End_Code_Sample__ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Pause for user input?
Does anyone know of a method to pause during the processing of a script to prompt a user for information and then incorporate the user's response for the remainder of the script? Larry S. Brown Dimension Networks, Inc. (727) 723-8388 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] apache user authentification problems
Hi, i wrote a php script, which shows a "printer-friendly" version of the current website. However, since the php safe_mode is turned to "on", i had to make use of a workaround to be able to display all users files with this script. Instead of accessing it via files, i use a fsockopen() connection and then work with the received page. So, everything worked just fine, until one user tried to use the print-script in a password protected area. (A simple apache user authentification) Since my script uses fsockopen() it comes up with a blank page, because it cannot load the page without the proper user&pass. I tried to get the $_SERVER vars, but since the script is in a different directory, the user authentification vars get lost as soon as you click on the print-script link. So, here is my question: Is there any way, i can make the printer script realize there is a password protected area (the server doesn't use .htaccess files; all user auths are defined in the httpd.conf) and then: - if possible: use the previously entered login details to get the page - or: ask for a second login and then use that one to open the page Thanks for your help, Duncan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] class query
Hi all, In a php class I'm using I do this: require_once('db/settings.inc'); // just hold db properties class blah { etc But, I have 3 classes that all start the same way that I need to require on a page and I'm getting "cannot redeclare class 'settings'". How can I solve this please? I thought what I was doing was fairly sensible but -- Nick Wilson // www.tioka.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] manage Form data
I want to sumbit data from a form and then view the data and then send it to the data base...
Re: [PHP] Pause for user input?
At 14:42 20.11.2002, Larry Brown spoke out and said: [snip] >Does anyone know of a method to pause during the processing of a script to >prompt a user for information and then incorporate the user's response for >the remainder of the script? [snip] This seems to be a very common misunderstanding of how the Web works. First as an answer to your question, you cannot do it, no way. Next, assume you're a manufacturer and send some goods to a customer, wrapped in a parcel. What you want to achieve is: when the customer eventually receives the parcel, you ask him if the address label is printed correctly. If he answers "yes" you give him a scissor to open it, if not you hand him another - now corrected - label. It's clear that this can't be done - you're at your office, and your customer is at his location. While clear in "real world" terms, this is often misunderstood for internet applications. In the example above the client browser (better: the web form) is you, the manufacturer. The customer receiving the goods is the server application. The form is displayed and filled out at the users browser, clicking on "submit" transmits the whole form content to the server for processing. >From this moment the client's out of the game. - Ok, but I have a solution. If you are able to interrupt your processing to ask the user some question, you can view your process as two parts - let's name them "PreProcess" and "PostProcess". When the user submits the form, the server starts the "PreProcess" action. At the end of the "PreProcess" action the current data status gets saved to session persistent storage, and another form is sent to the browser to answer your specific question. Eventually the user answers your question and submits this (second) form. Now the server application is fired up again, rereads the session data, and continues with "PostProcess" as you like. Everything clear? -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/
Re: [PHP] manage Form data
At 03:52 PM 11/20/2002 +0200, ??? ?ta? wrote: I want to sumbit data from a form and then view the data and then send it to the data base... Okay, send it to an intermediate page which has a form with hidden values representing all of the data, show the data on the page, and then have the users click submit to approve. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pause for user input?
Cannot be done this way, you need to use 2 pages Larry Brown wrote: Does anyone know of a method to pause during the processing of a script to prompt a user for information and then incorporate the user's response for the remainder of the script? Larry S. Brown Dimension Networks, Inc. (727) 723-8388 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] manage Form data
Can you show me an example? I already tried that but it doesn't work... - Original Message - From: "JohnMeyer" <[EMAIL PROTECTED]> To: "??? ?ta?" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, November 20, 2002 3:55 PM Subject: Re: [PHP] manage Form data > At 03:52 PM 11/20/2002 +0200, ??? ?ta? wrote: > >I want to sumbit data from a form and then view the data and then send it > >to the data base... > > > > Okay, send it to an intermediate page which has a form with hidden values > representing all of the data, show the data on the page, and then have the > users click submit to approve. > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Listing a table /Limit
And how would I find out which portion (row number) the row would be in, that I would like to see in a listing? Hello, how would I go about listing a portion of a MySQL table, without an overall selection criterium? I have a unique index field, but it's a string and not autoincremented (but manually and with gaps). I just want to go to one particular row (query on that index field) and then list, say, 20 rows before that point and 20 rows after it. So I can create an output of 41 rows in a HTML table. Is there something like the dBase SKIP and GOTO command? Should I do a query for each individual row (and get 41 result sets) or can I somehow walk through 1 result set ? Thanks, Marco -- Marco Bleeker, Amsterdam, NL. Please do not distribute my email address to a third party Refer to www.ecocam.com for an email form (and more) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Listing a table /Limit
I was thinking you'd start at the beginning, displaying row 0 through row 19, and then have a next link, that will show rows 20 through 39, and so on. > -Original Message- > From: Marco Bleeker [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, November 20, 2002 9:06 AM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Listing a table /Limit > > > And how would I find out which portion (row number) the row > would be in, > that I would like to see in a listing? > > > Hello, how would I go about listing a portion of a MySQL > table, without an > overall selection criterium? I have a unique index field, but > it's a string > and not autoincremented (but manually and with gaps). I just > want to go to > one particular row (query on that index field) and then list, > say, 20 rows > before that point and 20 rows after it. So I can create an > output of 41 > rows in a HTML table. Is there something like the dBase SKIP and GOTO > command? Should I do a query for each individual row (and get > 41 result > sets) or can I somehow walk through 1 result set ? > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] manage Form data
On Wednesday 20 November 2002 22:06, ??? ?ta? wrote: > Can you show me an example? I already tried that but it doesn't work... For an example, try the simple tutorial available on the PHP website. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* This sentence no verb. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Unlink
Does unlink work with wildcards e.g unlink("somefile*.*"); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Listing a table /Limit
On Wednesday 20 November 2002 22:12, Matt Schroebel wrote: > I was thinking you'd start at the beginning, displaying row 0 through > row 19, and then have a next link, that will show rows 20 through 39, > and so on. Read the question again :) That's not what the OP wants. > > And how would I find out which portion (row number) the row > > would be in, > > that I would like to see in a listing? The only way I can think of to achieve this is to read all your rows into an array and process it from there. I'm not sure whether it's possible in SQL -- but then again if you was looking for an SQL solution you would have posted to the php-db list! > > > > Hello, how would I go about listing a portion of a MySQL > > table, without an > > overall selection criterium? I have a unique index field, but > > it's a string > > and not autoincremented (but manually and with gaps). I just > > want to go to > > one particular row (query on that index field) and then list, > > say, 20 rows > > before that point and 20 rows after it. So I can create an > > output of 41 > > rows in a HTML table. Is there something like the dBase SKIP and GOTO > > command? Should I do a query for each individual row (and get > > 41 result > > sets) or can I somehow walk through 1 result set ? > > -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Laundry is the fifth dimension!! ... um ... um ... th' washing machine is a black hole and the pink socks are bus drivers who just fell in!! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Unlink
On Wednesday 20 November 2002 22:22, JohnMeyer wrote: > Does unlink work with wildcards e.g unlink("somefile*.*"); Try it? And let us know how it goes. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* It's all in the mind, ya know. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] flush() issue
Are you outputing each row in a table? IE won't start displaying the table until the tag, that might be causing your problem... Andrew - Original Message - From: "Jock Pereira" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, November 20, 2002 1:28 PM Subject: [PHP] flush() issue Having an issue getting flush to work. Browser version is IE 6 sp1. I am not using mod_gzip on Apache. In the following code sample you can see that I am looping through a mysql result array and using a different include each time. At the end of the foreach loop I am attempting to flush to the browser. I am taking into consideration the buffer size that must be met for flush to work (str_pad) and all other considerations I came across in the php manual... http://www.php.net/manual/en/function.flush.php. Despite the below my browser does not show results until the entire script has completed (~10 minutes). Any idea on how I can get this to work? Anything to take into consideration that I am not... considering... below? Thanks! Jock Pereira _ Code_Sample_Below__ $result = mysql_query("SELECT * FROM DEALER_Inventory WHERE DealerID = '$this_dealer' AND Car_Type != 'new'"); foreach ($themalls as $thismall) { logExportResults("$this_dealer", "$thismall", "Exporting..."); Print (" $this_dealer: Sending to $thismall"); include('include/EXPORT_'.$thismall.'.php'); mysql_data_seek($result,0); logIt("7","",$thismall); logExportResults("$this_dealer", "$thismall", "Export Done..."); echo str_pad(" ", 300); flush(); } ___ End_Code_Sample__ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Listing a table /Limit
I don't think this can be done without ordering the selection first. Then you can do it: 1. you need to find out the value your middle row has in the order column, 2. count rows with smaller value in the order column than your middle row, this is its offset 3. now you can (using the offset) select 20 rows before and after, but you must order your selection by the order column Marco Bleeker wrote: And how would I find out which portion (row number) the row would be in, that I would like to see in a listing? Hello, how would I go about listing a portion of a MySQL table, without an overall selection criterium? I have a unique index field, but it's a string and not autoincremented (but manually and with gaps). I just want to go to one particular row (query on that index field) and then list, say, 20 rows before that point and 20 rows after it. So I can create an output of 41 rows in a HTML table. Is there something like the dBase SKIP and GOTO command? Should I do a query for each individual row (and get 41 result sets) or can I somehow walk through 1 result set ? Thanks, Marco -- Marco Bleeker, Amsterdam, NL. Please do not distribute my email address to a third party Refer to www.ecocam.com for an email form (and more) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: cURL with PHP Help?
Have you tried this: http://curl.haxx.se/libcurl/php/examples/ Would help if you posted some code, or errors or something. I've used curl in several PHP applications successfully. Snoopy is actually a really awesome implementation of curl in php: http://sourceforge.net/projects/snoopy/ I replaced several of my functions with snoopy classes. HTH --Brian "Steve Keller" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Ok, I'm going to break down and ask for help. > > I'm trying to post an XML file to NetLedger through HTTPs, but cURL isn't > returning any errors when I run through PHP, and the file isn't getting there. > > Can someone point me in the direction of a site with some *good* help on > how to do file posting with cURL under PHP? And when I say "good," I mean > to say that I've already been to PHP.net and the list of CURLOPT's without > explanation of how to use them is not helpful to someone at my skill level. > Neither is the example on Sourceforge. > -- > S. Keller > UI Engineer > The Health TV Channel, Inc. > (a non - profit organization) > 3820 Lake Otis Pkwy. > Anchorage, AK 99508 > 907.770.6200 ext.220 > 907.336.6205 (fax) > Email: [EMAIL PROTECTED] > Web: www.healthtvchannel.org > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] pass file data through forms
Is there any way of submitting a file , pass all the data for it throuhg another form and upload from another form? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Unlink
I personally have not gotten it to work, and ended up using a very, very, well checked system call to /bin/rm verifying over and over that I am locked into the directory where I am erasing the file so I can't do any damage. On Wed, 2002-11-20 at 09:22, JohnMeyer wrote: > Does unlink work with wildcards e.g unlink("somefile*.*"); > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- Adam Voigt ([EMAIL PROTECTED]) The Cryptocomm Group My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc signature.asc Description: This is a digitally signed message part
Re: [PHP] New generation of PHP Program, reaction to ASP.NET
Are you interested in this?! New generation of PHP Program, reaction to ASP.NET WOOP (Web Object Of Php) Have you write PHP program like this ? // begin class TForm extends System_UI_Form { function init() { $this->label1 = & new System_UI_Label("label1", &$this); $this->button1 = & new System_UI_Button("button1", &$this); $this->button2 = & new System_UI_Button("button2", &$this); $this->label1->caption = "23"; $this->button1->caption = "number+1"; $this->button1->onclick = "button1click"; $this->button2->caption = "number-1"; $this->button2->onclick = "button2click"; } function button1click() { $this->label1->caption++; } function button2click() { $this->label1->caption--; } } $form1 = & new TForm("form1"); $form1->init(); //end to see the result of this program Goto http://www.shiziye.net/woop I need your help to finish this system together!!! _ Ãâ·ÑÏÂÔØ MSN Explorer: http://explorer.msn.com/lccn/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] class query
* and then Nick Wilson declared > Hi all, > > In a php class I'm using I do this: > > require_once('db/settings.inc'); // just hold db properties Ooops, sorry everyone. Just noticed that one of the classes does *not* use require_once() but require() -- and therein lies the problem ;-) -- Nick Wilson // www.tioka.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] manual trans-sid?
Hi, does anyone know a way to rewrite url's with the session-tag in a string, without sending the output to a browser? I'm writing some sort of webserver in php wich should, of course, send rewrited urls to its clients via sockets. Thanks a lot, Thomas 'Neo' Weber --- [EMAIL PROTECTED] [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Stripping HTML tags, but keeping entities...
Hi all I have a text field that users can enter any information into (it is supposed to be a description field) For obvious reasons, I want to strip unfriendly HTML/PHP tags. This I am doing using: strip_tags($_POST['Duplicate'], ' '); OK, so this is cool. I got this list from the Slashdot allowed tags list, which I would assume is ok. Now I get someone sending me information such as: "In fact the value of the destination is < the source." Strip_tags removes all info after the < sign. Obviously I would like to convert it to a > entity, but how can I do both of these? Thanks for any advice. David Russell IT Support Manager Barloworld Optimus (Pty) Ltd Tel: +2711 444-7250 Fax: +2711 444-7256 e-mail: [EMAIL PROTECTED] web: www.BarloworldOptimus.com smime.p7s Description: application/pkcs7-signature
RE: [PHP] New generation of PHP Program, reaction to ASP.NET
Hi, > Are you interested in this?! > New generation of PHP Program, reaction to ASP.NET I saw it when you posted it yesterday and tried it out, but it didn't work for me. I imagine this is because I've disabled Javascript. Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] scrolling data from db
I have a large amount of data to present to the user. Currently, I am just putting it in a table and displaying it on the page, if it is more than a page of course the page just scrolls. Is there a way o, without using frames, to put all the data from the db in the middle of the page with a scroll bar on the side that just scrolls the data, I mean the header and footer of the php page do not move? I am sure I will need javascript for this...right? Thanks, Eddie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Stripping HTML tags, but keeping entities...
Hello, (B (B"David Russell" <[EMAIL PROTECTED]> wrote: (B (B...[snip]... (B (B> Strip_tags removes all info after the < sign. Obviously I would like to (B> convert it to a > entity, but how can I do both of these? (B (BHave you tried this? (B (B http://www.php.net/manual/en/function.preg-replace.php (B (B- E (B (B-- (BPHP General Mailing List (http://www.php.net/) (BTo unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pause for user input?
No. However, I'm sure whatever you are trying to do can be designed as two pages to yield the exact same user experience. Chris --- Larry Brown <[EMAIL PROTECTED]> wrote: > Does anyone know of a method to pause during the processing of a > script to prompt a user for information and then incorporate the > user's response for the remainder of the script? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] pass file data through forms
Hello, "??? ?ta?" <[EMAIL PROTECTED]> wrote: > Is there any way of submitting a file , pass all the data for it throuhg > another form and upload from another form? I'm not sure if I understand your question correctly but you can try using the sample code in the manual for uploading files. Then, instead of moving it to your desired folder, you can just move it first to a temporary folder. This way, if one decided to cancel/abort, you can just unlink() or do some cleaning up of the folder later on. (May not be the best way but I think it'll work...) Just use your imagination, you might just find a better way :) - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] catching a robot or spider
User agent isn't very useful. Most web spiders can be set to return what ever user agent needed. You are depending on the writers/users of the spiders to follow commonly acceptable practices ie looking for robots.txt and the like. On Tue, 19 Nov 2002 14:54:49 +0100 "Wilbert Enserink" <[EMAIL PROTECTED]> wrote: > Hi all, > > > does anybody know a way to make a distinction between robots and > users? should I use the user agent? Or is this not a safe method. > If the visitor is a spider/robot I want to include some script > containing extra URL's for the robot. > > regards Wilbert > > > - > Pas de Deux > Van Mierisstraat 25 > 2526 NM Den Haag > tel 070 4450855 > fax 070 4450852 > http://www.pdd.nl > [EMAIL PROTECTED] > - -- Tom Woody Systems Administrator NationWide Flood Research, Inc. phone: 214-631-0400 x209 fax: 214-631-0800 Don't throw your computer out the window, throw the Windows out of your computer! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] manual trans-sid?
If you are creating a socket application, then *you* control when you send output to the browser. So, essentially what you are asking is how to replace the values of the href attributes in some HTML with a modified value that includes a session ID. I would recommend a combination of a regular expression to correctly obtain the value of each href, parse_url() to correctly parse the URL into its parts, and some basic string concatenation to build the new URL. You might also want to look at the nanoweb project (http://nanoweb.si.kz/). It is a Web server written in PHP. Chris --- Thomas Weber <[EMAIL PROTECTED]> wrote: > does anyone know a way to rewrite url's with the session-tag in a > string, without sending the output to a browser? I'm writing some > sort of webserver in php wich should, of course, send rewrited urls > to its clients via sockets. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] flush() issue
Hello, "Andrew Brampton" <[EMAIL PROTECTED]> wrote: > Are you outputing each row in a table? > IE won't start displaying the table until the tag, that might be > causing your problem... ...then, CSS to the rescue... :) Try this: ... HTH, - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] manage Form data
Hello, "??? ?ta?" <[EMAIL PROTECTED]> wrote: > Can you show me an example? I already tried that but it doesn't work... Please don't get me wrong but... Saying that "it doesn't work..." doesn't work either. You have to at least help others to help you. Show some codes, error messages, etc. And try to be more specific on what/where "doesn't work..." - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] scrolling data from db
Eddie, I use the attached on a site of mine... works with JavaScript and tags. There are 2 parts to the file - the javascript, and then the HTML code to make it happen. Tweak according to your needs. Peter At 11:00 AM 11/20/2002 -0500, you wrote: I have a large amount of data to present to the user. Currently, I am just putting it in a table and displaying it on the page, if it is more than a page of course the page just scrolls. Is there a way o, without using frames, to put all the data from the db in the middle of the page with a scroll bar on the side that just scrolls the data, I mean the header and footer of the php page do not move? I am sure I will need javascript for this...right? Thanks, Eddie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php - - - - - - - - - - - - - - - - - - - - - Fourth Realm Solutions [EMAIL PROTECTED] http://www.fourthrealm.com Tel: 519-739-1652 - - - - - - - - - - - - - - - - - - - - - insert your text here !! Up Down <<< << < | > >> >>> Free JavaScripts provided by http://javascriptsource.com";>The JavaScript Source -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pause for user input?
Hello, "Larry Brown" <[EMAIL PROTECTED]> wrote: > Does anyone know of a method to pause during the processing of a script to > prompt a user for information and then incorporate the user's response for > the remainder of the script? ... in addition to what the others already said, let me just ask a couple of questions: 1. Do you really need to "pause"? What did you exactly mean by "pause"? 2. Is it even necessary to "pause"? Just wondering... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] scrolling data from db
There is position css2 property, you might be able to use it Edward Peloke wrote: I have a large amount of data to present to the user. Currently, I am just putting it in a table and displaying it on the page, if it is more than a page of course the page just scrolls. Is there a way o, without using frames, to put all the data from the db in the middle of the page with a scroll bar on the side that just scrolls the data, I mean the header and footer of the php page do not move? I am sure I will need javascript for this...right? Thanks, Eddie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] catching a robot or spider
On Tue, 19 Nov 2002 14:54:49 +0100 "Wilbert Enserink" <[EMAIL PROTECTED]> wrote: Hi all, does anybody know a way to make a distinction between robots and users? should I use the user agent? Or is this not a safe method. If the visitor is a spider/robot I want to include some script containing extra URL's for the robot. The best way I've found of doing this is to include the links as 1x1 transparent gifs on the index page. -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] scrolling data from db
Hello, "Edward Peloke" <[EMAIL PROTECTED]> wrote: > I have a large amount of data to present to the user. Currently, I am just > putting it in a table and displaying it on the page, if it is more than a > page of course the page just scrolls. Is there a way o, without using > frames, to put all the data from the db in the middle of the page with a > scroll bar on the side that just scrolls the data, I mean the header and > footer of the php page do not move? I am sure I will need javascript for > this...right? Not really... Of course, you can use javascript. (I think somebody just posted--er, kindly posted--a sample code...) You can also use CSS to make the header, etc. be "fixed" on different location of your browser window. However, this approach works only on browsers that support that css. (e.g. Mozilla-based browsers like N7, etc. or Opera 6...) How about another approach using "iframes"? (Personally, I don't like frames or iframes...) It might work for you. But then again, the best way IMHO, is to divide your table into different sections or pages. Do you really need to keep them in one page? Just some ideas... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Looking for compiled Windows PHP installation with multistring fts support
Hello, "Simon Dedeyne" <[EMAIL PROTECTED]> wrote: > > Sorry, I meant multibyte strings, like when you want to display > Japanese. ...well, then, you can find one here: (Japanese site) http://www.geocities.jp/rui_hirokawa/php/ or, download the file directly: http://www.geocities.jp/rui_hirokawa/php/win/php-4.2.2-Win32-mb-1.0.lzh That file is already patched. (Esp. for problems that affects Japanese characters, e.g. shift-jis bug, etc.) The person who compiled (and/or patched) it is an author (or co-author) of this series: http://www.amazon.co.jp/exec/obidos/ASIN/4797320974/ref=ase_ruihirokaspag-22 /250-6587854-7764234 HTH, - E PS BTW, it's a good idea to reply to the list. Doing so would give more opportunity to more people to extend more help :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Server-server file copy question
Hi, I am using PHP 4.4.2.. I need a function to copy a file from one server to another. The src/dst filenames are relative to the Document Root of the website, but I can build an absolute path name if necessary. I can't use ftp because the ftp ports are closed on these servers. I would like to use http or ssh for the file transfer. The application is that multiple files can be copied from website to website on our various servers. I have been looking around at mailing lists, etc but haven't found a function described which does a non-ftp inter-IP file copy, only client/server file uploads and ftp functions. TIA, Rich
Re: [PHP] Unlink
On Wed, 20 Nov 2002, JohnMeyer wrote: > Does unlink work with wildcards e.g unlink("somefile*.*"); No. unlink() is a thin veneer on the system unlink() call. Wildcard expansion like you have it is done by a shell glob function. You would need to replicate what the shell does - use it as a regular expression in an opendir()/readdir()/delete file on regexp match/closedir() set of operations. Or, preferably, look up the glob() function in PHP and use the return values in an unlink() call. Much better than spawning a shell process ;^) -- "... but while you're marching in the rain, doesn't the *bell* on the sax fill with water?" - jerry "Yes, Jerry ... the bell would fill with water. (un)Fortunately, this does not affect the way a sax sounds." - Fred (postings on the Clarinet BBoard) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] which PHP debugger?
Check out DBG, which is the PHP debugger that is used by most of the IDEs out there: http://dd.cron.ru/dbg/ If you want a free, open source, IDE to use with it, check out: http://www.phpedit.com/ At 09:37 AM 11/19/2002 -0500, Adam Voigt wrote: Actually, I belive you can set breakpoints and step through code with Zend Studio. (Free download for personal use). http://www.zend.com On Tue, 2002-11-19 at 04:35, [EMAIL PROTECTED] wrote: > h... > I *think* PHP is platform independant for the most part, and it is not like it > is a compiled language where you have fancy debuggers to set breakpoints, step > through the code, etc... > > Why not use the functions built into PHP? > echo " "; > if a mysql problem: mysql_error() > > -Brad > > > Hi all, > > please which PHP debugger is the "best one"? (fast keyboard commands, > > variables, includes, reliability etc.). > > Which PHP debugger works well under Windows, which under Linux? > > > > thanks... > > > > --- > > Odchozí zpráva neobsahuje viry. > > Zkontrolováno antivirovým systémem AVG (http://www.grisoft.cz). > > Verze: 6.0.419 / Virová báze: 235 - datum vydání: 13.11.2002 > > > > > > > > -- > > 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 > -- Adam Voigt ([EMAIL PROTECTED]) The Cryptocomm Group My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Server-server file copy question
At 17:55 20.11.2002, Richard Fox spoke out and said: [snip] >Hi, > >I am using PHP 4.4.2.. I need a function to copy a file from one server to >another. The src/dst filenames are relative to the Document Root of the >website, but >I can build an absolute path name if necessary. I can't use ftp because the >ftp ports are closed on these servers. I would like to use http or ssh for >the file transfer. The application is that multiple files can be copied from >website to website on our various servers. I have been looking around at >mailing lists, etc but haven't found a function described which does a >non-ftp inter-IP file copy, only client/server file uploads and ftp >functions. > >TIA, >Rich [snip] I'd try to use scp in conjunction with a SSH certificate (to avoid a password prompt) -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/
Re: [PHP] Server-server file copy question
Hello, "Richard Fox" <[EMAIL PROTECTED]> wrote: > Hi, > > I am using PHP 4.4.2.. I need a function to copy a file from one server to > another. The src/dst filenames are relative to the Document Root of the website, > but I can build an absolute path name if necessary. I can't use ftp because the > ftp ports are closed on these servers. I would like to use http or ssh for > the file transfer. The application is that multiple files can be copied from > website to website on our various servers. I have been looking around at > mailing lists, etc but haven't found a function described which does a > non-ftp inter-IP file copy, only client/server file uploads and ftp > functions. Check: http://www.php.net/manual/en/ref.exec.php And check: (I assume you're using linux...) man scp Just some ideas, - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] FTP_SITE and FTP_EXEC prob
Hya, I'm using a script to upload a file, and after I need to chmod it to 755. I upload the file with no prob AND I can chmod using the ftp server with a FTP client. But when I use PHP I get this error: Warning: ftp_site: Unknown SITE command. in /home/to/public_html/CriaPagina.php on line 59 Here's the code: ftp_exec($conn_id,"site chmod 755 /home/to/public_html/index.php"); I tried with ftp_exec and ftp_site, any advice? Tó -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Server-server file copy question
Have you considered using rsync? http://samba.org/rsync Quoting Richard Fox <[EMAIL PROTECTED]>: ### Hi, ### ### I am using PHP 4.4.2.. I need a function to copy a file from one server ### to ### another. The src/dst filenames are relative to the Document Root of the ### website, but ### I can build an absolute path name if necessary. I can't use ftp because ### the ### ftp ports are closed on these servers. I would like to use http or ssh ### for ### the file transfer. The application is that multiple files can be copied ### from ### website to website on our various servers. I have been looking around at ### mailing lists, etc but haven't found a function described which does a ### non-ftp inter-IP file copy, only client/server file uploads and ftp ### functions. ### ### TIA, ### Rich ### ### ### -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Server-server file copy question
Sorry - nevermind! ### Have you considered using rsync? ### ### http://samba.org/rsync ### ### Quoting Richard Fox <[EMAIL PROTECTED]>: ### ### ### Hi, ### ### ### ### I am using PHP 4.4.2.. I need a function to copy a file from one ### server ### ### to ### ### another. The src/dst filenames are relative to the Document Root of ### the ### ### website, but ### ### I can build an absolute path name if necessary. I can't use ftp ### because ### ### the ### ### ftp ports are closed on these servers. I would like to use http or ### ssh ### ### for ### ### the file transfer. The application is that multiple files can be ### copied ### ### from ### ### website to website on our various servers. I have been looking around ### at ### ### mailing lists, etc but haven't found a function described which does ### a ### ### non-ftp inter-IP file copy, only client/server file uploads and ftp ### ### functions. ### ### ### ### TIA, ### ### Rich ### ### ### ### ### ### ### ### ### ### ### -- ### 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] DBF files
Hi everyone, Can anyone tell me if and how to access DBF tables using PHP on UNIX. Ideally i want to display data from the tables, but also update the tables and index's etc. all through a web interface. Thank you for any help. -- Tony Burgess -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP Application Framework
Quoting Alexandru COSTIN <[EMAIL PROTECTED]>: > Hello, > You could check Krysalis, http://www.interakt.ro/products/Krysalis/ > > It's GPL, and it has a lot of powerful features included, as it's based on > XML and XSL. > > Alexandru > > Hi all, > > > > > > Does anyone have a recommendation for a stable yet flexible application > > framework for PHP? > > > > Something similar to Midgard that will run on Windows would be nice. > > > > Thanks! If you mean PHP Application Framework (and not IDE). http://www.horde.org (some of the modules require linux servers, but the framework itself is very robust and should be cross-platform, we use many of the project modules and some of our own in a production enviornment). -- Ryan T. Gallagher [EMAIL PROTECTED] International Studies Abroad http://www.studiesabroad.com (512)480-8522 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] manage Form data
> -Original Message- > From: ??? ?ta? [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, November 20, 2002 8:52 AM > To: [EMAIL PROTECTED] > Subject: [PHP] manage Form data > > I want to sumbit data from a form and then view the data and then send it > to the data base... That's awesome. I want to strike it rich in Vegas and not have to work for anyone ever again. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to: If($var != '#' OR '#')
I have code that says: if($_GET['sc'] != '2' OR '8'){ do this. } but I doesn't work. What do I need to do to get it to work? I have checked operator precendence and all that and am still confused on whether I should be using '||' or 'OR' or something else... I have tried both of those, as well as 'XOR' and '^'. Help please! Jami -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to: If($var != '#' OR '#')
> I have code that says: > > if($_GET['sc'] != '2' OR '8'){ > do this. > } if($_GET['sc'] != 2 || $_GET['sc'] != 8) { do this... } You don't need the single quotes if you're comparing integers. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem whith query in query
Quoting Ernest E Vogelsinger <[EMAIL PROTECTED]>: > At 04:57 18.11.2002, Lars Espelid said: > [snip] > >I tought this would work, but it won't: > > > >SELECT * FROM identifisering as i > >WHERE i.identifiseringid=(SELECT MAX(ii.identifiseringid) > >FROM identifisering as ii > >GROUP BY dprosjekt); > > > >also tried: > > > >SELECT * FROM identifisering as i > >WHERE i.identifiseringid IN (SELECT MAX(ii.identifiseringid) > >FROM identifisering as ii > >GROUP BY dprosjekt); > [snip] > > The only thing I can say the second form (using IN) works like a charm in > PostgreSQL: > > select * from identifisering as i > where i.identifiseringid in ( > select max(ii.identifiseringid) from identifisering as ii > group by ii.dprosjekt > ); > > If it doesn't work in MySQL it must be one of the unfortunately numerous > shortcomings of MySQL. I always suggest using PostgreSQL in favour of > MySQL; it's OS as well, it's mature, it's fast (faster than MySQL AFAIK), > etc etc. And it comes bundled with at least RedHat, but I believe it's > available with most Linux distros. If you seek many records, use _IN_ (will also work with one record). If you are indeed seeking one record, the GROUP BY seems out of place. Also in my experience with MSSQL, the SELECT MAX() syntax almost always requires that you assign that result to a name. ie: SELECT * FROM identifisering as i WHERE i.identifiseringid = ( SELECT MAX(ii.identifiseringid) AS maxIdentifiseringid FROM identifisering as ii ) GROUP BY dprosjekt Now that I look at it, your GROUP BY was definitely out of place, since dprosjekt no doubt is a col being returned from the SELECT * of the main query. -- Ryan T. Gallagher [EMAIL PROTECTED] International Studies Abroad http://www.studiesabroad.com (512)480-8522 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to: If($var != '#' OR '#')
On Thursday 21 November 2002 01:24, Jami wrote: > I have code that says: > > if($_GET['sc'] != '2' OR '8'){ > do this. > } > > but I doesn't work. What do I need to do to get it to work? I have checked > operator precendence and all that and am still confused on whether I should > be using '||' or 'OR' or something else... I have tried both of those, as > well as 'XOR' and '^'. Help please! Each of the comparison needs to be specified explicitly: if ($_GET['sc'] != '2' AND $_GET['sc'] != '8') { do_this_if_neither_2_nor_8; } -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Always there remain portions of our heart into which no one is able to enter, invite them as we may. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to: If($var != '#' OR '#')
Quoting Jami <[EMAIL PROTECTED]>: > I have code that says: > > if($_GET['sc'] != '2' OR '8'){ > do this. > } > > but I doesn't work. What do I need to do to get it to work? I have checked > operator precendence and all that and am still confused on whether I should > be using '||' or 'OR' or something else... I have tried both of those, as > well as 'XOR' and '^'. Help please! > > Jami Try: if( ( $_GET['sc'] != 2 ) OR ( $_GET['sc'] != 8 ) ){ /* * Do Foo provided sc is anything but a 2 or 8 */ do foo; } Assuming of course that you meant to exclude cases of 2 or 8. It's a bit hard to tell what your intended event for 8 is. -- Ryan T. Gallagher [EMAIL PROTECTED] International Studies Abroad http://www.studiesabroad.com (512)480-8522 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Still having ereg migranes
Sorry to repost this, but I haven't found a solution and it's still nagging me. Maybe some of you can come up with something I can't. Here was my original post: I've made myself an tag that contains in the value attribute a list of comma-delimited numbers. I need to find if a certain number is in these tags (and each file contains one tag). I need an ereg statement that will let me search these lines to see if a number exists, obviously in the beginning or the end or the middle or if it's the only number in the list. So, say I need #1, I need to grep each file to find if 1 is in its INPUT TYPE="HIDDEN" list. Here's what I mean (searching for number 1): //beginning //middle //end //only I can't grab all the tags and search for it in PHP (there would be too many tags to parse through and I'd rather let the OS handle that). I need to do this at the operating system level. Does anybody yet have a solution? I *know* it's possible, but I can't get it and I've been working on it for days now. This is one of those really annoying bugs that really grates on a programmer. __ Do you Yahoo!? Yahoo! Web Hosting - Let the expert host your site http://webhosting.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: cURL with PHP Help?
At 11/20/2002 08:46 AM, you wrote: >Have you tried this: >http://curl.haxx.se/libcurl/php/examples/ Yeah. That's where you end up from the Sourcefourge site. There's a sample on there for a multi-part post, but I'm confused as to how it works. >Would help if you posted some code, or errors or something. I've used curl >in several PHP applications successfully. I'm not getting any errors. And, as I said, I'm just not getting cURL, so as far as code, I've been monkeying with just about every example I could find. But again, I'm not asking for debugging of my code, I'm just trying to find something to help me understand how the cURL functions in PHP work. >Snoopy is actually a really awesome implementation of curl in php: >http://sourceforge.net/projects/snoopy/ > >I replaced several of my functions with snoopy classes. Thanks. I'll definitely take a look at that. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to: If($var != '#' OR '#')
Hiya, On Wed, Nov 20, 2002 at 11:24:11AM -0600, Jami wrote: > I have code that says: > > if($_GET['sc'] != '2' OR '8'){ > do this. > } > > but I doesn't work. What do I need to do to get it to work? I have checked > operator precendence and all that and am still confused on whether I should > be using '||' or 'OR' or something else... I have tried both of those, as > well as 'XOR' and '^'. Help please! It won't work 'cause you're asking two different questions: 1. if $_GET['sc'] != 2, and 2. 8 Operators can only work on two operands, i.e. one either side, so you if you want to ask any more questions, like above, you have to split them each into their own question: if ($_GET['sc'] != '2' || $_GET['sc'] != 8) { It also works the same when looking for a range like '2 < $x < 6', it has to be two questions - '2 < $x && $x < 6'. Hope that helps! :) -- Jonathan Wright.. // [EMAIL PROTECTED] // www.djnauk.co.uk -- // life has no meaning unless we can enjoy what we've been given -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem whith query in query
At 18:29 20.11.2002, Ryan Gallagher said: [snip] >SELECT * FROM identifisering as i >WHERE i.identifiseringid = ( >SELECT MAX(ii.identifiseringid) AS maxIdentifiseringid >FROM identifisering as ii > ) >GROUP BY dprosjekt > >Now that I look at it, your GROUP BY was definitely out of place, since >dprosjekt no doubt is a col being returned from the SELECT * of the main >query. [snip] No, it wasn't. You need the GROUP BY in the subquery to retrieve the max(id) for any distinct dprosjekt. If you have it like you did the subquery would simply return a single result, the max(id) of all records. Your version simply functions as an "order by" which is useless here since only a single record will be returned. -- >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] Problem whith query in query
Quoting Ernest E Vogelsinger <[EMAIL PROTECTED]>: > At 18:29 20.11.2002, Ryan Gallagher said: > [snip] > >SELECT * FROM identifisering as i > >WHERE i.identifiseringid = ( > >SELECT MAX(ii.identifiseringid) AS maxIdentifiseringid > >FROM identifisering as ii > > ) > >GROUP BY dprosjekt > > > >Now that I look at it, your GROUP BY was definitely out of place, since > >dprosjekt no doubt is a col being returned from the SELECT * of the main > >query. > [snip] > > No, it wasn't. > You need the GROUP BY in the subquery to retrieve the max(id) for any > distinct dprosjekt. If you have it like you did the subquery would simply > return a single result, the max(id) of all records. Your version simply > functions as an "order by" which is useless here since only a single record > will be returned. Sorry, that's what I was trying to decipher... The '=' combined with the use of MAX led me to believe the desired recordset size was ONE in the sub query. -- Ryan T. Gallagher [EMAIL PROTECTED] International Studies Abroad http://www.studiesabroad.com (512)480-8522 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Still having ereg migranes
first way: if(ereg('([^0-9]|^)'.$your_number.'([^0-9]|$)',$_REQUEST['numbers']) ) second way: $numbers=explode(',',$_REQUEST['numbers']); if(in_array($your_number,$numbers)) Mako Shark wrote: Sorry to repost this, but I haven't found a solution and it's still nagging me. Maybe some of you can come up with something I can't. Here was my original post: I've made myself an tag that contains in the value attribute a list of comma-delimited numbers. I need to find if a certain number is in these tags (and each file contains one tag). I need an ereg statement that will let me search these lines to see if a number exists, obviously in the beginning or the end or the middle or if it's the only number in the list. So, say I need #1, I need to grep each file to find if 1 is in its INPUT TYPE="HIDDEN" list. Here's what I mean (searching for number 1): "1,2,3,4,5"> //beginning "0,1,2,3,4,5"> //middle "5,4,3,2,1"> //end //only I can't grab all the tags and search for it in PHP (there would be too many tags to parse through and I'd rather let the OS handle that). I need to do this at the operating system level. Does anybody yet have a solution? I *know* it's possible, but I can't get it and I've been working on it for days now. This is one of those really annoying bugs that really grates on a programmer. __ Do you Yahoo!? Yahoo! Web Hosting - Let the expert host your site http://webhosting.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Still having ereg migranes
> Sorry to repost this, but I haven't found a solution > and it's still nagging me. Maybe some of you can come > up with something I can't. Here was my original post: > > I've made myself an tag that > contains in the value attribute a list of > comma-delimited numbers. I need to find if a certain > number is in these tags (and each file contains one > tag). I need an ereg statement that will let me search > these lines to see if a number exists, obviously in > the beginning or the end or the middle or if it's the > only number in the list. So, say I need #1, I need to > grep each file to find if 1 is in its INPUT > TYPE="HIDDEN" list. Here's what I mean (searching for > number 1): > > "1,2,3,4,5"> //beginning > > "0,1,2,3,4,5"> //middle > > "5,4,3,2,1"> //end > > > //only > > I can't grab all the tags and search for it in PHP > (there would be too many tags to parse through and I'd > rather let the OS handle that). I need to do this at > the operating system level. Does anybody yet have a > solution? I *know* it's possible, but I can't get it > and I've been working on it for days now. This is one > of those really annoying bugs that really grates on a programmer. Well, one way without regex would be to explode() numbers on a comma and use in_array() to see if you're value exists. $ar = explode(',',$_GET['numbers']); if(in_array($search_number,$ar)) { //number is present; } else { //number is not present; } With regex, maybe something like this? if(preg_match('/^|,'.$search_number.',|$/',$_GET['numbers'])) { //number is present; } else { //number is not present; } That should look for your number, preceded by either the beginning of the string or a comma and followed by either a comma or the end of the string. Let me know if that works. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] THANK YOU! - How to: If($var != '#' OR '#')
Thanks all for the prompt responses. In case someone else searchs on the list, the following code worked: if($_GET['sc'] != '2' AND $_GET['sc'] !='8'){ do this. } Thanks Jason, Jonathan W., John H, Ryan G., and Tony B.! - Original Message - From: "Jami" <[EMAIL PROTECTED]> To: "PHP General" <[EMAIL PROTECTED]> Sent: Wednesday, November 20, 2002 11:24 AM Subject: [PHP] How to: If($var != '#' OR '#') > I have code that says: > > if($_GET['sc'] != '2' OR '8'){ > do this. > } > > but I doesn't work. What do I need to do to get it to work? I have checked > operator precendence and all that and am still confused on whether I should > be using '||' or 'OR' or something else... I have tried both of those, as > well as 'XOR' and '^'. Help please! > > Jami > > > > -- > 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] interpreting variables containing in another variable
I've got a variable - $email_body, that contain's other variables. For example, echo "$email_body," might look like this: $name, $address, $phone, $blah I want those variables to interpreted with corresponding values set earlier in the script. So, in effect, where name=bob, address=101 east main, phone=555-, and blah=foo, echo "$email_body" would look like this: bob, 101 east main, 555-, foo Any suggestions? Thanks in advance. -Bob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] interpreting variables containing in another variable
Not sure what your saying, but like: $email_body = $name . ", " . $address . ", " . $phone . ", " . $blah; ? On Wed, 2002-11-20 at 13:15, ROBERT MCPEAK wrote: > I've got a variable - $email_body, that contain's other variables. For example, >echo "$email_body," might look like this: > > $name, $address, $phone, $blah > > > I want those variables to interpreted with corresponding values set earlier in the >script. So, in effect, where name=bob, address=101 east main, phone=555-, and >blah=foo, echo "$email_body" would look like this: > > bob, 101 east main, 555-, foo > > > Any suggestions? > > Thanks in advance. > > -Bob > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- Adam Voigt ([EMAIL PROTECTED]) The Cryptocomm Group My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc signature.asc Description: This is a digitally signed message part
Re: [PHP] How to: If($var != '#' OR '#')
On Thursday 21 November 2002 01:34, Ryan Gallagher wrote: > Try: > > if( ( $_GET['sc'] != 2 ) OR ( $_GET['sc'] != 8 ) ){ > /* >* Do Foo provided sc is anything but a 2 or 8 >*/ > do foo; > } > > Assuming of course that you meant to exclude cases of 2 or 8. It's a bit > hard to tell what your intended event for 8 is. The above would not have the intended effect. My boolean maths is extremely rusty but I think it is equivalent to saying: if (!($_GET['sc'] == 2 AND $_GET['sc'] == 8)) Which means your code above is *always* TRUE, so do foo is always executed! In any case you can easily test it by mentally plugging in values 1 to 8 for $_GET['sc'] and evaluating it for yourself. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* History repeats itself. That's one thing wrong with history. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Still having ereg migranes
Heheh. Maybe I wasn't clear, or maybe I'm missing something. > Well, one way without regex would be to explode() > numbers on a comma and use in_array() to see if > you're value exists. > That should look for your number, preceded by either > the beginning of the string or a comma and followed > by either a comma or the end of the string. I can't use PHP commands to do this. I can only have an ereg statement, but that has to be placed in a grep statement. Maybe I should ask a Unix list, but I figure with the ereg(i) expertise here, this is my best bet. By the time my shell_exec() call returns its results, it should return only those files with the actual number. At that point, I can't explode() it and start searching for the number all over again using in_array() or any other commands. By the time Unix returns its results, the only thing I can do is carry on assuming I have only those tags that contain the number without having to search through the array. I appreciate the help, but while these commands would work in some situations, it won't work in mine. The whole finding-if-it's-in-the-list thing has to happen in the ereg that I pass to grep. __ Do you Yahoo!? Yahoo! Web Hosting - Let the expert host your site http://webhosting.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Still having ereg migranes
<> Not sure I get this but, again, I can't use $_REQUEST or explode or in_array at this point. The entire process needs to happen in the shell_exec() command, because I'd much rather have that handle the whole shebang than PHP. __ Do you Yahoo!? Yahoo! Web Hosting - Let the expert host your site http://webhosting.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Pause for user input?
The idea is to have the script start to load, prompt for a question or more, then use the data from the response to complete loading the page and avoid having to post all of the variables from page to page to get all of the responses back. A lot of the questions are formed based on the answers to previous questions so I'm trying to keep the number of separate pages to a minimum by using such a technique. I understand that Java can provide this function, but I want to do as much with PHP and as little as possible with Java. Larry S. Brown MCSE President/CEO Dimension Networks, Inc. Member ICCA (727) 723-8388 -Original Message- From: @ Edwin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 20, 2002 11:29 AM To: Larry Brown Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Pause for user input? Hello, "Larry Brown" <[EMAIL PROTECTED]> wrote: > Does anyone know of a method to pause during the processing of a script to > prompt a user for information and then incorporate the user's response for > the remainder of the script? ... in addition to what the others already said, let me just ask a couple of questions: 1. Do you really need to "pause"? What did you exactly mean by "pause"? 2. Is it even necessary to "pause"? Just wondering... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] web server and permissions
Please B/CC me, thank you. I am on a site that has all the files in both the /home/sitename/www/ directory and a directory we'll call /home/directory/includes/ with the following permisssions: rwxr-x--r The group I have in /etc/group does not have anyone in it, including me. The server reads everything fine and the php engine can include fine from the /home/sitename/includes/ directory. The problem is, everyone else on the site can read the includes directory as well, including my database password file which get's included. What I would like to set up is: [1] the apache/php engine can include from the includes directory, but not just spit it out. I think that is taken care of by the .htaccess file already. [2] the apache/php process is in my group, and everything I want to go out has the group permissions set to rwx--r--- (do php/html/inc files also have to be executable to be serverd?) [3] 'everyone' does not have the ability to read my files on myserver. Is this the way to do it? What is the normal way permission are set up for users/apache/groups/everyone? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] interpreting variables containing in another variable
--- ROBERT MCPEAK <[EMAIL PROTECTED]> wrote: > I've got a variable - $email_body, that contain's other variables. > For example, echo "$email_body," might look like this: > > $name, $address, $phone, $blah > > I want those variables to interpreted with corresponding values set > earlier in the script. So, in effect, where name=bob, address=101 > east main, phone=555-, and blah=foo, echo "$email_body" would > look like this: > > bob, 101 east main, 555-, foo Check out the eval() function: http://www.php.net/manual/en/function.eval.php Also, you might want to consider altering your approach slightly. For example, maybe something like this would be more appropriate: $email_body = "$name, $address, $phone, $blah"; If you echo $email_body in this case, it will output: bob, 101 east main, 555-, foo Good luck. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] interpreting variables containing in anothervariable
Duh!!! Thanks! Being a newbie hurts sometimes. >>> Chris Shiflett <[EMAIL PROTECTED]> 11/20/02 01:50PM >>> --- ROBERT MCPEAK <[EMAIL PROTECTED]> wrote: > I've got a variable - $email_body, that contain's other variables. > For example, echo "$email_body," might look like this: > > $name, $address, $phone, $blah > > I want those variables to interpreted with corresponding values set > earlier in the script. So, in effect, where name=bob, address=101 > east main, phone=555-, and blah=foo, echo "$email_body" would > look like this: > > bob, 101 east main, 555-, foo Check out the eval() function: http://www.php.net/manual/en/function.eval.php Also, you might want to consider altering your approach slightly. For example, maybe something like this would be more appropriate: $email_body = "$name, $address, $phone, $blah"; If you echo $email_body in this case, it will output: bob, 101 east main, 555-, foo Good luck. Chris -- 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] failded to connect with imap
Warning: imap_open(): Couldn't open stream {192.168.0.1:143}INBOX in /www/imap.php on line 4 can't connect: Certificate failure for 192.168.0.1: self signed certificate: /C=--/ST=SomeState/L=SomeCity/O=SomeOrganization/OU=SomeOrganizationalUnit [EMAIL PROTECTED] Any suggestions? -- Jochen Kaechelin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to: If($var != '#' OR '#')
--- Jason Wong <[EMAIL PROTECTED]> wrote: > On Thursday 21 November 2002 01:34, Ryan Gallagher wrote: > > if( ( $_GET['sc'] != 2 ) OR ( $_GET['sc'] != 8 ) ){ > > /* > >* Do Foo provided sc is anything but a 2 or 8 > >*/ > > do foo; > > } > > > > Assuming of course that you meant to exclude cases of 2 or 8. > > The above would not have the intended effect. My boolean maths is > extremely rusty but I think it is equivalent to saying: > > if (!($_GET['sc'] == 2 AND $_GET['sc'] == 8)) > > Which means your code above is *always* TRUE, so do foo is always > executed! Your boolean math may be rusty, but you are correct. :-) I think, however, that he was simply focusing on a literal interpretation of the original poster's code without considering if it made sense. If you want to exclude 2 *and* exclude 8 (saying things aloud can sometimes reveal obvious logic problems), just write it like this: if($_GET["sc"] != 2 && $_GET["sc"] != 8) { ... } Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to: If($var != '#' OR '#')
Quoting Jason Wong <[EMAIL PROTECTED]>: > On Thursday 21 November 2002 01:34, Ryan Gallagher wrote: > > > Try: > > > > if( ( $_GET['sc'] != 2 ) OR ( $_GET['sc'] != 8 ) ){ > > /* > >* Do Foo provided sc is anything but a 2 or 8 > >*/ > > do foo; > > } > > > > Assuming of course that you meant to exclude cases of 2 or 8. It's a bit > > hard to tell what your intended event for 8 is. > > The above would not have the intended effect. My boolean maths is extremely > rusty but I think it is equivalent to saying: > > if (!($_GET['sc'] == 2 AND $_GET['sc'] == 8)) > > Which means your code above is *always* TRUE, so do foo is always executed! > > In any case you can easily test it by mentally plugging in values 1 to 8 for > > $_GET['sc'] and evaluating it for yourself. I'll shut up now, teaches me to reply to this list too early in the morning and without coffee. ;-) BTW, what I posted would ALWAYS execute, because of _OR_. If it's 2, then it's not 8, so one of the two sides would be true. Here's a corrected one: if( ( $_GET['sc'] != 2 ) AND ( $_GET['sc'] != 8 ) ){ /* * Do Foo provided sc is anything but a 2 or 8 */ do foo; } -- Ryan T. Gallagher [EMAIL PROTECTED] International Studies Abroad http://www.studiesabroad.com (512)480-8522 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] copying tables
Is anyone using php and iframes? I have a php script "; ?> The script within the frame, auction.php, has buttons that when clicked sends parameters back to this iframe script which calls the auction.php script again with the new parameters. Everything works fine, the only problem is as I click the buttons, each time the frame gets smaller and smaller. Any suggestions? Thanks, Eddie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] copying tables
I apologize, I meant to add a new message, not respond to the copy tables message. -Original Message- From: Edward Peloke [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 20, 2002 2:30 PM To: PHP Subject: RE: [PHP] copying tables Is anyone using php and iframes? I have a php script "; ?> The script within the frame, auction.php, has buttons that when clicked sends parameters back to this iframe script which calls the auction.php script again with the new parameters. Everything works fine, the only problem is as I click the buttons, each time the frame gets smaller and smaller. Any suggestions? Thanks, Eddie -- 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] copying tables
On Thursday 21 November 2002 03:34, Edward Peloke wrote: > I apologize, I meant to add a new message, not respond to the copy tables > message. When you want to start a new topic please don't do so by replying to an existing one. Because if you do: - You have started a new thread by taking an existing posting and replying to it while you changed the subject. That is bad, because it breaks threading. Whenever you reply to a message, your mail client generates a "References:" header that tells all recipients which posting(s) your posting refers to. A mail client uses this information to build a threaded view ("tree view") of the postings. With your posting style you successfully torpedoed this useful feature; your posting shows up within an existing thread it has nothing to do with. Always do a fresh post when you want to start a new thread. To achieve this, click on "New message" instead of "Reply" within your mail client, and enter the list address as the recipient. You can save the list address in your address book for convenience. - -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* As for the women, though we scorn and flout 'em, We may live with, but cannot live without 'em. -- Frederic Reynolds */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Newbie: php/mysql (Select)
Hi... I'm with a little sintax problem... The question is that i have two search fields (titulotxt and cdstxt) and i want to create an mysql condition... i trying: $sql1=($titulotxt) ? "titulo like '%".$titulotxt."%'":""; $sql2=($cdstxt) ? "cds like '$cdstxt'":""; $sql="SELECT * FROM divx WHERE" .$sql1 " && " .$sql2 " ORDER BY titulo"; but the bastard is giving me a sintax error on the 3 line... Can anyone teach me how i must do to validate the mysql condition and make it work? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php