You are here: Re: redirect after send form to email with message « PHP Programming Language « IT news, forums, messages
Re: redirect after send form to email with message

Posted by Shelly on 09/30/07 19:04

"Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
news:W6adnfYtA_AaeWLbnZ2dnUVZ_g-dnZ2d@comcast.com...
> Big Moxy wrote:
>> On Sep 30, 10:39 am, Krustov <m...@privacy.net> wrote:
>>> <comp.lang.php>
>>> <Big Moxy>
>>> <Sun, 30 Sep 2007 09:05:09 -0700>
>>> <1191168309.331313.203...@o80g2000hse.googlegroups.com>
>>>
>>>> I want to redirect the user back to the home page after submitting
>>>> their form inquiry and display a message on the home page. I tried
>>>> this in my send mail (apply.php) file -
>>>> $_SESSION['sent_message'] == "Thank you for your request! Someone will
>>>> be contacting you soon.";
>>>> header("location:index.php");
>>> Why not send the user straight to the index.php page instead of
>>> apply.php page ? .
>>>
>>> Put the following on your form page .....
>>>
>>> <input type="hidden" name="passform" value="1">
>>>
>>> Put the following in the index.php page .....
>>>
>>> <?php
>>> $msg=$_REQUEST['passform'];
>>> if ($msg==1) {"<br> Thank you for your request! Someone will be
>>> contacting you soon. <br>";}
>>> ?>
>>>
>>> The rest of your index.php page will de displayed as normal .
>>>
>>> --
>>> (c) The Amazing Krustov
>>
>> I set it up so the form posts to the apply page to processes the form
>> input and send the email. I suppose I could do it all on the index
>> page but generally prefer not to.
>>
>> Thanks,
>> Tim
>>
>>
>
> I'm the same way, Tim. I like to keep my processing separate, and do it
> like you do. And it beats having an index.php page which dozens of
> conditional include statements.

This is gettin dangerous, Jerry (after owu knock-down, drag-out :-) ), but
we are in agreement too often lately.

Shelly

 

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

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