NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page PHP form problem

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
5 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 06-15-2004, 08:45 PM THREAD STARTER               #1 (permalink)
First Time Poster!
Join Date: Jun 2004
Posts: 1
mikeboy99 is an unknown quantity at this point
 



PHP form problem


well, i have created a PHP feedback form that is located here... http://www.eatarock.com/contact.htm
here is the code i am using for the form:



<form method="post" action="feedback.php">
Name: <input name=”name” type=”text” /><br />
Email: <input name="email" type="text" size="25" /><br />
Comments:<br />
<textarea name="comments" rows="15" cols="40">
</textarea><br />
????: NamePros.com http://www.namepros.com/programming/34250-php-form-problem.html
<input type="submit" />
</form>



that is located in contact.htm..... now here is the code i am using for feedback.php:




<?php

$msg = "Name:t$namen";
$msg .= "Email:t$emailn";
$msg .= "Comments:t$commentsn";

$recipient = "admin@eatarock.com";
$subject = "New Feedback from my site";

$mailheaders = "From:$emailn";
$mailheaders .= "Reply-To:$emailnn";

mail($recipient, $subject, $msg, $mailheaders);
header("Location: http://www.eatarock.com/thankyou.htm");
?>




for some reason whenever you press submit on the contact form it takes you to feedback.php and says page cannot be displayed.... It is supposed to redirect to thankyou.htm...... I have no clue as to why it is doing this

Does anyone know how to fix it?

B.T.W. i am hosting on 1and1.com with the MShosting package that 4.99/mo if that makes a difference

-Thanks in advance

Mike
mikeboy99 is offline  
Old 06-16-2004, 07:07 AM   #2 (permalink)
Senior Member
Join Date: May 2003
Posts: 2,187
adam_uk is a jewel in the roughadam_uk is a jewel in the roughadam_uk is a jewel in the rough
 


Breast Cancer
instead of using the full address of the page try this

replace
header("Location: http://www.eatarock.com/thankyou.htm");

with

$loc = "./thankyou.htm";
header("Location: $loc");
adam_uk is offline  
Closed Thread


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


 
All times are GMT -7. The time now is 02:22 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger