UK Webmaster Talk - Online Marketing - SEO


 

Contact Us Form?

This is a discussion on Contact Us Form? within the Programming Articles forums, part of the Webmaster Articles/Tutorials category; Ok, so you need a basic script so people can send you feedback? Firstly we need to create a php ...


Go Back   UK Webmaster Talk - Online Marketing - SEO > Webmaster Articles > Webmaster Articles/Tutorials > Programming Articles

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Notices

Reply

 

LinkBack Thread Tools Display Modes
Old 22-04-2005, 00:31   #1 (permalink)
Senior Member
 
Join Date: Apr 2005
Posts: 1,088
iTrader: 0 / 0%
Departed is a name known to allDeparted is a name known to all
Default Contact Us Form?

Ok, so you need a basic script so people can send you feedback? Firstly we need to create a php script to send the mail once it has been submitted in the html file.

Open up notepad and put this code in it (Change email adress to your email adress and change the urls as well).
Code:
<?
  $email = $_REQUEST['email'] ;
  $message = $_REQUEST['message'] ;

  if (!isset($_REQUEST['email'])) {
	header( "Location: http://www.mydomain.com/feedback.htm" );
  }
  elseif (empty($email) || empty($message)) {
	header( "Location: http://www.mydomain.com/eror.htm" );
  }
  else {
	mail( "randomemailadress@random.com", "Feedback results for my site",
	  $message, "From: $email" );
	header( "Location: http://www.mydomain.com/thankyou.htm" );
  }
?>
Now save this as sendfeedback.php

Now, inside your webpage in body you need to create the form.
This is a example of a form, you must change the size of the input boxes and the info you want to receive.

Code:
<form method="post" action="sendfeedback.php">
Email: <input type="text" name="Email" />

Message:<br />
<textarea name="Message" rows="20" cols="45">
</textarea>

<input type="submit" />
</form>
Now save your webpage after editing the script accordingly.
Then upload Both the files to the same directory and your done!
Ive used this script here but i havnt included the "Having to put in info" php bit as i cant be bothered.

Hope this helps, any problems or comments please post below.

Thanks

Flubber
__________________
-Gary
Departed is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
contact, form

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Form to Mail HostYorkshire Php and MySQL 0 08-01-2007 19:20
Electronic Form bradk Website Design Forum 7 03-03-2006 21:34
Form help JsPLACEwebby Programming / Scripting / Coding 2 05-12-2005 11:25
Domain renewal, can't contact customer monaghan Hosting Forum 9 08-11-2005 19:49


All times are GMT +1. The time now is 01:48.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
UK Webmaster Forum © WebmasterTalk.co.uk | Design by Forbairt

Ad Management by RedTyger

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41