|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general-digest-help_at_lists.php.net
Date: Wed Nov 20 2002 - 13:23:29 CST
php-general Digest 20 Nov 2002 19:23:29 -0000 Issue 1716
Topics (messages 125200 through 125302):
Re: REPLY NEEDED
125200 by: Jonathan Sharp
Re: plus sign has changed to space after POST
125201 by: Chris Shiflett
Re: exploding strings
125202 by: Ernest E Vogelsinger
125215 by: COQUET,JULIEN (HP-France,ex1)
Re: date
125203 by: Matthieu Le Corre
using move_uploaded_file
125204 by: nirat.mail.com.np
125205 by: Michael Hazelden
125206 by: nirat.mail.com.np
Re: catching a robot or spider - asking too
125207 by: W. Enserink
Problem with browscap.ini
125208 by: Martin Magnusson
125209 by: Ernest E Vogelsinger
Re: Help with functions()
125210 by: Chris Hewitt
Re: Problem whith query in query
125211 by: Marek Kilimajer
125214 by: Ernest E Vogelsinger
125275 by: Ryan Gallagher
125281 by: Ernest E Vogelsinger
125282 by: Ryan Gallagher
Re: Loooooooooonnnnnnnnnnggggggggg
125212 by: Marek Kilimajer
Re: PHP Application Framework
125213 by: Alexandru COSTIN
125271 by: Ryan Gallagher
Simple Question on Date conversion
125216 by: Jack
125218 by: John W. Holmes
editing .htaccess / .htpasswrd
125217 by: Oliver Witt
Re: isapi mod on iis
125219 by: Brian McGarvie
PHP/ASP - ODBC - CHARSET - PROBLEM
125220 by: dark rotter
flush() issue
125221 by: Jock Pereira
125222 by: Marek Kilimajer
125223 by: John W. Holmes
125238 by: Andrew Brampton
125254 by: . Edwin
Pause for user input?
125224 by: Larry Brown
125228 by: Ernest E Vogelsinger
125230 by: Marek Kilimajer
125250 by: Chris Shiflett
125257 by: . Edwin
125291 by: Larry Brown
apache user authentification problems
125225 by: Duncan
class query
125226 by: Nick Wilson
125244 by: Nick Wilson
manage Form data
125227 by: ??????? ?????ta?
125229 by: JohnMeyer
125231 by: ??????? ?????ta?
125234 by: Jason Wong
125255 by: . Edwin
125272 by: John W. Holmes
Listing a table /Limit
125232 by: Marco Bleeker
125233 by: Matt Schroebel
125236 by: Jason Wong
125239 by: Marek Kilimajer
Unlink
125235 by: JohnMeyer
125237 by: Jason Wong
125242 by: Adam Voigt
125263 by: Mark Charette
Re: cURL with PHP Help?
125240 by: UberGoober
125279 by: Steve Keller
pass file data through forms
125241 by: ??????? ?????ta?
125251 by: . Edwin
Re: New generation of PHP Program, reaction to ASP.NET
125243 by: shi ziye
125247 by: Jon Haworth
manual trans-sid?
125245 by: Thomas Weber
125253 by: Chris Shiflett
Stripping HTML tags, but keeping entities...
125246 by: David Russell
125249 by: . Edwin
scrolling data from db
125248 by: Edward Peloke
125256 by: Support . Fourthrealm.com
125258 by: Marek Kilimajer
125260 by: . Edwin
Re: catching a robot or spider
125252 by: Tom Woody
125259 by: Stuart
Re: Looking for compiled Windows PHP installation with multistring fts support
125261 by: . Edwin
Server-server file copy question
125262 by: Richard Fox
125265 by: Ernest E Vogelsinger
125266 by: . Edwin
125268 by: rw.xend.net
125269 by: rw.xend.net
Re: which PHP debugger?
125264 by: Nick Oostveen
FTP_SITE and FTP_EXEC prob
125267 by: António Godinho
DBF files
125270 by: Tony Burgess
How to: If($var != '#' OR '#')
125273 by: Jami
125274 by: John W. Holmes
125276 by: Jason Wong
125277 by: Ryan Gallagher
125280 by: Jonathan Wright
125288 by: Jason Wong
125297 by: Chris Shiflett
125298 by: Ryan Gallagher
Still having ereg migranes
125278 by: Mako Shark
125283 by: Marek Kilimajer
125284 by: John W. Holmes
125289 by: Mako Shark
125290 by: Mako Shark
Re: THANK YOU! - How to: If($var != '#' OR '#')
125285 by: Jami
interpreting variables containing in another variable
125286 by: ROBERT MCPEAK
125287 by: Adam Voigt
125293 by: Chris Shiflett
125294 by: ROBERT MCPEAK
web server and permissions
125292 by: Dennis Gearon
failded to connect with imap
125295 by: Jochen Kächelin
copying tables
125296 by: Steve Buehler
125299 by: Chris Shiflett
125300 by: Edward Peloke
125301 by: Edward Peloke
125302 by: Jason Wong
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
MY GOODNESS! Thing of what 126M would do for the open source movement!
We could run php.net on gold plated servers! Not to mention a 64 way sun
box with all the bells and whistles, and spruced up with urb3r cool
lighting kits!
or thing of all the cd's you could send to AOL for 126M!
any other ideas?
-js
OrangeHairedBoy wrote:
> I think I'd rather go with the 126M USD being offered by Desmond West (see
> email entitled "STRICTLY CONFIDENCIAL") instead of this measly 31.5M USD.
>
> If anyone wants to contact the people who own ecplaza.net (for fun), here's
> the info from whois:
>
> Registrant:
> EC Plaza Network Inc.
> 1F, Shinho Villart, 452-3 Sungnae2dong, Kangdong ku
> Seoul, Korea
>
> Domain Name: ECPLAZA.NET
> Registrar: HANGANG Systems,Inc. dba doregi.com
>
> Administrative, Technical, Billing Contact:
> Kim jieum domadmin
ecplaza.net
> 82-2-476-1144
> 82-2-482-0339
>
>
> "Michael Oshodi" <moshodi
ecplaza.net> wrote in message
> news:php.general-125196
news.php.net...
>
> ASSISTANCE
>
> WE ARE MEMBERS OF A SPECIAL COMMITTEE FOR BUDGET AND
> PLANNING OF THE NIGERIA NATIONAL PETROLEUM CORPORATION
> (NNPC)IN WEST AFRICA. THIS COMMITTEE IS PRINCIPALLY CONCERNED
> WITH CONTRACT AWARDS AND APPROVAL. WITH OUR POSITIONS,
> WE HAVE SUCCESSFULLY SECURED FOR OURSELVES THE SUM OF
> THIRTHY ONE MILLION, FIVE HUNDRED THOUSAND UNITED
> STATES DOLLARS (US$31.5M). THIS AMOUNT WAS CAREFULLY
> MANIPULATED BY OVER-INVOICING OF AN OLD CONTRACT.
>
> BASED ON INFORMATION GATHERED ABOUT YOU, WE BELIEVE
> YOU WOULD BE IN A POSITION TO HELP US IN TRANSFERING
> THIS FUND (US$31.5M) INTO A SAFE ACCOUNT. IT HAS BEEN
> AGREED THAT THE OWNER OF THE ACCOUNT WILL BE
> COMPENSATED WITH 30% OF THE REMITTED FUNDS, WHILE WE
> KEEP 60% AS THE INITIATORS AND 10% WILL BE SET ASIDE
> TO OFFSET EXPENSES AND PAY THE NECESSARY TAXES.WE
> INTEND TO USE PART OF OUR OWN SHARE TO IMPORT FROM
> YOUR COUNTRY AGRICULTURAL AND CONSTRUCTION MACHINERY.
> THIS IS BECAUSE THE PRESENT GOVERNMENT OF MY COUNTRY
> IS EMPHASISING ON PROVIDING FOOD AND HOUSING FOR ALL
> ITS CITIZENS BEFORE THE NEXT ELECTION. HENCE,
> AGRICULTURAL AND CONSTRUCTION EQUIPMENT ARE IN HIGH
> DEMAND OVER HERE. WE SHALL ALSO NEED YOUR ASSISTANCE
> IN THIS REGARD ON A COMMISSION TO BE AGREED UPON WHEN
> WE FINALLY MEET.
>
> ALL MODALITIES OF THIS TRANSACTION HAVE BEEN CAREFULLY
> WORKED OUT AND ONCE STARTED WILL NOT TAKE MORE THAN
> SEVEN (7) WORKING DAYS, WITH YOUR FULL SUPPORT. THIS
> TRANSACTION IS 100% RISK FREE.
>
> MOREOVER, WE SHALL NEED THE FOLLOWING FROM YOU TO
> ENABLE US BEGIN THE TRANSACTION FORMALLY. THEY ARE;
> YOUR FULL NAME AND ADDRESS OR YOUR COMPANY NAME,
> ADDRESS AND TELEPHONE/FAX NUMBERS, YOUR BANKERS
> NAME AND ADDRESS, YOUR ACCOUNT NUMBER AND NAME.
> THIS INFORMATION WILL BE USED ALONGSIDE OTHER VITAL
> DOCUMENTS OVER HERE IN PREPARING THE NECESSARY
> APPLICATION FOR PAYMENT TO THE CONCERNED QUARTERS
> WHERE PAYMENT APPROVALS WOULD BE SECURED IN FAVOUR
> OF YOUR COMPANY FOR THE PAYMENT OF OUR FUND(US$31.5M)
> INTO YOUR NOMINATED ACCOUNT FOR US ALL. BY OUR APPLICATION,
> IT WILL BE ASSUMED THAT THIS SUM IS BEING REQUESTED AS
> PAYMENT, WHICH IS LONG-OUTSTANDING, FOR A CONTRACT,
> WE SHALL CLAIM WITH OUR POSITION, YOU OR YOUR COMPANY
> EXECUTED FOR (NNPC) SOMETIME IN 1997. HENCE, WE SHALL
> FOLLOW ALL THE LEGAL OFFICIAL PROTOCOLS USUALLY
> OBSERVED BY FOREIGN CONTRACTORS WHENEVER THEY
> ARE DEMANDING PAYMENT FOR CONTRACTS EXECUTED
> FOR THE GOVERNMENT OF MY COUNTRY.
>
> FURTHERMORE, IMMEDIATELY THE FINAL APPROVAL IS GRANTED,
> THE FUND WILL BE TRANSFERRED INTO YOUR ACCOUNT WITHIN 72
> HOURS, BY WHICH TIME MY PARTNERS AND I WILL BE IN YOUR COUNTRY
> FOR THE FINAL DISBURSEMENT IN THE RATIO ALREADY SPELT OUT TO YOU.
>
> PLEASE, YOU SHOULD ENDEAVOUR TO GIVE US AN ACCOUNT
> WHICH YOU HAVE ABSOLUTE CONTROL OVER. THIS IS VERY
> IMPORTANT BECAUSE WE WOULD NOT WANT A SITUATION
> WHEN THE MONEY IS IN THE ACCOUNT, YOU NOW TELL US
> YOU WOULD NEED TO BE AUTHORISED BY ANOTHER PERSON
> BEFORE WE CAN HAVE OUR OWN SHARE.
>
> YOU WILL NOT BE REQUIRED TO TRAVEL OUT OF YOUR COUNTRY,
> ME AND MY PARTNERS, WE TRAVEL DOWN TO YOUR COUNTRY
> FOR THE DISBURSEMENT OF THE FUND, AFTER THE FINAL TRANSACTION.
> WE WILL ALSO DISCUSS ABOUT OIL BUSINEES IN MY COUNTRY
> WHEN WE COME DOWN OVER THERE. BECAUSE WE WOULD
> LIKE TO ESTABLISH A JOINT BUSINESS WITH YOU. THAT IS
> WE WILL USE YOUR NAME TO REGISTER AND
> INCORPORATE AN OIL COMPANY IN MY COUNTRY.
>
> BESIDES, ON THE COMPLETION OF THIS TRANSFER,
> ALL DOCUMENTS USED FOR THE PURPOSE WILL BE
> WITHDRAWN FROM THE QUARTERS THEY ARE SUBMITTED
> BY OUR CONTACTS IN THESE OFFICES AND DESTROYED,
> THEREAFTER. SO, THERE WILL NOT BE ANY PROBLEM
> ARISING FROM THIS TRANSACTION NOW OR IN THE FUTURE.
> IF THIS PROPOSAL SATISFIES YOU, PLEASE REACH US ONLY
> BY EMAIL FOR MORE INFORMATION.
>
> PLEASE, TREAT AS URGENT AND VERY IMPORTANT.
>
> YOURS FAITHFULLY,
>
> CHIEF MICHAEL OSHODI
>
>
>
>
>
>
attached mail follows:
That's a terrible idea.
Not only does this avoid fixing the real issue (tries to fix the
symptom instead of the problem), you're telling him to change all
spaces to + signs.
Imagine a form asking for your name. You enter "Hugh Danaher" only to
see it translated into "Hugh+Danaher" on the server.
Chris
--- Hugh Danaher <hdanaher
earthlink.net> wrote:
> Just do ereg_replace(" ","+",$var) on the receiving end and be done
> with it.
> > From: <bhkwan
ThoughtWorks.com>
> >
> > > After upgrade to 4.2.3, plus "+" sign has changed to space
> > > after POST. I have checked the mailing list but can't find any
> > > help to turn this off forever! is this a bug in PHP?
attached mail follows:
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 '<font color="red">',array_shift($as), '</font>, ', join(', ', $as);
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
attached mail follows:
heh does the job :)
<?php $no=("1+2+3"); $number=explode("+", $no); foreach ($number as $key=>$value){ if ($value==1) { print '<span style="color:red;">'.$value.'</span>';
} } ?>
-----Original Message-----
From: Michael P. Carel [mailto:mikecarel
teamglac.com]
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
attached mail follows:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
2 fonction for that ;) written specially for the same pb as you ;)
// transformation de la date jj/mm/aaaa -> aaaa-mm-jj function modate ( $date ) { $inter= split("/",$date) ; $date=$inter[2]."-".$inter[1]."-".$inter[0] ; return $date ; }
// transformation de la date aaaa-mm-jj -> jj/mm/aaaa 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 : Matthieu.lecorre
ac-nantes.fr
\____________________________________
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE921i5iQG6YxCcev4RAu1jAJ0UFm1XAp7C8zKeOPc/CEA32jZpdgCfReBY 3uhaeYd614pugiecRDDCYOM= =7f9l -----END PGP SIGNATURE-----
attached mail follows:
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
attached mail follows:
http://www.php.net/manual/sk/features.file-upload.php
found in 2 seconds searching the PHP site for "Uploaded File".
-----Original Message-----
From: nirat
mail.com.np [mailto:nirat
mail.com.np]
Sent: 20 November 2002 05:32
To: php-general
lists.php.net
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
*********************************************************************
attached mail follows:
thanks will give it a try
"Michael Hazelden" <michael.hazelden
ocado.com> wrote in message
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: nirat
mail.com.np [mailto:nirat
mail.com.np]
> Sent: 20 November 2002 05:32
> To: php-general
lists.php.net
> 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
>
> *********************************************************************
attached mail follows:
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" <steve
extremewattage.co.uk>
To: <php-general
lists.php.net>
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 <a href=\'http://www.whois.sc\'>Whois Source</a>" > > > > 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
info
pdd.nl
-------------------------
attached mail follows:
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\
attached mail follows:
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/
attached mail follows:
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
>
attached mail follows:
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 > > > > > >
attached mail follows:
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/
attached mail follows:
Quoting Ernest E Vogelsinger <ernest
vogelsinger.at>:
> 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 ryanstudiesabroad.com International Studies Abroad http://www.studiesabroad.com (512)480-8522
attached mail follows:
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/
attached mail follows:
Quoting Ernest E Vogelsinger <ernest
vogelsinger.at>:
> 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 ryanstudiesabroad.com International Studies Abroad http://www.studiesabroad.com (512)480-8522
attached mail follows:
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" <kilimajer
webglobe.sk>
>Newsgroups: php.general
>To: "PHP" <php-general
lists.php.net>
>Sent: Tuesday, November 19, 2002 2:30 PM
>Subject: Re: Fw: [PHP] Loooooooooonnnnnnnnnnggggggggg
>
>
>
>
>>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" <justin
indent.com.au>
>>>To: "Tristan Carron" <tcarron
bsv.fr>
>>>Sent: Tuesday, November 19, 2002 12:23 PM
>>>Subject: Re: [PHP] Loooooooooonnnnnnnnnnggggggggg
>>>
>>>
>>>
>>>
>>>
>>>
>>>>You should post this to the list, not me direct :)
>>>>
>>>>Justin
>>>>
>>>>
>>>>on 19/11/02 10:10 PM, Tristan Carron (tcarron
bsv.fr) 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" <justin
indent.com.au>
>>>>>Newsgroups: php.general
>>>>>To: "Hacook" <hacook
free.fr>; <php-general
lists.php.net>
>>>>>Sent: Tuesday, November 19, 2002 12:09 PM
>>>>>Subject: Re: [PHP] Loooooooooonnnnnnnnnnggggggggg
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>on 19/11/02 10:00 PM, Hacook (hacook
free.fr) 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
>>>>--------------------
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>
>
>
attached mail follows:
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!
attached mail follows:
Quoting Alexandru COSTIN <acostin
iakt.rdsnet.ro>:
> 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). <The Horde Project> 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 ryanstudiesabroad.com International Studies Abroad http://www.studiesabroad.com (512)480-8522
attached mail follows:
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
attached mail follows:
> 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...
attached mail follows:
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
attached mail follows:
The Internet Guest user needs to have permissions to the foler the script's are located. This should remove the auth request.
"Chris Edwards" <chris.edwards
obinet.com> wrote in message
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
> chris.edwards
obinet.com
> http://www.OuterBanksInternet.com
>
attached mail follows:
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
attached mail follows:
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 ("<br><strong><font size=\"2\" face=\"Arial, Helvetica, sans-serif\"> $this_dealer: Sending to $thismall</font></strong><br>");
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______________________________
attached mail follows:
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 ("<br><strong><font size=\"2\" face=\"Arial, Helvetica, sans-serif\"> $this_dealer: Sending to $thismall</font></strong><br>"); > > > > 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______________________________ > > >
attached mail follows:
What do the include/EXPORT_*.php files do?
---John Holmes...
> -----Original Message-----
> From: Jock Pereira [mailto:jpereira
dataonesoftware.com]
> Sent: Wednesday, November 20, 2002 8:28 AM
> To: php-general
lists.php.net
> 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 ("<br><strong><font size=\"2\" face=\"Arial, Helvetica,
sans-
> serif\"> $this_dealer: Sending to
> $thismall</font></strong><br>");
>
>
>
> 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______________________________
attached mail follows:
Are you outputing each row in a table? IE won't start displaying the table until the </table> tag, that might be causing your problem...
Andrew
----- Original Message -----
From: "Jock Pereira" <jpereira
dataonesoftware.com>
To: <php-general
lists.php.net>
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 ("<br><strong><font size=\"2\" face=\"Arial, Helvetica, sans-serif\"> $this_dealer: Sending to $thismall</font></strong><br>");
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______________________________
attached mail follows:
Hello,
"Andrew Brampton" <andrew
bramp.freeserve.co.uk> wrote:
> Are you outputing each row in a table? > IE won't start displaying the table until the </table> tag, that might be > causing your problem...
...then, CSS to the rescue... :)
Try this:
<table style="table-layout:fixed"> ... </table>
HTH,
- E
attached mail follows:
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
attached mail follows:
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/
attached mail follows:
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 > > > > > >
attached mail follows:
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 <larry.brown
dimensionnetworks.com> 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?
attached mail follows:
Hello,
"Larry Brown" <larry.brown
dimensionnetworks.com> 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
attached mail follows:
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:copperwalls
hotmail.com]
Sent: Wednesday, November 20, 2002 11:29 AM
To: Larry Brown
Cc: php-general
lists.php.net
Subject: Re: [PHP] Pause for user input?
Hello,
"Larry Brown" <larry.brown
dimensionnetworks.com> 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
attached mail follows:
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
attached mail follows:
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
attached mail follows:
* 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
attached mail follows:
I want to sumbit data from a form and then view the data and then send it to the data base...
attached mail follows:
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.
attached mail follows:
Can you show me an example? I already tried that but it doesn't work...
----- Original Message -----
From: "JohnMeyer" <johnmeyer_1978
yahoo.com>
To: "??????? ?????ta?" <kouretas
vlsi.ee.upatras.gr>;
<php-general
lists.php.net>
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. > > > >
attached mail follows:
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. */
attached mail follows:
Hello,
"??????? ?????ta?" <kouretas
vlsi.ee.upatras.gr> 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
attached mail follows:
> -----Original Message-----
> From: ??????? ?????ta? [mailto:kouretas
vlsi.ee.upatras.gr]
> Sent: Wednesday, November 20, 2002 8:52 AM
> To: php-general
lists.php.net
> 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...
attached mail follows:
And how would I find out which portion (row number) the row would be in, that I would like to see in a listing?
<Q> 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 ? </Q>
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)
attached mail follows:
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:marco_bleeker
hetnet.nl]
> Sent: Wednesday, November 20, 2002 9:06 AM
> To: php-general
lists.php.net
> Cc: mschroebel
epooch.com
> 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?
>
> <Q>
> 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 ?
> </Q>
attached mail follows:
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!
> > <Q> > > 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 ? > > </Q>
-- 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!! */
attached mail follows:
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? > > <Q> > 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 ? > </Q> > > 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) > >
attached mail follows:
Does unlink work with wildcards e.g unlink("somefile*.*");
attached mail follows:
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. */
attached mail follows:
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 (adamcryptocomm.com) The Cryptocomm Group My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQA926JzF9k9BmZXCWYRAmUnAKC0yyQeaZzCRg6BFNAAEIcDYdfEvQCgrK7x 4e8WI3MGZjWlClH3mpUCY/U= =hLf6 -----END PGP SIGNATURE-----
attached mail follows:
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)
attached mail follows:
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" <skeller
healthtvchannel.org> wrote in message
news:5.1.1.6.0.20021119153639.00aa50e0
207.159.149.141...
> 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: skeller
healthtvchannel.org
> Web: www.healthtvchannel.org
>
attached mail follows:
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.
attached mail follows:
Is there any way of submitting a file , pass all the data for it throuhg another form and upload from another form?
attached mail follows:
Hello,
"??????? ?????ta?" <kouretas
vlsi.ee.upatras.gr> 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
attached mail follows:
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/
attached mail follows:
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
attached mail follows:
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
--- thomasyoungarts.org neo
gothic-chat.de
attached mail follows:
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 <thomas
youngarts.org> 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.
attached mail follows:
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'], '<B> <I> <P> <A> <LI> <OL> <UL> <EM> <BR> <TT> <STRONG> <BLOCKQUOTE> <DIV> <ECODE> ');
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: DavidR
BarloworldOptimus.com
web: www.BarloworldOptimus.com
- application/x-pkcs7-signature attachment: smime.p7s
attached mail follows:
Hello,
"David Russell" <DavidR
BarloworldOptimus.com> wrote:
...[snip]...
> 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?
Have you tried this? http://www.php.net/manual/en/function.preg-replace.php
- E
attached mail follows:
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
attached mail follows:
Eddie, I use the attached on a site of mine... works with JavaScript and <DIV> 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
pbechard
fourthrealm.com
http://www.fourthrealm.com
Tel: 519-739-1652
- - - - - - - - - - - - - - - - - - - - -
- text/plain attachment: scroller.txt
attached mail follows:
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 > > > >
attached mail follows:
Hello,
"Edward Peloke" <epeloke
echoman.com> 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
attached mail follows:
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" <wilbert
pdd.nl> 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
> info
pdd.nl
> -------------------------
-- Tom Woody Systems Administrator NationWide Flood Research, Inc. phone: 214-631-0400 x209 fax: 214-631-0800Don't throw your computer out the window, throw the Windows out of your computer!
attached mail follows:
> On Tue, 19 Nov 2002 14:54:49 +0100
> "Wilbert Enserink" <wilbert
pdd.nl> 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
attached mail follows:
Hello,
"Simon Dedeyne" <Simon.Dedeyne
psy.kuleuven.ac.be> 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 :)
attached mail follows:
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
attached mail follows:
Message-Id: <5.1.1.6.2.20021120180608.02c01dd0
mail.vogelsinger.at>
Date: Wed, 20 Nov 2002 18:09:31 +0100
To: "Richard Fox" <rfox
sbsii.com>
From: Ernest E Vogelsinger <ernest
vogelsinger.at>
Cc: "PHP" <php-general
lists.php.net>
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="===========_1323830531=.ALT"
Subject: Re: [PHP] Server-server file copy question
--===========_1323830531=.ALT Content-Type: text/plain; charset="us-ascii"
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/
--===========_1323830531=.ALT--
attached mail follows:
Hello,
"Richard Fox" <rfox
sbsii.com> 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
attached mail follows:
Have you considered using rsync?
Quoting Richard Fox <rfox
sbsii.com>:
### 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 ### ### ###
attached mail follows:
Sorry - nevermind!
### Have you considered using rsync?
###
### http://samba.org/rsync
###
### Quoting Richard Fox <rfox
sbsii.com>:
###
### ### 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
###
###
attached mail follows:
Check out DBG, which is the PHP debugger that is used by most of the IDEs out there:
If you want a free, open source, IDE to use with it, check out:
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, bbonkosk
tampabay.rr.com wrote:
> > hmmmm...
> > 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 (adam
cryptocomm.com)
>The Cryptocomm Group
>My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc
attached mail follows:
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ó
attached mail follows:
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
attached mail follows:
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
attached mail follows:
> 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...
attached mail follows:
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. */
attached mail follows:
Quoting Jami <jami
jamisniche.com>:
> 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 ryanstudiesabroad.com International Studies Abroad http://www.studiesabroad.com (512)480-8522
attached mail follows:
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.. // maildjnauk.co.uk // www.djnauk.co.uk -- // life has no meaning unless we can enjoy what we've been given
attached mail follows:
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. */
attached mail follows:
--- Jason Wong <php-general
gremlins.biz> 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
attached mail follows:
Quoting Jason Wong <php-general
gremlins.biz>:
> 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 ryanstudiesabroad.com International Studies Abroad http://www.studiesabroad.com (512)480-8522
attached mail follows:
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 <INPUT TYPE="HIDDEN"> 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):
<INPUT TYPE = "HIDDEN" NAME = "numbers" VALUE = "1,2,3,4,5"> //beginning
<INPUT TYPE = "HIDDEN" NAME = "numbers" VALUE = "0,1,2,3,4,5"> //middle
<INPUT TYPE = "HIDDEN" NAME = "numbers" VALUE = "5,4,3,2,1"> //end
<INPUT TYPE = "HIDDEN" NAME = "numbers" VALUE = "1"> //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
attached mail follows:
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 <INPUT TYPE="HIDDEN"> 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): > ><INPUT TYPE = "HIDDEN" NAME = "numbers" VALUE = >"1,2,3,4,5"> //beginning > ><INPUT TYPE = "HIDDEN" NAME = "numbers" VALUE = >"0,1,2,3,4,5"> //middle > ><INPUT TYPE = "HIDDEN" NAME = "numbers" VALUE = >"5,4,3,2,1"> //end > ><INPUT TYPE = "HIDDEN" NAME = "numbers" VALUE = "1"> >//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 > > >
attached mail follows:
> 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 <INPUT TYPE="HIDDEN"> 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): > > <INPUT TYPE = "HIDDEN" NAME = "numbers" VALUE = > "1,2,3,4,5"> //beginning > > <INPUT TYPE = "HIDDEN" NAME = "numbers" VALUE = > "0,1,2,3,4,5"> //middle > > <INPUT TYPE = "HIDDEN" NAME = "numbers" VALUE = > "5,4,3,2,1"> //end > > <INPUT TYPE = "HIDDEN" NAME = "numbers" VALUE = "1"> > //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...
attached mail follows:
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
attached mail follows:
<<first way: if(ereg('([^0-9]|^)'.$your_number.'([^0-9]|$)',$_REQUEST['numbers']) ) second way: $numbers=explode(',',$_REQUEST['numbers']); if(in_array($your_number,$numbers))>>
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
attached mail follows:
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" <jami
jamisniche.com>
To: "PHP General" <php-general
lists.php.net>
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 > > > >
attached mail follows:
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-5555, and blah=foo, echo "$email_body" would look like this:
bob, 101 east main, 555-5555, foo
Any suggestions?
Thanks in advance.
-Bob
attached mail follows:
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-5555, and blah=foo, echo "$email_body" would look like this: > > bob, 101 east main, 555-5555, 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 (adamcryptocomm.com) The Cryptocomm Group My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQA929KCF9k9BmZXCWYRAi8hAJ9lL3XgDYJzTqkbUY9gol/ZfhrbfQCggWnB r0d/tXmnQRiYnIMQySCKdow= =8fpK -----END PGP SIGNATURE-----
attached mail follows:
--- ROBERT MCPEAK <RMCPEAK
jhuccp.org> 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-5555, and blah=foo, echo "$email_body" would
> look like this:
>
> bob, 101 east main, 555-5555, 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-5555, foo
Good luck.
Chris
attached mail follows:
Duh!!! Thanks! Being a newbie hurts sometimes.
>>> Chris Shiflett <shiflett
php.net> 11/20/02 01:50PM >>>
--- ROBERT MCPEAK <RMCPEAK
jhuccp.org> 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-5555, and blah=foo, echo "$email_body" would
> look like this:
>
> bob, 101 east main, 555-5555, 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-5555, foo
Good luck.
Chris
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
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?
attached mail follows:
Warnin