Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

input field- send email

Featured Replies

OK, sorry for this noob question, but its very advance for me, I am creating web site for my virtual airline company and stuck on input field , so i'll send you html code of that imput field from my template, so if can someone just help me and prepare me that code to send mail..and yes I use dW CS3 and doing static page HTML

Greets

Bojan

 

The code is :

 

 

<form action="" id="form">
<table width="515" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" width="267" height="100%">
<table width="1" border="0" cellspacing="0" cellpadding="0" style="height:100%;">
<tr>
<td valign="top" nowrap style="padding:4px 5px 0px 0px;">Your Name:</td>
<td valign="top"><input type="text" class="input_1"></td>
</tr>
<tr>
<td valign="top" nowrap style="padding:4px 5px 0px 0px;">Telephone:</td>
<td valign="top"><input type="text" class="input_1"></td>
</tr>
<tr>
<td valign="top" nowrap style="padding:4px 5px 0px 0px;">E-mail:</td>
<td valign="top"><input type="text" class="input_1"></td>
</tr>
</table>
</td>
<td valign="top" style="padding:4px 5px 0px 0px;">Message:</td>
<td valign="top"><textarea rows="3" cols="3"></textarea></td>
</tr>
<tr><td> </td><td> </td><td valign="top" style="padding:6px 0px 0px 0px; ">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td width="100%"><img src="images/spacer.gif" width="1" height="1" alt=""></td>
<td nowrap valign="top"><span><a href="#" onclick="document.getElementById('form').reset()">reset</a></span><img src="images/marker_1.gif" width="12" height="14" alt="" align="middle" hspace="6"></td>
<td><img src="images/spacer.gif" width="21" height="1" alt=""></td>
<td nowrap valign="top"align="right"><span><a href="#" onclick="document.getElementById('form').submit()">submit</a></span><img src="images/marker_1.gif" width="12" height="14" alt="" align="middle" hspace="6"></td>
</tr>
</table>
</td></tr>
</table>
</form>

 

Abd it looks like this:

 

t236382_24.11.png

Edited by Sam G
added [code] tags

are you wanting to email the whole form that is submitted?

 

try this

<form action="mailto:you@you.net?subject=Form" id="form">

 

this is not a prefered method though in my opinion. a PHP coded form is more advanced and flexible

Edited by Sam G
added [code] tags

  • Author
are you wanting to email the whole form that is submitted?

 

try this

<form action="mailto:you@you.net?subject=Form" id="form">

 

this is not a prefered method though in my opinion. a PHP coded form is more advanced and flexible

 

Yap want whole form.

Well i heard that is php better but dont know how to code php

I'll definitivly try

TNX

Edited by Sam G
added [code] tags

  • Author
Yap want whole form.

Well i heard that is php better but dont know how to code php

I'll definitivly try

TNX

 

 

Well no, not working, but thabks on try :drinks:

 

So noone knows*!!??? :unknw: ...ok!!cmon someone give a shot :clapping:

Im not going to do it for you but I'll point you in the right direction

 

Looking to PHP...

 

You'll need to pass the posted vars with $_POST.

 

Then you'll want to format the message with text.

 

Then send it off with php's mail function... mail()

  • Author
Im not going to do it for you but I'll point you in the right direction

 

Looking to PHP...

 

You'll need to pass the posted vars with $_POST.

 

Then you'll want to format the message with text.

 

Then send it off with php's mail function... mail()

 

I am total beginner so if u can explain i little bit what to change and how. it would be appreciated

Below is a PHP coded contact form .... it should give you an idea hopefully

 

<?
if (! empty($_POST['email']) )
{

 $message=htmlentities($_POST['message']);
 $email=$_POST["email"];
 $flname=htmlentities($_POST['flname']);
 $mail=htmlentities($_POST['mail']);

 $content = "You have a New Message From {$flname} ( {$mail} ) : {$message}";

 $mailSent = false;
 $mailSent = mail( $email, "Website Contact Form", $content, "From: $mail" );

 if ($mailSent)
 {
echo "Thanks $flname - Mail sent<br /><br />";
 }
 else
 {
echo "Problem sending mail<br /><br />";
 }
}

?>
<form method="post" action="<? echo $_SERVER['PHP_SELF']; ?>">
Your Name: <input name="flname" type="text" /><br />
Your Email: <input name="mail" type="text" /><br />
<input name="email" type="hidden" value="YOU@YOURDOMAIN.co.uk" /><br />
Your Message:<br />
<textarea name="message" rows="5" cols="40">
</textarea><br />
<input type="submit" />
</form>

Below is a PHP coded contact form .... it should give you an idea hopefully

 

<?
if (! empty($_POST['email']) )
{

 $message=htmlentities($_POST['message']);
 $email=$_POST["email"];
 $flname=htmlentities($_POST['flname']);
 $mail=htmlentities($_POST['mail']);

 $content = "You have a New Message From {$flname} ( {$mail} ) : {$message}";

 $mailSent = false;
 $mailSent = mail( $email, "Website Contact Form", $content, "From: $mail" );

 if ($mailSent)
 {
echo "Thanks $flname - Mail sent<br /><br />";
 }
 else
 {
echo "Problem sending mail<br /><br />";
 }
}

?>
<form method="post" action="<? echo $_SERVER['PHP_SELF']; ?>">
Your Name: <input name="flname" type="text" /><br />
Your Email: <input name="mail" type="text" /><br />
<input name="email" type="hidden" value="YOU@YOURDOMAIN.co.uk" /><br />
Your Message:<br />
<textarea name="message" rows="5" cols="40">
</textarea><br />
<input type="submit" />
</form>

 

That's what you want

  • Author
Below is a PHP coded contact form .... it should give you an idea hopefully

 

<?
if (! empty($_POST['email']) )
{

 $message=htmlentities($_POST['message']);
 $email=$_POST["email"];
 $flname=htmlentities($_POST['flname']);
 $mail=htmlentities($_POST['mail']);

 $content = "You have a New Message From {$flname} ( {$mail} ) : {$message}";

 $mailSent = false;
 $mailSent = mail( $email, "Website Contact Form", $content, "From: $mail" );

 if ($mailSent)
 {
echo "Thanks $flname - Mail sent<br /><br />";
 }
 else
 {
echo "Problem sending mail<br /><br />";
 }
}

?>
<form method="post" action="<? echo $_SERVER['PHP_SELF']; ?>">
Your Name: <input name="flname" type="text" /><br />
Your Email: <input name="mail" type="text" /><br />
<input name="email" type="hidden" value="YOU@YOURDOMAIN.co.uk" /><br />
Your Message:<br />
<textarea name="message" rows="5" cols="40">
</textarea><br />
<input type="submit" />
</form>

 

 

Well what can I tell just tnk u very much :friends:

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.