![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| Hi..... ------------------------------------------------------------------------- <html> <head> </head> <body> <?php $mese[0]="-"; $mese[1]="January"; $mese[2]="February"; $mese[3]="March"; $mese[4]="April"; $mese[5]="May"; $mese[6]="June"; $mese[7]="July"; $mese[8]="August"; $mese[9]="September"; $mese[10]="Octobre"; $mese[11]="November"; $mese[12]="December"; $giorno[0]="Sun"; $giorno[1]="Mon"; $giorno[2]="Tues"; $giorno[3]="Wed"; $giorno[4]="Thu"; $giorno[5]="Fri"; $giorno[6]="Sat"; $gisett=(int)date("w"); $mesnum=(int)date("m"); $vd = $giorno[$gisett]." ".$mese[$mesnum]." ".date("d")." ".date("Y"); echo "Sending E-mail..."; $recipient = "tony@tonydisabled.com"; $subject = "A grocery list email notify"; $ta = "Hello!!!!!\n\nThis is an automated email to Ron or Arlene Esler.\n \nIf you are not Ron or Arlene Esler, IGNORE THIS EMAIL." $taa = " \n\nThe grocery list is ready as of" .$vd; $tb = "\n\nPlease visit http://www.tonydisabled.com to see list.""\n \nThank You.\n\nTony Wilson"; $extra = "From: tony@tonydisabled.com\r\nReply-To: tony@tonydisabled.com \r\n"; $message = $ta. $taa. $tb.; mail ($recipient, $subject, $message, $extra); header("Location: http://www.tonydisabled.com/Groceries/foodpw.html"); ?> </body> </html> ------------------------------------------------------------------------- Can someone pls tell me why the above script DOES NOT work.and how to fix it. The problem seems to be inserting the date in the body of the msg. If I remove any & all references to the date,the script works but with the script as it is above all I get is a white blank page. I can echo $vd and the current date comes up (which is correct) The way that I know that its not working is because the header does not run. Even though I understand PHP to be a server side language,is there a way I can run PHP on a Windows 2000 Pro desktop? To test run a php file, I have to upload it to server and run it via browser which is becoming a pain. Thanks, Tony | |||
| Advertisements |
| | #2 | ||
| Tony Wilson wrote: > Even though I understand PHP to be a server side language,is there a way > I can run PHP on a Windows 2000 Pro desktop? To test run a php file, I > have to upload it to server and run it via browser which is becoming a > pain. You can run a simple webserver setup on almost any computer. For Windows, I usually use a package called "Uniform Server" that has Apache, PHP, and MySql, is a small download, and runs without installation. You can find it at http://www.sourceforge.net/projects/miniserver As to your main question: I'll look into it when I have more time later today, if you haven't gotten an answer by then Jochen -- /** * @author Jochen Buennagel <zang at buennagel dot com> * @see http://www.sourceforge.net/projects/zang */ | |||
| | #3 | ||
| On Mon, 18 Aug 2003 17:26:54 +0000, Tony Wilson wrote: <snip!> ------------------------------------------------------------------------ > Can someone pls tell me why the above script DOES NOT work.and how to fix > it. The problem seems to be inserting the date in the body of the msg. If <snip!> Not nearly enough information. Are you getting any error messages? -- Jeffrey D. Silverman | jeffrey AT jhu DOT edu Johns Hopkins University | Baltimore, MD Website | http://www.wse.jhu.edu/newtnotes/ | |||
| | #4 | ||
| Tony Wilson wrote: > $mese[0]="-"; > $mese[1]="January"; > $mese[2]="February"; > $mese[3]="March"; > $mese[4]="April"; > $mese[5]="May"; > $mese[6]="June"; > $mese[7]="July"; > $mese[8]="August"; > $mese[9]="September"; > $mese[10]="Octobre"; > $mese[11]="November"; > $mese[12]="December"; > > $giorno[0]="Sun"; > $giorno[1]="Mon"; > $giorno[2]="Tues"; > $giorno[3]="Wed"; > $giorno[4]="Thu"; > $giorno[5]="Fri"; > $giorno[6]="Sat"; > > $gisett=(int)date("w"); > $mesnum=(int)date("m"); > > $vd = $giorno[$gisett]." ".$mese[$mesnum]." ".date("d")." ".date("Y"); replace all that above with: $vd = date('D F d Y'); > The way that I know that its > not working is because the header does not run. That is because you have output in the file before the header call... For instance, get rid of everything above your block of PHP... (Don't send <html>.....) don't even have whitespace. -- Justin Koivisto - spam@koivi.com PHP POSTERS: Please use comp.lang.php for PHP related questions, alt.php* groups are not recommended. | |||
| | #6 | ||
| Tony Wilson wrote: > "Jeffrey Silverman" <jeffrey@jhu.edu> wrote in > <snip!> > >>Not nearly enough information. >> >>Are you getting any error messages? >> > > > nope... > > just a white page Did you check your error log file for your domain? -- Justin Koivisto - spam@koivi.com PHP POSTERS: Please use comp.lang.php for PHP related questions, alt.php* groups are not recommended. | |||
| | #7 | ||
| You have a . to much here: $message = $ta. $taa. $tb.;... and one to little here: $tb = "\n\nPlease visit http://www.tonydisabled.com to see list.""\n (should be $tb = "\n\nPlease visit http://www.tonydisabled.com to see list."."\n) -- // DvDmanDT MSN: dvdmandt@hotmail.com Mail: dvdmandt@telia.com "Tony Wilson" <tony@tonydisabled.com> skrev i meddelandet news:y%70b.5863$Ki3.635782@news20.bellglobal.com.. . > Hi..... > > > ------------------------------------------------------------------------- > <html> > <head> > </head> > <body> > <?php > > $mese[0]="-"; > $mese[1]="January"; > $mese[2]="February"; > $mese[3]="March"; > $mese[4]="April"; > $mese[5]="May"; > $mese[6]="June"; > $mese[7]="July"; > $mese[8]="August"; > $mese[9]="September"; > $mese[10]="Octobre"; > $mese[11]="November"; > $mese[12]="December"; > > $giorno[0]="Sun"; > $giorno[1]="Mon"; > $giorno[2]="Tues"; > $giorno[3]="Wed"; > $giorno[4]="Thu"; > $giorno[5]="Fri"; > $giorno[6]="Sat"; > > $gisett=(int)date("w"); > $mesnum=(int)date("m"); > > $vd = $giorno[$gisett]." ".$mese[$mesnum]." ".date("d")." ".date("Y"); > echo "Sending E-mail..."; > $recipient = "tony@tonydisabled.com"; > $subject = "A grocery list email notify"; > $ta = "Hello!!!!!\n\nThis is an automated email to Ron or Arlene Esler.\n > \nIf you are not Ron or Arlene Esler, IGNORE THIS EMAIL." > $taa = " \n\nThe grocery list is ready as of" .$vd; > $tb = "\n\nPlease visit http://www.tonydisabled.com to see list.""\n > \nThank You.\n\nTony Wilson"; > $extra = "From: tony@tonydisabled.com\r\nReply-To: tony@tonydisabled.com > \r\n"; > $message = $ta. $taa. $tb.; > mail ($recipient, $subject, $message, $extra); > > header("Location: http://www.tonydisabled.com/Groceries/foodpw.html"); > ?> > </body> > </html> > ------------------------------------------------------------------------- > Can someone pls tell me why the above script DOES NOT work.and how to fix > it. The problem seems to be inserting the date in the body of the msg. If > I remove any & all references to the date,the script works but with the > script as it is above all I get is a white blank page. I can echo $vd and > the current date comes up (which is correct) The way that I know that its > not working is because the header does not run. > > Even though I understand PHP to be a server side language,is there a way > I can run PHP on a Windows 2000 Pro desktop? To test run a php file, I > have to upload it to server and run it via browser which is becoming a > pain. > > Thanks, > > Tony | |||
| | #8 | ||
| > Even though I understand PHP to be a server side language,is there a way > I can run PHP on a Windows 2000 Pro desktop? To test run a php file, I > have to upload it to server and run it via browser which is becoming a > pain. > > Thanks, > > Tony Can't help you with the first part of your question, but yes you can run PHP from your home computer. Install EasyPHP, start it up, go to your new 'localhost' and start your php file. If you are manipulating an MySQL database of course this doesn't work, unless you make a copy of your MySQL for use on your computer instead of the server. In that case make sure you don't mix the two up (think you have manipulated the real database while you have only manipulated your local copy). Regards, Willem van der Berg | |||
| | #9 | ||
| Hi Tony, Just wanted to make special note that if your sending HTML email with headers and you think your readers will be using outlook.. use "/r /n" instead of "/r/n" outlook seems to think its neat to ignore common concepts and email will show up as plain text if you dont have a space there - jpdr TTG Tony Wilson wrote: > Hi..... > > > ------------------------------------------------------------------------- > <html> > <head> > </head> > <body> > <?php > > $mese[0]="-"; > $mese[1]="January"; > $mese[2]="February"; > $mese[3]="March"; > $mese[4]="April"; > $mese[5]="May"; > $mese[6]="June"; > $mese[7]="July"; > $mese[8]="August"; > $mese[9]="September"; > $mese[10]="Octobre"; > $mese[11]="November"; > $mese[12]="December"; > > $giorno[0]="Sun"; > $giorno[1]="Mon"; > $giorno[2]="Tues"; > $giorno[3]="Wed"; > $giorno[4]="Thu"; > $giorno[5]="Fri"; > $giorno[6]="Sat"; > > $gisett=(int)date("w"); > $mesnum=(int)date("m"); > > $vd = $giorno[$gisett]." ".$mese[$mesnum]." ".date("d")." ".date("Y"); > echo "Sending E-mail..."; > $recipient = "tony@tonydisabled.com"; > $subject = "A grocery list email notify"; > $ta = "Hello!!!!!\n\nThis is an automated email to Ron or Arlene Esler.\n > \nIf you are not Ron or Arlene Esler, IGNORE THIS EMAIL." > $taa = " \n\nThe grocery list is ready as of" .$vd; > $tb = "\n\nPlease visit http://www.tonydisabled.com to see list.""\n > \nThank You.\n\nTony Wilson"; > $extra = "From: tony@tonydisabled.com\r\nReply-To: tony@tonydisabled.com > \r\n"; > $message = $ta. $taa. $tb.; > mail ($recipient, $subject, $message, $extra); > > header("Location: http://www.tonydisabled.com/Groceries/foodpw.html"); > ?> > </body> > </html> > ------------------------------------------------------------------------- > Can someone pls tell me why the above script DOES NOT work.and how to fix > it. The problem seems to be inserting the date in the body of the msg. If > I remove any & all references to the date,the script works but with the > script as it is above all I get is a white blank page. I can echo $vd and > the current date comes up (which is correct) The way that I know that its > not working is because the header does not run. > > Even though I understand PHP to be a server side language,is there a way > I can run PHP on a Windows 2000 Pro desktop? To test run a php file, I > have to upload it to server and run it via browser which is becoming a > pain. > > Thanks, > > Tony | |||
| | #10 | ||
| On Tue, 19 Aug 2003 08:49:15 +0000, haptiK wrote: > Hi Tony, > > Just wanted to make special note that if your sending HTML email with > headers and you think your readers will be using outlook.. use "/r /n" > instead of "/r/n" outlook seems to think its neat to ignore common > concepts and email will show up as plain text if you dont have a space > there > > - jpdr > TTG <Snip!> I think you mean backslash-r-backslash-n \r\n not forward-slash /r/n -- Jeffrey D. Silverman | jeffrey AT jhu DOT edu Johns Hopkins University | Baltimore, MD Website | http://www.wse.jhu.edu/newtnotes/ | |||
| Featured Websites | ||||
|
![]() |
| Tags: grrrrrrrrrrr |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| Featured Websites | ||||
|