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.

help need

Featured Replies

i found a contact form script on web.its work really good...

 

but after pressing the submit button,a page woth thank you message appears.but there is no button to back to the previous page.its same for the error page.

 

with my little knowledge i can do it by my own,so i need help,

 

here is the link

 

link

 

and here is the code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">



<?php

//========
//LICENSE
//========

//The CSS, XHTML, PHP and design is released under Creative Commons Attribution v2.5:
//http://creativecommons.org/licenses/by/2.5/

//Use of this contact form is free of charge but the copyright notes in the footer must remain intact.
//I would appreciate if you send me the URI of your site if you use LightForm.

//FormCheck (http://moo.floor.ch/?p=18) is released under the MIT license:
//http://www.opensource.org/licenses/mit-license.php

//NiceForms (http://www.badboy.ro/articles/2005-07-23/niceforms_preview/) is released under no specific license. You are free to use and modify but you must provide credits.

//This said, let's see how to use this contact form:





//==============
//CONFIGURATION
//==============

//IMPORTANT!!
//Put in your email address below:
$to = 'info@platform-it.net';


//User info (DO NOT EDIT!)
$name = stripslashes($_POST['name']); //sender's name
$email = stripslashes($_POST['email']); //sender's email
$website = stripslashes($_POST['website']); //sender's website

//The subject
$subject  = "[LightFormX Contact Form] "; //The default subject. Will appear by default in all messages. Change this if you want.
$subject .= stripslashes($_POST['subject']); // the subject


//The message you will receive in your mailbox
//Each parts are commented to help you understand what it does exaclty.
//YOU DON'T NEED TO EDIT IT BELOW BUT IF YOU DO, DO IT WITH CAUTION!
$msg  = "From : $name \r\n";  //add sender's name to the message
$msg .= "e-Mail : $email \r\n";  //add sender's email to the message
$msg .= "Website : $website \r\n"; //add sender's website to the message
$msg .= "Subject : $subject \r\n\n"; //add subject to the message (optional! It will be displayed in the header anyway)
$msg .= "---Message--- \r\n".stripslashes($_POST['message'])."\r\n\n";  //the message itself

//Extras: User info (Optional!)
//Delete this part if you don't need it
//Display user information such as Ip address and browsers information...
$msg .= "---User information--- \r\n"; //Title
$msg .= "User IP : ".$_SERVER["REMOTE_ADDR"]."\r\n"; //Sender's IP
$msg .= "Browser info : ".$_SERVER["HTTP_USER_AGENT"]."\r\n"; //User agent
$msg .= "User come from : ".$_SERVER["HTTP_REFERER"]; //Referrer
// END Extras

?>

<head>
<title>:::contact with us</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="Ajax Contact form using CheckForm2 and NiceForms." />
<meta name="keywords" content="php, contact form, Ajax, mootools, checkform2, niceforms, Moo Floor, class, javascript, spamcheck, badboy.ro" />
<meta name="author" content="Jeremie Tisseau" />

<link rel="stylesheet" href="css/main.css" type="text/css" media="screen" />

<script type="text/javascript" src="js/mootools.js"></script>

<!-- Formcheck2 / Moo.Floor.ch -->
<!-- [url="http://moo.floor.ch/?p=18"]http://moo.floor.ch/?p=18[/url] -->
<script type="text/javascript" src="js/formcheck.js"></script>
<script type="text/javascript">
window.addEvent('domready', function(){check = new FormCheck('third', {
	display : {
		fadeDuration : 500,
		errorsLocation : 1,
		indicateErrors : 1,
		showErrors : 1
	}
})});
</script>

<!-- NiceForms / BadBoy.ro -->
<!-- [url="http://www.badboy.ro/articles/2005-07-23/niceforms_preview/"]http://www.badboy.ro/articles/2005-07-23/niceforms_preview/[/url] -->
<script type="text/javascript" src="js/niceforms.js"></script>

</style>

</head>
<body>
<!-- The contact form starts here-->
<?php
  if ($_SERVER['REQUEST_METHOD'] != 'POST'){
     $self = $_SERVER['PHP_SELF'];
?>

   <!-- Start HTML form -->
  	<form name="form" method="post" id="third" action="<?php echo $self;?>"  class="niceform">
	<h1>contact with platform-it</h1>
       <!-- Name -->
	<label for="name"><strong><span class="blue">*</span> Name : </strong></label>
		<input id="name" name="name" type="text" class="validate['required','length[3,-1]','nodigit']" size="20" />

	<!-- Email -->
	<label for="email"><strong><span class="blue">*</span> Email : </strong></label>
		<input id="email" name="email" type="text" class="validate['required','length[5,-1]','email']" size="20" />

	<!-- Website -->
	<label for="site">website : </label>
		<input id="website" name="website" type="text" class="validate['url']" size="20" />

	<!-- Subject -->
    <label for="subject"><strong><span class="blue">*</span> Subject : </strong></label>
		<input id="subject" name="subject" type="text" class="validate['required']" size="20" />

	<!-- Message -->
	<label for="msg"><strong><span class="blue">*</span> Your message : </strong></label><br />
		<textarea id="message" name="message" type="text" class="validate['required']" rows="10" cols="30"></textarea>

	<!-- Spam Check -->
    <label for="spamcheck"><span class="blue">*</span> <acronym  title="[ Spam prevention ]"><strong>Are you human?</acronym> : <span class="blue">2 + 3 = ???</span></strong></label>
		<input id="spamcheck" name="spamcheck" type="text" size="5" class="validate['required','number','spamcheck']" />

	<br /><br />
	<input type="submit" class="buttonSubmit" value="Send it!" />

    <!-- Niceforms: mouse over effect -->
	<!-- Do not remove the line below -->
	<div id="stylesheetTest"></div>

</form>


<!-- / footer -->
   <?php
} else {
       error_reporting(0);

     	if  (mail($to, $subject, $msg, "From: $email\r\nReply-To: $email\r\nReturn-Path: $email\r\n"))

  	//Message sent!
  	//It the message that will be displayed when the user click the sumbit button
  	//You can modify the text if you want
     	echo nl2br("
   	<div class=\"MsgSent\">
		<h1>Congratulations!!</h1>
		<p>Thank you <b><?=$name;?></b>, your message is sent!<br /> I will get back to you as soon as possible.</p>
	</div>
   ");

      	else

    // Display error message if the message failed to send
       echo "
   	<div class=\"MsgError\">
		<h1>Error!!</h1>
		<p>Sorry <b><?=$name;?></b>, your message failed to send. Try later!</p>
	</div>";
}
?>
</body>
</html>

 

advance thank for the help,i really need the help

Just make a link with some Javascript code, par exemple:

 

<a href="#" onclick="history.go(-1);return false;">BACK</a>

Or put in an ordinary hyperlink so that the use can click to go back or to another page

 

<a href="www.homepageAddress.com"> Return to home </a>

Edited by Sam G
added [code] tags

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.