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.

Contact form not submitting...

Featured Replies

Hi Everyone, I am making a web contact form for my new website, i have changed hosting companies, my last hoster had customised scripts for just about everything, my new one doesnt so I am having to learn the normal way of doing things using php.

 

Every time I press the submit button I am taken to the error I have specified - "blarg"

 

If anyone could help me i would forever grateful!!

 

PS i got the php side of this form from an online tutorial somewhere...

 

 

 

 

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

<input type="hidden" name="sub" value="1">

 

<td valign="top"><table border="0" cellpadding="5" cellspacing="20">

 

<tr>

<td align="left" valign="top">

<label for="Name">Name: </label>

<input name="Name" type="text" id="Name" size="40" class="search {required:true}"/>

<br />

<label for="Phone">Phone: </label>

<input name="Phone" type="text" id="Phone" size="40" class="search {required:true}"/>

<br />

<label for="Email">Email: </label>

<input name="Email" type="text" id="Email" size="40"class="search {required:true}"/>

<br />

<label for="Location">Location: </label>

<input name="Email" type="text" id="Email" size="40"class="search {required:true}"/>

<br />

<br />

<label for="Comments">Message: </label>

<p><br />

<br />

<textarea name="Comments" cols="40" rows="4" id="Comments" class="comments {required:true}"></textarea>

</p>

<p><br />

<input type="submit" value="submit" columns=50 id="Submit">

</p></td>

</tr>

</table>

</td>

</form>

 

---------------------------------------------------------------------------------

PHP FILE

---------------------------------------------------------------------------------

<?php

if(isset($_POST['submit'])) {

$to = "info@aussiewebsites.net";

$subject = "Form Tutorial";

$name_field = $_POST['name'];

$email_field = $_POST['email'];

$message = $_POST['message'];

 

$body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message";

 

echo "Data has been submitted to $to!";

mail($to, $subject, $body);

} else {

echo "blarg!";

}

?>

Hi Everyone, I am making a web contact form for my new website, i have changed hosting companies, my last hoster had customised scripts for just about everything, my new one doesnt so I am having to learn the normal way of doing things using php.

 

Every time I press the submit button I am taken to the error I have specified - "blarg"

 

If anyone could help me i would forever grateful!!

 

PS i got the php side of this form from an online tutorial somewhere...

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

<input type="hidden" name="sub" value="1">

 

<td valign="top"><table border="0" cellpadding="5" cellspacing="20">

 

<tr>

<td align="left" valign="top">

<label for="Name">Name: </label>

<input name="Name" type="text" id="Name" size="40" class="search {required:true}"/>

<br />

<label for="Phone">Phone: </label>

<input name="Phone" type="text" id="Phone" size="40" class="search {required:true}"/>

<br />

<label for="Email">Email: </label>

<input name="Email" type="text" id="Email" size="40"class="search {required:true}"/>

<br />

<label for="Location">Location: </label>

<input name="Email" type="text" id="Email" size="40"class="search {required:true}"/>

<br />

<br />

<label for="Comments">Message: </label>

<p><br />

<br />

<textarea name="Comments" cols="40" rows="4" id="Comments" class="comments {required:true}"></textarea>

</p>

<p><br />

<input type="submit" value="submit" columns=50 id="Submit">

</p></td>

</tr>

</table>

</td>

</form>

 

---------------------------------------------------------------------------------

PHP FILE

---------------------------------------------------------------------------------

<?php

if(isset($_POST['submit'])) {

$to = "info@aussiewebsites.net";

$subject = "Form Tutorial";

$name_field = $_POST['name'];

$email_field = $_POST['email'];

$message = $_POST['message'];

 

$body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message";

 

echo "Data has been submitted to $to!";

mail($to, $subject, $body);

} else {

echo "blarg!";

}

?>

 

Hi the id in the form must match the php

 

$name_field = $_POST['name'];
$email_field = $_POST['email'];
$message = $_POST['message'];

 

name, email etc all lowercase.

 

In your form

 

<input name="Name" type="text" id="Name"

 

The id has a capital Name,these are case sensitive.

 

Pat

  • Author

Hi, Thanks so much for the reply,

 

I fixed all that stuff up and its STILL not working...i have no idea why, i have been looking at it for ages and i cant see any typos or anything...do you have any more suggestions?

 

 

Here is the updated version

_______________________________________________________________

PHP

_______________________________________________________________

 

 

<?php

if(isset($_POST['submit'])) {

$to = "info@aussiewebsites.net";

$subject = "mailform";

$name_field = $_POST['name'];

$email_field = $_POST['email'];

$location_field = $_POST['location'];

$message = $_POST['message'];

 

$body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message Location: $location_field\n";

 

echo "Data has been submitted to $to!";

mail($to, $subject, $body);

} else {

echo "Oh NO!";

}

?>

 

 

_______________________________________________________________

HTML

_______________________________________________________________

 

 

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

<input type="hidden" name="sub" value="1">

 

<td valign="top"><table border="0" cellpadding="5" cellspacing="20">

 

<tr>

<td align="left" valign="top">

<label for="name">Name: </label>

<input name="name" type="text" id="name" size="40" class="search {required:true}"/>

<br />

<label for="phone">Phone: </label>

<input name="phone" type="text" id="phone" size="40" class="search {required:true}"/>

<br />

<label for="email">Email: </label>

<input name="email" type="text" id="email" size="40"class="search {required:true}"/>

<br />

<label for="location">Location: </label>

<input name="location" type="text" id="location" size="40"class="search {required:true}"/>

<br />

<br />

<label for="message">Message: </label>

<br />

<textarea name="message" cols="40" rows="4" id="message" class="message {required:true}"></textarea>

</p>

<p><br />

<input type="submit" value="submit" columns=50 id="submit">

</p></td>

</tr>

</table>

</td>

</form>

Hi, Thanks so much for the reply,

 

I fixed all that stuff up and its STILL not working...i have no idea why, i have been looking at it for ages and i cant see any typos or anything...do you have any more suggestions?

Here is the updated version

_______________________________________________________________

PHP

_______________________________________________________________

<?php

if(isset($_POST['submit'])) {

$to = "info@aussiewebsites.net";

$subject = "mailform";

$name_field = $_POST['name'];

$email_field = $_POST['email'];

$location_field = $_POST['location'];

$message = $_POST['message'];

 

$body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message Location: $location_field\n";

 

echo "Data has been submitted to $to!";

mail($to, $subject, $body);

} else {

echo "Oh NO!";

}

?>

_______________________________________________________________

HTML

_______________________________________________________________

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

<input type="hidden" name="sub" value="1">

 

<td valign="top"><table border="0" cellpadding="5" cellspacing="20">

 

<tr>

<td align="left" valign="top">

<label for="name">Name: </label>

<input name="name" type="text" id="name" size="40" class="search {required:true}"/>

<br />

<label for="phone">Phone: </label>

<input name="phone" type="text" id="phone" size="40" class="search {required:true}"/>

<br />

<label for="email">Email: </label>

<input name="email" type="text" id="email" size="40"class="search {required:true}"/>

<br />

<label for="location">Location: </label>

<input name="location" type="text" id="location" size="40"class="search {required:true}"/>

<br />

<br />

<label for="message">Message: </label>

<br />

<textarea name="message" cols="40" rows="4" id="message" class="message {required:true}"></textarea>

</p>

<p><br />

<input type="submit" value="submit" columns=50 id="submit">

</p></td>

</tr>

</table>

</td>

</form>

 

i had the same problem until i red the server settings for my STMP

 

i add the following on streamline.net hosted sites

 

 

ini_set("sendmail_from", "info@aussiewebsites.net");

 

have a look at your server settings for web mail if it doesnt work good luck

  • 3 weeks later...
  • Author

thanks guys, its working now!! thanks heaps for your help!!

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.