Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Re: HELP: PHP Send mail problems.

Reply
Thread Tools

Re: HELP: PHP Send mail problems.

 
 
Jonathan N. Little
Guest
Posts: n/a
 
      08-02-2010
ing wrote:
> mail($emailadd, $subject, $text, 'From: '.$emailadd.'');
> echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';
> ?>


This would be much better handled at a.c.l.p, but if you are using
server side don't use META redirects, use PHP's header function:

$url='http://example.com/WhereYouWantToGo.html';
header("Location: $url");

<http://www.php.net/manual/en/function.header.php>

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
 
 
 
Jonathan N. Little
Guest
Posts: n/a
 
      08-02-2010
ing wrote:
> On Mon, 02 Aug 2010 08:38:14 -0400, "Jonathan N. Little"
> <> wrote:
>
>> ing wrote:
>>> mail($emailadd, $subject, $text, 'From: '.$emailadd.'');
>>> echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';
>>> ?>

>>
>> This would be much better handled at a.c.l.p, but if you are using
>> server side don't use META redirects, use PHP's header function:
>>
>> $url='http://example.com/WhereYouWantToGo.html';
>> header("Location: $url");
>>
>> <http://www.php.net/manual/en/function.header.php>

>
> Srry but you've completely baffled me and the web link is even
> worse.The fact that I use Expression Web should tell you I'm not up on
> coding. What is a Meta redirect? Where do I have them? Does your
> header need to go in the HTML (calling) part of the PHP code part? How
> do I type it if where I want it to go is an email to my inbox? I don't
> want a web page, I want a message sent. TIA.


After the line:
mail($emailadd, $subject, $text, 'From: '.$emailadd.'');

You are echoing in PHP:
echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';

That essentially create a HTML page use just this META tag redirect.
This is NOT the way to redirect to the "response|thank you|your order
been sent" page. PHP, (You do know you are using PHP, right?*) can not
only send HTML output but can send info via the server headers that
precedes the HTML output. That is what you want to do here, not send
HTML output to do the redirect but send response headers to do the
redirect, i.e. in place of your echo statement you want:

header("Location: $url");

Note*: Expression Web or any other misnomer WYSIWYG editor is *not* a
substitute for know what you are doing. If you are going to use more
than just static HTML and use server-side scripting like PHP in your
pages, you really have to learn a bit about PHP. The manual link is a
good place to start. Plenty of tuts on the web. I suggest you kit a few,
else you could inadvertently hand the hackers a spam machine...


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
 
 
 
Doug Miller
Guest
Posts: n/a
 
      08-02-2010
In article <>, "" <> wrote:
>Oops! Sorry. No it doesn't. I believe Doug Miller identified the fact
>that the PHP script is never being called.


I did nothing of the kind. You asserted that "nothing happened". And I
questioned "nothing at all? not even invoking the script?"

The script not being called is entirely an assumption on your part, and
probably an incorrect assumption at that. Your biggest problem right now is
that you have no idea what is or is not happening.

> So the problem appears to
>be in the HTML element.


I doubt that very much. Have you checked your PHP error log to see if there's
anything there that would indicate a problem?
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: HELP: PHP Send mail problems. Doug Miller HTML 9 08-04-2010 09:55 PM
Re: PHP Send mail problems. rf HTML 13 08-04-2010 10:22 AM
PHP Training Institute In Delhi, Live Projects on PHP. Short TermPHP Courses, PHP Scripts, PHP Training with Live Projects. Rajive Narain Java 0 09-18-2009 10:47 AM
Send mail using System.Web.Mail fails w/ m.BodyFormat=MailFormat.H =?Utf-8?B?Unlhbg==?= ASP .Net 2 02-28-2006 01:50 AM
Mail.SmtpMail.Send won't send to one of my addresses Nathan Sokalski ASP .Net 3 11-23-2005 09:25 PM



Advertisments
 



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