[PHP] Re: dropdown with two Sql query
I don't even understand what the first two code blocks are saying. Looks like html, but I have never seen it like that. I also don't see the two fields you specifically mention to start in your first select statement - some other garbled names are there instead. Are you sure you've copied this correctly? "asp kiddy" wrote in message news:snt106-w94d445760f0a991221ebed6...@phx.gbl... In this table (tb_code_prmtn11_email) I have two field : fld_email_id fld_name_email It works here is a code code> Choose your name"; $req_email_adress_menu = "SELECT DISTINCT id_email, fld_name_email, fld_adresse_email FROM $table_db_email ORDER BY fld_name_email "; $rep_email_adress_menu = mysql_query($req_email_adress_menu, $cnx) or die( mysql_error() ) ; while($show_email_adress_menu = mysql_fetch_assoc($rep_email_adress_menu)) { echo ''.$show_email_adress_menu['fld_name_email'].' - '.$show_email_adress_menu['fld_adresse_email'].''; } ?> <-endcode -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] dropdown with two Sql query
On Jun 25, 2011, at 3:57 PM, asp kiddy wrote: SELECT td.id_resultat,td.fld_email_id,email.fld_name_email FROM $table_db td JOIN $table_db_email email ON td.fld_email_id = email.id_email WHERE td.id_resultat = $id I see two small problems right away: > FROM $table_db td should read: FROM $table_db AS td and: > JOIN $table_db_email email should read JOIN $table_db_email AS email Maybe that's it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] dropdown with two Sql query
On Jun 25, 2011, at 3:57 PM, asp kiddy wrote: This code works also but I don't know how I can include this second query in my menu... I'm not exactly sure what you want it to do -- perhaps you could mock up some sample output to show what you're expecting? If you are simply planning on replacing the select statement in the first version, that should be very straight-forward. If you are planning on having a second set of select options, that shouldn't be too hard, either. If you are wanting to somehow modify or mix the two selected set of options, that may be a bit harder. Just not sure what you actually want to do. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] dropdown with two Sql query
On Sun, 2011-06-26 at 10:29 -0500, Tamara Temple wrote: > On Jun 25, 2011, at 3:57 PM, asp kiddy wrote: > > > SELECT td.id_resultat,td.fld_email_id,email.fld_name_email > > FROM $table_db td > > JOIN $table_db_email email ON td.fld_email_id = email.id_email > > WHERE td.id_resultat = $id > > I see two small problems right away: > > > FROM $table_db td > > should read: > > FROM $table_db AS td > > and: > > > JOIN $table_db_email email > > should read > > JOIN $table_db_email AS email > > Maybe that's it? > > > I don't think that MySQL requires the 'AS' in that context, I write queries like that without the 'AS' all the time. -- Thanks, Ash http://www.ashleysheridan.co.uk
[PHP] Php filter validate url
Hi, I wanted tu use php filters for validation to avoid regular expresions. Is it possible that FILTER_VALIDATE_URL only checks if the string has http:// and do not check for the format domain.something? $url = 'http://wwwtestcom'; $url = filter_var($url,FILTER_VALIDATE_URL); echo $url; - Or I am doing something wrong Thank you -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Php filter validate url
On 06/26/2011 12:31 PM, Adam Tong wrote: > Hi, > > I wanted tu use php filters for validation to avoid regular expresions. > Is it possible that FILTER_VALIDATE_URL only checks if the string has > http:// and do not check for the format domain.something? > > $url = 'http://wwwtestcom'; > $url = filter_var($url,FILTER_VALIDATE_URL); > echo $url; > - > > Or I am doing something wrong > > Thank you No, because http:// is not a URL, it's a scheme or protocol. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php filter validate url
On Sunday, 26 June 2011 at 18:31, Adam Tong wrote: > Hi, > > I wanted tu use php filters for validation to avoid regular expresions. > Is it possible that FILTER_VALIDATE_URL only checks if the string has > http:// and do not check for the format domain.something? > > $url = 'http://wwwtestcom'; > $url = filter_var($url,FILTER_VALIDATE_URL); > echo $url; > - > > Or I am doing something wrong > > Thank you As noted in the documentation (http://php.net/filter.filters.validate), URLs are validated according to the format specified in RFC2396 (http://www.faqs.org/rfcs/rfc2396). It does not validate that it's an HTTP URL, or that the hostname contains .s. Thus, "http://wwwtestcom"; is a perfectly valid URL, as is "banana://in.syrup", and anything else that can be parsed as a URL according to the rules in the above RFC. If you need to check for a specific type of URL you'll need to implement your own validation function, or google for one - there's loads out there. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php filter validate url
On Sun, 2011-06-26 at 20:10 +0100, Stuart Dallas wrote: > On Sunday, 26 June 2011 at 18:31, Adam Tong wrote: > > Hi, > > > > I wanted tu use php filters for validation to avoid regular expresions. > > Is it possible that FILTER_VALIDATE_URL only checks if the string has > > http:// and do not check for the format domain.something? > > > > $url = 'http://wwwtestcom'; > > $url = filter_var($url,FILTER_VALIDATE_URL); > > echo $url; > > - > > > > Or I am doing something wrong > > > > Thank you > > As noted in the documentation (http://php.net/filter.filters.validate), URLs > are validated according to the format specified in RFC2396 > (http://www.faqs.org/rfcs/rfc2396). It does not validate that it's an HTTP > URL, or that the hostname contains .s. > > Thus, "http://wwwtestcom"; is a perfectly valid URL, as is > "banana://in.syrup", and anything else that can be parsed as a URL according > to the rules in the above RFC. > > If you need to check for a specific type of URL you'll need to implement your > own validation function, or google for one - there's loads out there. > > -Stuart > > -- > Stuart Dallas > 3ft9 Ltd > http://3ft9.com/ > > I've not really read the spec, so excuse me if I'm very wrong, but wouldn't that make it more of a URI syntax validator instead of a URL syntax validator? -- Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Php filter validate url
On Sunday, 26 June 2011 at 21:59, Ashley Sheridan wrote: > On Sun, 2011-06-26 at 20:10 +0100, Stuart Dallas wrote: > > On Sunday, 26 June 2011 at 18:31, Adam Tong wrote: > Hi, > > I wanted tu > > use php filters for validation to avoid regular expresions. > Is it > > possible that FILTER_VALIDATE_URL only checks if the string has > http:// > > and do not check for the format domain.something? > > $url = > > 'http://wwwtestcom'; > $url = filter_var($url,FILTER_VALIDATE_URL); > echo > > $url; > - > > Or I am doing something wrong > > Thank you As noted in > > the documentation (http://php.net/filter.filters.validate), URLs are > > validated according to the format specified in RFC2396 > > (http://www.faqs.org/rfcs/rfc2396). It does not validate that it's an HTTP > > URL, or that the hostname contains .s. Thus, "http://wwwtestcom"; is a > > perfectly valid URL, as is "banana://in.syrup", and anything else that can > > be parsed as a URL according to the rules in the above RFC. If you need to > > check for a specific type of URL you'll need to implement your own > > validation function, or google for one - there's loads out there. -Stuart > > -- S tuart Dallas 3ft9 Ltd http://3ft9.com/ > > > I've not really read the spec, so excuse me if I'm very wrong, but wouldn't > that make it more of a URI syntax validator instead of a URL syntax validator? Yes, but the referenced RFC is titled "Uniform Resource Identifiers (URI): Generic Syntax," so the only thing that's "wrong" is the FILTER_VALIDATE_URL constant. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Php filter validate url
On 06/26/2011 12:31 PM, Adam Tong wrote: > Hi, > > I wanted tu use php filters for validation to avoid regular expresions. > Is it possible that FILTER_VALIDATE_URL only checks if the string has > http:// and do not check for the format domain.something? > > $url = 'http://wwwtestcom'; > $url = filter_var($url,FILTER_VALIDATE_URL); > echo $url; > - > > Or I am doing something wrong > > Thank you Unless I'm totally misunderstanding what you want (validate that a string starts with http://) try: if(strpos($url, 'http://') === 0) { //starts with http:// } esle { // does not start with http:// } -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Php filter validate url
Guys, when you reply a mail, You should write your reply on the top of it, not at the bottom of it. makes it easier to follow. On Sun, Jun 26, 2011 at 11:44 PM, Shawn McKenzie wrote: > On 06/26/2011 12:31 PM, Adam Tong wrote: > > Hi, > > > > I wanted tu use php filters for validation to avoid regular expresions. > > Is it possible that FILTER_VALIDATE_URL only checks if the string has > > http:// and do not check for the format domain.something? > > > > $url = 'http://wwwtestcom'; > > $url = filter_var($url,FILTER_VALIDATE_URL); > > echo $url; > > - > > > > Or I am doing something wrong > > > > Thank you > > Unless I'm totally misunderstanding what you want (validate that a > string starts with http://) try: > > if(strpos($url, 'http://') === 0) { > //starts with http:// > } esle { > // does not start with http:// > } > > -- > Thanks! > -Shawn > http://www.spidean.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
Re: [PHP] Re: Php filter validate url
On Sunday, 26 June 2011 at 22:50, Fatih P. wrote: > Guys, when you reply a mail, You should write your reply on the top of it, > not at the bottom of it. > makes it easier to follow. This is a holy war, and not worth getting into again. The bottom line is that top posting breaks the rules, regardless of people's personal opinion of the merits of any particular posting style. http://php.net/reST/php-src/trunk_README.MAILINGLIST_RULES - item 3 near the bottom of the page. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Php filter validate url
well, anyway ignore it then On Sun, Jun 26, 2011 at 11:57 PM, Stuart Dallas wrote: > > On Sunday, 26 June 2011 at 22:50, Fatih P. wrote: > > Guys, when you reply a mail, You should write your reply on the top of > it, > > not at the bottom of it. > > makes it easier to follow. > This is a holy war, and not worth getting into again. The bottom line is > that top posting breaks the rules, regardless of people's personal opinion > of the merits of any particular posting style. > > http://php.net/reST/php-src/trunk_README.MAILINGLIST_RULES - item 3 near > the bottom of the page. > > -Stuart > > -- > Stuart Dallas > 3ft9 Ltd > http://3ft9.com/ >
Re: [PHP] Re: Php filter validate url
On Mon, 2011-06-27 at 00:00 +0200, Fatih P. wrote: > well, anyway ignore it then > > On Sun, Jun 26, 2011 at 11:57 PM, Stuart Dallas wrote: > > > > > On Sunday, 26 June 2011 at 22:50, Fatih P. wrote: > > > Guys, when you reply a mail, You should write your reply on the top of > > it, > > > not at the bottom of it. > > > makes it easier to follow. > > This is a holy war, and not worth getting into again. The bottom line is > > that top posting breaks the rules, regardless of people's personal opinion > > of the merits of any particular posting style. > > > > http://php.net/reST/php-src/trunk_README.MAILINGLIST_RULES - item 3 near > > the bottom of the page. > > > > -Stuart > > > > -- > > Stuart Dallas > > 3ft9 Ltd > > http://3ft9.com/ > > No, the bottom-posting is a rule for this list. Don't like it, you don't have to use the list. -- Thanks, Ash http://www.ashleysheridan.co.uk
[PHP] Re: Php filter validate url
In mailing lists and usenet you should never top post. You integrate your reply or "follow up". This is well documented and makes sense in tech threads were context is everything. In adidition your content type in your post is incorrect. Your header contains Content-Type: multipart/alternative; boundary=00151747b53cf2927204a6a46ebb But its not multipart. This happens a lot in this group and I dont experience it elsewhere so I dont know if its a "php programmer thing", an gmane artifact or something the mailing list does. "Fatih P." writes: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Php filter validate url
On Mon, Jun 27, 2011 at 1:15 AM, Richard Riley wrote: > > In mailing lists and usenet you should never top post. You integrate > your reply or "follow up". This is well documented and makes sense in > tech threads were context is everything. > > In adidition your content type in your post is incorrect. > > Your header contains > > Content-Type: multipart/alternative; > boundary=00151747b53cf2927204a6a46ebb > > But its not multipart. This happens a lot in this group and I dont > experience it elsewhere so I dont know if its a "php programmer thing", > an gmane artifact or something the mailing list does. > > > > "Fatih P." writes: > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > headers are set and sent by gmail itself Content-Type: multipart/alternative; boundary=00151747b53cf2927204a6a46ebb
Re: [PHP] dropdown with two Sql query
On Jun 26, 2011, at 10:34 AM, Ashley Sheridan wrote: I don't think that MySQL requires the 'AS' in that context, I write queries like that without the 'AS' all the time. This is what i get for trying to be coherent on 2 hours sleep -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Php filter validate url
On 06/26/2011 04:50 PM, Fatih P. wrote: > Guys, when you reply a mail, You should write your reply on the top of it, > not at the bottom of it. > makes it easier to follow. > Ready flame-throwers! -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upgrade or Die?
On Sat, Jun 25, 2011 at 12:13 AM, wrote: > The message for Netscape was very clear, the development community refused to > write for it they had started a precedence that could not be forgotten. > I say communities will not forget this act and remove the browser from their > systems rather than be forced into an update for security reasons. > > Honestly, rarely do any of my customers use FF, and their reasons are > justified in their mind, so I do not argue the point. > > This is another reason for security personnel, to credit their policies in > denying FF on their network the same as they did with Netscape. > > > > > Richard L. Buskirk > Senior Software Engineer/Systems Administrator > > You can’t grow your business with systems that are on life support... > > -Original Message- > From: Richard Quadling [mailto:rquadl...@gmail.com] > Sent: Friday, June 24, 2011 5:38 PM > To: a...@ashleysheridan.co.uk > Cc: Andy McKenzie; php-general@lists.php.net > Subject: Re: [PHP] Upgrade or Die? > > On 24 June 2011 19:39, Ashley Sheridan wrote: >> On Fri, 2011-06-24 at 13:38 -0400, Andy McKenzie wrote: >> >>> On Fri, Jun 24, 2011 at 1:30 PM, wrote: >>> > Chrome. Enough said. Now, if we can only convince the rest of the world >>> > ... >>> > >>> >>> Ugh. I can't stand Chrome. Of course, I gave up on Firefox years ago >>> and went back to Opera, so it doesn't bother me when Firefox does >>> something weird like this... >>> >>> -Andy >>> >> >> >> Meh, I'm still using 3.6 on my main computer and 3.5 on my laptop. Using >> Fx4 at work, and I have to say, I prefer 3.6. Fx4 is slower, prone to >> crashing and a bit of a memory hog. I really hope Mozilla doesn't go the >> way of Google and create loads of new versions dropping support for the >> older ones as it goes, even if the 'older' versions are barely that old >> at all. > > That pattern of behaviour sounds exactly like Netscape all those years ago. > > > > -- > Richard Quadling > Twitter : EE : Zend : PHPDoc > @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Just to throw my two pennies into this - I believe that all browsers should auto-upgrade. The browser has become the most important application on desktops and it is remiss of all parties involved to allow the masses to use exploitable out-dated software. If someone is paranoid about their supposed privacy, afford them the luxury of finding ways to use software that has known defects. I entreat you to consider how much time and pain this would have prevented over the last decade. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] asynchronous launch of a script
How do I launch a php script from another running php script asynchronously? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: asynchronous launch of a script
You mean - you want a second thread to run independently of your current "running" script? A wonderful thing to do and helpful for long intenesive processes but do you really want to go thru the hassles of managing two processes? Won't you have to verify the results of your offshoot and react to unexpected circumstances? Otherwise, what are you doing that would not require such complex management? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: asynchronous launch of a script
On 6/26/2011 7:58 PM, Jim Giner wrote: You mean - you want a second thread to run independently of your current "running" script? A wonderful thing to do and helpful for long intenesive processes but do you really want to go thru the hassles of managing two processes? Won't you have to verify the results of your offshoot and react to unexpected circumstances? Otherwise, what are you doing that would not require such complex management? Having an OpenBSD server I use a thing called nohup. I have a shell script that starts/stops things for me nohup /usr/bin/ssh -2 -N -f -L $L_IP:$L_PORT:$R_IP:$R_PORT root@localhost 1>/dev/null This starts a ssh tunnel port forwarding for me with a from and to port assignment. But, one crucial thing you haven't told us is what OS you are trying to do this on. Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: asynchronous launch of a script
On Jun 26, 2011, at 11:52 PM, Jim Lucas wrote: On 6/26/2011 7:58 PM, Jim Giner wrote: You mean - you want a second thread to run independently of your current "running" script? A wonderful thing to do and helpful for long intenesive processes but do you really want to go thru the hassles of managing two processes? Won't you have to verify the results of your offshoot and react to unexpected circumstances? Otherwise, what are you doing that would not require such complex management? Having an OpenBSD server I use a thing called nohup. I have a shell script that starts/stops things for me nohup /usr/bin/ssh -2 -N -f -L $L_IP:$L_PORT:$R_IP:$R_PORT root@localhost 1>/dev/null This starts a ssh tunnel port forwarding for me with a from and to port assignment. But, one crucial thing you haven't told us is what OS you are trying to do this on. Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Wow, that's really getting complex. All I want is for a php script to get launched and the calling script to return immediately. I don't necessarily have to know or care when the called script ends, just want the user to get an immediate return instead of waiting around for the lengthy script to run. I'm not talking AJAX or anything like that where the page depends on the eventual output from the called script. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php