php-general Digest 3 Feb 2001 14:57:56 -0000 Issue 490 Topics (messages 37929 through 37955): Need to count number of rows per id! :( 37929 by: Sandeep Hundal 37930 by: Julian Wood 200 DOLLARS FOR YOU 37931 by: Matt Spears Re: Re:What version of Linux? 37932 by: John Hinsley 37938 by: Meir kriheli 37948 by: Christian Reiniger Re: PHP evaluates an expression function? 37933 by: johnny p. 37937 by: ¹æÃ¢Çö 37946 by: Duccio Gasparri Help with XSLT! 37934 by: Theo Brinkman Re: Pricing for PHP programming??? 37935 by: tarique.sanisoft.com 37940 by: Siim Einfeldt aka Itpunk 37941 by: Siim Einfeldt aka Itpunk 37955 by: John Meyer Re: Change Password script 37936 by: mwaples.waples.net i want permanently connect in imap_open() 37939 by: Á¤Èñö Configure pdf lib with php4 on Win NT 37942 by: PHP Re: Future plans (4.1) ? 37943 by: Alain Fontaine Immediately write me!! Row size in mysql 37944 by: PHP Microsoft's new naming convention... 37945 by: Ahmad Navid Yar PHP Hosting 37947 by: PHPlover 37952 by: James, Yz Re: Semi-review of Zend-IDE 1.0 37949 by: Zeev Suraski Re: Off Subject, but can't find any info elsewhere 37950 by: Martin Thoma select prob. 37951 by: Netbrain di M.L. Querying MySQL using 'AND' / 'OR' 37953 by: James, Yz Animated / Streaming GIF 37954 by: Hrishi 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] ----------------------------------------------------------------------
Hey guys, I need an answer to a problem I've been trying to work on for days :( I made a message board, which has a front page which lists Topic name, topic started by, and what date. All this info, and the topic message is stored in one mysql table. when you click on any of the topics, it leads to a page which lists all replies to that topic by topic_id. Now what I want to do is have a listen on the first index page, the number of replies for that particular topic. I know I need something like select id from $secondtable where topicid=$topicid, and then use mysql_num_rows, but I can't figure out how to integrate the first set of results from table 1 with the query on table 2. This is the query on the front page on the main table : $query = "SELECT topicid, icon, name, topic, datestamp FROM $maintable ORDER by datestamp DESC LIMIT 40 "; $result = mysql_query($query); TIA! Sandeep __________________________________________________ Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
Are you looking for select topicID, count(*) from $secondtable group by topicID? This will give you a count of each distinct topicID in $secondtable. Julian -- Julian Wood Multimedia Developer University of Calgary on 2/2/01 6:15 PM, Sandeep Hundal at [EMAIL PROTECTED] wrote: > > Hey guys, > > I need an answer to a problem I've been trying to work on for days :( > > I made a message board, which has a front page which lists Topic > name, topic started by, and what date. All this info, and the topic > message is stored in one mysql table. when you click on any of the > topics, it leads to a page which lists all replies to that topic by > topic_id. > > Now what I want to do is have a listen on the first index page, the > number of replies for that particular topic. I know I need something > like select id from $secondtable where topicid=$topicid, and then use > mysql_num_rows, but I can't figure out how to integrate the first set > of results from table 1 with the query on table 2. > > This is the query on the front page on the main table : > $query = "SELECT topicid, icon, name, topic, datestamp FROM > $maintable ORDER by datestamp DESC LIMIT 40 "; > $result = mysql_query($query); > > TIA! > > Sandeep > > __________________________________________________ > Get personalized email addresses from Yahoo! Mail - only $35 > a year! http://personal.mail.yahoo.com/
Christian Reiniger <[EMAIL PROTECTED]> wrote: > > On Friday 02 February 2001 05:32, John Hinsley wrote: > > > > I want to install my personal server on a old Intel 486 machine, 36 > > > Mb RAM, 2 Gb HardDisk, VGA, to develop in PHP. What version of Linux > > > do I need to install? > > > But I'm unsure of what you "really" intend using this machine for. Do > > you really want a home network (in which case conventional wisdom > > suggests that the server should be the most powerful box on site) or > > Well, you'll have great trouble getting several 100k hits per day on a > home server, so a small machine completely suffices :) Yes, yes. But you assume that our friend wants to use the 486 box as an Intranet server, to run cgi and php scripts on, and punt out HTML documents to the rest of his network, and pretty much that alone. I simply was _not_ prepared to make that assumption, which is why I asked for more detail :-0 Let me elaborate a little: Unless you have existing Win or Mac boxes (I omit Sun workstations and Ataris only because not many folk have them at home) that you want to pick up all this HTML stuff which Apache or whatever_your_choice_of_web_server is dishes out, it probably makes sense not to build a little 486 server, but to use the hard drive to put into a (more powerful) dual boot box: you can then run all your HTML stuff as localhost (and use a gui too!). You could then use your 486 as a firewall. If you're going to the hastle of building a home network, you might consider using the more powerful machine as an all singing, all dancing fileserver, application server and intranet server (pick your choice)! The 486 could be used as a Windows box connected to the server and/or as an X client (in which case 32Mb of RAM would be just fine). None of these solutions is "right" per se, but they do bear thinking about! Hence, again, the call for more detail. -- ****************************************************************************** Marx: "Why do Anarchists only drink herbal tea?" Proudhon: "Because all proper tea is theft." ******************************************************************************
On Friday 02 February 2001 17:09, Christian Reiniger wrote: > On Friday 02 February 2001 05:32, John Hinsley wrote: > > > I want to install my personal server on a old Intel 486 machine, 36 > > > Mb RAM, 2 Gb HardDisk, VGA, to develop in PHP. What version of Linux > > > do I need to install? You can also try the LinuxFromScratch project, there you can install the minimum needed stuff, and tweak it to your liking. It will take you a few days but IMHO it's worth the trouble (and you'll learn much more about linux that way). check http://www.linuxfromscratch.org -- Meir Kriheli There's someone in my head, but it's not me - Pink Floyd
On Saturday 03 February 2001 04:36, John Hinsley wrote: > > > > I want to install my personal server on a old Intel 486 machine, > > > > 36 Mb RAM, 2 Gb HardDisk, VGA, to develop in PHP. What version of > > Well, you'll have great trouble getting several 100k hits per day on > > a home server, so a small machine completely suffices :) > > Yes, yes. But you assume that our friend wants to use the 486 box as an > Intranet server, to run cgi and php scripts on, and punt out HTML > documents to the rest of his network, and pretty much that alone. > > I simply was _not_ prepared to make that assumption, which is why I > asked for more detail :-0 Point taken :) > If you're going to the hastle of building a home network, you might > consider using the more powerful machine as an all singing, all dancing > fileserver, application server and intranet server (pick your choice)! Well, my home server is a wimpy P90 with 48MB RAM. It serves as web server (all my technical docs, php website testing, more), web cache (WWWoffle), web filter (junkbuster), file server (nfs and samba), masquerading internet gateway, firewall, mail server (also processing my pretty big .procmailrc), print server and propably also something else :) Ah, yes. MySQL for my php stuff also runs on it. The only problem I have with its performance is that it's only connected to my other machines via 10 MBit ethernet (well, and the ram is a bit on the low side). The processor's limits aren't reached by a long shot. > The 486 could be used as a Windows box connected to the server and/or > as an X client (in which case 32Mb of RAM would be just fine). I'd say a combination of good text editor + browser requires more resources than a apache+PHP+mysql in such a scenario. And don't forget that you have to sit in front of the development (client) box all day and getting a decent graphics card for a 486 is *hard* -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) AAAAA - American Association Against Acronym Abuse
Well, I think the equivalent PHP function to VB's eval() function is... eval(). go to: http://www.php.net/manual/en/function.eval.php HTH, johnny p. > -----Original Message----- > From: ¹æÃ¢Çö [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 02, 2001 8:11 PM > To: [EMAIL PROTECTED] > Subject: [PHP] PHP evaluates an expression function? > > > Hi. > > I working convert from VBSCRIPT source to PHP. > I found VBSCRIPT eval() same function in PHP. > > example. > > VBSCRIPT running... > > $a = "1+2+3+4" > $b = eval ($a) > > $b retunr is number 10. > > What function or same method in PHP. > > Thank! > > E-mail: [EMAIL PROTECTED] > PHONE: +83-2-3411-4196 > FAX: +83-2-3411-4009 > M.PHONE; +83-16-380-6107 > >
Thank's your advices. Eureka! <? $f = "1+2+3+3"; eval ("\$r=$f;"); echo "r=$r"; ?> result r=10 ----- Original Message ----- From: "johnny p." <[EMAIL PROTECTED]> To: "©ö©¡A¡ËCo" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Saturday, February 03, 2001 1:51 PM Subject: RE: [PHP] PHP evaluates an expression function? > Well, I think the equivalent PHP function to VB's eval() function is... > eval(). > > go to: > http://www.php.net/manual/en/function.eval.php > > HTH, > > johnny p. > > > -----Original Message----- > > From: ¹æÃ¢Çö [mailto:[EMAIL PROTECTED]] > > Sent: Friday, February 02, 2001 8:11 PM > > To: [EMAIL PROTECTED] > > Subject: [PHP] PHP evaluates an expression function? > > > > > > Hi. > > > > I working convert from VBSCRIPT source to PHP. > > I found VBSCRIPT eval() same function in PHP. > > > > example. > > > > VBSCRIPT running... > > > > $a = "1+2+3+4" > > $b = eval ($a) > > > > $b retunr is number 10. > > > > What function or same method in PHP. > > > > Thank! > > > > E-mail: [EMAIL PROTECTED] > > PHONE: +83-2-3411-4196 > > FAX: +83-2-3411-4009 > > M.PHONE; +83-16-380-6107 > > > > >
At 16.15 03/02/01 +0900, =?ks_c_5601-1987?B?uebDosf2?= wrote: >Thank's your advices. > >Eureka! > ><? >$f = "1+2+3+3"; >eval ("\$r=$f;"); >echo "r=$r"; >?> > >result >r=10 Maybe there's still some work to do! :-) BR, Duccio.
I'm trying to learn XSLT and thought that PHP 4.0.4 with the Sablotron extension would be ideal for this, but I quite simply cannot get any samples I find to work. I'm trying to use the class.XSLTransform.php file mentioned in the annotated PHP manual, but I get a fatal error on line 113 (don't have the exact text,but it doesn't say anything more useful). I've compiled PHP --with-sablot --enable-sablot-errors-descriptive --with-pgsql, and tried two sets of sample files which are said to work. One from phpbuilder, the other from another php site, that I don't remember the name of off hand. (The second set of files has to do with recipes, in case anyone out there might know where I found that set of files.) I'm running PHP 4.0.4 on Apache 1.3.14 on Linux Mandrake 7.1. I've also tried both 4.0.4 and 4.0.4pl1 on Apache 1.3.14 on NT 4 with identical results. Is there a problem with the sablotron extension that isn't mentioned anywhere I can find, or am I doing something wrong? Some simple samples that any of you have gotten working would be greatly appreciated. - Theo
tOn Fri, 2 Feb 2001, johnny p. wrote: > Hah! My wife has a formal education in graphics design. My web sites > would look like crap without her extensive layout skills. :) I'm so > lucky... Ah! kindered spirit My wife has a formal education in Mass Communication and Public Relations I wouldn't be in bussiness if she was not able make presentations to drum up clients ! BUT we still lack a graphic designer - don't think I can afford a second wife ;-) Cheers Tarique -- ========================================= B2B Application Providers http://www.sanisoft.com Vortal for Nagpur http://nagpurcity.net =========================================
>Ok, I just started my own company and finished work for my first client >(shameless plug here: http://www.alamosawinecellars.com). The problem I >had wasn't in pricing my work by what it's worth and how much time I put >in it, but pricing it in a way that would work for my client. I ended >up making roughly $10/hr., maybe less, for the effort, but I ended up >with an extra $1000 in the bank. Actually when thinking about the projects which I`m making for one company, they end up being 10/h (not $) as well. >The part of the >project that took all my time is in a backend admin tool that allows the >client to update their pages whenever they need. The data is all stored >in a mysql db. I know, that part takes most of my time as well, but I`m working on some good template which would make my future jobs easier and cheaper as well (for the clients). >Anyways, I have noticed that for some clients, like my >first, charging too much will lose them. Right. Usually, when dealing with companies I aleady know, I first listen them out, give my suggestions and views about it, ask what they think about them, and then ask if the sum is ok for them (the sum that I have thought about). I usually give a bit higher one first, I guess quite many of us do it, many companies like to get the price lower, even if it wasn´t high at all, so now as I have the possibility to lower the sum, I will do it. But still, you can´t set the price too low, I would suggest never to do it, maybe only for friends (for them, why not for free). >For other clients, like medium >sized companies, charging too little will send them hunting for someone >else. You are probably right. But as a freelance, you can sometimes afford asking them maybe even 3-4times less than some big web development company would. >And also, everything can be negotiated. One of my mottos:-) Siim Einfeldt [EMAIL PROTECTED]
> So how do you know what to charge when youre independent and just starting? Actually you don`t. I doubt very many of us actually know what would be the only right price to set, I think there`s no such thing. It`s negotiable, usually. You just have to sell youreself, think of some company you could sell your services to, make some written offer, don`t send it to the company, go and talk to the boss of it, explain him what he would gain from it, tell him/her everything you can to make him/her interested (but don´t lie). Once you get his attention, you can start talking about the price. You first ask them if they were be interested in the project offer you made them. If yes, just ask what would be affordable to them, ask enough questions to get to know what they would be ready to pay. They probably don´t want to tell you anything about the price, but try to read between the lines and then make them an offer, "would $... be acceptable for you?". If not, keep talking until you have agreed on something. Well, yes it isn´t as easy at it my seem, it isn´t easy at all, but that`s one possibility. And I think this kind of approach should go mainly for small-medium sized businesses. And it`s just for starters. Siim Einfeldt [EMAIL PROTECTED]
Interesting, that, since I will be graduating with majors in Computer Information Systems _and_ Mass Communications, but I still need a graphic artist. Does anybody where I can get a good wife? *JK* -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, February 02, 2001 8:56 PM To: johnny p. Cc: Jerry Lake; [EMAIL PROTECTED] Subject: RE: [PHP] Pricing for PHP programming??? tOn Fri, 2 Feb 2001, johnny p. wrote: > Hah! My wife has a formal education in graphics design. My web sites > would look like crap without her extensive layout skills. :) I'm so > lucky... Ah! kindered spirit My wife has a formal education in Mass Communication and Public Relations I wouldn't be in bussiness if she was not able make presentations to drum up clients ! BUT we still lack a graphic designer - don't think I can afford a second wife ;-) Cheers Tarique -- ========================================= B2B Application Providers http://www.sanisoft.com Vortal for Nagpur http://nagpurcity.net ========================================= -- 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]
enthalpy wrote: > > anyone have example code of a change password script in php? > > <-----CoreComm-Internet-Services--http://core.com/-----> > (Jon Marshall CoreComm Services Chicago) > ([EMAIL PROTECTED] Systems Engineer II) > ([EMAIL PROTECTED] Network Operations) > <-----Enthalpy.org------------http://enthalpy.org/-----> > ([EMAIL PROTECTED] The World of Nothing) > <------------------------------------------------------> > > -- this is for freebsd - use at your own risk - best used as a php shell script run by root $newpassword = "veryinsecure"; $fp = popen("/usr/sbin/pw usermod -n username -h passwd", "w"); fputs($fp, "$newpassword"); pclose($fp)
i open mailbox with imap_open when i move next page, mailbox close. and i must open mailbox again. i want connection contiue, even if i move next page
tell me how i configure pdf lib with php4.0 on win nt server and iis 4.0 i already run php 4 on this server . thanks
Hi, I think this kind of reflection particularly holds true when thinking about OpenSource development, where a potentially unlimited number of developers all work on the same project; developers from all over the world. Now, how would you possibly try to impose a coding standard to several dozens of people coming from different countries, having different backgrounds, etc etc. "Toby Butzon" <[EMAIL PROTECTED]> a écrit dans le message news: [EMAIL PROTECTED] > > > As for better OO. I think many of the things people ask for, like > > > visibility (public,private,protected) class properties, aren't actually > > > features that add functionality, but more just convenience features > > > that could be implemented in user space. > > > > I disagree. Just as with strong typing (which I hope will be added to > > PHP5 (optional - see how it's planned for Perl6)), language-enforced OO > > visibility makes it possible that the *compiler* (interpreter) > > immediately catches a bug that could hide for ages otherwise. > > Errare humanum est - conventions can't prevent mistakes. > > > > This is something I've been waiting for, as well. Public, private, and > protected are definately important features as far as I'm concerned. > > For instance: If a team develops a complex web application with PHP, > being careful to use naming conventions and such to resolve > public/private namespace conflicts, fine. But what happens when the team > completes their job and their contract is up; maybe in a year the > company who had the thing written wants to add some functionality, so > they once again hire a team or maybe just one programmer. However, the > programmer isn't so knowledgable about the system and before he knows it > he's got all kinds of problems with using object data that SHOULD be > protected (preceded by an _), but isn't. > > I know this may not sound important, but it is. On top of that, if it > wasn't important, why would C/C++, Java, etc. all have it and stress > that it should be used instead of making everything "public"? > > It's not a matter of preference; it's a matter of making classes truely > abstract types (using member functions to manipulate special data) and > not semi-abstract (you can use the functions or you can mess things up > by not using them). > > Just my .02 - > > --Toby > > -- > 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] >
Write me immediately how I find a row size in mysql table if i create a table in this manner create table size(f1 int,f2 date ,f3 varchar(25),f4 varchar(100), f5 text , f6 int, f7 tinyint(1), f8 tinyint(1) ,f9 tinyint(3), f10 varchar(25)) f mean fields . how i know the row size in kilo bytes or bytes.
FYI folks... Microsoft is planning on a new naming convention for it's latest products. They will be naming their Office 10 Suite as Office XP, and Whisler will officially be named Windows XP. They say the "XP" might stand for XML Protocol, which "also happens to be the Worldwide Web Consortium's name for the Simple Object Access Protocol (SOAP) for messaging that Microsoft and a handful of partners are championing." The formal public announcement is expected next week, from Microsoft. I hope Linux and BSD can break the market barrier that Microsoft has a hold of. I'm not a big fan of MS products, but it's good to keep up with your enemy's moves before it makes them. For those who are MS puppets, please don't be offended by my personal tastes... :) Article: Microsoft to rebrand Office, Windows with 'XP'? Source: ZDNet News Author: Mary Jo Foley
Can anyone receommend free MySQL hosting with PHP. Or if you can find such a hosting on NT, that would be nice. Thanks
I believe http://www.f2s.com allow you to use PHP and provide you with a MySQL database. James. > Can anyone receommend free MySQL hosting with PHP. Or if you can find such a > hosting on NT, that would be nice.
Ed, I won't argue with you about the necessity of these features in a modern IDE. All I can say is that this is just the initial version, and it came out with above-minimal set of features that make for a useful PHP development environment. There's no doubt that there is room for improvement, and I can assure you that our IDE team isn't sitting back and watching the sky right now. Most of the features you've mentioned, as well as others, are scheduled for the next non-bugfix release version of the IDE. Version 1.0 is hardly where things end. Look at the PHP version number :) Zeev At 01:01 3/2/2001, Ed Finkler wrote: >I was really pleased to see that Zend had taken the new approach with >pricing and availability of the Zend IDE, and that they were offering a demo >version of the product. I downloaded it right away and took it for a spin. > >To be honest, I was pretty disappointed with the product. While the >debugging features look great, otherwise I think the Zend IDE barely >qualifies as an Integrated Development Environment. Aside from the debugger >and color coding, there's little offered here that I couldn't get in the >most basic of text editors. > >The product I'm comparing the Zend IDE most to is Allaire's Homesite, which >we use as our primary code development tool. From an editor standpoint, >Homesite is simply a superior product. >Here are the major areas that I feel the Zend IDE falls short: > >1) No FTP integration > This is a major blow to useability for me. Homesite offers nearly >seamless integration with FTP servers so they appear identical to local >files. Zend IDE doesn't appear to have any options for this at all. > >2) No HTML or PHP shortcuts; lack of customizability? > Why can't I just highlight some text and hit CTRL+B to wrap <B> tags >around my selection? What about CTRL+P to insert a print ""; statement? >Or F5 to insert my own code snippet? Homesite allows us to assign any >keystroke to any tag, IDE command, or code snippet. We were able to dump >every single PHP fuction into Homesite as a code snippet, and can assign >common ones to whatever key strokes we desire. Zend IDE doesn't seem to >offer any such feature. This was a real disappointment. > >3) No intergrated documentation (not even PHP documentation) > Homesite allows us to add our own HTML-formatted documentation. It >comes with extensive HTML and CFM documentation, and at least one kind >fellow converted an older set of the PHP docs to work with the Homesite help >system. To be honest, I was *shocked* that the Zend IDE didn't offer any >sort of integrated PHP documentation, let alone the ability to roll your >own. > >4) No regular expression searching/replacing. > I use this feature frequently in Homesite, even when I'm not actually >doing development work. Not having it means I have to jump out of the IDE >to do certain kinds of search and replace work, which sorta defeats the >whole "Integrated" part of being an IDE. > >5) Very little customization ability > I touched on this before, but want to reiterate it as its own issue. >Some basic keystroke and color coding customization is available, but all in >all the Zend IDE really compares poorly to Homesite - and from what I know, >most other popular text editors - in terms of customization. > >6) Database accessSQL Query analyzer > This is something available in projects like KphpDev, and looks really, >really useful. I'm surprised this didn't make it into the Zend IDE, as so >much PHP development uses databases. > >7) Price > Given the small featureset, I have trouble with the cost of the Zend >IDE -- over $100 for a client license. The debugger is great, but it's >nearly useless to me without a proper supporting set of tools. I might be >willing to pay $25 for this per client license. > >Frankly, I don't think the Zend IDE is an IDE at all -- it's basically a >simple text editor with color coding that has an integrated debugger. I was >really expecting a lot more, given Zend's role in bringing PHP into the >"real world" of e-business. > >I would like to say that I really admire what Zend is doing. I think you >guys are on the right track. We need the kinds of things you're >developing... but in terms of the IDE, we need a lot more to be convinced to >drop our current editors. > >--------------- >Ed Finkler >Supervisor of Web Development >Golden Dome Media >[EMAIL PROTECTED] >219-631-1107 > > > >-- >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] -- Zeev Suraski <[EMAIL PROTECTED]> CTO & co-founder, Zend Technologies Ltd. http://www.zend.com/
Go to developers.netscape.com, there you can find newsgroups where you can get help. Martin Toby Miller schrieb: > Web Developers, > > I know this has nothing to do with PHP, but some bright minds out there might have >run across it. It's about Netscape 6 mouseovers. > > I've read elsewhere that Netscape 6 has problems with preloading images. I have >confirmed this time and time again, but have not been able to come to any viable >solutions. Nor have I been able to find a posted solution or a documented workaround >anywhere on the web. Has anyone here found a workaround for this bug that will >prevent Netscape from causing mouseover images (which were preloaded) to stop >disappearing from the screen when you roll over them too quickly. They aren't just >made invisible, they are actually gone. > > I'm fine with the new DOM as it makes sense to start complying to the standards, it >needs to be done. However, mouseovers are one of the most basic features of >JavaScript that every site on the web uses so there really should be a way to >successfully code mouseovers into a web page without worrying about them >disappearing. Talk about a web site navigation nightmare. > > I have like mostly everything about Netscape 6 except this little "feature" and I'm >about to give up on the browser because of it. If anyone has found a way around this >I would really appreciate knowing how you dealt with it. > > Thanks, > Toby
Hi all, I'm in trouble checking client's value passed via a web form ... In a web form I usally use for the input's name a array var like this: <input type=text name=form[name] .. <input type=text name=form[email] .. <select name=form[country]> <option value=NONE>Select your country <option value=NONE>------------------- <option value=US>United State <option value=UK>United Kingdom .... and to generally check if some value is missing I use a simple routine like this: $manca=array(); foreach($array as $key=>$valore){ if(empty($valore) || $valore=="NONE"){ $manca[$key]++; } } where if $manca is greater then zero means that not all value was set .. My prob is that it never detects if the var $valore is equal to NONE ... I think that is due by my select field but at this moment I don't see how to correctly check if the passed values from it is a real value (as US,UK, etc.) or not (as NONE) ... any ideas? many thanks in advance max ------------------- Please Help Puppies ------------------- x
Hi Guys, Quick question...... I've managed to write a function (thanks to help from people earlier in the week) which queries an admin table. There are currently four fields in the table; id, username, password, and 'site', where the 'site' means a subdirectory of my site that the particular admin user is allowed acces to change things in.... Now, each 'site' user is allowed access to only their site, but, being the owner of all the 'sites', my field contains the word "all." So, I used this to determine whether the user (when logged in) is firstly an administrator, and secondly what area of the site they're responsible for: $sql = "SELECT * FROM table WHERE username = '$username' AND password = '$password' AND site = 'theirsite' OR site = 'all'"; Now, as you can probably see, the table is querying whether the table has a row with fields: username, password, site OR Just a row with the field containing "all." So, without writing some if statements, is there any way of rewriting that $sql check so that it checks whether the user is an admin of either the individual subdirectory, or all of the sites? Like username: foo password: bar site: all or username: foo password: bar site: subdirectory ......... Hope that makes sense, and thanks in advance for any help :) James.
hello, is there any way to create an animated GIF [or PNG] image using the php image functions ? thanks, Hrishi