FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


email script question





inphurno
i have another php question Smile

when people press on my send button the email script i have will be activated. After processing the data i want people to be sent to a thank you page that is in another directory(separate from htdocs) How can i do this?

i was using header() but i noticed it didnt like how my thank you page was in a separate directory. For the location i put the path to the thank you page that's on my hard drive. According to the header documentation it needs to be an http header so I guess the page must be in htdocs so that it'll work like http://localhost/thankYou.html. how can i get around this problem?

Thanks in advance
kv
You can include onother file in your current file.

Code:

include(<filename>);


This will allow you to execute contents without leaving the current file. Make sure you have the directory path of current file in include_path of php (either in php.ini or using ini_set() ) or use full path to the file in the method call.

For more info refer http://www.php.net/include/
rvec
if you use header('location:...') the browser will just be forwarded to the other page (mentioned in the header as the new location of the file). So if the user is able to open it normally, the header has to work (either with a relative link or full url).

Edit yeah you could try the include, but why not just put it in the webdir?
sonam
Quote:
After processing the data i want people to be sent to a thank you page that is in another directory(separate from htdocs) How can i do this?
i was using header() but i noticed it didnt like how my thank you page was in a separate directory. For the location i put the path to the thank you page that's on my hard drive.


If I good understand your question then you cannot use include out of your htdocs without iniset command or define function. How I know, for the header() function you need to create another site root if you want to use full link (http://) because relative link (in your situation) is working only in htdocs root.

Sonam
devaco
Does anyone have a good software to build a nice e-mail-form, because i am news in this thing.

Thank you ..
sonam
devaco wrote:
Does anyone have a good software to build a nice e-mail-form, because i am news in this thing.

Thank you ..


You don't need any good software to build a nice email form. Notepad is enought but if you want something better try to search forum. You need knowledge of PHP, HTML and CSS for your needs.

Sonam
rvec
sonam wrote:
devaco wrote:
Does anyone have a good software to build a nice e-mail-form, because i am news in this thing.

Thank you ..


You don't need any good software to build a nice email form. Notepad is enought but if you want something better try to search forum. You need knowledge of PHP, HTML and CSS for your needs.

Sonam
An email form is easy to make, but I wouldn't recommend beginners to start with stuff like that because you can easily make a script which spammers can abuse.

If you don't know much about php and want an email form try searching for one on websites like www.hotscripts.com
inphurno
thanks for all your responses everyone, this helped a lot! i will give it a try and let you know...
Related topics
Web e-mail !
Web Mailer, Create a "contact us" mailer
Check THIS script
CGI FormMail Script Part II
PHP Problem
Hoe kan ik ...?
Script Question
Textbox Submit to email
PHP Mail - Always Junked?
simple form security!
why is post not allowed on here
HELP needed with basic Email perl script.
20 - 150 FRIH$ for flash assistance
Email Acript Needed
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.