Computer Webmaster Gaming Console Graphics Forum

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.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > PHP
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

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.

Google
Closed Thread
 
LinkBack Thread Tools Display Modes
Old 07-01-2007, 5:12 PM   #1
Tony Wilson
 
Tony Wilson's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default grrrrrrrrrrr

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
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Advertisements
Old 07-01-2007, 5:12 PM   #2
Jochen Buennagel
 
Jochen Buennagel's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default grrrrrrrrrrr

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
*/

 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 5:12 PM   #3
Jeffrey Silverman
 
Jeffrey Silverman's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default grrrrrrrrrrr

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/

 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 5:12 PM   #4
Justin Koivisto
 
Justin Koivisto's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default grrrrrrrrrrr

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.

 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 5:12 PM   #5
Tony Wilson
 
Tony Wilson's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default grrrrrrrrrrr

"Jeffrey Silverman" <jeffrey@jhu.edu> wrote in
<snip!>
>
> Not nearly enough information.
>
> Are you getting any error messages?
>


nope...

just a white page
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 5:12 PM   #6
Justin Koivisto
 
Justin Koivisto's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default grrrrrrrrrrr

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.

 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 5:13 PM   #7
DvDmanDT
 
DvDmanDT's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default grrrrrrrrrrr

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



 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 5:13 PM   #8
Willem van der Berg
 
Willem van der Berg's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default grrrrrrrrrrr

> 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


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 5:13 PM   #9
haptiK
 
haptiK's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default grrrrrrrrrrr

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


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 5:13 PM   #10
Jeffrey Silverman
 
Jeffrey Silverman's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default grrrrrrrrrrr

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/

 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Featured Websites
Free Space
Free Space
Free Space Free Space
Closed Thread
Tags:




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Featured Websites




All times are GMT +1. The time now is 12:23 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98