• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

I would like to ask for assistance in form to email

Battousai001

Senior member
First of all I have no experience or knowledge in scripting language, but I have done similar and complex stuff using asp back in college in our web design class

I would like to ask for some assistance on how to construct the php script for this simple "form to email" page. Since I have no experience using php I had a headache figuring out the code.

I have already made a very simple html page with the form details (below is the code). All i need is the php script that will send the details entered to email. I just need the simple code to send the details to email or access database if possible (no security stuff necessary, i need the simplest code) it doesnt matter if this will work with my current setup (i have installed iis and php on my machine)

<html>
<head>
<title>Email Form </title>
</head>
<body>

<form method="post" action="senddetails.php">

<p><font face="Arial, Helvetica, sans-serif">First Name:</font>
<input type="text" name="firstname" size="35" />
</p>
<p><br />
<font face="Arial, Helvetica, sans-serif">Family Name: </font>
<input type="text" name="familyname" size="35" />
</p>
<p><br />
<font face="Arial, Helvetica, sans-serif">Email Address:</font>
<input type="text" name="emailaddress" size="35" />
</p>
<p><br />
<br />
<input type="submit" value="Send Details" />
<br />
</p>
</form>

</body>
</html>

Lastly the reason why I stumbled upon php is because of my search for "form to email" on google and it suggest me to use php, I know the asp for this and it is easier but i needed a different language, is there any other scripting language that can do "form to email" or form to database" function?

Thanks for any replies!
 
"easier" is relative.

You are more familiar with asp and therefore find it easier to built it using asp. Doesn't mean that making it in PHP is "harder". Just a bit of a learning curve (sorry, pet peeve of mine. Folks who say it's harder to do things a certain way because they are less familiar with it)

And I can tell you that making it happen in PHP is (at least for me) a piece of cake.

Do you just want a script that does it for you, or do you want to build it yourself (and learn?)?

 
Hi! Thanks for your replies! I have tried to learn the basics and construct a simple form to email using php. My question now is, is it possible to test form to email without uploading the files to a "live" server? I mean can I test form to email using my local workstation? I have IIS installed and installed PHP as well and some simple php scripts do work except form to email which gives me an error message such as "PHP Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for my email in C:\mailto\sendmail.php on line 6"

I was thinking that scripts like this have to be uploaded to work? Is this correct or is it possible to test this on a single workstation?
 
Back
Top