[PHP] Add BCC parameter to mail()
Hi folks - Newbie question... Q: Is there a way to add BCC and/or CC parameters to this simple email function? If there is a better way to do this - please let me know Thanks in advance $header = "From: ". $Name . " <" . $email . ">\r\n"; //optional headerfields $fullto = $recipientname . " <" . $recipient . ">"; ini_set('sendmail_from', 't...@test.com'); mail($fullto, $subject, $mail_body, $header); //mail command :) ?> Thanks, c...@hosting4days.com
[PHP] mod primary key field - newbie question
newbie question ... I have a MySQL table where I want to update (renumber) the primary numeric key field. - I successfully turned field off as a primary key index and UN auto incremented it - then created new sequential numbers for it - then turned back on primary key index and re added auto increment in BUT when I make a new record it does NOT start where new numbers stop last is 51 next should be 52 but jumps to 157 Q: is there a way to reset the NEXT SERIAL ID NUMBER somewhere? how do I fix this? -- Thanks - RevDave Cool @ hosting4days . com [db-lists 09]
[PHP] newbie - Is there a calendar module for date entry?
newbie ... - is there a calendar module for date fields? - so that a small calendar pops up - then you can click on a date, to add to a field - like google or yahoo calendars has...? BTW: I saw this - but it doesn't seem to be the right thing ( more meant for Converter issues) for what I'm looking for... http://us2.php.net/manual/en/intro.calendar.php -- Thanks - RevDave Cool @ hosting4days . com [db-lists 09] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] newbie - Is there a calendar module for date entry?
On Jul 21, 2009, at 6:17 PM, Jonathan Tapicer wrote: That is javascript thing, not PHP. The Yahoo UI has a nice one, here you have an example: http://developer.yahoo.com/yui/examples/calendar/ calcontainer_clean.html, and here the module reference: http://developer.yahoo.com/yui/calendar/ Jonathan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php The Yahoo UI looks great. On Jul 22, 2009, at 12:50 AM, Ashley Sheridan wrote: When I do these sorts of things, I tend to use Tigra calendar. They do two versions, the free and the pro version, but tbh, the free one does everything you need. It's very easy to set up too. Hi Ashley - the free one seems to be just the thing. - thanks Thanks to all - They both look good - I'm checking them out now! Another newbie question: storing dates and times... I'm trying to build a simple notepad page where I can attach a date and even time field. So this Tigra or yahoo calendar will be great date picker helper. This is for the US, so I'd like the user to see normal us formatting like: date field - 7/1/2009 and separate time field like: 11:30 AM mysql can use a DATE or TIME or datetime field type. and seems to use a different standard like: -MM-DD I want to to be able to do date calcs and such - so what is the best way (types) to store these fields in mysql and display them on the page with php? I do know about some of the cool php functions like: echo date('m-d-y g:i a', strtotime($row_this['myDate'])); so do I? ... store the date and time in separate fields then manipulate the display with php functions or??? - just looking for any favorite practices -- Thanks - RevDave Cool @ hosting4days . com [db-lists 09] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mail Command Body Issue - Trying to use 'do while' loop
I'm having a problem with mail body issue trying to use 'do while' loop in the $mail_body var. this line: do { echo $row_get1['name'] } while ($row_get1 = mysql_fetch_assoc ($get1)) will show ok when it's on the page elsewhere (not in the $mail_body var) but typed like: --- ok on web page (not email) echo $row_get1['vt_name']; } while ($row_get1 = mysql_fetch_assoc ($get1)); ?> Q: i want "TEXT" LOOP "TEXT" - AM I MISSING some syntax characters like(; or??) somewhere or THANKS for your help - dave - full email code $mail_body = "test \n\n"."test2".do { echo 'test' } while ($row_get1 = mysql_fetch_assoc($get1))."Thanks test xxx"; ?> $header = "From: ". $Name . " <" . $email . ">\r\n"; //optional headerfields $fullto = $recipientname . " <" . $recipient . ">"; //$fullto = $recipientname . " <" . $recipient . ">".", ".$recip2; ini_set('sendmail_from', 't...@test.com'); mail($fullto, $subject, $mail_body, $header); //mail command :) ?> Thanks, c...@hosting4days.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Command Body Issue - Trying to use 'do while' loop
On Sep 12, 2009, at 3:47 PM, c...@hosting4days.com wrote: I'm having a problem with mail body issue trying to use 'do while' loop in the $mail_body var. this line: do { echo $row_get1['name'] } while ($row_get1 = mysql_fetch_assoc ($get1)) will show ok when it's on the page elsewhere (not in the $mail_body var) but typed like: --- ok on web page (not email) echo $row_get1['vt_name']; } while ($row_get1 = mysql_fetch_assoc ($get1)); ?> Q: i want "TEXT" LOOP "TEXT" - AM I MISSING some syntax characters like(; or??) somewhere or THANKS for your help - dave I got it working like this Q: is this the best way? - full email code $mail_body = "test \n\n"."test2".do { echo 'test' } while ($row_get1 = mysql_fetch_assoc($get1))."Thanks test xxx"; ?> $header = "From: ". $Name . " <" . $email . ">\r\n"; //optional headerfields $fullto = $recipientname . " <" . $recipient . ">"; //$fullto = $recipientname . " <" . $recipient . ">".", ".$recip2; ini_set('sendmail_from', 't...@test.com'); mail($fullto, $subject, $mail_body, $header); //mail command :) ?> Thanks, c...@hosting4days.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Thanks, c...@hosting4days.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Odd Endless Loop with Explorer 8 (pc)
I have many of these tags on a site... They work well with all browsers i've tested - except explorer 8 (pc) '; ?> It just goes into an endless loop but stays on the original page - never going to page2.php Q: Any idea how to fix this? Thanks, c...@hosting4days.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Odd Endless Loop with Explorer 8 (pc)
On Sep 12, 2009, at 7:57 PM, kranthi wrote: '; ?> may b u should have '; ?> Thanks kranthi & HallMarc Websites url= ... - that did the trick! Thanks, c...@hosting4days.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Parse Question Using list()
newbie import csv question file is like: stuff1,stuff2,stuff3 stuff1,stuff2,stuff3 stuff1,stuff2,stuff3 stuff1,stuff2,stuff3 etc. Problem: when I try to parse out the 3 fields and display them using list() it just gets just 1st char of each field ... Q: How do I get it to set $col1 - 2 & $col3 to the full contents of each for each line (not just 1st char)? '; // this shows the whole line ok echo "c1 is $col1 and c2 is $col2 and c3 is $col3".''; // this shows just 1st char of each field } ?> Thanks, c...@hosting4days.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Parse Question Using list()
On Oct 1, 2009, at 5:02 PM, Ben Dunlap wrote: You could tackle this in a couple of different ways. Either split your string into an array first: $line = fgets($handle); $columns = explode(",", trim($line)); Thanks Ben - the explode() command worked great! - Now a bit of another problem I'm exporting from another database (mac) to a csv file then a quick import to excel 2004 (mac) for some cleaning... before the excel import, some date fields look like "2009-9-29 11:21:37" = good for sql import but excel does an auto reformat to 9/29/2009 11:21:37 AM = not good for sql import Q: any way to turn this auto reformat off in excel and keep it the way I had it? (I saw nothing in pref's) Thanks, c...@hosting4days.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Plotting a Line Graph It seems that the google charts work from a url - so 500 points would be way to long for any url - so I guess that option is out.
I have a data file that stores about 500 numbers in a record - meant to plot a basic line graph (left to right). The numbers can be imported into a record with 500 fields or just stored in a text field - which ever is better. The user might want to pick a few random records and plot them together - so the line graph may compare the few records together. It seems that the google charts work from a url - so 500 points would be way to long for any url - so I guess that option is out. Q: what is the best way to create / display line graphs in with PHP? Thanks in advance for your help - dave Thanks, c...@hosting4days.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Plotting a Line Graph
Jim Lucas wrote: I would recommend http://www.rgraph.net/ It was written and is currently maintained by a member of this list. Jim Lucas Hi Jim, rgraph looks cool... most demos I see show just a few points - do you think this could display 500 points? (I'm looking through their docs now...) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Force-Saving an Audio File
Hi folks, I'm trying to force save .mp3 files so this is a test page (found on the net). It works fine when: $directory = ""; // so the audio is in the same local directory but fails when I use a REAL web directory - (the audio file is here - http://mysite.com/test1/audio.mp3 ) $directory = "http://mysite.com/test1/";; says - The file $file was not found. Q: Any ideas how to get it to download from the website? = http://mysite.com/test1/";; //$directory = ""; $path = "$directory$file"; if(ini_get('zlib.output_compression')) ini_set('zlib.output_compression', 'Off'); $file_extension = strtolower(substr(strrchr($path,"."),1)); if( $file == "" ) { echo " File not found. File not found. "; exit; } elseif (! file_exists( $path ) ) { echo " The file $file was not found. The file $file was not found. - path - $path ";exit; }; switch( $file_extension ) { case "pdf": $ctype="application/pdf"; break; case "zip": $ctype="application/zip"; break; case "doc": $ctype="application/msword"; break; case "xls": $ctype="application/vnd.ms-excel"; break; case "ppt": $ctype="application/vnd.ms-powerpoint"; break; case "gif": $ctype="image/gif"; break; case "png": $ctype="image/png"; break; case "jpeg": case "jpg": $ctype="image/jpg"; break; case "wav": case "mp3": $ctype="application/iTunes"; break; default: $ctype="application/force-download"; } header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private",false); header("Content-Type: $ctype"); header("Content-Disposition: attachment; filename=\"".basename ($path)."\";" ); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".filesize($path)); readfile("$path"); exit(); ?> Thanks, c...@hosting4days.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Force-Saving an Audio File
Thanks Gaurav & Shawn, I'll check into your suggestions. Thanks, c...@hosting4days.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php