[PHP-DB] Re: php mail() question
Hi, Okay removed "value" and have this now: ---some code--- echo ""; echo "",HtmlSpecialChars($headers[$line]),"'"; echo ""; ---some code--- What does this do? Well I added and for a testing purpose. It returns in the textarea ... So it's skipping the HtmlSpecialChars code. Why? Okay if I have this: ---some more code--- echo ""; echo "$headers'"; echo ""; ---some more code--- It returns in the textarea the following: Array So it appears to display if I don't use ",,". I guess there is no easy way to define $headers to diaply the entire headers when it's used? I quote you: Text areas do not take any value attributes. Well they do... If I use value="whatever" it returns that in the box. (well did for me) I posted on another board regarding the issue and they told me to contact the author of the script. (which is you I believe) They also seeked some sniplets which I sent onto them and they said ti SHOULD work. But I only gave them a sniplet of it and gave them the url for the script. They believe something is blocking the break out from the textarea so when you break out of it to use a function it returns nothing. But if you don't break out and use $headers it returns a value. Please check the script and see if there is something blocking a breakout. I'll look into this though, it seems odd to me but I suggest you contact the author as they would know the problem. (hence they wrote it) If the author fails to help let me know, I'll look into it. But 9 times out of 10 they will assist unless they have copied it off somewhere or don't have alot of time. He than went on about some things than ended with... It only looks like a simple thing, you've probably done some miss typing so should only take a few minutes to find the error and might only be in your form so ask the author. I am continuely replying to their comments to resolve this problem. But they keep insisting me to contact the author. Anyways since they claim it's something easy or miss typed I think $4 or $5 is applicable to fix this. Not a job many would expect payment from I am sure. Probably a 30 second job, that is why I posted here. Not as if I need something high techy. When I first posted you directed me to the pop3. Yes I grabbed it.. Got some more help off you. Did some work to get a database setup and test against my live database for a match. Yep works fine. However I made it so you had to type in the email address to get the account flagged. So I got it all setup but now I want the headers to be displayed in the text box. Like it's displayed on screen for message 1. But I can't get anything like that in the text box. Since the return is an array and seems to ignore the other code. I have continuely followed up because you said you use this method to handle bounced emails for your mailing list. So obviously you use it somehow or another or a different method but your sending data to a database with the bounced email and handling it. SO how are you getting it here via a form? What info are you using to get the form to understand it. As I said before credit is given for all work with author, web address for script etc. That results in a much better return than $4 or $5 will. Cheers! --- This does not make sense. You need to understand what you are doing. Text areas do not take any value attributes. The text that will show must be entered between http://personals.yahoo.com.au - Yahoo! Personals New people, new possibilities. FREE for a limited time. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Display Mysql Result in drop down list
Hi all, Right now I'm trying to retrieve one of the column "tutor_name" and display al the tutor's name in a drop down list. The problem now is, the drop down list only manage to display 1 record from that row instead of all tutor's name under "tutor_name" column...wonder where the problem lies?? Hope to get some help soon. Below is a snip of the code: Drop me a msg if anyone needs the entire code. " .$row ["tutor_name"]. ""; } $result = $db->query($sql); ?> Thanks in advance =) Irin. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: php mail() question
Hello, On 12/22/2003 12:13 PM, Jerry wrote: You just need to call the RetrieveMessage function that returns the headers of each message and then look for the To: header. Ummm, why can't you give me a working code that grabs the headers and put it into a textarea? Hey, I can tell you how to fish, but it needs to be the one that will fish for yourself. Meaning, I have given you enough information for you to take the class and do what you need it to do. If you are having difficulties, maybe you just ask for help probably paying for the work. Sorry, I can't help you now, but here you may find solve your problem. http://www.php-freelancers.com/ echo ""; echo "'"; echo "\n"; echo ""; Results in the form area being blank. Replacing 'HtmlSpecialChars' with 'RetrieveMessage' comes back with an error saying it's not deinfed on line blah This does not make sense. You need to understand what you are doing. Text areas do not take any value attributes. The text that will show must be entered between -- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Age old - Sort between two dates...
Dear Tristan.Pretty , MySQL Version 4.0.15 I've since found this... MySQL supports the between operator for the DATE field. SELECT * FROM Appointments WHERE Moment BETWEEN StartTime AND EndTime ORDER BY StartTime; if the StartTime and EndTime are two PHP variables then use quotes like ' $StarTime ' This must solve the prob but that doesn't appear to work? Well confused now...? No, not but much focused now after knowing the fact that MySQL is not a Database with stuff Regards, V Kashyap *Sai Hertz And Control Systems <[EMAIL PROTECTED]>* Sent by: [EMAIL PROTECTED] 22/12/2003 17:25 Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTED] cc [EMAIL PROTECTED] Subject Re: [PHP-DB] Age old - Sort between two dates... Dear Tristan Pretty, >I have a date field in my database, and want to select all entries in the >database from date 1 --> date 2 >I'll let the user decide what dates... > > What Database are you using and its version this will give you replies not google searches >Can anyone point me in the right direction as to what command I need? > >Sorry to be a dunce, but I can't find this one... > >Tris... > >* >The information contained in this e-mail message is intended only for >the personal and confidential use of the recipient(s) named above. >If the reader of this message is not the intended recipient or an agent >responsible for delivering it to the intended recipient, you are hereby >notified that you have received this document in error and that any >review, dissemination, distribution, or copying of this message is >strictly prohibited. If you have received this communication in error, >please notify us immediately by e-mail, and delete the original message. >*** > > > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php * The information contained in this e-mail message is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. *** -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Age old - Sort between two dates...
Ah... MySQL Version 4.0.15 I've since found this... MySQL supports the between operator for the DATE field. SELECT * FROM Appointments WHERE Moment BETWEEN StartTime AND EndTime ORDER BY StartTime; but that doesn't appear to work? Well confused now...? Sai Hertz And Control Systems <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 22/12/2003 17:25 Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTED] cc [EMAIL PROTECTED] Subject Re: [PHP-DB] Age old - Sort between two dates... Dear Tristan Pretty, >I have a date field in my database, and want to select all entries in the >database from date 1 --> date 2 >I'll let the user decide what dates... > > What Database are you using and its version this will give you replies not google searches >Can anyone point me in the right direction as to what command I need? > >Sorry to be a dunce, but I can't find this one... > >Tris... > >* >The information contained in this e-mail message is intended only for >the personal and confidential use of the recipient(s) named above. >If the reader of this message is not the intended recipient or an agent >responsible for delivering it to the intended recipient, you are hereby >notified that you have received this document in error and that any >review, dissemination, distribution, or copying of this message is >strictly prohibited. If you have received this communication in error, >please notify us immediately by e-mail, and delete the original message. >*** > > > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php * The information contained in this e-mail message is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. ***
Re: [PHP-DB] Age old - Sort between two dates...
Dear Tristan Pretty, I have a date field in my database, and want to select all entries in the database from date 1 --> date 2 I'll let the user decide what dates... What Database are you using and its version this will give you replies not google searches Can anyone point me in the right direction as to what command I need? Sorry to be a dunce, but I can't find this one... Tris... * The information contained in this e-mail message is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. *** -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Age old - Sort between two dates...
Hi all... I've searched on google without luck, and so far, no luck... I have a date field in my database, and want to select all entries in the database from date 1 --> date 2 I'll let the user decide what dates... Can anyone point me in the right direction as to what command I need? Sorry to be a dunce, but I can't find this one... Tris... * The information contained in this e-mail message is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. ***
Re: [PHP-DB] PHP export to CSV
using mysql as an example, this is what i do. ---UNTESTED CODE -- $sql = "SELECT * FROM TABLE"; $res = mysql_query($sql) or die(mysql_error() . "".$sql); $fp = fopen("file_to_create.csv", "w"); while ($rs = mysql_fetch_row($res)) { $write_string = "\" . implode("\",\"", $rs) . "\" \n"; fwrite($fp, $write_string); } fclose($fp); This would produce a fully quoted csv file. edit to you liking. hth Jeff "John Greco" <[EMAIL PROTECTED]>To: [EMAIL PROTECTED] cc: 12/22/2003 10:20 Subject: [PHP-DB] PHP export to CSV AM Please respond to "John Greco" Anyone ever get some code to select from the DB and drop into a CSV file? -- 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
[PHP-DB] PHP export to CSV
Anyone ever get some code to select from the DB and drop into a CSV file? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PHP/DB speed
> On 56K the page would probably either 1) timeout on > the way you have it currently or 2) only display part > of the page/form and not read the whole page > correctly. > > I dunno give us the URL, I am sure someone is on > dialup to give it a wurl. Try the url with web analyzer http://www.websiteoptimization.com/services/analyze/ This is by far the most useful dev tool I have found recently. Saves touching dial ups for testing.. -- Mike Karthauser Managing Director - Brightstorm Ltd Email >> [EMAIL PROTECTED] Web >> http://www.brightstorm.co.uk Tel >> 0117 9426653 (office) 07939 252144 (mobile) Snailmail >> Unit 8, 14 King Square, Bristol BS2 8JJ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PHP/DB speed
Robin Kopetzky wrote: > Good afternoon! > > I am writing a project and have a speed concern... > > The code I am using is thus and is retrieving around 2,500 records: > > $result = mysql_query($sql) > while ($row = mysql_fetch_array($result)) > { > build stmt > } > > Is there a faster method? Timed this with microtime and .9 seconds to > retrieve the data and output the web page seems REAL slow. Now this is on a > T-Base-100 network but I imagine it would be like watching paint dry in a > 56K modem. Any thoughts, ideas on accelerating this? I did try ob_start() > and ob_end_flush() and no help... Ouch, .9 Seconds, is this 9 seconds or 90 seconds? I'm guessing .9 is 90. Never the less 9 or 90 is slow. But what do you expect when your draging down 2,500 records in a statement. The poor HTML is working alot and the browser has to render it. This takes time. That's a fair bit of HTML. Try grabbing 2,500 records of abc with around it and for each abc and display it as plain text and see how long it would take. Probably the same speed wise. Why would you need 2,500 anyways. The poor old user would be there for at least 5 mins deciding or finding the one to click. This is some project. An easy way is to diplay all data in plain text and have the user simply typing what they want. You could than run the results against the database for a match and if one found process it. If the user types some bogus thing that is not in the list return a error. That be alot faster in speed wise. But again it comes back to the user selecting taking ages to sift through so many records. It depends what their selecting also, if it's like a sport name you could customize them in alphabetical order or Occupation or something can work the same. (be easier for user to find) Another way, not sure how speed would go is to have a radio button or check box down one side of the page. Give each a unique id name (e.g. 1 , 2 , 3) and display the data to the right of it so they select one. Than you run a query to match the id against the database which will find the data to match it with. But that method I'd guess would be slightly QUICKER than the OPTION method. But only a bit faster, nothing crash hot as the browser still needs to render the HTML. On 56K the page would probably either 1) timeout on the way you have it currently or 2) only display part of the page/form and not read the whole page correctly. I dunno give us the URL, I am sure someone is on dialup to give it a wurl. Goodluck :) http://personals.yahoo.com.au - Yahoo! Personals New people, new possibilities. FREE for a limited time. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: php mail() question
You just need to call the RetrieveMessage function that returns the headers of each message and then look for the To: header. -- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/ Ummm, why can't you give me a working code that grabs the headers and put it into a textarea? echo ""; echo "'"; echo "\n"; echo ""; Results in the form area being blank. Replacing 'HtmlSpecialChars' with 'RetrieveMessage' comes back with an error saying it's not deinfed on line blah (which results back to the form line) But having the first code results in no errors, but a blank box. But why does it work outside the box fine as plain text? All I need is the code that actually shows up into a textarea or a simple input text box. Code would be ideal as I can't figure this out ... I can get it to output fine in plain text but when I try a form it does nothing. Another way I tried which I can't remember what I did now returned an array response. I'm not worried about sifting through and finding the To: address. I know how to do this. I have the database setup to handle that. Just can't seem to get the headers in a form box, that's all I require than it's all done. Just a small bit of code is stopping sucess. otherwise I'll opt to another method of handling this, probably end up more complicated but I was told that this way would be pretty easy but can't seem to get you to show a working text area displaying the text. What I can't understand is why can't a simple bit of code show the same results in a text box than in plain text? Something is stopping it, but does not seem to be a error because no error is outputed. Unless some errors are not displayed? Anyways... I'm at the stage at throwing all the code in because of this problem. I've spent a week or so on it. I could of got a Mailing List and do it all that way and handle all bounces but thought I'd try a way that at least I could run it the way I want it to run that adapts to my database instead of using one all setup to run on a certain database structure which I'd have to work right through to edit to get to work with mine. Thanks to those people that have assisted me, please reply to this thread to this board though so everyone is aware of what you suggest etc. So than we don't get multiple ideas floating my way. All is appreicated. :) And thanks again, credit on the site I am working this with will be given to all sucessful help as I do on all my sites. Cheers! http://personals.yahoo.com.au - Yahoo! Personals New people, new possibilities. FREE for a limited time. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Reading emails with PHP
Manuel, et al -- ...and then Manuel Lemos said... % % Hello, Hi! % ... % A more useful solution is one based on setting the return path address % of the message being sent in such a way that you can retrieve the % original recipient address from the bounced message recipient address. Agreed. Full VERPing can be done if the client is interested :-) % % This has just been discussed here: % % http://marc.theaimsgroup.com/?t=1071585&r=1&w=2 Thanks! % % -- % % Regards, % Manuel Lemos HAND & Happy Holidays :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
SV: [PHP-DB] PHP/DB speed
Hi, As others have pointed out, the real problem is the huge list. You may however get a slightly lower time by using mysql_fetch_row instead of mysql_fetch_array. Regards Henrik Hornemann -Oprindelig meddelelse- Fra: Robin Kopetzky [mailto:[EMAIL PROTECTED] Sendt: 21. december 2003 23:16 Til: PHP DB Group Emne: [PHP-DB] PHP/DB speed Good afternoon! I am writing a project and have a speed concern... The code I am using is thus and is retrieving around 2,500 records: $result = mysql_query($sql) while ($row = mysql_fetch_array($result)) { build stmt } Is there a faster method? Timed this with microtime and .9 seconds to retrieve the data and output the web page seems REAL slow. Now this is on a T-Base-100 network but I imagine it would be like watching paint dry in a 56K modem. Any thoughts, ideas on accelerating this? I did try ob_start() and ob_end_flush() and no help... Thank for any help in advance. Robin 'Sparky' Kopetzky Black Mesa Computers/Internet Service Grants, NM 87020 -- 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] Database Array Question
! - sign adds a negative meaning to the statement. Thus, if(!isset($_SESSION['uid'])) means = If (NOT isset($_SESSION['uid']))) you know that if(statement) will work if "statement" returns a "true" value...so if $_SESSION['uid'] is already set(has some value), isset($_SESSION['uid']) will also return a true value... so, by writting if(!isset()) { ...some_actions... }, some_actions will be executed only if uid session is not set (doesn't contain any value). Hope this helps, Muhammed Mamedov - Original Message - From: "Kieran Hood" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, December 22, 2003 1:26 PM Subject: [PHP-DB] Database Array Question > I'm new to PHP and was wondering if there's any better way of retrieving > the records from the query other than using an array (This query will only > return 1 row): > > $auth = mysql_query("SELECT username, userlevel, password, email FROM > users WHERE id = '".$_SESSION['uid']."'"); > while ($row = mysql_fetch_array($auth)) > { > $password = $row['password']; > } > > > Also, can anyone tell me what the relevance of adding '!' is to an if > statement eg. > > This: > if(!isset($_SESSION['uid'])) > > Instead of this: > if(isset($_SESSION['uid'])) > > > Thanks > -- > Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ > > -- > Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ > > -- > 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
[PHP-DB] Database Array Question
I'm new to PHP and was wondering if there's any better way of retrieving the records from the query other than using an array (This query will only return 1 row): $auth = mysql_query("SELECT username, userlevel, password, email FROM users WHERE id = '".$_SESSION['uid']."'"); while ($row = mysql_fetch_array($auth)) { $password = $row['password']; } Also, can anyone tell me what the relevance of adding '!' is to an if statement eg. This: if(!isset($_SESSION['uid'])) Instead of this: if(isset($_SESSION['uid'])) Thanks -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: Subject: PHP/DB speed
0.9 seconds doesn't sounds too bad to me! Although, you haven't told us how big each record is, only that you have 2500 of them ! So we cannot guess. However, I would investigate the PHP gzip functions along with ob_start() so that your output can be zipped before sending to the client. Is the entire record data, or does is consist of javascript fluff and other furniture which might be better driven by client side DHTML processing ? Also with 2500 records I would make a more efficient search algorithm, or page your output to say 25 pages of 100 records each. If your query is often returning the same data, cache the output as a file on the server instead, and update the file only when you apply updates to the database. Cheers - Neil. At 22:11 21/12/2003 +, you wrote: From: "Robin Kopetzky" <[EMAIL PROTECTED]> To: "PHP DB Group" <[EMAIL PROTECTED]> Date: Sun, 21 Dec 2003 15:15:35 -0700 Message-ID: <[EMAIL PROTECTED]> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: PHP/DB speed Good afternoon! I am writing a project and have a speed concern... The code I am using is thus and is retrieving around 2,500 records: $result = mysql_query($sql) while ($row = mysql_fetch_array($result)) { build stmt } Is there a faster method? Timed this with microtime and .9 seconds to retrieve the data and output the web page seems REAL slow. Now this is on a T-Base-100 network but I imagine it would be like watching paint dry in a 56K modem. Any thoughts, ideas on accelerating this? I did try ob_start() and ob_end_flush() and no help... Thank for any help in advance. Robin 'Sparky' Kopetzky Black Mesa Computers/Internet Service Grants, NM 87020 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php