Affiliate Marketing
Forum Search

Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 12-12-04
Registered User
 
Join Date: Aug 2004
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
al2004 is an unknown quantity at this point
  Newbie technical question re submitting a form

I'm new to using forms in HTML, and have been testing one tonight. After completing the form and clicking on 'Submit', I'm prompted for my 'Microsoft Passport' username and password. Hello?! Don't know u-n and p-w. Never did know. Shouldn't the details entered into the form just be sent to the e-mail address I've specified in the HTML code (with no need for username and password)?

Could someone provide some guidance, please?
Thank you
Al
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 12-12-04
morleymouse's Avatar
Super Member
 
Join Date: Aug 2003
Location: Costa Del Sheffield
Posts: 2,744
Thanks: 1
Thanked 10 Times in 6 Posts
morleymouse is an unknown quantity at this point
post for <form> </form> code in the next 10 mins and ill help
__________________
Dan Morley
Alpharooms.com
daniel at alpharooms dot com - Hotels, Flights, Airport Transfers, Care Hire + More! sign up
My Blog | Cheap Holidays
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 12-12-04
Registered User
 
Join Date: Aug 2004
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
al2004 is an unknown quantity at this point
Didn't manage to respond with the code within 10 mins, as I had what for me these days is an early night. I hope you can still help. Thank you.

The code is basically as follows. I've changed the questions (ie. they're not the ones I want to actually ask on my form), the 'input names' and the e-mail address. But the syntax is unchanged.

Here's a thought : Should I remove the references to my global style-sheet (CLASS=Content) to get the form working?

<FORM method="post" action="mailto:myhotmailaddress@hotmail.com" enctype="text/plain">
<PRE>

<P CLASS=Question>
What is your favourite colour ?
</P>
<INPUT NAME="FavouriteColour" TYPE=text size=20>

<P CLASS=Question>
How did you find out about the website ?
</P>
<select name="Website_Discovery">
<option value=Option_Selection>*** Select an option ***
<option value=Advertisement>Advertisement
<option value=Excite>Another website
<option value=Referred_By_Friend_Relative_Associate>Referr ed by a friend/relative/associate
<option value=Search_Engine>Search engine
<option value=OtherSearchEngine>Other
</select>

<P CLASS=Question>
Further comments :
<textarea name="Further_Comments" rows="5" cols="70">
</textarea>
</P>

</PRE>
<INPUT TYPE="submit" value="Submit form">
<INPUT TYPE="reset" value="Clear form, and start again">
</FORM>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 12-12-04
morleymouse's Avatar
Super Member
 
Join Date: Aug 2003
Location: Costa Del Sheffield
Posts: 2,744
Thanks: 1
Thanked 10 Times in 6 Posts
morleymouse is an unknown quantity at this point
morning!

yup, right, the style sheet things fine, no problems there.

all your options could do with a </option> after them, just to make it more tidy.

only thing id say thats wrong is the post action, I dont know if you can post direct to email, as ive never seen it done before.

what you want is an email script, really easy to do and there ten a penny online, for free. do a google for "php mail script" or something, providing your server has php. probably even a few guides about to get you going, if not ill do you one.
__________________
Dan Morley
Alpharooms.com
daniel at alpharooms dot com - Hotels, Flights, Airport Transfers, Care Hire + More! sign up
My Blog | Cheap Holidays
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 12-12-04
mibut's Avatar
Registered User
 
Join Date: Aug 2003
Posts: 606
Thanks: 0
Thanked 0 Times in 0 Posts
mibut is an unknown quantity at this point
Heres a link to a script that I use (its free)

http://www.sensationdesigns.com/prod...ezformmail.php
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 15-12-04
Registered User
 
Join Date: Aug 2004
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
al2004 is an unknown quantity at this point
Hello again. Getting back to this after a couple of days away. Thanks for your replies. I've tried submitting some 'dummy' (ironically, 'cos that's what I feel like) data from a feedback form, but I get the message :

Error 405 Method Not Allowed
The requested method POST is not allowed for URL /FormScript.php

The code on my form starts :


<FORM method="post" action="http://www.mysite.co.uk/FormScript.php" name="FeedbackForm" enctype="text/plain">

By the way, I've tried changing the file extension from php to phtml and php3 (as suggested by someone else), but no joy.

Can anyone tell a php newbie : what's wrong with the 'post' method ? And what are the alternatives ?

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 15-12-04
morleymouse's Avatar
Super Member
 
Join Date: Aug 2003
Location: Costa Del Sheffield
Posts: 2,744
Thanks: 1
Thanked 10 Times in 6 Posts
morleymouse is an unknown quantity at this point
have u tried

<FORM action="http://www.mysite.co.uk/FormScript.php">
...stuff.....
</FORM>

might make a difference
__________________
Dan Morley
Alpharooms.com
daniel at alpharooms dot com - Hotels, Flights, Airport Transfers, Care Hire + More! sign up
My Blog | Cheap Holidays
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 15-12-04
Registered User
 
Join Date: Aug 2004
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
al2004 is an unknown quantity at this point
Thanks

I've made a bit of progress, using (website address amended) :

<FORM action="http://www.acme.co.uk/FormScript.php" method="post" name="Feedback-form_Website" enctype="text/plain">


I don't think the "post" method bit was the problem before. I think I might have just saved the php file correctly or something.


The body of the e-mail appears (slightly amended) :

On 15/12/2004, feedback on the Acme website was provided
The following information was submitted :


However, I haven't yet been able to get the fields entered on the feedback form to appear in the e-mail body. How should that be coded ? Something along the following lines ? Do I have to specify the names I've allocated to each and every field, line by line? (Sorry, I must sound really thick!). Thanks


$Body="On $Date, feedback on the Acme website was provided \n".
"The following information was submitted :\n\n";

foreach ($HTTP_POST_VARS as $key=>$value){
if ($key="Submit") continue;
$Body .="$key: $value\n";
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 15-12-04
Registered User
 
Join Date: Aug 2004
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
al2004 is an unknown quantity at this point
Postscript :

I forgot to say that the other thing that's still not right is the sender's e-mail address. It's appearing as <-mail_Address@hosts.co.uk>

Any ideas what's wrong there?

Thanks
Al
I feel as though I really ought to start contributing to this forum rather than asking so many questions!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 15-12-04
morleymouse's Avatar
Super Member
 
Join Date: Aug 2003
Location: Costa Del Sheffield
Posts: 2,744
Thanks: 1
Thanked 10 Times in 6 Posts
morleymouse is an unknown quantity at this point
for that to work your Submit button will need to have a value of "Submit"

no idea about the sender email as I dont know the script your using, and I couldnt access a copy, kept timing out (presuming your using the link mibut posted)

post the bit thwere it mentions sender addresses etc
__________________
Dan Morley
Alpharooms.com
daniel at alpharooms dot com - Hotels, Flights, Airport Transfers, Care Hire + More! sign up
My Blog | Cheap Holidays
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 16-12-04
mibut's Avatar
Registered User
 
Join Date: Aug 2003
Posts: 606
Thanks: 0
Thanked 0 Times in 0 Posts
mibut is an unknown quantity at this point
It isn't the script I suggested.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 17-12-04