[PHP-DB] DB_FETCHMODE_ASSOC result differs for MySQL and MS-SQL
I have a problem with PHP 4.3.0, latest PEAR running under w2k with either MySQL or MS-SQL. With MySQL everything is fine, running the same application just changing the DB server to MS-SQL I get different results. I am using fetchRow(DB_FETCHMODE_ASSOC) to get my DB rows. Under MySQL (correct) a row would look like this: 'fieldname' = value(e.g. [whateverfield] = 9 ) Under MS-SQL I get: 0 = value 'fieldname' = value (e.g. [0] = 9 [whateverfield] = 9 ) It seems that under MS-SQL DB_FETCHMODE_ASSOC AND DB_FETCHMODE_ORDERED are both on at the same time. Any ideas how I get this working ...? Gunther -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: Send mail with a file
Hello, On 01/16/2003 07:47 AM, Bruno Pereira wrote: How can i insert a file on a mail, with the command mail()? It is possible? You may want to try this class that does exactly what you need: http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Recursive SQL Expression?
Thanks Paul, not quite the answer I hoped for, but nevertheless, an excellent description of the problem. Since I'm not using the more powerful DBMS systems, I'll just stick to my original method and with the addition of a simple caching mechanism to limit the load on the server. Thanks again... -- Alan Paul Burney wrote: on 1/16/03 7:12 PM, Alan McFarlane at [EMAIL PROTECTED] appended the following bits to my mbox: I've a small problem working out the best method of reading data from a mySQL database with PHP... The table is a simple self-referential table constructed (loosely) as follows: cat_id integer unique cat_namestring cat_parent integer (points to a cat_id or 0 if no parent). Now, I need to extract the data in 'tree order', that is each cat (catgory) with it's siblings then the next category and so on... I'm currently forced into using a very nasty bit of code to list each category within a particular category - this is fine for a small dataset, but a large one results in a rather expensive load on the database server. Well, I'm sure this isn't the answer you want to hear, but with that table structure and MySQL as your RDBMS, I don't think there's much else you can do. The only suggestion I can really offer is to make sure you are indexing the parent category as well as the cat_id. In the php code, make it a little less nasty by using a function recursively, for example: ?php function list_sub_cats($p = 0) { $str = ''; $q = 'SELECT cat_id,cat_name FROM cats WHERE cat_parent=' . $p . ''; $r = mysql_query($q,$dbh); if (mysql_num_rows($r) 0) { $str .= 'ul'; while ($s = mysql_fetch_assoc($r)) { $str .= 'li' . $s['cat_name']; $str .= list_sub_cats($s['cat_id']); $str .= '/li'; } $str .= '/ul'; } return $str; } ? Calling list_sub_cats() above should return a nested unordered list in HTML of your categories (hasn't been tested, though). If you were using Oracle, you could use a CONNECT BY term in your query or write a stored procedure to give you back the tree. See this site for details: http://philip.greenspun.com/sql/trees.html If you aren't tied to that database structure, you could investigate the must faster denormalized alternative nested set model that is often mentioned on this list: http://searchdatabase.techtarget.com/tip/1,289483,sid13_gci537290,00.html http://www.dbmsmag.com/9605d06.html http://vyaskn.tripod.com/hierarchies_in_sql_server_databases.htm Hope that helps. Sincerely, Paul Burney -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Identifying clients?
Having experimented with REMOTE_ADDR, HTTP_X_FORWARDER_FOR, HTTP_CLIENT_IP etc. I'm still unsure as to a foolproof method of identifying clients WITHOUT having them log in to a site. I can only assume that some combination of the above environment variables and judicious use of small cookies is as near as I can get to perfection, but I'm stumped if I can see how to do it. I am aware that whatever routine will only (roughly) identify a machine and not an actual human (can users be called human?), but that will have to do. As for sample code, I can only presume it would be something like: // Step 1 - get all interesting IP addresses... $ip1 = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : null; $ip2 = isset($_SERVER['HPPT_CLIENT_IP']) ? $_SERVER['HPPT_CLIENT_IP'] : null; $ip3 = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : null; // This may in fact be good enough... $ip_md5 = md5(serialize(array($ip1, $ip2, $ip3))); // Step 2 - get a cookie $cookie = isset($_COOKIE[$ip_md5]) ? $_COOKIE[$ip_md5] : null; if (is_null($cookie)) { // set the cookie with something - probably just the $ip_md5 value? } Any suggestions etc. most appreciated. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Getting all rows of a certain column when grouping?
I have a table that stores smileys users can use. I'm trying to make a page that lists them in an HTML table something like: || | Smiley | Image | ||---| |:), :-) | IMAGE | |:(, :-( | IMAGE | -- I could use a query something like: select * from smileys group by image But that would only return one of the possible things the user can type to make that smiley. Is there another way? -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: Identifying clients?
it seems to me that this is to much work for the output. not only will ISPs add complexity, but since you are combining thee seperate items you confining people to a single location. any laptop user may come in from various ips and still be unique. I tend to stay with the information you described and mark them with a cookie to the corresponding unique row that they are in the database where you have this information saved. I used a cookie value like the string you mentioned and it started to drag mysql after heavy heavy use, trying to tie return visitors down on entry so i moved to keeping that info for compaison, and just storing the unique row identifier for that user. then you can try to nail down the exacts, after the fact with the cookie and the ip info. I think with this sort of a solution you have nearly eveyone you can get except for internet cafes. I'm not sure exactly what you're trying to do so pardon me if i went off on a tangent. And coming from a corportate environment. where needs can differ greatly. hth Jeff Alan McFarlane mcfarlane_alan@ly To: [EMAIL PROTECTED] cos.co.uk cc: Subject: [PHP-DB] Re: Identifying clients? 01/18/2003 10:27 AM Ah, it seems that certain ISPs can make a client appear from differing addresses (although the cookie - if set - would retain the same data). This extends the problem... Perhaps a lookup on md5(REMOTE_ADDR + CLIENT_IP + FORWARDED_FOR) on a database, plus verification via the cookie? Sheesh - it just keeps getting worse... :) Alan McFarlane wrote: Having experimented with REMOTE_ADDR, HTTP_X_FORWARDER_FOR, HTTP_CLIENT_IP etc. I'm still unsure as to a foolproof method of identifying clients WITHOUT having them log in to a site. I can only assume that some combination of the above environment variables and judicious use of small cookies is as near as I can get to perfection, but I'm stumped if I can see how to do it. I am aware that whatever routine will only (roughly) identify a machine and not an actual human (can users be called human?), but that will have to do. As for sample code, I can only presume it would be something like: // Step 1 - get all interesting IP addresses... $ip1 = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : null; $ip2 = isset($_SERVER['HPPT_CLIENT_IP']) ? $_SERVER['HPPT_CLIENT_IP'] : null; $ip3 = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : null; // This may in fact be good enough... $ip_md5 = md5(serialize(array($ip1, $ip2, $ip3))); // Step 2 - get a cookie $cookie = isset($_COOKIE[$ip_md5]) ? $_COOKIE[$ip_md5] : null; if (is_null($cookie)) { // set the cookie with something - probably just the $ip_md5 value? } Any suggestions etc. most appreciated. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Getting all rows of a certain column when grouping?
On Sunday 19 January 2003 00:00, Leif K-Brooks wrote: I have a table that stores smileys users can use. I'm trying to make a page that lists them in an HTML table something like: || | Smiley | Image | ||---| | |:), :-) | IMAGE | |:(, :-( | IMAGE | -- I could use a query something like: select * from smileys group by image But that would only return one of the possible things the user can type to make that smiley. Is there another way? select * from smileys order by image Then do some simple manipulation when outputting so that smileys associated with the same image are displayed on the same row. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* I'm not the person your mother warned you about... her imagination isn't that good. -- Amy Gorin */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: SUM(colname)
if i am not mistaken SELECT SUM(colname) WHERE value = 'value' only return one row, and that's the sum you want i guess. Foong Cesar Aracena [EMAIL PROTECTED] wrote in message 01c2be5d$087868a0$7a00a8c0@NOTEBOOK">news:01c2be5d$087868a0$7a00a8c0@NOTEBOOK... Hi all, I'm trying to add all the values from the same column in MySQL with a query like this: SELECT SUM(colname) WHERE value = 'value' But then I can't output it on the screen correctly. I've tried to put all the results into an array and then make an array_sum($arrayname) and it gives me exactly the double of what it should... any suggestions? By the way, the column I'm trying to add is a DOUBLE 6,2. Thanks in advance, Cesar L. Aracena [EMAIL PROTECTED] [EMAIL PROTECTED] (0299) 156-356688 Neuquén (8300) Capital Argentina -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] print new account name on new account page?
hello, i have a form someone fills out. on submit it takes them to a new accounts page that say welcome new member. how can i get their name to print on the new page from the form they just filled out? i have been trying the following but it keeps giving me error messages regardless of how i manipulate the following. thank you for your time. addison ? include(config.php); $sql = SELECT firstName,lastName FROM accounts WHERE email='$logname'; $result = mysql_query($sql) or die(Couldn't execute query 1.); $row = mysql_fetch_array($result,MYSQL_ASSOC); extract($row); echo headtitleNew Account Welcome/title/head h2 align='center' style='margin-top: .7in' Welcome $firstName $lastName/h2\n; ? here is an example of the errors: Warning: extract() expects first argument to be an array in /users/infoserv/web/register/ca/new_account.php on line 82 -- Addison Ellis small independent publishing co. 114 B 29th Avenue North Nashville, TN 37203 (615) 321-1791 [EMAIL PROTECTED] [EMAIL PROTECTED] subsidiaries of small independent publishing co. [EMAIL PROTECTED] [EMAIL PROTECTED]
[PHP-DB] [NB] Mail() question
I need to send myself an email in one of my PHP page. So i wrote the following code: $result = ini_set(SMTP, smtp.earthlink.net); if ($result) { echo ini_get(SMTP); $result = mail([EMAIL PROTECTED], test, test123); if ($result) echo mail sent; } It always print mail sent, but I never got the email. So I was wondering if Mail() request any send mail program to work. Can anyone tell me? Thanks. Tony S. Wu [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] [NB] Mail() question
The mail() function returns true if it functions, i.e. if you have all the parameters correct, and that sort of thing. If the SMTP server rejects the email, you'll still get true returned. I ran into this a while back. Try and do a manual connection to the SMTP server from your PHP machine and see if it works that way. It may be failing and you don't know. If you have access to the mail logs, check those out too. -Micah On Sat, 2003-01-18 at 12:48, Tony S.Wu wrote: I need to send myself an email in one of my PHP page. So i wrote the following code: $result = ini_set(SMTP, smtp.earthlink.net); if ($result) { echo ini_get(SMTP); $result = mail([EMAIL PROTECTED], test, test123); if ($result) echo mail sent; } It always print mail sent, but I never got the email. So I was wondering if Mail() request any send mail program to work. Can anyone tell me? Thanks. Tony S. Wu [EMAIL PROTECTED] -- Raincross Technologies Development and Consulting Services http://www.raincross-tech.com
Re: [PHP-DB] [NB] Mail() question
EarthLink is my DSL ISP, so its smtp server is not likely to block my mail. Besides, I can send email with my mail program just fine. I tried the similar thing on a friend's smtp server where I have access to the log, weird thing is I didn't even see PHP trying to access the smtp server. I need to figure out why it's not working fast... Thanks to your help. Tony S. Wu [EMAIL PROTECTED] It takes a smart man to be stupid. ~Tony On Saturday, January 18, 2003, at 01:47 PM, Micah Stevens wrote: The mail() function returns true if it functions, i.e. if you have all the parameters correct, and that sort of thing. If the SMTP server rejects the email, you'll still get true returned. I ran into this a while back. Try and do a manual connection to the SMTP server from your PHP machine and see if it works that way. It may be failing and you don't know. If you have access to the mail logs, check those out too. -Micah On Sat, 2003-01-18 at 12:48, Tony S.Wu wrote: I need to send myself an email in one of my PHP page. So i wrote the following code: $result = ini_set(SMTP, smtp.earthlink.net); if ($result) { echo ini_get(SMTP); $result = mail([EMAIL PROTECTED], test, test123); if ($result) echo mail sent; } It always print mail sent, but I never got the email. So I was wondering if Mail() request any send mail program to work. Can anyone tell me? Thanks. Tony S. Wu [EMAIL PROTECTED] -- Raincross Technologies Development and Consulting Services http://www.raincross-tech.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] [NB] Mail() question
EarthLink is my DSL ISP, so its smtp server is not likely to block my mail. Besides, I can send email with my mail program just fine. I tried the similar thing on a friend's smtp server where I have access to the log, weird thing is I didn't even see PHP trying to access the smtp server. I need to figure out why it's not working fast... Thanks to your help. Tony S. Wu [EMAIL PROTECTED] On Saturday, January 18, 2003, at 01:47 PM, Micah Stevens wrote: The mail() function returns true if it functions, i.e. if you have all the parameters correct, and that sort of thing. If the SMTP server rejects the email, you'll still get true returned. I ran into this a while back. Try and do a manual connection to the SMTP server from your PHP machine and see if it works that way. It may be failing and you don't know. If you have access to the mail logs, check those out too. -Micah On Sat, 2003-01-18 at 12:48, Tony S.Wu wrote: I need to send myself an email in one of my PHP page. So i wrote the following code: $result = ini_set(SMTP, smtp.earthlink.net); if ($result) { echo ini_get(SMTP); $result = mail([EMAIL PROTECTED], test, test123); if ($result) echo mail sent; } It always print mail sent, but I never got the email. So I was wondering if Mail() request any send mail program to work. Can anyone tell me? Thanks. Tony S. Wu [EMAIL PROTECTED] -- Raincross Technologies Development and Consulting Services http://www.raincross-tech.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] [NB] Mail() question
On Sunday 19 January 2003 04:48, Tony S. Wu wrote: I need to send myself an email in one of my PHP page. So i wrote the following code: $result = ini_set(SMTP, smtp.earthlink.net); if ($result) { echo ini_get(SMTP); $result = mail([EMAIL PROTECTED], test, test123); if ($result) echo mail sent; } It always print mail sent, but I never got the email. So I was wondering if Mail() request any send mail program to work. Is it a windows server that you're using? SMTP only works for windows. Anything else uses sendmail or equivalent. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* transient bus protocol violation */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] session_cache_limiter
i am getting a login name to print now on the new account page but i get the following error message: Warning: Cannot send session cache limiter - headers already sent (output started at /users/infoserv/web/register/ca/new_account.php:6) in /users/infoserv/web/register/ca/new_account.php on line 76 [EMAIL PROTECTED] my code is as follows: ? session_start(); if (@$auth != yes) { header(Location: login.php); exit(); } include(config.php); echo logname=$lognamebr; $sql = SELECT first_name,last_name FROM accounts WHERE email='$logname'; $result = mysql_query($sql) or die(Couldn't execute query 1.); $row = mysql_fetch_array($result,MYSQL_ASSOC); extract($row); echo headtitleNew Account Welcome/title/head h2 align='center' style='margin-top: .7in' Welcome $first_name $last_name/h2\n; ? without the below: session_start(); if (@$auth != yes) { header(Location: login.php); exit(); } i can not get the new account name to print from the form just submitted. any ideas are greatly appreciated and thank you again. Addison You must have session_start() before _any_ output to the browser. A blank space or the html or any other tag is considered output. So, to use sessions, the very first two characters of you file should be ? And you should have a session_start() somewhere in that PHP block. If you'd do a little research or even read the error message, it's not that hard to figure out. You are sending output starting on line 6 of your file, but you have session_start() on line 76. Hope that helps. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] [NB] Mail() question
Change the ini_set line to this: $result = ini_set(SMTP, smtp.earthlink.net); -Micah On Sat, 2003-01-18 at 14:18, Tony S.Wu wrote: EarthLink is my DSL ISP, so its smtp server is not likely to block my mail. Besides, I can send email with my mail program just fine. I tried the similar thing on a friend's smtp server where I have access to the log, weird thing is I didn't even see PHP trying to access the smtp server. I need to figure out why it's not working fast... Thanks to your help. Tony S. Wu [EMAIL PROTECTED] It takes a smart man to be stupid. ~Tony On Saturday, January 18, 2003, at 01:47 PM, Micah Stevens wrote: The mail() function returns true if it functions, i.e. if you have all the parameters correct, and that sort of thing. If the SMTP server rejects the email, you'll still get true returned. I ran into this a while back. Try and do a manual connection to the SMTP server from your PHP machine and see if it works that way. It may be failing and you don't know. If you have access to the mail logs, check those out too. -Micah On Sat, 2003-01-18 at 12:48, Tony S.Wu wrote: I need to send myself an email in one of my PHP page. So i wrote the following code: $result = ini_set(SMTP, smtp.earthlink.net); if ($result) { echo ini_get(SMTP); $result = mail([EMAIL PROTECTED], test, test123); if ($result) echo mail sent; } It always print mail sent, but I never got the email. So I was wondering if Mail() request any send mail program to work. Can anyone tell me? Thanks. Tony S. Wu [EMAIL PROTECTED] -- Raincross Technologies Development and Consulting Services http://www.raincross-tech.com -- Raincross Technologies Development and Consulting Services http://www.raincross-tech.com
RE: [PHP-DB] [NB] Mail() question
Here is a quick article that discusses how to connect manually to an SMTP server: HOW TO: Test Windows 2000 IIS SMTP Services Manually http://support.microsoft.com/default.aspx?scid=kb;EN-US;286421 Just substitute machine_name for your ISPs SMTP server. Run through the tests and you'll be able to see what errors you're getting. You're going to be doing the same thing that PHP is doing with the mail() command, so you'll be able to see what errors PHP is getting, but not returning. Hope that helps. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -Original Message- From: Tony S. Wu [mailto:[EMAIL PROTECTED]] Sent: Saturday, January 18, 2003 5:18 PM To: Micah Stevens Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] [NB] Mail() question EarthLink is my DSL ISP, so its smtp server is not likely to block my mail. Besides, I can send email with my mail program just fine. I tried the similar thing on a friend's smtp server where I have access to the log, weird thing is I didn't even see PHP trying to access the smtp server. I need to figure out why it's not working fast... Thanks to your help. Tony S. Wu [EMAIL PROTECTED] It takes a smart man to be stupid. ~Tony On Saturday, January 18, 2003, at 01:47 PM, Micah Stevens wrote: The mail() function returns true if it functions, i.e. if you have all the parameters correct, and that sort of thing. If the SMTP server rejects the email, you'll still get true returned. I ran into this a while back. Try and do a manual connection to the SMTP server from your PHP machine and see if it works that way. It may be failing and you don't know. If you have access to the mail logs, check those out too. -Micah On Sat, 2003-01-18 at 12:48, Tony S.Wu wrote: I need to send myself an email in one of my PHP page. So i wrote the following code: $result = ini_set(SMTP, smtp.earthlink.net); if ($result) { echo ini_get(SMTP); $result = mail([EMAIL PROTECTED], test, test123); if ($result) echo mail sent; } It always print mail sent, but I never got the email. So I was wondering if Mail() request any send mail program to work. Can anyone tell me? Thanks. Tony S. Wu [EMAIL PROTECTED] -- Raincross Technologies Development and Consulting Services http://www.raincross-tech.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] [NB] Mail() question
Ah, that must be it. I am running a Mac OS X server, which is Darwin based. Guess I should go with sendmail. Thanks a lot. Tony S. Wu [EMAIL PROTECTED] On Saturday, January 18, 2003, at 02:27 PM, Jason Wong wrote: On Sunday 19 January 2003 04:48, Tony S. Wu wrote: I need to send myself an email in one of my PHP page. So i wrote the following code: $result = ini_set(SMTP, smtp.earthlink.net); if ($result) { echo ini_get(SMTP); $result = mail([EMAIL PROTECTED], test, test123); if ($result) echo mail sent; } It always print mail sent, but I never got the email. So I was wondering if Mail() request any send mail program to work. Is it a windows server that you're using? SMTP only works for windows. Anything else uses sendmail or equivalent. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* transient bus protocol violation */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] print new account name on new account page?
I don't use the mysql functions anymore (look into php.weblogs.com) but I believe what you are looking for is $row['firstName'], not $firstName. (The extract MAY put them into variables for you but if it does, it's not necessary, just use the $row array. Also, tail the log file on your SQL server to make sure that the select is being executed properly. =C= * * Cal Evans * Stay plugged into your audience. * http://www.christianperformer.com * -Original Message- From: Addison Ellis [mailto:[EMAIL PROTECTED]] Sent: Saturday, January 18, 2003 1:58 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] print new account name on new account page? hello, i have a form someone fills out. on submit it takes them to a new accounts page that say welcome new member. how can i get their name to print on the new page from the form they just filled out? i have been trying the following but it keeps giving me error messages regardless of how i manipulate the following. thank you for your time. addison ? include(config.php); $sql = SELECT firstName,lastName FROM accounts WHERE email='$logname'; $result = mysql_query($sql) or die(Couldn't execute query 1.); $row = mysql_fetch_array($result,MYSQL_ASSOC); extract($row); echo headtitleNew Account Welcome/title/head h2 align='center' style='margin-top: .7in' Welcome $firstName $lastName/h2\n; ? here is an example of the errors: Warning: extract() expects first argument to be an array in /users/infoserv/web/register/ca/new_account.php on line 82 -- Addison Ellis small independent publishing co. 114 B 29th Avenue North Nashville, TN 37203 (615) 321-1791 [EMAIL PROTECTED] [EMAIL PROTECTED] subsidiaries of small independent publishing co. [EMAIL PROTECTED] [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Email to a list of address in your database.
Hi, I have a list of email address in a mysql database and I would like to create a link that when clicked pulls up your my mail program and mails to everyone in the database. a href=mailto:ARRAY OF EMAIL ADDRESSMail to everyone/a Here is my code: pBr ? $userquery = select * from users; $myuserquery = mysql_query($userquery, $connection) or die(Couldn't execute query.); while($myresult = mysql_fetch_array($myuserquery)) { $emailAddress = $myresult['emailAddress']; $to[] = $emailAddress; } $maxTo = count($to); for($count = 0; $count $maxTo; $count++) { $mailTo = $to[$count]; } ? pa href=mailto:?=$mailTo;?mail To all my list/a -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php