Re: [PHP] Load from db into select-list
Curt Zirzow wrote: On Sun, Dec 18, 2005 at 08:28:22PM +0100, Gustav Wiberg wrote: Hi there! Is it possible to load a select-list with databasinfo without reloading a page??? With AJAX, yeah. Curt. call it 'remote scripting', dammit! it rarely seems to get used as 'ajax' strictly.. unless you're using some kinda of framework, i suppose, but far too often xml isn't returned! (never mind me, it's just a pet hate of mine, aha) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Function Overloading
Labunski wrote: PHP does not support function overloading. So, is there any other way of getting a number of parameters(variables) passed to a function? aka. function fruits($apple, $banana, $kiwi, $grape){ #should (somehow) output 4 } OK. if it was an array, than I could use count($array), but now I'm stuck! Thanks in advance! func_num_args() will do the trick. and then you use func_get_arg() or func_get_args() to use them. http://au2.php.net/func_num_args --josh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Mail-format...
I was having the same issue with one of my clients just today in fact. We just filtered the email addresses to ensure they're valid. There's a million regex's out there to do this for you.. Cheers Josh Gustav Wiberg wrote: Hi there! I wonder why I get get these kind of mails (look down below in this mail) I recieve them sometimes... ...I have a code like this... $name = $_POST[frmNamn]; $email = $_POST[frmEpost]; //Send mail that there is a new member // mail([EMAIL PROTECTED],Ny medlem - Stammis Internet,Namn: $name, Epost:$email); /G http://www.varupiraten.se/ Namn: [EMAIL PROTECTED] Content-Type: multipart/mixed; boundary=\===0158601545==\ MIME-Version: 1.0 Subject: c1805938 To: [EMAIL PROTECTED] bcc: [EMAIL PROTECTED] From: [EMAIL PROTECTED] This is a multi-part message in MIME format. --===0158601545== Content-Type: text/plain; charset=\us-ascii\ MIME-Version: 1.0 Content-Transfer-Encoding: 7bit aienglpcm --===0158601545==-- , Epost:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Best way to mass mail
You have to be careful, though, because I had this problem.. I had PHP running as a CGI on the host with Apache, and Apache had a nasty habit of terminating the CGI communicationg before PHP had finished mailing everyone, even if set_time_limit(0); was set (well, even if set_time_limit(arbitrarily_big_number); was used). I ended up using an exec call to a shell script, which executed the PHP CLI binary with a custom php.ini, and as a background process. The mails successfully send, now. And yes, it's a convoluted way, but as it turns out, it was the only way to properly background it and run all the way until it ends. So be careful if you decide to rely on set_time_limit().. Josh. Manuel Lemos wrote: Hello, on 09/12/2005 10:50 AM Ryan A said the following: The thing that bothers me the most is if the program times out..., how do I start again from the ones that have not been sent? Use set_time_limit(0); and your script will never timeout. Anyway, long standing scripts should be run off your Web server, maybe started from by cron. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php