php-general Digest 4 Apr 2001 22:33:06 -0000 Issue 608 Topics (messages 47008 through 47136): Re: File create permissions 47008 by: Christian Reiniger Re: Monthly Drawing Winner! 47009 by: Knut H. Hassel Nielsen 47023 by: B. van Ouwerkerk 47093 by: news.mail.thecasino.com 47094 by: TV Karthick Kumar 47097 by: Rasmus Lerdorf 47098 by: Joe Stump 47099 by: Phillip Bow 47101 by: Michael Kimsal 47104 by: Thomas Deliduka 47107 by: B. van Ouwerkerk 47109 by: Joe Stump problem with php-ftp ftpbuf? 47010 by: Jan Grafström unset() 47011 by: Patrick Dunford Re: Seeking PHP case studies 47012 by: Christian Reiniger 47014 by: Nettie Feldman Re: measuring cpu time 47013 by: Christian Reiniger Re: regexp question - extracting wanted ascii characters only? 47015 by: Christian Reiniger 47040 by: Jorg Krause Reading from a webpage 47016 by: James Kneebone 47017 by: Plutarck 47018 by: Jason Lotito 47019 by: Plutarck 47021 by: Steve Werby safe_mode and file-uploads 47020 by: B. Tenhumberg Re: Oracle NVL equivalent for MySQL? 47022 by: Maxim Derkachev SID ????? environment variable??? 47024 by: Scott Fletcher 47029 by: Felix Kronlage 47034 by: Scott Fletcher equivalent of asp's <%= strTest %> 47025 by: Costas 47035 by: elias 47042 by: Mark Roedel XML 47026 by: Andreas Sisask 47036 by: Sebastien Roy 47054 by: Joe Stump 47061 by: Andreas Sisask 47068 by: Sebastien Roy TheCasino.com: You have been removed! 47027 by: support.thecasino.com 47033 by: support.thecasino.com 47038 by: support.thecasino.com 47046 by: support.thecasino.com 47047 by: support.thecasino.com 47048 by: Andrew Rush 47049 by: support.thecasino.com 47050 by: support.thecasino.com 47051 by: Zeus 47052 by: support.thecasino.com 47053 by: support.thecasino.com echo ("test"); 47028 by: phpa 47030 by: Johan Holst Nielsen Re: Sneaky solution 47031 by: Boget, Chris 47032 by: Boget, Chris Mime type 47037 by: phpa 47044 by: Knut H. Hassel Nielsen Re: enclosing files into mail 47039 by: elias PHP code to verify existing URL??? 47041 by: Mark Eckeard 47043 by: Steve Werby Include files 47045 by: Mike 47060 by: Mike 47062 by: Mike 47065 by: bizzk 47066 by: Mike 47069 by: Boget, Chris 47102 by: Christian Reiniger 47126 by: CC Zona stop these solfix.net messages 47055 by: B. van Ouwerkerk 47072 by: Renze Munnik 47089 by: B. van Ouwerkerk 47111 by: Krznaric Michael HOWTO: Dynamically Create A Form 47056 by: Scott Walter 47071 by: Michael Kimsal 47073 by: Renze Munnik 47103 by: Reuben D Budiardja reusing MySQL results 47057 by: George Wright 47058 by: Altunergil, Oktay 47059 by: Mark Roedel ms acces to mySQL 47063 by: bizzk Re: FLASH AND PHP 47064 by: Richard Kirk Re: reusing MySQL results - SOLVED 47067 by: George Wright PHP and MD5 passwords? 47070 by: Chris Hutton [RaptorNet] 47082 by: Pierre-Yves Lemaire 47083 by: Chris Adams Re: Session variables and register_global 47074 by: Johnson, Kirk Item in two db tables 47075 by: bill 47080 by: Joe Sheble (Wizaerd) 47084 by: Steve Werby mysql_result() 47076 by: Jordan Elver 47078 by: matt help - parsing text file 47077 by: Kurth Bemis 47124 by: Kurth Bemis TEST 47079 by: Mike Building an array from a URL 47081 by: Mike Gifford 47085 by: Joe Stump 47088 by: Knut H. Hassel Nielsen 47091 by: Delbono Re: [PHP-DB] mysql_result() 47086 by: Andrew Hill Re: help with parse 47087 by: Lindsay Adams MIT for free 47090 by: Boget, Chris any other way ? 47092 by: TV Karthick Kumar insert into multiple tables 47095 by: Toni Barskile PAIR NUMBER 47096 by: Jon 47123 by: CC Zona getting IMAP part ID´s 47100 by: joel.abcweb.com.ar file upload question 47105 by: Joe Stump BUG - Someone else please verify B4 I file 47106 by: Krznaric Michael 47113 by: Data Driven Design 47114 by: Jeff Carnahan 47115 by: Andrew Rush 47119 by: Steve Werby Select case equivelent 47108 by: Allen May 47110 by: Jon Rosenberg 47112 by: Johnson, Kirk filename into variable. 47116 by: Michael Roark 47117 by: Joe Stump 47122 by: Morgan Curley PHP.net is slow 47118 by: Matt Friedman 47120 by: Steve Werby 47121 by: Michael Kimsal 47136 by: James Moore Problems porting from MySQL Server to MSSQL7 Server 47125 by: Adrian Jurjica 47134 by: Jeff Carnahan Re: reusing MySQL results -- resetting mySQL pointer with mysql_data_seek() 47127 by: Daevid Vincent 47128 by: George Wright 47129 by: Juan C. Borrero 1 MySQL Database?? 47130 by: Frank K 47131 by: Martín Marqués CGI ver. showing exec line 47132 by: Thomas Deliduka PHP + IRC 47133 by: Puarot APC breaking under freebsd! 47135 by: Dan Phoenix Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] ----------------------------------------------------------------------
On Tuesday 03 April 2001 23:06, you wrote: > I am trying to create and open a file in php4 using > > $fp = fopen($filename,r) > > php4 is compiled as an apache module. I keep gettting errors, and > cannot create the file. The directory is chmod 777, apache is running > as user apache. > > Any ideas why I can't write this file? man fopen Tip: look at the little "r" -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offence. - Edsger W. Dijkstra
Hehehehe ;) How much is that on each of us ? And were do we collect this ? On Wed, 4 Apr 2001 [EMAIL PROTECTED] wrote: > > Dear PHP Group [EMAIL PROTECTED], > > Congratulations! You just won US$10.00!! > > We just gave away US$25,000.00!! And you PHP Group [EMAIL PROTECTED] are > among the lucky 2500 people randomly selected to receive a FREE US$10.00 Trial > Account at TheCasino.com - the Internet's Premier Online Casino! > ........ -- Knut ------ Knut H. Hassel Nielsen Principal Engineer / Avdelingsingeniør Norwegian University of Science and Technology / NTNU Department of Computer and Information Science / IDI N-7491 Trondheim, Norway Phone Office / Telefon jobb : (+47) 73 59 18 46 Fax Office / Telefax jobb : (+47) 73 59 17 33 Cell. Phone / Mobiltelefon : 91 59 86 06
>Hehehehe ;) > >How much is that on each of us ? >And were do we collect this ? Dunno, but they seem to target quite a few lists.. perhaps we all need to honor them with a unsubscribe.. Just clicking the link they provided.. Give their server something to do :-) Bye. B.
Dear PhpList wives (E-mail), Congratulations! You just won US$10.00!! We just gave away US$25,000.00!! And you PhpList wives (E-mail) are among the lucky 2500 people randomly selected to receive a FREE US$10.00 Trial Account at TheCasino.com - the Internet's Premier Online Casino! Account Status for PhpList wives (E-mail): Live Account Balance: US$5.00 (your cash account) Live Buffer Balance: US$5.00 (for extended play!) To access your "Winning Account", please go to: http://special.TheCasino.com/drawing.cs?winner=PhpList&lastname=(E-mail)&[EMAIL PROTECTED] Again, congratulations to you PhpList wives (E-mail), and to the rest of our most recent instant money winners!! Enjoy your VIP visit to TheCasino.com! Sincerely, Ms. Kaara Moore Director of Relations [EMAIL PROTECTED] http://www.TheCasino.com TheCasino.com - Better Than Life!! (TM) Serving Winners since 1999 - Now with 100% Bonus on Every Deposit! ========================================================================== If you no longer wish to be considered for future Prize Give-Aways, please click on the following link to remove yourself from our drawings: http://www.TheCasino.com/remove.me?[EMAIL PROTECTED] ==========================================================================
Can't we just get rid of this spam: [EMAIL PROTECTED] and not allow to continue. I am sure the list master (in php.net) can do it, for the sake of the list. Hope he's hearing !. It's a requisition. Thanks in adv. ~ Karthick ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 04, 2001 5:17 PM Subject: [PHP] Monthly Drawing Winner! > > Dear PhpList wives (E-mail), > > Congratulations! You just won US$10.00!! > > We just gave away US$25,000.00!! And you PhpList wives (E-mail) are among the lucky 2500 people > randomly selected to receive a FREE US$10.00 Trial Account at TheCasino.com - the > Internet's Premier Online Casino! > > Account Status for PhpList wives (E-mail): > Live Account Balance: US$5.00 (your cash account) > Live Buffer Balance: US$5.00 (for extended play!) > > To access your "Winning Account", please go to: > > http://special.TheCasino.com/drawing.cs?winner=PhpList&lastname=(E-mail)&add [EMAIL PROTECTED] > > > Again, congratulations to you PhpList wives (E-mail), and to the rest of our > most recent instant money winners!! > > Enjoy your VIP visit to TheCasino.com! > > Sincerely, > > Ms. Kaara Moore > Director of Relations > [EMAIL PROTECTED] > http://www.TheCasino.com > > TheCasino.com - Better Than Life!! (TM) > Serving Winners since 1999 - Now with 100% Bonus on Every Deposit! > > > ========================================================================== > If you no longer wish to be considered for future Prize Give-Aways, please click on the > following link to remove yourself from our drawings: > > http://www.TheCasino.com/remove.me?[EMAIL PROTECTED] > ========================================================================== > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > >
Done. Anything from mail.thecasino.com and thecasino.com is now blocked. -Rasmus On Wed, 4 Apr 2001, TV Karthick Kumar wrote: > Can't we just get rid of this spam: [EMAIL PROTECTED] and not allow to > continue. > I am sure the list master (in php.net) can do it, for the sake of the list. > Hope he's hearing !. > It's a requisition. > > Thanks in adv. > > ~ Karthick
You have to give the spammers credit - why compile huge lists of people when you can just spam precompiled lists (ie the php-general list) and let them do all the work of distributing the spam. This is a tricky loophole as well - I know using relays to distribute spam isn't legal, but what about lists? --Joe On Wed, Apr 04, 2001 at 10:04:53AM -0700, Rasmus Lerdorf wrote: > Done. Anything from mail.thecasino.com and thecasino.com is now blocked. > > -Rasmus > > On Wed, 4 Apr 2001, TV Karthick Kumar wrote: > > > Can't we just get rid of this spam: [EMAIL PROTECTED] and not allow to > > continue. > > I am sure the list master (in php.net) can do it, for the sake of the list. > > Hope he's hearing !. > > It's a requisition. > > > > Thanks in adv. > > > > ~ Karthick > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] /******************************************************************************\ * Joe Stump - PHP/SQL/HTML Developer * * http://www.care2.com - http://www.miester.org - http://gtk.php-coder.net * * "Better to double your money on mediocrity than lose it all on a dream." * \******************************************************************************/
Aww shoot. How am I supposed to win now? :) -- phill "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Done. Anything from mail.thecasino.com and thecasino.com is now blocked. > > -Rasmus
<cheesemode="ON"> If you're using PHP, you're already a winner (in my book anyway!) </cheesemode> :) Phillip Bow wrote: > Aww shoot. How am I supposed to win now? :) > -- > phill > > "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Done. Anything from mail.thecasino.com and thecasino.com is now blocked. > > > > -Rasmus > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED]
On 4/4/2001 1:32 PM this was written: > <cheesemode="ON"> > If you're using PHP, you're already a winner (in my book anyway!) > </cheesemode> LOL -- Thomas Deliduka IT Manager ------------------------- New Eve Media The Solution To Your Internet Angst http://www.neweve.com/
>- I >know using relays to distribute spam isn't legal, but what about lists? Most listsoftware (as far as I know) will allow the admin to block non-members from sending to a list.. Not completely foolproof.. but it can be much help.. certainly if you can add a blacklist to prevent these spammers from coming back.. Bye, B.
> >- I > >know using relays to distribute spam isn't legal, but what about lists? > > Most listsoftware (as far as I know) will allow the admin to block > non-members from sending to a list.. Not completely foolproof.. but it can > be much help.. certainly if you can add a blacklist to prevent these > spammers from coming back.. True, ezmlm (wich kicks ass), allows all of these. I suggest anyone who hasn't checked out qmail on the list to check it out. It works great with PHP and I've even made my own mailing list using qmail with PHP :O) --Joe > > Bye, > > > > B. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] /******************************************************************************\ * Joe Stump - PHP/SQL/HTML Developer * * http://www.care2.com - http://www.miester.org - http://gtk.php-coder.net * * "Better to double your money on mediocrity than lose it all on a dream." * \******************************************************************************/
Hi! I tryed the ftp script found in php manual. I got this errormessage: ------- Warning: Unable to find ftpbuf 0 in /home/myName/public_html/sess/ftpfile.php3 on line 6 ------- What does ftpbuf mean? Thanks for any help. Regards Jan
I wrote a function inside a file which I included with a require() call. The function takes four arguments by reference (because I need to pass back four values). The first thing it does is to call unset() four times to unset these arguments, so that it can enter new data into them. This will clear the variable values in the calling script of course, but is not a problem because the function needs to clear them so it can put data in them. However it was a surprise to find that the variables contained data when checked on the last line of the function, but when checked in the calling code after the function call had been made, they were empty. Removing the calls to unset() in the function resolved the problem and I have put the unset() calls into the calling code immediately before calling the function. This works but still leaves me with the question. -- ======================================================================= Patrick Dunford, Christchurch, NZ - http://pdunford.godzone.net.nz/ Rejoice in the Lord always. I will say it again: Rejoice! -- Philippians 4:4 http://www.heartlight.org/cgi-shl/todaysverse.cgi?day=20010404 ======================================================================= Created by Mail2Sig - http://pdunford.godzone.net.nz/software/mail2sig/
On Wednesday 04 April 2001 01:47, you wrote: > Hello. > > I posted something about this a few days ago, and am > reiterating my request again. We're looking for > PHP case studies that we can use in an upcoming project. > Interested parties should contact me directly at > [EMAIL PROTECTED] > > and we'll give you more information at that point. Well, what about giving more information now, so that people can decide whether they are interested? :) -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offence. - Edsger W. Dijkstra
Hello, Michael. We have many case studies on PHP Please go to http://www.zend.com/zend/cs/ Please let me know if you need any other assistance. Nettie Feldman, marketing product manager, Zend Technologies Ltd. email: [EMAIL PROTECTED] -----Original Message----- From: Michael Kimsal [mailto:[EMAIL PROTECTED]] Sent: Wed, April 04, 2001 1:48 AM To: [EMAIL PROTECTED] Subject: Seeking PHP case studies Hello. I posted something about this a few days ago, and am reiterating my request again. We're looking for PHP case studies that we can use in an upcoming project. Interested parties should contact me directly at [EMAIL PROTECTED] and we'll give you more information at that point. Thanks. :)
On Wednesday 04 April 2001 04:43, you wrote: > Im trying to optimize some php/mysql code. Does anyone know a way to > measure the amount cpu time a php script consumes? Use "ab" (ApacheBench - comes with apache) if possible. -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offence. - Edsger W. Dijkstra
On Wednesday 04 April 2001 11:23, you wrote: > Is it possible through the regexp to specify that I > only want some of the ASCII characters from the binary > stream? Here is the perl equivalent: > > /([\040-\176\s]{3,})/g > > I want only those words that are minimum 3 characters > and I want the characters to match the ASCII numbers > from 40 to 176. Why do you ask if you already have the solution? man preg_match -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offence. - Edsger W. Dijkstra
> From: Erick Papadakis [mailto:[EMAIL PROTECTED]] > > Hi, > > I need to do a simple thing. I want to read a binary > file (e.g., microsoft word, excel etc) and then > extract only the text from it. I am using simple > fopen() and fread() and when I print out the contents > of the file, it returns me the text but apart from the > text, there is some junk which is probably because of > the file being binary. > > Is it possible through the regexp to specify that I > only want some of the ASCII characters from the binary > stream? Here is the perl equivalent: > > /([\040-\176\s]{3,})/g > > I want only those words that are minimum 3 characters > and I want the characters to match the ASCII numbers > from 40 to 176. > You can use the regex likewise to perl. Try it here: http://www.php.comzept.de/rexpr/index.php4 Instead of the /g option use the function preg_grep() in PHP. Read the file in an array with file(), then grep through the array with the regex to get the right lines. Want a string? implode() without delimiter. Joerg Krause ****************************************************** E-Mail: [EMAIL PROTECTED] Info: www.joerg.krause.net German Reference Handbook: www.php.comzept.de/referenz ******************************************************
Hello List, I have a small problem reading information from a webpage. I have a list of about 40 pages that I need to read (doing it in a loop as the layout is the same on each page). What I would like to know is whether the information read from a webpage is actually the information that we see or whether it is the underlying source code. I understand that depending on what it is will mean changes to the way I retrieve the information. If you need additional information, please contact me and let me know. Thank-you. James
You get the source code itself. Also if the webpage in question examines the browser of the requestor your webserver may get different code than you would if you pulled it up in your browser yourself. -- Plutarck Should be working on something... ...but forgot what it was. "James Kneebone" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello List, > > I have a small problem reading information from a webpage. I have a list of > about 40 pages that I need to read (doing it in a loop as the layout is the > same on each page). > > What I would like to know is whether the information read from a webpage is > actually the information that we see or whether it is the underlying source > code. I understand that depending on what it is will mean changes to the > way I retrieve the information. > > If you need additional information, please contact me and let me know. > > Thank-you. > > James > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
> Hello List, > > I have a small problem reading information from a webpage. I have > a list of > about 40 pages that I need to read (doing it in a loop as the > layout is the > same on each page). > > What I would like to know is whether the information read from a > webpage is > actually the information that we see or whether it is the > underlying source > code. I understand that depending on what it is will mean changes to the > way I retrieve the information. > > If you need additional information, please contact me and let me know. > > Thank-you. > > James Go to the website. Then, View Source in the Browser. That is what you will get when you 'read' the web page. This is because any server side information is already parsed by the time it sends the information out. You should feel happy this is true, I don't want people getting a hold of passwords or other vital information. =) Jason Lotito www.NewbieNetwork.net Where those who can, teach; and those who can, learn.
When I said source code, btw, I meant the "html source code", not the programming source code, lol. Unless you can access the page through FTP, that is. In which case it wouldn't be gained through apache, so it wouldn't be parsed. -- Plutarck Should be working on something... ...but forgot what it was.
"James Kneebone" <[EMAIL PROTECTED]> wrote: > I have a small problem reading information from a webpage. I have a list of > about 40 pages that I need to read (doing it in a loop as the layout is the > same on each page). > > What I would like to know is whether the information read from a webpage is > actually the information that we see or whether it is the underlying source > code. If your pulling data from a webpage served by a web server, you are reading the HTML source code for the page. If the page happens to be generated using a programming language like PHP you won't be reading the PHP source code. -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/
Hello! Where can I find a nice and COMPLETE safe_mode-description? At php.net I haven't found the demanded information. What kind of restrictions do I have relating file-system, /tmpdir, file-uploads and last not least file-permissions of files who are written by apache who is running at nobody:nogroup. -- Berthold Tenhumberg (live long and prosper...)
Hello Dominick, Wednesday, April 04, 2001, 12:32:26 PM, you wrote: DV> Maybe a bit offtopic, but is there an equivalent for the NVL function in DV> Oracle for MySQL? DV> NVL is a function that returns a given result when a value is null >From MySQL manual: IFNULL(expr1,expr2) If expr1 is not NULL, IFNULL() returns expr1, else it returns expr2. IFNULL() returns a numeric or string value, depending on the context in which it is used. -- Best regards, Maxim Derkachev mailto:[EMAIL PROTECTED] Symbol-Plus Publishing Ltd. phone: +7 (812) 324-53-53 http://www.Books.Ru -- All Books of Russia
In the script, I have here ..... >> header("Location: https://testsecure.e-cbi.org/user_index.php?".SID); I have been wondering what is "SID"? I ask someone who wrote the script and he said that it is an environment variable. Does this have to do with the database session ID? SSL? Anyone know what it is? Anyone know where I can find the information about it? (This code, "SID", kept HTTP_REFERER from working in Netscape 6.) Thanks, Scott
On Wed, Apr 04, 2001 at 08:59:00AM -0400, Scott Fletcher wrote: > I have been wondering what is "SID"? SID stands for Session ID. (which identifies/maps a running session to user) http://www.php.net/manual/en/ref.session.php will explain sessions in general. -fkr -- gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0 8A48 0D31 9BD3 D9AC 74D0 |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE | |all your base are belong to us | shame on me | fkr@IRCnet |
Thanks, Scott "Felix Kronlage" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Wed, Apr 04, 2001 at 08:59:00AM -0400, Scott Fletcher wrote: > I have been wondering what is "SID"? SID stands for Session ID. (which identifies/maps a running session to user) http://www.php.net/manual/en/ref.session.php will explain sessions in general. -fkr -- gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0 8A48 0D31 9BD3 D9AC 74D0 |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE | |all your base are belong to us | shame on me | fkr@IRCnet | -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Is there an equivalent in PHP of the following code: equivalent of asp's <%= strTest %> But not echo "" Thanks
Yes, i tried: <?=$str?> and it worked fine! ""Costas"" <[EMAIL PROTECTED]> wrote in message 9af60k$dof$[EMAIL PROTECTED]">news:9af60k$dof$[EMAIL PROTECTED]... > Is there an equivalent in PHP of the following code: > > equivalent of asp's <%= strTest %> > > > > But not echo "" > > Thanks > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
> -----Original Message----- > From: Costas [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 04, 2001 8:08 AM > To: [EMAIL PROTECTED] > Subject: [PHP] equivalent of asp's <%= strTest %> > > > Is there an equivalent in PHP of the following code: > > equivalent of asp's <%= strTest %> > > But not echo "" If you've got asp-style tags enabled in your PHP configuration (see http://www.php.net/manual/en/configuration.php#ini.asp-tags for more info) then the syntax turns out to be just the same (see http://www.php.net/manual/en/language.basic-syntax.php for more info on that.) --- Mark Roedel ([EMAIL PROTECTED]) || "There cannot be a crisis next week. Systems Programmer / WebMaster || My schedule is already full." LeTourneau University || -- Henry Kissinger
Hello, Does php have some feature of using .dtd or .xsd in parsing an .xml file? I mean for example if I parse some .xml (which refers to some .dtd) it checks that the .xml is correct or if not then gives quite exact error about it. Andreas
Hi Andreas, Please let me know if you find something about that, it would be really nice! Regards, Sebastien Roy [EMAIL PROTECTED] Andreas Sisask wrote: > Hello, > > Does php have some feature of using .dtd or .xsd in parsing an .xml file? > I mean for example if I parse some .xml (which refers to some .dtd) it > checks that the .xml is correct or if not then > gives quite exact error about it. > > Andreas > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED]
AFAIK php doesn't care about extensions (ie .html vs .htm) - if it's valid XML and expat supports it then you should be good to go. I've parsed .rdf just fine... --Joe On Wed, Apr 04, 2001 at 03:09:36PM +0200, Andreas Sisask wrote: > Hello, > > Does php have some feature of using .dtd or .xsd in parsing an .xml file? > I mean for example if I parse some .xml (which refers to some .dtd) it > checks that the .xml is correct or if not then > gives quite exact error about it. > > Andreas > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] /******************************************************************************\ * Joe Stump - PHP/SQL/HTML Developer * * http://www.care2.com - http://www.miester.org - http://gtk.php-coder.net * * "Better to double your money on mediocrity than lose it all on a dream." * \******************************************************************************/
I have a docdef.dtd file which defines a document. Now, if I parse some doc1.xml file which refers to this docdef.dtd, that is it contains the line <!DOCTYPE whateva SYSTEM "docdef.dtd"> I want to chek if the doc1.xml really is correct as defined - has the syntax (elements, nesting and whatever I have defined in docdef1.dtd) And as I got answers from several people, it is not possible. Andreas "Joe Stump" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > AFAIK php doesn't care about extensions (ie .html vs .htm) - if it's valid > XML and expat supports it then you should be good to go. I've parsed .rdf just > fine... > > --Joe > > On Wed, Apr 04, 2001 at 03:09:36PM +0200, Andreas Sisask wrote: > > Hello, > > > > Does php have some feature of using .dtd or .xsd in parsing an .xml file? > > I mean for example if I parse some .xml (which refers to some .dtd) it > > checks that the .xml is correct or if not then > > gives quite exact error about it. > > > > Andreas > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > /*************************************************************************** ***\ > * Joe Stump - PHP/SQL/HTML Developer * > * http://www.care2.com - http://www.miester.org - http://gtk.php-coder.net * > * "Better to double your money on mediocrity than lose it all on a dream." * > \*************************************************************************** ***/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
Sorry, but i'm not sure to understand your response... (maybe it's the question that I don't understand) I thought that the question was ansking for a simple way to validate a xml document with his associated dtd by a php script. It would be very useful for me to validate the xml document once it has been created. Only to be sure that it is still well-formed after that I made my changes on it. Regards, Sebastien Roy [EMAIL PROTECTED] Joe Stump wrote: > AFAIK php doesn't care about extensions (ie .html vs .htm) - if it's valid > XML and expat supports it then you should be good to go. I've parsed .rdf just > fine... > > --Joe > > On Wed, Apr 04, 2001 at 03:09:36PM +0200, Andreas Sisask wrote: > > Hello, > > > > Does php have some feature of using .dtd or .xsd in parsing an .xml file? > > I mean for example if I parse some .xml (which refers to some .dtd) it > > checks that the .xml is correct or if not then > > gives quite exact error about it. > > > > Andreas > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > /******************************************************************************\ > * Joe Stump - PHP/SQL/HTML Developer * > * http://www.care2.com - http://www.miester.org - http://gtk.php-coder.net * > * "Better to double your money on mediocrity than lose it all on a dream." * > \******************************************************************************/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED]
http://www.TheCasino.com: Better Than Life! (tm) Since 1999 - Now With 100% "Buffer Bonuses" On All Deposits!! Dear [EMAIL PROTECTED], This email is to confirm that we have "removed" you from our mailing list - per your request! You will no longer be considered for TheCasino.com Monhtly Prize Drawings. Please let us know if we can be of further assistance. The Support Staff TheCasino.com, Corp. [EMAIL PROTECTED] http://www.theCasino.com
http://www.TheCasino.com: Better Than Life! (tm) Since 1999 - Now With 100% "Buffer Bonuses" On All Deposits!! Dear [EMAIL PROTECTED], This email is to confirm that we have "removed" you from our mailing list - per your request! You will no longer be considered for TheCasino.com Monhtly Prize Drawings. Please let us know if we can be of further assistance. The Support Staff TheCasino.com, Corp. [EMAIL PROTECTED] http://www.theCasino.com
http://www.TheCasino.com: Better Than Life! (tm) Since 1999 - Now With 100% "Buffer Bonuses" On All Deposits!! Dear [EMAIL PROTECTED], This email is to confirm that we have "removed" you from our mailing list - per your request! You will no longer be considered for TheCasino.com Monhtly Prize Drawings. Please let us know if we can be of further assistance. The Support Staff TheCasino.com, Corp. [EMAIL PROTECTED] http://www.theCasino.com
http://www.TheCasino.com: Better Than Life! (tm) Since 1999 - Now With 100% "Buffer Bonuses" On All Deposits!! Dear [EMAIL PROTECTED], This email is to confirm that we have "removed" you from our mailing list - per your request! You will no longer be considered for TheCasino.com Monhtly Prize Drawings. Please let us know if we can be of further assistance. The Support Staff TheCasino.com, Corp. [EMAIL PROTECTED] http://www.theCasino.com
http://www.TheCasino.com: Better Than Life! (tm) Since 1999 - Now With 100% "Buffer Bonuses" On All Deposits!! Dear [EMAIL PROTECTED], This email is to confirm that we have "removed" you from our mailing list - per your request! You will no longer be considered for TheCasino.com Monhtly Prize Drawings. Please let us know if we can be of further assistance. The Support Staff TheCasino.com, Corp. [EMAIL PROTECTED] http://www.theCasino.com
on 4/4/01 9:26 AM, [EMAIL PROTECTED] at [EMAIL PROTECTED] wrote: > You will no longer be considered for TheCasino.com Monhtly Prize Drawings. oh, damn. now my day is ruined. have a great day andy -- ******************************************************* Andrew Rush :: Lead Systems Developer :: MaineToday.com ******************************************************* "A friend of the devil is a friend of mine" - R. Hunter
http://www.TheCasino.com: Better Than Life! (tm) Since 1999 - Now With 100% "Buffer Bonuses" On All Deposits!! Dear [EMAIL PROTECTED], This email is to confirm that we have "removed" you from our mailing list - per your request! You will no longer be considered for TheCasino.com Monhtly Prize Drawings. Please let us know if we can be of further assistance. The Support Staff TheCasino.com, Corp. [EMAIL PROTECTED] http://www.theCasino.com
http://www.TheCasino.com: Better Than Life! (tm) Since 1999 - Now With 100% "Buffer Bonuses" On All Deposits!! Dear [EMAIL PROTECTED], This email is to confirm that we have "removed" you from our mailing list - per your request! You will no longer be considered for TheCasino.com Monhtly Prize Drawings. Please let us know if we can be of further assistance. The Support Staff TheCasino.com, Corp. [EMAIL PROTECTED] http://www.theCasino.com
Damn 10 emails in a day. Someone is out to get us. ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 04, 2001 10:23 PM Subject: [PHP] TheCasino.com: You have been removed! > > > http://www.TheCasino.com: Better Than Life! (tm) > Since 1999 - Now With 100% "Buffer Bonuses" On All Deposits!! > > Dear [EMAIL PROTECTED], > > This email is to confirm that we have "removed" you from our mailing > list - per your request! > > You will no longer be considered for TheCasino.com Monhtly Prize Drawings. > > Please let us know if we can be of further assistance. > > > The Support Staff > TheCasino.com, Corp. > [EMAIL PROTECTED] > http://www.theCasino.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > >
http://www.TheCasino.com: Better Than Life! (tm) Since 1999 - Now With 100% "Buffer Bonuses" On All Deposits!! Dear [EMAIL PROTECTED], This email is to confirm that we have "removed" you from our mailing list - per your request! You will no longer be considered for TheCasino.com Monhtly Prize Drawings. Please let us know if we can be of further assistance. The Support Staff TheCasino.com, Corp. [EMAIL PROTECTED] http://www.theCasino.com
http://www.TheCasino.com: Better Than Life! (tm) Since 1999 - Now With 100% "Buffer Bonuses" On All Deposits!! Dear [EMAIL PROTECTED], This email is to confirm that we have "removed" you from our mailing list - per your request! You will no longer be considered for TheCasino.com Monhtly Prize Drawings. Please let us know if we can be of further assistance. The Support Staff TheCasino.com, Corp. [EMAIL PROTECTED] http://www.theCasino.com
Hey there, sorry if this has been covered before. I am not sure if this makes a difference but I see in some books echo written as: echo ("Hello"); and in others just: echo "Hello"; Do the brackets make a difference. Thanks
>sorry if this has been covered before. I am not sure if this makes a difference but I see in some books echo written as: > >echo ("Hello"); > >and in others just: > >echo "Hello"; > >Do the brackets make a difference. Hmmm, nope. You can also write print "Hello"; or print("Hello"); /Johan
> If you want to check where your submit is comming from, then > you need to check the REFERER url..... do so by useing the globa > $HTTP_REFERER variable. Except that, as I point out in the message that the person you responded to replied to, $HTTP_REFERER by no means is guaranteed to have a value. It can be suppressed, spoofed of the browser might not even support it. It is not something you can rely on. Chris
> This may not matter for your application -- are you writing a > financial app or a personal portfolio? -- but if you really need > to authenticate the source of data that comes from some other > IP address (as is the case with a web browser) then you're into > PGP keys and signed certificates. We are already using SSL. How would you use PGP on a web page? Chris
Hey there, anybody know where a list of mime type names can be found? I can generate and Excel doc - but I dont know the mime names of others such as Word etc etc. example code: Thanks <?php header( "Content-type: application/vnd.ms-excel" ); ?> 123 123 123 10 10 10
On Wed, 4 Apr 2001, phpa wrote: > Hey there, > > anybody know where a list of mime type names can be found? I can generate and Excel >doc - but I dont know the mime names of others such as Word etc etc. > > example code: > > Thanks > > > > > <?php > > header( "Content-type: application/vnd.ms-excel" ); > > > ?> > > 123 123 123 > 10 10 10 > Isn't there a MIME.TYPES kind of file underneath your conf-region in your apache distribution ?? That should do it -- Knut ------ Knut H. Hassel Nielsen Principal Engineer / Avdelingsingeniør Norwegian University of Science and Technology / NTNU Department of Computer and Information Science / IDI N-7491 Trondheim, Norway Phone Office / Telefon jobb : (+47) 73 59 18 46 Fax Office / Telefax jobb : (+47) 73 59 17 33 Cell. Phone / Mobiltelefon : 91 59 86 06
If you scroll and search this news group you will find an answer already posted. ""Vlad"" <[EMAIL PROTECTED]> wrote in message 9ae9ia$vuf$[EMAIL PROTECTED]">news:9ae9ia$vuf$[EMAIL PROTECTED]... > Hi all > > How can I enclose files into my letter & send it from the php script (using > for example mail() function) > > Thanks, Vlad > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
Hi, Does anyone know of any PHP code that will take a URL from a form and go to the web & verify if it exists? What about search the META tags as well?? Thanks, Mark __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
"Mark Eckeard" <[EMAIL PROTECTED]> wrote: > Does anyone know of any PHP code that will take > a URL from a form and go to the web & verify if it > exists? fopen() will do it. You can use the socket functions. curl can be used if it was configured into your PHP install. You could also use an existing open source application like mnogosearch. > What about search the META tags as well?? Read the manual - there are functions specifically for this (though they won't work if the meta tags aren't exactly as expected). -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/
I'm trying to use html "include" syntax in a php page.If I use .shtml the php gets ignored .If I use php the <!--#include virtual="Nav.htm" --> the php gets ignored.Is there a way of doing this without using the php include function? Thanks Mike P [EMAIL PROTECTED]
I'm trying to use html "include" syntax in a php page.If I use .shtml the php gets ignored .If I use php the <!--#include virtual="Nav.htm" --> the php gets ignored.Is there a way of doing this without using the php include function? Thanks Mike P [EMAIL PROTECTED]
I'm trying to use html "include" syntax in a php page.If I use .shtml the php gets ignored .If I use php the <!--#include virtual="Nav.htm" --> the php gets ignored.Is there a way of doing this without using the php include function? Thanks Mike P [EMAIL PROTECTED]
<html> <head> <title></title> </head> <body> ...your HTML page... <br> <? include("footer.html"); ?> </body> </html> I got this from www.devshed.com (http://www.devshed.com/Server_Side/PHP/PHP101_1/page5.html). Check it out! See You, Bizzk ""Mike"" <[EMAIL PROTECTED]> schreef in bericht 9afcj1$o9l$[EMAIL PROTECTED]">news:9afcj1$o9l$[EMAIL PROTECTED]... > I'm trying to use html "include" syntax in a php page.If I use .shtml the > php gets ignored .If I use php the <!--#include virtual="Nav.htm" --> the > php gets ignored.Is there a way of doing this without using the php include > function? > Thanks > > Mike P > [EMAIL PROTECTED] > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
I'm trying to use html "include" syntax in a php page.If I use .shtml the php gets ignored .If I use php the <!--#include virtual="Nav.htm" --> the php gets ignored.Is there a way of doing this without using the php include function? Thanks Mike P [EMAIL PROTECTED]
> I'm trying to use html "include" syntax in a php page.If I > use .shtml the php gets ignored .If I use php the <!--#include > virtual="Nav.htm" --> the php gets ignored.Is there a way > of doing this without using the php include function? Set up the .shtml extension so that it is parsed as PHP. Chris
On Wednesday 04 April 2001 17:08, you wrote: > I'm trying to use html "include" syntax in a php page.If I use .shtml > the php gets ignored .If I use php the <!--#include virtual="Nav.htm" > --> the php gets ignored.Is there a way of doing this without using the > php include function? > Thanks Stop resubmitting this every few minutes! > > Mike P > [EMAIL PROTECTED] -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) "Software is like sex: the best is for free" -- Linus Torvalds
In article <9afah8$8d3$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Mike") wrote: > I'm trying to use html "include" syntax in a php page.If I use .shtml the > php gets ignored .If I use php the <!--#include virtual="Nav.htm" --> the > php gets ignored.Is there a way of doing this without using the php include > function? http://www.php.net/virtual/ -- CC
Hi, How about these messages from solfix.net ???? What have I done to deserve these.. Every message I send to this list is followed by one from solfix.. with a list of message commands.. Already send a message to their postmaster still getting them. If someone out there knows more about it.. STOP IT.. It's very annoying.. As far as I know it has nothing to do with the lists @php.net they're running ezmlm. The messages I'm getting are generated by Xtramail.. Bye, B.
"B. van Ouwerkerk" wrote: > > Hi, > > How about these messages from solfix.net ???? What have I done to deserve > these.. > > Every message I send to this list is followed by one from solfix.. with a > list of message commands.. > > Already send a message to their postmaster still getting them. > > If someone out there knows more about it.. STOP IT.. It's very annoying.. > As far as I know it has nothing to do with the lists @php.net they're > running ezmlm. The messages I'm getting are generated by Xtramail.. > > Bye, > > B. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] Same here! I tried about everything to get off those stupid msgs. Try going to their STMP server, you'll find out that your email-address is a valid user on their system. How funny is that? NOT FUNNY!!! I still haven't found anything to make 'm stop. -- * R&zE: *************************** ** Renze Munnik ** ** E: [EMAIL PROTECTED] ** M: +31 6 218 111 43 ***************************
>I tried about everything to get off those stupid msgs. Try going to >their STMP server, you'll find out that your email-address is a >valid user on their system. How funny is that? NOT FUNNY!!! > >I still haven't found anything to make 'm stop. They use Xtramail.. it's a mailclient.. I know how to stop these messages.. just a matter of using procmail.. One of two things: - they have created their own list and relay messages - they fucked up during installation of their Xtramail Charming.. they are in Istanbul. They can be contacted via (TEL)212 6621139 (FAX) 212 663 7350 Bye, B.
Yeah, same here -----Original Message----- From: B. van Ouwerkerk [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 04, 2001 10:44 AM To: [EMAIL PROTECTED] Subject: [PHP] stop these solfix.net messages Hi, How about these messages from solfix.net ???? What have I done to deserve these.. Every message I send to this list is followed by one from solfix.. with a list of message commands.. Already send a message to their postmaster still getting them. If someone out there knows more about it.. STOP IT.. It's very annoying.. As far as I know it has nothing to do with the lists @php.net they're running ezmlm. The messages I'm getting are generated by Xtramail.. Bye, B. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
I know this sounds very simple, but I only want certain fields on my form to be displayed depending on the selected item in a drop-down menu, that is part of the form. I cannot figure out how to get it to work, and I don't want to resubmit the form... *** I need it to be done on the fly.*** Your help is appreciated! Example of online form Source of Income: _________________ Dues: _________________ Type of Funds: ________________v Where ____ = text field ___v = drop-down menu Based on the selection of "Type of Funds" I want one more field to be displayed. pseudo-code: if (type_if_fund == 'Bank') { // then display text field to // enter the bank's name } else { // no need to display anything else } Thanks again. -Scott
Scott Walter wrote: > I know this sounds very simple, but I only want certain fields on my form > to be displayed depending on the selected item in a drop-down menu, that is > part of the form. I cannot figure out how to get it to work, and I don't > want to resubmit the form... *** I need it to be done on the fly.*** Your > help is appreciated! "I don't want to resubmit the form" You've pretty much killed it, imo. Not many browser can handle dynamically redrawing the form that's currently being displayed. You're best bet is to automatically resubmit the form and redraw the form based on that input. Or write a client side app that will do this data collection for you - you'll have much more control over the interface behaviour.
Scott Walter wrote: > > I know this sounds very simple, but I only want certain fields on my form > to be displayed depending on the selected item in a drop-down menu, that is > part of the form. I cannot figure out how to get it to work, and I don't > want to resubmit the form... *** I need it to be done on the fly.*** Your > help is appreciated! > > Example of online form > Source of Income: _________________ > Dues: _________________ > Type of Funds: ________________v > > Where ____ = text field > ___v = drop-down menu > > Based on the selection of "Type of Funds" I want one more field to be > displayed. > pseudo-code: > if (type_if_fund == 'Bank') { > // then display text field to > // enter the bank's name > } else { > // no need to display anything else > } > > Thanks again. > > -Scott > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] Well; PHP is server-side, so without resubmitting the form you won't be able to do this using PHP. That's why JavaScript is available. At this time I don't have enough time to explain exactly how to do this, but JS is the way for this. If your in a hurry and noone else in this list _has_ got the time to 'finish' my msg, try posting a msg on a JavaScript newgroup. E.g.: secnews.netscape.com: netscape.devs-javascript I'm sorry I can't help you out further at the time. Good luck! -- * R&zE: *************************** ** Renze Munnik ** ** E: [EMAIL PROTECTED] ** M: +31 6 218 111 43 ***************************
At 03:19 PM 4/4/01 +0000, you wrote: >Scott Walter wrote: > >Well; PHP is server-side, so without resubmitting the form you won't >be able to do this using PHP. That's why JavaScript is available. At >this time I don't have enough time to explain exactly how to do >this, but JS is the way for this. >If your in a hurry and noone else in this list _has_ got the time to >'finish' my msg, try posting a msg on a JavaScript newgroup. > >E.g.: >secnews.netscape.com: netscape.devs-javascript > >I'm sorry I can't help you out further at the time. >Good luck! This is kind of standard tutorial javascript. Try to find a tutorial site on the net for javascript, probably it will have an example of doing something like that. If I remember correctly, I think I saw something like that in the tutorial for javascrip in http://hotwired.lycos.com/webmonkey/ (it's been a long time). Hope that helps. Reuben D. Budiardja >-- > >* R&zE: > >*************************** >** Renze Munnik >** >** E: [EMAIL PROTECTED] >** M: +31 6 218 111 43 >*************************** > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED]
Hi All, I have a page with two forms. Both forms have drop-down option lists that are populated by a the same query. The query and db connection are all done before either form is introduced (this is the select statement, mysql_pconnect(), mysql_select_db(), and mysql_query()). I am using a while loop to build the options. The loop "engine" is mysql_fetch_object(), which writes out the values inside of option tags. Everything works fine the first time around, but when I call the query result for the second time, it's as if there are no rows to return so nothing is written out. No errors are being thrown. I know the resultant query object still exists, because I can access some of its properties (e.g.: mysql_num_rows has a value when it is called at this same place in the code as the second loop set). One caveat: This code DOES work if, just before the second call to build the second set of options, I resend the query (again using mysql_query()). I would think that looping on the object the first time should only read from it and not otherwise change it. Why am I unable to reuse this object in a second mysql_fetch_object() without resending the query? I have tried distinguishing the variable names that I set the results to for each loop and this doesn't seem to make a difference. Running PHP 4.0.4, MySQL 3.23.22-beta on Win2K. Thanks, George
use mysql_data_seek() just like you'd use reset() on an array. from php.net : "mysql_data_seek() moves the internal row pointer of the MySQL result associated with the specified result identifier to point to the specified row number. The next call to mysql_fetch_row() would return that row. " -----Original Message----- From: George Wright [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 04, 2001 10:35 AM To: '[EMAIL PROTECTED]' Subject: [PHP] reusing MySQL results Hi All, I have a page with two forms. Both forms have drop-down option lists that are populated by a the same query. The query and db connection are all done before either form is introduced (this is the select statement, mysql_pconnect(), mysql_select_db(), and mysql_query()). I am using a while loop to build the options. The loop "engine" is mysql_fetch_object(), which writes out the values inside of option tags. Everything works fine the first time around, but when I call the query result for the second time, it's as if there are no rows to return so nothing is written out. No errors are being thrown. I know the resultant query object still exists, because I can access some of its properties (e.g.: mysql_num_rows has a value when it is called at this same place in the code as the second loop set). One caveat: This code DOES work if, just before the second call to build the second set of options, I resend the query (again using mysql_query()). I would think that looping on the object the first time should only read from it and not otherwise change it. Why am I unable to reuse this object in a second mysql_fetch_object() without resending the query? I have tried distinguishing the variable names that I set the results to for each loop and this doesn't seem to make a difference. Running PHP 4.0.4, MySQL 3.23.22-beta on Win2K. Thanks, George -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
> -----Original Message----- > From: George Wright [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 04, 2001 9:35 AM > To: '[EMAIL PROTECTED]' > Subject: [PHP] reusing MySQL results > > > Hi All, > > I have a page with two forms. Both forms have drop-down option > lists that are populated by a the same query. The query and > db connection are all done before either form is introduced > (this is the select statement, mysql_pconnect(), mysql_select_db(), > and mysql_query()). > > I am using a while loop to build the options. The loop "engine" > is mysql_fetch_object(), which writes out the values inside of > option tags. > > Everything works fine the first time around, but when I call > the query result for the second time, it's as if there are no > rows to return so nothing is written out. No errors are being > thrown. Mysql_data_seek() is your friend. PHP has an internal pointer that it maintains as you move through your result set. At the end of your mysql_fetch_object while loop, that pointer is located at the end of the result set. Mysql_data_seek() is the means for you to "rewind" that pointer to the any specified row, including the first, of the result set. See http://php.net/manual/en/function.mysql-data-seek.php for more information, including sample code. --- Mark Roedel ([EMAIL PROTECTED]) || "There cannot be a crisis next week. Systems Programmer / WebMaster || My schedule is already full." LeTourneau University || -- Henry Kissinger
Hi, Does anyone has some program/script that converts a MS-Acces database to mySQL (prefferable in a .sql, .mysql or .txt file so i can upload it in phpMyAdmin). Thanks in Advance, Bizzk
If you put this code behind a button in Flash 5 (for example): on (release) { //Construct and XML object to hold request type requestXml = new XML(); requestElement = requestXml.createElement("REQUEST"); requestElement.attributes.request = "<MyRequest/>"; requestXml.contentType = 'text/xml'; requestXml.appendChild( requestElement ); requestXml.contentType = 'text/xml'; //Construct an XML object to hold the servers (webobject's) reply requestReplyXml = new XML(); requestReplyXml.onLoad = onRequestReply; //debug requestXml.xmlDecl = "<?xml version=\"1.0\" ?>"; trace( "Request sent" ); trace( requestXml.docTypeDecl ); trace( requestXml.xmlDecl ); //Send the request object to the server cRequest = "Sent request..."; requestXml.sendAndLoad( "http://www.foo.com/dataretriever.php", requestReplyXML ); cRequest = "Waiting For Reply..."; } function onRequestReply () { //Get the first XML element var e = this.firstChild; var _level0:TotalStoreNumber = 0; var i = -1; if( e != null ){ do { if( e.nodeName == "REQUESTREPLY") e = e.firstChild; else //Do what you want with the xml data //------------------------------------ if( e.nodeName == "STORE") { cStoreList += ( e.attributes.NAME + " - " + e.attributes.ADDRESS + newline ); if( i == -1 ) i = 1; else i++; eval( "_level0:n" + i ) = i; eval( "_level0:s" + i ) = e.attributes.NAME; eval( "_level0:c" + i ) = 111; } e = e.nextSibling; } while( e != null ) } } dataretriever.php can then query your DB/build an xml document (see php.net on how to read/create XML files in PHP) and output it as normal. Flash will recognise the xml and then you can parse the xml doc returned from your php script and build the flash object accordingly. Of course, you don't have to pass xml to your php script, you could just pass a URL parameter but xml gives you a great framework for expansion without breaking existing code. This line is the key: requestXml.contentType = 'text/xml'; and you won't find it mentioned in the current flash 5 documentation! HTH > -----Original Message----- > From: Godd [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 03, 2001 8:57 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] FLASH AND PHP > > > EXPLAIN !!!!!! > > I am not an XML expert > > Please explain. I have only now begun to read up on XML > > > > > ""Richard Kirk"" <[EMAIL PROTECTED]> wrote in message > 000d01c0bc55$6db38ee0$7200000a@proj00014">news:000d01c0bc55$6db38ee0$7200000a@proj00014... > > Or alternatively use the xml object to send an xml (flash 5) document to > php > > which then waits for an xml response. > > > > Cheers > > > > > -----Original Message----- > > > From: Lindsay Adams [mailto:[EMAIL PROTECTED]] > > > Sent: Monday, April 02, 2001 10:00 PM > > > To: PHP > > > Subject: Re: [PHP] FLASH AND PHP > > > > > > > > > If you are wanting to use pregenerated FLASH scripts ( and not > > > build them on > > > the fly with libswf or ming) then what you want to do, without > > > having to buy > > > Generator for your server is... > > > > > > In the beginning of you falsh file, do a load variables from > a PHP page, > > > that queries a database or whatever, gets the data, and echoes it > > > out to the > > > FLASH file in the format expected by load variables. Tack on > a variable > at > > > the end called loadDone and set it to 1 (or true) > > > In flash, you have to put in a loop in the second frame, or after the > > > loadvariables command, that checks to see if loadDone==1, to make > > > sure that > > > all the variables have loaded. > > > > > > You cannot assume that the variables will load within a certain > > > time period. > > > If they don't, the rest of your scripts will break. > > > > > > That, is how you can pass a lot of dynamic information into your > > > flash file, > > > without the use of server side generator install from macromedia. > > > > > > > > > > > > On 4/2/01 11:14 AM, "Godd" <[EMAIL PROTECTED]> wrote: > > > > > > > Now VRML and PHP may be possible but if you can get Flash to > > > get in the mix > > > > that will be so bad. > > > > > > > > What I really want to do is to get a flash file that will use > > > the pictures > > > > that I send to it via php and let it use that picture to do the > > > animation. > > > > > > > > Now what I am looking at is a flash file that displays info on > > > a product. > > > > now given the picture of the product and the information on the > > > product, I > > > > want flash to use that info with the events that I will place > > > in the flash > > > > file and let it do its thing. > > > > > > > > now that will be good. I am not sure what macromedia has along > > > this line. > > > > > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > To contact the list administrators, e-mail: > [EMAIL PROTECTED] > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > >
Excellent. Thanks for everyone's response. I put: mysql_data_seek($result_Section, 0); just ahead of the second while loop and it works perfectly. Thanks again, George > -----Original Message----- > From: Mark Roedel [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 04, 2001 10:52 AM > To: George Wright; [EMAIL PROTECTED] > Subject: RE: [PHP] reusing MySQL results > > > > -----Original Message----- > > From: George Wright [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, April 04, 2001 9:35 AM > > To: '[EMAIL PROTECTED]' > > Subject: [PHP] reusing MySQL results > > > > > > Hi All, > > > > I have a page with two forms. Both forms have drop-down option > > lists that are populated by a the same query. The query and > > db connection are all done before either form is introduced > > (this is the select statement, mysql_pconnect(), mysql_select_db(), > > and mysql_query()). > > > > I am using a while loop to build the options. The loop "engine" > > is mysql_fetch_object(), which writes out the values inside of > > option tags. > > > > Everything works fine the first time around, but when I call > > the query result for the second time, it's as if there are no > > rows to return so nothing is written out. No errors are being > > thrown. > > Mysql_data_seek() is your friend. > > PHP has an internal pointer that it maintains as you move through your > result set. At the end of your mysql_fetch_object while loop, that > pointer is located at the end of the result set. > > Mysql_data_seek() is the means for you to "rewind" that pointer to the > any specified row, including the first, of the result set. > > See > > http://php.net/manual/en/function.mysql-data-seek.php > > for more information, including sample code. > > > --- > Mark Roedel ([EMAIL PROTECTED]) || "There cannot be a crisis > next week. > Systems Programmer / WebMaster || My schedule is already full." > LeTourneau University || -- > Henry Kissinger >
Greetings, How would I go about using PHP to take an entered password, and check it against an encyrpted MD5 password in a database or flat-file? -/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/- Chris Hutton - KF4YDF [EMAIL PROTECTED] Senior Administrator 404.378.0499, Fax 877.471.6649 RaptorNet Systems http://www.raptor.nu -/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-
hum, that would do it? function encrypt_pwd( $pwd ){ if ( function_exists( md5 )){ $password = md5( $pwd ); }else{ $password = $pwd; } return $password; } py At 11:12 AM 4/4/01 -0400, you wrote: >Greetings, > >How would I go about using PHP to take an entered password, and check it >against an encyrpted MD5 password in a database or flat-file? > >-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/- >Chris Hutton - KF4YDF [EMAIL PROTECTED] >Senior Administrator 404.378.0499, Fax 877.471.6649 >RaptorNet Systems http://www.raptor.nu >-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/- > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] + ====================== + Pierre-Yves Lem@ire + E-MedHosting.com + (514) 729-8100 + [EMAIL PROTECTED] + ======================
On 4 Apr 2001 08:06:06 -0700, Chris Hutton [RaptorNet] <[EMAIL PROTECTED]> wrote: >How would I go about using PHP to take an entered password, and check it >against an encyrpted MD5 password in a database or flat-file? retrieve the record you'd like to check and compare it to md5($UserEnteredPassword).
> -----Original Message----- > From: Niklas Neumann [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 04, 2001 3:20 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Session variables and register_global > > session_register("test"); > $GLOBALS['HTTP_SESSION_VARS']['test'] = 'Hello World!'; > > does not work properly (session variable test is not > initialized with the > value 'Hello World!') if register_globals is turned on, but > when it is > turned off? $test and $GLOBALS['HTTP_SESSION_VARS']['test'] are *not* the same variable *while on the current page*: $test = "Goodbye cruel world!"; session_register("test"); $GLOBALS['HTTP_SESSION_VARS']['test'] = 'Hello World!'; echo $test; // prints Goodbye cruel world! echo $GLOBALS['HTTP_SESSION_VARS']['test']; // prints Hello World! What happens on the *next page* depends on whether register_globals is on or off. If it is on, then: echo $test; // prints Goodbye cruel world! echo $GLOBALS['HTTP_SESSION_VARS']['test']; // also prints Goodbye cruel world! The value in the GLOBAL variable $test gets written to $GLOBALS['HTTP_SESSION_VARS']['test'] when PHP stores the session variables between pages. If register_globals is off, then: echo $test; // prints nothing echo $GLOBALS['HTTP_SESSION_VARS']['test']; // prints Hello World! This is because there are no session variables outside of $HTTP_SESSION_VARS when register_globals is off. Also, all references to POST/GET variables must be made through the corresponding $HTTP_***_VARS arrays. This is a complicated aspect of PHP, and the manual is not real clear on how this all works. I strongly urge you to write up some short test code and see for yourself what is going on with register_globals. Kirk
If I want to find a list of items in one table whose id does not appear in another table, can that be done in one query? I can only figure it out if I use two queries. $result=mysql_query("SELECT id,item FROM table1"); while ($row=mysql_fetch_array($result)) { $thisid=$row["id"]; $thisitem=$row["item"]; $ckresult=mysql_query("SELECT id FROM table2 WHERE id=$thisid"); if (!mysql_num_rows($ckresult)) { echo "$thisitem using id $thisid is in table 1 but does not appear in table 2<BR>"; } // end if } // end while kind regards, bill hollett
I'm not 100% certain about this, but I believe you want to look at using a LEFT OUTER JOIN At 11:37 AM 4/4/01 -0400, bill wrote: >If I want to find a list of items in one table whose id does not appear >in another table, can that be done in one query? > >I can only figure it out if I use two queries. > >$result=mysql_query("SELECT id,item FROM table1"); > >while ($row=mysql_fetch_array($result)) { > $thisid=$row["id"]; > $thisitem=$row["item"]; > $ckresult=mysql_query("SELECT id FROM table2 WHERE id=$thisid"); > if (!mysql_num_rows($ckresult)) { > echo "$thisitem using id $thisid is in table 1 but does not >appear in table 2<BR>"; > } // end if > >} // end while > > > >kind regards, > >bill hollett > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED]
"bill" <[EMAIL PROTECTED]> wrote: > If I want to find a list of items in one table whose id does not appear > in another table, can that be done in one query? Absolutely. SELECT * FROM table_1 LEFT JOIN table_2 on table_2.id = table_1.id WHERE table_2.id IS NULL Read about LEFT JOINs in the manual. -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/
Hi, If I knnow that a query will only retrun one row, can I do thiss (below) rather than using a while loop for one record? $id = @mysql_result($result, 0, 'id'); $name = @mysql_result($result, 0, 'name'); $email = @mysql_result($result, 0, 'email'); $address1 = @mysql_result($result, 0, 'address1'); $address2 = @mysql_result($result, 0, 'address2'); $town_city = @mysql_result($result, 0, 'town_city'); $postcode = @mysql_result($result, 0, 'postcode'); Cheers, Jord
extract(mysql_fetch_array($result)); sets all the variables at once. much neater :) Maatt "Jordan Elver" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > If I knnow that a query will only retrun one row, can I do thiss (below) > rather than using a while loop for one record? > > $id = @mysql_result($result, 0, 'id'); > $name = @mysql_result($result, 0, 'name'); > $email = @mysql_result($result, 0, 'email'); > $address1 = @mysql_result($result, 0, 'address1'); > $address2 = @mysql_result($result, 0, 'address2'); > $town_city = @mysql_result($result, 0, 'town_city'); > $postcode = @mysql_result($result, 0, 'postcode'); > > Cheers, > > Jord > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
arg - i' at wits end. i need to parse a text file into a mysql insert statement. the statement isn't the problem its parsing the text file. heres a sample of the file West Chesterfield (603) 256-8278 V.90 (603) 307-2100 V.90 & K56flex (603) 307-2200 ISDN / DOV Hinsdale336 West Chesterfield256, 307, 614 Westmoreland399 Brattleboro, VT(802) 251, 254, 257, 258, 451 Jacksonville, VT(802) 368, 659 Newfane, VT(802) 221, 365 Putney, VT(802) 387, 536 Williamsville, VT(802) 348 Wilmington, VT(802) 464 i need to get the town the number is located (west chesterfield in this case) the 2 numbers (V.90 and ISDN - there may be more but i only need one of each),town(state), and the number. I'm still struggling with rexexp expressions...and just can't seem to hack this one around. I'm not opposed to perl.....:-) can ANYONE offer any help? ~kurth
arg - i' at wits end. i need to parse a text file into a mysql insert statement. the statement isn't the problem its parsing the text file. heres a sample of the file West Chesterfield (603) 256-8278 V.90 (603) 307-2100 V.90 & K56flex (603) 307-2200 ISDN / DOV Hinsdale336 West Chesterfield256, 307, 614 Westmoreland399 Brattleboro, VT(802) 251, 254, 257, 258, 451 Jacksonville, VT(802) 368, 659 Newfane, VT(802) 221, 365 Putney, VT(802) 387, 536 Williamsville, VT(802) 348 Wilmington, VT(802) 464 i need to get the town the number is located (west chesterfield in this case) the 2 numbers (V.90 and ISDN - there may be more but i only need one of each),town(state), and the number. I'm still struggling with rexexp expressions...and just can't seem to hack this one around. I'm not opposed to perl.....:-) can ANYONE offer any help? ~kurth
My posts seem to joined to a thread all of a sudden although I'm starting a new post each time Mike P [EMAIL PROTECTED]
Hello, I'm trying to build an array out of data submitted from a URL. Essentially, I want to pull certain records out of a database which have been selected on another form. The URL presently looks like this: superRSS.phtml?150=1150&superRSS166=1166&superRSS168=1168&superRSS175=1188 I'd like to take these independent variables and merge them into a single array: $array_superRSS = implode (":", $superRSS[]); So I can then pipe these values directly into another function: while ($array_superRSS) { display_superRSS($array_superRSS[]); } Obviously I'm missing a step or two here, but would really appreciate someone filling in some of the gaps. Thanks! Mike -- Mike Gifford, OpenConcept Consulting, http://openconcept.ca Offering everything your organization needs for an effective web site. Featured Client: http://www.aboriginalrightscoalition.ca/ If a book doesn't make us better, then what on earth is it for? - Alice Walker
FYI you can send data like this on the url: http://www.foo.com/script.php?test[joe]=stump&test[harry]=bar&test[jane]=scott Then $test will be an array that translates to this in PHP: <? $test = array( joe => 'stump', harry => 'bar', jane => 'scott'); ?> --Joe On Wed, Apr 04, 2001 at 12:00:48PM -0400, Mike Gifford wrote: > Hello, > > I'm trying to build an array out of data submitted from a URL. > > Essentially, I want to pull certain records out of a database which have been > selected on another form. > > The URL presently looks like this: > superRSS.phtml?150=1150&superRSS166=1166&superRSS168=1168&superRSS175=1188 > > I'd like to take these independent variables and merge them into a single array: > $array_superRSS = implode (":", $superRSS[]); > > So I can then pipe these values directly into another function: > > while ($array_superRSS) { > display_superRSS($array_superRSS[]); > } > > Obviously I'm missing a step or two here, but would really appreciate someone > filling in some of the gaps. > > Thanks! > > Mike > -- > Mike Gifford, OpenConcept Consulting, http://openconcept.ca > Offering everything your organization needs for an effective web site. > Featured Client: http://www.aboriginalrightscoalition.ca/ > If a book doesn't make us better, then what on earth is it for? - Alice Walker > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] /******************************************************************************\ * Joe Stump - PHP/SQL/HTML Developer * * http://www.care2.com - http://www.miester.org - http://gtk.php-coder.net * * "Better to double your money on mediocrity than lose it all on a dream." * \******************************************************************************/
Did you try to see if $HTTP_GET_VARS can help you ? Its an array of every variable posted by GET (the way you described) Else : Split the different key/values with the delimiter '&' and thereafter split the elements in the array by '=' But first split the string into page and variables : list( $page, $str ) = split("?","superRSS.phtml?150=1150&superRSS166=1166&superRSS168=1168&superRSS175=1188"); function make_arr_from_str( $str ) { $exp_arr = Explode( "&", $str ); $new_arr = Array(); for ( $i = 0 ; $i < count( $exp_arr ) ; $i++ ) { list( $key, $val ) = split( "=", $exp_arr[ $i ] ); $new_arr["$key"] = $val; } return $new_arr; } $array = make_arr_from_str( $str ); var_dump($array); On Wed, 4 Apr 2001, Mike Gifford wrote: > Hello, > > I'm trying to build an array out of data submitted from a URL. > > Essentially, I want to pull certain records out of a database which have been > selected on another form. > > The URL presently looks like this: > superRSS.phtml?150=1150&superRSS166=1166&superRSS168=1168&superRSS175=1188 > > I'd like to take these independent variables and merge them into a single array: > $array_superRSS = implode (":", $superRSS[]); > > So I can then pipe these values directly into another function: > > while ($array_superRSS) { > display_superRSS($array_superRSS[]); > } > > Obviously I'm missing a step or two here, but would really appreciate someone > filling in some of the gaps. > > Thanks! > > Mike > -- Knut ------ Knut H. Hassel Nielsen Principal Engineer / Avdelingsingeniør Norwegian University of Science and Technology / NTNU Department of Computer and Information Science / IDI N-7491 Trondheim, Norway Phone Office / Telefon jobb : (+47) 73 59 18 46 Fax Office / Telefax jobb : (+47) 73 59 17 33 Cell. Phone / Mobiltelefon : 91 59 86 06
I think the function parse_str does exactly what you want. http://www.php.net/manual/en/function.parse-str.php ----- Original Message ----- From: "Knut H. Hassel Nielsen" <[EMAIL PROTECTED]> To: "Mike Gifford" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, April 04, 2001 6:12 PM Subject: Re: [PHP] Building an array from a URL Did you try to see if $HTTP_GET_VARS can help you ? Its an array of every variable posted by GET (the way you described) Else : Split the different key/values with the delimiter '&' and thereafter split the elements in the array by '=' But first split the string into page and variables : list( $page, $str ) = split("?","superRSS.phtml?150=1150&superRSS166=1166&superRSS168=1168&superRS S175=1188"); function make_arr_from_str( $str ) { $exp_arr = Explode( "&", $str ); $new_arr = Array(); for ( $i = 0 ; $i < count( $exp_arr ) ; $i++ ) { list( $key, $val ) = split( "=", $exp_arr[ $i ] ); $new_arr["$key"] = $val; } return $new_arr; } $array = make_arr_from_str( $str ); var_dump($array); On Wed, 4 Apr 2001, Mike Gifford wrote: > Hello, > > I'm trying to build an array out of data submitted from a URL. > > Essentially, I want to pull certain records out of a database which have been > selected on another form. > > The URL presently looks like this: > superRSS.phtml?150=1150&superRSS166=1166&superRSS168=1168&superRSS175=1188 > > I'd like to take these independent variables and merge them into a single array: > $array_superRSS = implode (":", $superRSS[]); > > So I can then pipe these values directly into another function: > > while ($array_superRSS) { > display_superRSS($array_superRSS[]); > } > > Obviously I'm missing a step or two here, but would really appreciate someone > filling in some of the gaps. > > Thanks! > > Mike > -- Knut ------ Knut H. Hassel Nielsen Principal Engineer / Avdelingsingeniør Norwegian University of Science and Technology / NTNU Department of Computer and Information Science / IDI N-7491 Trondheim, Norway Phone Office / Telefon jobb : (+47) 73 59 18 46 Fax Office / Telefax jobb : (+47) 73 59 17 33 Cell. Phone / Mobiltelefon : 91 59 86 06 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Jordan, If you know your result is going to product one row, try using: $row=mysql_fetch_array($result, MSQL_ASSOC); // returns an assoc array where the field names are keys, field value is value $id=row[id]; $name=row[name]; etc. Best regards, Andrew -------------------------------------- Andrew Hill - OpenLink Software Director Technology Evangelism eBusiness Infrastructure Technology http://www.openlinksw.com -----Original Message----- > From: Jordan Elver [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 04, 2001 11:46 AM > To: PHP Database Mailing List; PHP General Mailing List > Subject: [PHP-DB] mysql_result() > > > Hi, > If I knnow that a query will only retrun one row, can I do thiss (below) > rather than using a while loop for one record? > > $id = @mysql_result($result, 0, 'id'); > $name = @mysql_result($result, 0, 'name'); > $email = @mysql_result($result, 0, 'email'); > $address1 = @mysql_result($result, 0, 'address1'); > $address2 = @mysql_result($result, 0, 'address2'); > $town_city = @mysql_result($result, 0, 'town_city'); > $postcode = @mysql_result($result, 0, 'postcode'); > > Cheers, > > Jord > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > >
The reason it worked, is that you were setting the value of $HTTP_USER_AGENT to "Mozilla" by using a single = That operation was succesful, so the result was true. Therefore the if() clause was being executed. On 4/3/01 6:15 PM, "Wade DeWerff" <[EMAIL PROTECTED]> wrote: > ugh, ok, I was without php support for a bit, ok the script works, except > that it doesnt work...it prints even when browser is IE. > > > -----Original Message----- > From: Jason Murray <[EMAIL PROTECTED]> > To: Jason Murray <[EMAIL PROTECTED]>; 'WD' > <[EMAIL PROTECTED]>; [EMAIL PROTECTED] <[EMAIL PROTECTED]> > Date: Tuesday, April 03, 2001 7:54 PM > Subject: RE: [PHP] help with parse > > >>>> <?php >>>> if ($HTTP_USER_AGENT = "Mozilla") >>> >>> ^ This needs to be "==" >> >> Actually, it needs to be " if(substr($HTTP_USER_AGENT, "Mozilla"))". >> >> *slap.self* >> >> Jason >> >> -- >> Jason Murray >> [EMAIL PROTECTED] >> Web Design Team, Melbourne IT >> Fetch the comfy chair! >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> To contact the list administrators, e-mail: [EMAIL PROTECTED] >
I humbly and sincerely apologize for this off topic post. But I just came across a page that I thought that many of you would find very interesting: http://web.mit.edu/newsoffice/nr/2001/ocw.html http://web.mit.edu/newsoffice/nr/2001/ocw-facts.html MIT is going to start offering their courseware online. While you won't get credit for it, you'll at least be able to learn the same things and get the same experience as the students of MIT. Anyways, I thought this was interesting and exciting and wanted to pass the information along. My apologies to those who would consider this spam. I just know that we are all always looking for ways to increase our knowledge base and what better way than courses from one of the most prestigious technology schools in the world! :) Chris
Hi Following is the piece of code, which I am struggling with, now & the problem is: I just want to display 4 email address in a textarea and mail them. The case here is, the available email address has to displayed and as I have maximum 4 email addresses coming up dynamically, I might get all the combinations, like 1&2, 1&3, 1&4, 2&3, 3&4 etc. Depending upon that I just want to split them up, with a separation and that's a comma (,). If I have the following piece of code executed, it just prints two commas in between, in the case of 1st email address and the 4th email address - like this: [EMAIL PROTECTED],,[EMAIL PROTECTED] (note two commas in between the email addresses) Instead I would like to get rid of one comma in between the email address and just display and sepearte it with only comma, instead of two commas and it should work for all the combinations that's possible. What are the possible ways to do that ?. Even I am trying out here. My Code: if ($svars[home_email1]!=='') { $vars["send_email"] .= $svars["home_email1"]; } if ($svars[home_email2]!=='') { $vars["send_email"] .= $comma; $vars["send_email"] .= $svars["home_email2"]; } if ($svars[work_email1]!=='') { $vars["send_email"] .= $comma; $vars["send_email"] .= $svars["work_email1"]; } if ($svars[work_email2]!=='') { $vars["send_email"] .= $comma; $vars["send_email"] .= $svars["work_email2"]; } Thanks in advance. ~ Karthick [EMAIL PROTECTED]
Can someone please help me w/the following code? I'm trying to insert data collected on a form into two tables into my database. I know the SQL statements work because I tested them individually, but I keep getting the error "Couldn't execute query 2". Does anyone have any suggestions? Thanks in Advance Toni <?php $sql = "INSERT INTO users (fname, lname, compid, status, dept, room, bldg, phone) VALUES ('$fname', '$lname', '$compid', '$status', '$dept', '$room', '$bldg', '$phone')"; $sql1 = "INSERT INTO tickets (ticket_num, compid, date_rpt, time_rpt, request_type, hardware, model, dci, dci_num, software_type, software_pkg, problem, comments, entered_by) VALUES ('$ticket_num', '$compid', '$date_rpt', '$time_rpt', '$request_type', '$hardware','$model','$dci','$dci_num','$software_type','$software_pkg','$problem','$comments','$entered_by')"; /*create connection*/ $connection = mysql_connect("hostname","user","password") or die ("Couldn't connect to the server"); /*select database*/ $db = mysql_select_db("db_name", $connection) or die ("Couldn't select database"); /*execute query and get result*/ $sql_result = mysql_query($sql, $connection) or die ("Couldn't execute query1"); $sql_result1 = mysql_query($sql1, $connection) or die ("Couldn't execute query2"); if (!sql_result){ echo "<p>Couldn't add record!"; } else{ echo " <p> Record Added!</p> <table cellspacing=5 cellpadding=5> /*More code down here...*/ _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com
Hi, I am searching for a POP function that let me calculate for example the MOD of dividing a number between 2 so as to know whether this number is pair o unpair. I have been looking throguh the section of mathematical functions but I have found nothing and I do not know where else could I search for this information. Thanks
In article <9afjqr$cn1$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Jon") wrote: > I am searching for a POP function that let me calculate for example the MOD > of dividing a number between 2 so as to know whether this number is pair o > unpair. I have been looking throguh the section of mathematical functions > but I have found nothing and I do not know where else could I search for > this information. http://php.net/manual/en/language.operators.php -- CC
Hi. Is there a PHP function to get a message part ID through IMAP? I´ve been looking for one but did not find it. Becaues the function imap_fetchbody requires a message part but I can´t figure out how to get its ID. anyone? thanks in adv. Joel.
I'm in the habit of putting all my form variables into an array (ie: <input type="text" name="f[firstname]" value="<? echo $f['firstname']; ?>">) so that I have a nice little package to pass to functions. My question is can you put files into those as well? If so how does it handle the $file_name and $file_size variables PHP creates? --Joe /******************************************************************************\ * Joe Stump - PHP/SQL/HTML Developer * * http://www.care2.com - http://www.miester.org - http://gtk.php-coder.net * * "Better to double your money on mediocrity than lose it all on a dream." * \******************************************************************************/
There seems to be a bug in php 4.0.4pl1, would someone please verify this script below. If you paste this script into a file called bug.php and you just call it you will see "Http post Vars Set". However you will not find that variable it in the output of PHPINFO. I tried this under php4.0.2 and the behavior is as expected "Http Post Vars Not Set". Can anyone confirm or disprove this? Mike bug.php <? if (isset ($HTTP_POST_VARS)){ echo "Http Post Vars Set"; } else { echo "Http Post Vars Not Set"; } phpinfo(); ?> My environment: PHP-4.0.4pl1 DSO Solaris 8 Apache 1.3.14
I've noticed that and had to rewrite several scripts when hosts upgraded from PHP3 to PHP4. $HTTP_POST_VARS is considered set even when it is empty. Data Driven Design P.O. Box 1084 Holly Hill, FL 32125-1084 http://www.datadrivendesign.com http://www.rossidesigns.net ----- Original Message ----- From: Krznaric Michael <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 04, 2001 11:02 AM Subject: [PHP] BUG - Someone else please verify B4 I file > There seems to be a bug in php 4.0.4pl1, would someone please verify > this script below. If you paste this script into a file called bug.php and > you just call it you will see "Http post Vars Set". However you will not > find that variable it in the output of PHPINFO. I tried this under > php4.0.2 and the behavior is as expected "Http Post Vars Not Set". > > Can anyone confirm or disprove this? > > Mike > > bug.php > <? > if (isset ($HTTP_POST_VARS)){ > echo "Http Post Vars Set"; > } > else { > echo "Http Post Vars Not Set"; > } > phpinfo(); > ?> > > My environment: > PHP-4.0.4pl1 DSO > Solaris 8 > Apache 1.3.14 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > >
In article <81A3043681E6824EBE672F7421C30E7E2A19A7 @SRVTORONTO.RAND.COM>, [EMAIL PROTECTED] says... }if (isset ($HTTP_POST_VARS)){ } echo "Http Post Vars Set"; Remember, just because a variable is "set", it doesn't imply that the variable has any data stored in it. In this case, while the HTTP_POST_VARS array may be set, it does not contain any elements. (It's size is zero.) Hence, it's not included in phpinfo(). -- Jeff Carnahan - [EMAIL PROTECTED]
on 4/4/01 5:14 PM, Data Driven Design at [EMAIL PROTECTED] wrote: > I've noticed that and had to rewrite several scripts when hosts upgraded > from PHP3 to PHP4. $HTTP_POST_VARS is considered set even when it is empty. i have also noticed this. we run 4.0.3pl1 here. have a great day andy -- ******************************************************* Andrew Rush :: Lead Systems Developer :: MaineToday.com ******************************************************* "A friend of the devil is a friend of mine" - R. Hunter
"Data Driven Design" <[EMAIL PROTECTED]> wrote: > I've noticed that and had to rewrite several scripts when hosts upgraded > from PHP3 to PHP4. $HTTP_POST_VARS is considered set even when it is empty. For those that can't guess the solution to this problem I suspect this will do the trick: ! empty() instead of: isset() Or Jeff (Data Driven Design), did you use a different technique? -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/
I have a list of conditions I want to test against. In ASP, I would do: Select Case foo case "bar1" foobar = "fooey" case "bar2" foobar = "fooey2" case "bar3" foobar = "fooey3" case else foobar = "NoBar" End Select How do I do the equivelent in PHP? Thanks -Allen [EMAIL PROTECTED]
switch ($i) { case 0: print "i equals 0"; break; case 1: print "i equals 1"; break; case 2: print "i equals 2"; break; } ----- Original Message ----- From: "Allen May" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 04, 2001 2:07 PM Subject: [PHP] Select case equivelent > I have a list of conditions I want to test against. > In ASP, I would do: > > Select Case foo > case "bar1" > foobar = "fooey" > case "bar2" > foobar = "fooey2" > case "bar3" > foobar = "fooey3" > case else > foobar = "NoBar" > End Select > > How do I do the equivelent in PHP? > > Thanks > > -Allen > [EMAIL PROTECTED] > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
See the "switch" statement. http://www.php.net/manual/en/control-structures.switch.php Kirk > -----Original Message----- > From: Allen May [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 04, 2001 12:07 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Select case equivelent > > > I have a list of conditions I want to test against.
How would i go about building a page which could use the name of the page less .php as a variable. For example: Say I have a file called screenshot_1.php and another called screenshot_2.php . Inside each of those files I want to have code which will take the name of the file from the url and assign that value to a variable. So $picture would get the value screenshot_1 from screenshot_1.php and so on. Michael Roark
Something like this would work ... let's say your path is http://www.server.com/images/screenshot_1.php <? $junk = explode('/',$REQUEST_URI); list(,,$file) = $junk; list($picture) = explode('.',$file); ?> That should do it just fine .... I might be off on my commas On Wed, Apr 04, 2001 at 01:26:27PM -0500, Michael Roark wrote: > How would i go about building a page which could use the name of the page > less .php as a variable. > For example: > > Say I have a file called screenshot_1.php and another called > screenshot_2.php . Inside each of those files I want to have code which > will take the name of the file from the url and assign that value to a > variable. So $picture would get the value screenshot_1 from > screenshot_1.php and so on. > > > > > Michael Roark > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] /******************************************************************************\ * Joe Stump - PHP/SQL/HTML Developer * * http://www.care2.com - http://www.miester.org - http://gtk.php-coder.net * * "Better to double your money on mediocrity than lose it all on a dream." * \******************************************************************************/
try: <?php preg_match( "/([^\/]+)\.php/", $HTTP_SERVER_VARS['PHP_SELF'], $matches ); echo "<H2>$matches[1]</H2>"; ?> Morgan At 01:26 PM 4/4/2001, you wrote: >How would i go about building a page which could use the name of the page >less .php as a variable. >For example: > >Say I have a file called screenshot_1.php and another called >screenshot_2.php . Inside each of those files I want to have code which >will take the name of the file from the url and assign that value to a >variable. So $picture would get the value screenshot_1 from >screenshot_1.php and so on. > > > > >Michael Roark > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED]
I don't know about everyone else but I've found that since the changeover to the new design of the php.net site, it's been very unreliable. I used to be able to look up a function in seconds if I didn't quite remember the usage. Now, I find that the doesn't won't even come up at times. Other times the search is very slow. If others have noticed this perhaps we can alert the developers to the situation. How about a downloadalbe version of the site? Does such a thing exist?
"Matt Friedman" <[EMAIL PROTECTED]> wrote: > I don't know about everyone else but I've found that since the changeover to > the new design of the php.net site, it's been very unreliable. It's worked fine for me, but maybe I'm not accessing it at the right...I mean wrong times. > How about a downloadalbe version of the site? Does such a thing exist? You can download the manual. See http://php.net/docs.php. If you want the entire site you're going to probably have to slurp it using a spider. -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/
Not sure what kind of network you're on, but I've had the exact opposite experience. The new design is easier on the eyes, but also much more lightweight, meaning much quicker downloads. Especially if using NS - I couldn't look up any function in under 10 seconds before. Now it's normally <3. Matt Friedman wrote: > I don't know about everyone else but I've found that since the changeover to > the new design of the php.net site, it's been very unreliable. > > I used to be able to look up a function in seconds if I didn't quite > remember the usage. Now, I find that the doesn't won't even come up at > times. > > Other times the search is very slow. If others have noticed this perhaps we > can alert the developers to the situation. > > How about a downloadalbe version of the site? Does such a thing exist? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED]
just grab a copy and install locally from http://snaps.php.net/ A quick rewrite rule/browser based java script etc will do exactly the same thing as php.net/functioname does but quicker. - James -- James Moore [EMAIL PROTECTED] PHP Web Scripting: http://www.php.net/ PHP QA Team: http://qa.php.net/ PHP-GTK: http://gtk.php.net/ VL-SRM: http://www.vl-srm.net/ > -----Original Message----- > From: Matt Friedman [mailto:[EMAIL PROTECTED]] > Sent: 04 April 2001 19:45 > To: php general > Subject: [PHP] PHP.net is slow > > > I don't know about everyone else but I've found that since the > changeover to > the new design of the php.net site, it's been very unreliable. > > I used to be able to look up a function in seconds if I didn't quite > remember the usage. Now, I find that the doesn't won't even come up at > times. > > Other times the search is very slow. If others have noticed this > perhaps we > can alert the developers to the situation. > > How about a downloadalbe version of the site? Does such a thing exist? > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED]
Can anyone help me? Today I was informed that the backend for my project will not be MySQL, but MSSQL 7.0. No problems, I said, but after porting database from MySQL to MSSQL I find that the UPDATE statement doesn't work. Strange is that INSERT statement in a php query does not work second time (ie, i made a script for taking records from MySQL and insert in MSSQL; first query work, but second doesn't). Code is here: my_update("update sometable set col1=".$var1." where col2=".$var2); and function: function my_update($query){ global $host,$user,$psw,$name; $conn=mssql_pconnect($host,user,psw) or die("Error: connection failed!"); $rdb=mssql_select_db($name,$conn) or die("Error: DB does not exist"); $rez_q=mssql_query($query,$conn) or die("Error: Invalid SQL"); } The same code and function work fine in MySQL. Why doesn't work in MSSQL Server??? Adrian JURJICA ================================ Tel.: +40-94-128879 E-mail: [EMAIL PROTECTED] ================================ Nu ocoliti pe Internet: http://oneblackcat.f2s.com http://www.terrasat.ro http://www.transcondor.com http://aimmr.go.ro ================================
In article <001401c0bd38$51d05580$[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... }Can anyone help me? }Code is here: } }The same code and function work fine in MySQL. Why doesn't work in MSSQL Server??? } Investigate the MSSQL Server UPDATE syntax carefully: http://msdn.microsoft.com/library/default.asp? URL=/library/psdk/sql/ts_ua-uz_82n9.htm (That's one long URL). -- Jeff Carnahan - [EMAIL PROTECTED]
Just my two cents here... I could be mistaken, but wouldn't this method hit the database twice? I would suggest you take your results the first time and store them in an array or multidimensional array, then you can get to any element at any time further down the page. > -----Original Message----- > From: Mark Roedel [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 04, 2001 7:52 AM > To: George Wright; [EMAIL PROTECTED] > Subject: RE: [PHP] reusing MySQL results > > > > -----Original Message----- > > From: George Wright [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, April 04, 2001 9:35 AM > > To: '[EMAIL PROTECTED]' > > Subject: [PHP] reusing MySQL results > > > > > > Hi All, > > > > I have a page with two forms. Both forms have drop-down option > > lists that are populated by a the same query. The query and > > db connection are all done before either form is introduced > > (this is the select statement, mysql_pconnect(), mysql_select_db(), > > and mysql_query()). > > > > I am using a while loop to build the options. The loop "engine" > > is mysql_fetch_object(), which writes out the values inside of > > option tags. > > > > Everything works fine the first time around, but when I call > > the query result for the second time, it's as if there are no > > rows to return so nothing is written out. No errors are being > > thrown. > > Mysql_data_seek() is your friend. > > PHP has an internal pointer that it maintains as you move through your > result set. At the end of your mysql_fetch_object while loop, that > pointer is located at the end of the result set. > > Mysql_data_seek() is the means for you to "rewind" that pointer to the > any specified row, including the first, of the result set. > > See > > http://php.net/manual/en/function.mysql-data-seek.php
Daevid, I think there is only the initial connection (using mysql_query()), and the result set is saved to a variable. This variable is then operated on by mysql_fetch_object(). My problem was that the internal pointer had exhausted its original array when I was calling it a second time, and I had to reset the pointer with mysql_data_seek(). With that function, I was able to reset the pointer working on that same object (the original result set), without having to hit the db again. HTH, George > -----Original Message----- > From: Daevid Vincent [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 04, 2001 4:18 PM > To: Mark Roedel; George Wright; [EMAIL PROTECTED] > Subject: RE: [PHP] reusing MySQL results -- resetting mySQL > pointer with > mysql_data_seek() > > > Just my two cents here... > > I could be mistaken, but wouldn't this method hit the database twice? > > I would suggest you take your results the first time and > store them in an > array or multidimensional array, then you can get to any > element at any time > further down the page. > > > -----Original Message----- > > From: Mark Roedel [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, April 04, 2001 7:52 AM > > To: George Wright; [EMAIL PROTECTED] > > Subject: RE: [PHP] reusing MySQL results > > > > > > > -----Original Message----- > > > From: George Wright [mailto:[EMAIL PROTECTED]] > > > Sent: Wednesday, April 04, 2001 9:35 AM > > > To: '[EMAIL PROTECTED]' > > > Subject: [PHP] reusing MySQL results > > > > > > > > > Hi All, > > > > > > I have a page with two forms. Both forms have drop-down option > > > lists that are populated by a the same query. The query and > > > db connection are all done before either form is introduced > > > (this is the select statement, mysql_pconnect(), > mysql_select_db(), > > > and mysql_query()). > > > > > > I am using a while loop to build the options. The loop "engine" > > > is mysql_fetch_object(), which writes out the values inside of > > > option tags. > > > > > > Everything works fine the first time around, but when I call > > > the query result for the second time, it's as if there are no > > > rows to return so nothing is written out. No errors are being > > > thrown. > > > > Mysql_data_seek() is your friend. > > > > PHP has an internal pointer that it maintains as you move > through your > > result set. At the end of your mysql_fetch_object while loop, that > > pointer is located at the end of the result set. > > > > Mysql_data_seek() is the means for you to "rewind" that > pointer to the > > any specified row, including the first, of the result set. > > > > See > > > > http://php.net/manual/en/function.mysql-data-seek.php >
Nope. Mysql_data_seek($result,0) and it is. ----- Original Message ----- From: "Daevid Vincent" <[EMAIL PROTECTED]> To: "Mark Roedel" <[EMAIL PROTECTED]>; "George Wright" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, April 04, 2001 3:18 PM Subject: RE: [PHP] reusing MySQL results -- resetting mySQL pointer with mysql_data_seek() > Just my two cents here... > > I could be mistaken, but wouldn't this method hit the database twice? > > I would suggest you take your results the first time and store them in an > array or multidimensional array, then you can get to any element at any time > further down the page. > > > -----Original Message----- > > From: Mark Roedel [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, April 04, 2001 7:52 AM > > To: George Wright; [EMAIL PROTECTED] > > Subject: RE: [PHP] reusing MySQL results > > > > > > > -----Original Message----- > > > From: George Wright [mailto:[EMAIL PROTECTED]] > > > Sent: Wednesday, April 04, 2001 9:35 AM > > > To: '[EMAIL PROTECTED]' > > > Subject: [PHP] reusing MySQL results > > > > > > > > > Hi All, > > > > > > I have a page with two forms. Both forms have drop-down option > > > lists that are populated by a the same query. The query and > > > db connection are all done before either form is introduced > > > (this is the select statement, mysql_pconnect(), mysql_select_db(), > > > and mysql_query()). > > > > > > I am using a while loop to build the options. The loop "engine" > > > is mysql_fetch_object(), which writes out the values inside of > > > option tags. > > > > > > Everything works fine the first time around, but when I call > > > the query result for the second time, it's as if there are no > > > rows to return so nothing is written out. No errors are being > > > thrown. > > > > Mysql_data_seek() is your friend. > > > > PHP has an internal pointer that it maintains as you move through your > > result set. At the end of your mysql_fetch_object while loop, that > > pointer is located at the end of the result set. > > > > Mysql_data_seek() is the means for you to "rewind" that pointer to the > > any specified row, including the first, of the result set. > > > > See > > > > http://php.net/manual/en/function.mysql-data-seek.php > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
Hi, The host that I am currently at only gives me 1 MySQL Database and I was wondering if I create lots of table will it slow it down at all? I will only be selecting data from 1 or 2 tables on a page...do you think it would slow it down at all? Thanks, -Frank
On Wednesday 04 April 2001 23:36, Frank K wrote: > Hi, > The host that I am currently at only gives me 1 MySQL Database and I > was wondering if I create lots of table will it slow it down at all? I will > only be selecting data from 1 or 2 tables on a page...do you think it would > slow it down at all? Shouldn't you ask this in a MySQL list? Saludos... :-) -- El mejor sistema operativo es aquel que te da de comer. Cuida tu dieta. ----------------------------------------------------------------- Martin Marques | [EMAIL PROTECTED] Programador, Administrador | Centro de Telematica Universidad Nacional del Litoral -----------------------------------------------------------------
Please forgive if this was posted before. I don't know what the line really is called but recently when I upgraded to PHP 4.... Um.. The latest and I used the exact same compile parameters as I did before. But now the first line of every script is displayed (the execution line) I.e. The file looks like this: #!/usr/local/php4/bin/php -q <? Code..... ?> And the first line is displayed to the screen when the script is ran. Why is that and does anyone know how to stop that? -- Thomas Deliduka IT Manager ------------------------- New Eve Media The Solution To Your Internet Angst http://www.neweve.com/
Hello PHP, Is there any ways to use php with irc? -- Best regards,
Trying to enable apc under freebsd php. Running into problems compiling it right into apache. gcc -I. -I/usr/home/dphoenix/freebsd/php-4.0.4pl1/ext/apc -I/usr/home/dphoenix/freebsd/php-4.0.4pl1/main -I/usr/home/dphoenix/freebsd/php-4.0.4pl1 -I/usr/home/dphoenix/freebsd/apache_1.3.19/src/include -I/usr/home/dphoenix/freebsd/apache_1.3.19/src/os/unix -I/usr/home/dphoenix/freebsd/php-4.0.4pl1/Zend -I/usr/local/curl/include -I/usr/local/include/freetype -I/usr/local/gd -I/usr/local/mysql/include -I/usr/home/dphoenix/freebsd/php-4.0.4pl1/ext/xml/expat/xmltok -I/usr/home/dphoenix/freebsd/php-4.0.4pl1/ext/xml/expat/xmlparse -I/usr/home/dphoenix/freebsd/php-4.0.4pl1/TSRM -DXML_BYTE_ORDER=12 -O2 -c apc_sem.c && touch apc_sem.lo apc_sem.c:33: redefinition of `union semun' *** Error code 1 any ideas? trying DSO method returns this [root@frodo apc]# phpize aclocal: not found autoconf: Undefined macros: configure.in:43:AC_PROG_LIBTOOL You should add the contents of `/usr/local/share/aclocal/libtool.m4' to `aclocal.m4'. [root@frodo apc]# very interesting....not sure how to proceed at this point. as it is i had to cd into ports collection to install autoconf for this apc thing. Any ideas would be great. -- Dan +------------------------------------------------------+ | BRAVENET WEB SERVICES | | [EMAIL PROTECTED] | | make installworld | | ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail | | ln -s /var/qmail/bin/newaliases /usr/sbin/newaliases | +______________________________________________________+