PHPMine
<? if(PHP > $Expectations) echo $Results ?>
by Angel S. Moreno
UNDER SOME SERIOUS CONSTRUCTION LINKS MAY NOT WORK
Asked 2008-05-22 14:10:36 by WH
Hi,
I'm in need of a php script for a form, but no experience.... lost!
Would really appriciate some help!!
So, I have the form and it looks like this -
http://www.worldhaus.net/rus/send.html
but no SCRIPT!!
Thank you!
(ps. it needs to be in russian, but i'll accept also in english ^^)
Anwered 2008-05-22 14:26:11 by HisVsHers.com
Your request is vague and I'm not sure if php is the right scripting language you need.
Is this form just to be sent to a email account or is it to be posted to a database?
What I would recommend is a simple .asp script, all you have to do is change the "post" method of your form to post to a page called submission.asp and in your form change the submit button to POST="submission.asp".
Keep in mind, I don't speak/read russion so I don't know what your form details.
Your HTML page should look like this...
<FORM ACTION="submission.asp" METHOD=post>
<!-- Your fields here
<INPUT TYPE=submit value="Submit">
</FORM>
But what your submission.asp file should include are
<%
For Each x In Request.Form
message = message & x & ": " & Request.Form(x) & CHR(10)
Next
set smtp=Server.CreateObject("Bamboo.SMTP")
smtp.Server="mail.yourdomain.com"
smtp.Rcpt="youremail@yourdomain.com"
smtp.From="formtomail@yourdomain.com"
smtp.FromName="Joe Smith"
smtp.Subject="Response to my form"
smtp.Message = message
on error resume next
smtp.Send
if err then
response.Write err.Description
else
Response.redirect ("http:// redirect.com")
end if
set smtp = Nothing
%>
What you are basically doing is creating values for your form (the .html) page and gathering that data into your .asp page. I'd be glad to help you more if this is NOT what your wanting to do and you have an SQL database you are posting your data to.
If you don't have a database and sending an email was your intent. This is your easiest option.
Questions and answers provided by the Yahoo Answers Community.