html help needed

15 posts Page 1 of 2
Contributors
User avatar
Shim
VIP - Donator
VIP - Donator
Posts: 882
Joined: Wed Dec 14, 2011 5:02 am

html help needed
Shim
hi ,
i just wanted to make a html email sender i mean example comathis contact form .
please be kind to help me
Find my programs on Softpedia
User avatar
Livengood
Serious Programmer
Serious Programmer
Posts: 444
Joined: Tue Feb 16, 2010 6:24 am

Re: html help needed
Livengood
You would have to use a form of Html and Php. Also would have to find a host that will allow you to do this if your using a free one.

Such As:
Code: Select all
<?php
	if($_SERVER['REQUEST_METHOD'] == "POST"){
		$mail_to = $_POST['mail_to'];
		$mail_from = "From: testing@example.com";
		$mail_subject = $_POST['mail_from'];
		$mail_body = $_POST['mail_body'];
		
		$mail_sent = @mail($mail_to, $mail_subject, $mail_body, $mail_from); 
		if ($mail_sent) { 
			echo "<p>Your Message was sent!</p>"; 
		} else { 
			echo "<p>Your Message couldn't be sent at this time!</p>"; 
		} 
	}
?>

<html>
	<head>
		<title>Mail Sender Example</title>
	</head>
	
	<body>
		<form method="post">
			<table width="35%">
				<tr>
					<td width="50%">To:</td>
					<td width="50%"><input type="text" name="mail_to" value="" style="-moz-border-radius:10px;-khtml-border-radius: 10px;-webkit-border-radius: 10px;border-radius: 10px;border:1px solid #B6B6B6;padding: 5px; width: 100%;" /></td>
				</tr>
				<tr>
					<td width="50%">Subject:</td>
					<td width="50%"><input type="text" name="mail_subject" value="" style="-moz-border-radius:10px;-khtml-border-radius: 10px;-webkit-border-radius: 10px;border-radius: 10px;border:1px solid #B6B6B6;padding: 5px; width: 100%;" /></td>
				</tr>
				<tr>
					<td width="50%" style="vertical-align:top;">Body:</td>
					<td width="50%"><textarea name="mail_body" rows="5" cols="20" style="resize: vertical;-moz-border-radius:10px;-khtml-border-radius: 10px;-webkit-border-radius: 10px;border-radius: 10px;border:1px solid #B6B6B6;padding: 5px; width: 100%;"></textarea></td>
				</tr>
				<tr>
					<td width="50%"></td>
					<td width="50%" align="right"><input type="submit" value="Submit" /></td>
				</tr>
			</table>
		</form>
	</body>
</html>
Image
User avatar
Shim
VIP - Donator
VIP - Donator
Posts: 882
Joined: Wed Dec 14, 2011 5:02 am

Re: html help needed
Shim
Livengood wrote:
You would have to use a form of Html and Php. Also would have to find a host that will allow you to do this if your using a free one.

Such As:
Code: Select all
<?php
	if($_SERVER['REQUEST_METHOD'] == "POST"){
		$mail_to = $_POST['mail_to'];
		$mail_from = "From: testing@example.com";
		$mail_subject = $_POST['mail_from'];
		$mail_body = $_POST['mail_body'];
		
		$mail_sent = @mail($mail_to, $mail_subject, $mail_body, $mail_from); 
		if ($mail_sent) { 
			echo "<p>Your Message was sent!</p>"; 
		} else { 
			echo "<p>Your Message couldn't be sent at this time!</p>"; 
		} 
	}
?>

<html>
	<head>
		<title>Mail Sender Example</title>
	</head>
	
	<body>
		<form method="post">
			<table width="35%">
				<tr>
					<td width="50%">To:</td>
					<td width="50%"><input type="text" name="mail_to" value="" style="-moz-border-radius:10px;-khtml-border-radius: 10px;-webkit-border-radius: 10px;border-radius: 10px;border:1px solid #B6B6B6;padding: 5px; width: 100%;" /></td>
				</tr>
				<tr>
					<td width="50%">Subject:</td>
					<td width="50%"><input type="text" name="mail_subject" value="" style="-moz-border-radius:10px;-khtml-border-radius: 10px;-webkit-border-radius: 10px;border-radius: 10px;border:1px solid #B6B6B6;padding: 5px; width: 100%;" /></td>
				</tr>
				<tr>
					<td width="50%" style="vertical-align:top;">Body:</td>
					<td width="50%"><textarea name="mail_body" rows="5" cols="20" style="resize: vertical;-moz-border-radius:10px;-khtml-border-radius: 10px;-webkit-border-radius: 10px;border-radius: 10px;border:1px solid #B6B6B6;padding: 5px; width: 100%;"></textarea></td>
				</tr>
				<tr>
					<td width="50%"></td>
					<td width="50%" align="right"><input type="submit" value="Submit" /></td>
				</tr>
			</table>
		</form>
	</body>
</html>




php is not allowed on blogger
Find my programs on Softpedia
User avatar
comathi
Coding God
Coding God
Posts: 1242
Joined: Fri Mar 26, 2010 1:59 pm

Re: html help needed
comathi
You can also check out this topic... mandai added something useful to it in the comments: viewtopic.php?f=86&t=2056
User avatar
Shim
VIP - Donator
VIP - Donator
Posts: 882
Joined: Wed Dec 14, 2011 5:02 am

Re: html help needed
Shim
comathi its for php . i am looking for html like yours .
Find my programs on Softpedia
Filip
Coding Guru
Coding Guru
Posts: 833
Joined: Wed Jan 05, 2011 3:59 pm

Re: html help needed
Filip
Comathi's contact form is php!! HTML is markup language not programing language..
CodenStuff wrote:
Nope, it's just your sick and dirty mind. You sick twisted warped little pervo :D
User avatar
comathi
Coding God
Coding God
Posts: 1242
Joined: Fri Mar 26, 2010 1:59 pm

Re: html help needed
comathi
Correct! The HTML part just links to the php file, which actually sends the email.
However, to make an HTML form, you would use the following code.
Code: Select all
<form action="send.php" method="post">
<input type="text" name="fname" />
<input type="text" name="lname" />
<input type="text" name="email" />
<textarea name="message"></textarea>
<input type="submit" value="submit" />
</form>
You have to make sure to have the php file with the code from my other comment in a file called 'send.php' (unless you want to change it in the code).
User avatar
Shim
VIP - Donator
VIP - Donator
Posts: 882
Joined: Wed Dec 14, 2011 5:02 am

Re: html help needed
Shim
php little bit supports on blogger . comathi i can try .
Find my programs on Softpedia
User avatar
Danny
VIP - Donator
VIP - Donator
Posts: 621
Joined: Sat Oct 30, 2010 8:21 pm

Re: html help needed
Danny
I made a website where you can make contact forms without knowledge, and I even host it but it take me 2 more days to finish.
User avatar
Shim
VIP - Donator
VIP - Donator
Posts: 882
Joined: Wed Dec 14, 2011 5:02 am

Re: html help needed
Shim
is there a javascript for this ?
Find my programs on Softpedia
15 posts Page 1 of 2
Return to “Help & Support”