You are here: Re: new to php « PHP Programming Language « IT news, forums, messages
Re: new to php

Posted by Andrew DeFaria on 06/15/05 17:59

Desmond wrote:

> This is my first attempt ever at php can anyone glance over this code
> segmant and tell me were I am going wrong please

As I often like to ask when people ask such not well thought out
questions: What was your first indication that it failed? Also, what
have you done in your attempts to debug it?

> ---- HTML ----
> <html>
> <head>
> <title>Email Me</title>
> <body>
> <p>
> </head>
> <table width="400">
> <tr>
> <td>
> <form action="email.php" method="POST">
> Subject:
> <br>
> <input type="text" name="subject" size="20" maxlength="30">
> <p>
> Message:
> <br>
> <textarea rows="8" name="message" cols="25"></textarea>
>
> <p>
> <input type="submit" value="Send">
> </form>
> </td>
> </tr>
> </table>
> </body>
> </html>
>
> ------------------------------
> ----PHP -------
> <html>
> <body>
>
> <?php
> $to = "otuatail@aol.com";
> $from = "desotuatail@aol.com";
> // $subject = "This is a test email";
> // $message = "Dear Desmond,\n\n\n This is just a test email.\n\n
> >From Chris.";
>
> // $headers = "From: $from\r\n";
>
> $success = mail($to, $HTTP_POST_VARS["subject"],
> $HTTP_POST_VARS["message"]);
> if ($success)
> echo "The email to $to from $from was successfully sent";
> else
> echo "An error occurred when sending the email to $to from
> $from";
> ?>
>
> </body>
> </html>
>
> --
> Headline: Bear takes over Disneyland in Pooh D'Etat!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация