Log in

View Full Version : Intranet Form



mohammed7866
01-11-2010, 02:22 PM
Hi

I would like to make a form that i could put on the internal intranet, which would allow users to send feedback or changes to.

I was wondering if it would be possible to put it on the intranet and then have it emailed to a specific email address, without the sender having an email account. (like an email webform)

I am using the following script for the form, but need the send part of it.


<!--
// URL: www.freecontactform.com
// Version: FreeContactForm Lite V1.0
// Copyright (c) 2009 Stuart Cochrane <stuartc1@gmail.com>
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Contact Us</title>
<script src="lite_validation.js"></script>
<script>
required.add('Full_Name','NOT_EMPTY','Full Name');
required.add('Email_Address','EMAIL','Email Address');
required.add('Your_Message','NOT_EMPTY','Your Message')
</script>
<link rel="stylesheet" type="text/css" href="lite_styles.css">
</head>
<body>

<form name="contactformlite" method="post" action="lite_process.php" onsubmit="return validate.check(this)">
<table width="400px" class="cflite">
<tr>
<td colspan="2">
<p style="text-align:center">Fields marked with <span class="required_star"> * </span> are required.</p>
</td>
</tr>
<tr>
<td valign="top" class="cflite_td">
<label for="Full_Name" class="required">Full Name<span class="required_star"> * </span></label>
</td>
<td valign="top" class="cflite_td">
<input type="text" name="Full_Name" id="Full_Name" maxlength="80" style="width:250px">
</td>
</tr>
<tr>
<td valign="top" class="cflite_td">
<label for="Email_Address" class="required">Email Address<span class="required_star"> * </span></label>
</td>
<td valign="top" class="cflite_td">
<input type="text" name="Email_Address" id="Email_Address" maxlength="100" style="width:250px">
</td>
</tr>
<tr>
<td valign="top" class="cflite_td">
<label for="Telephone_Number" class="not-required">Telephone Number</label>
</td>
<td valign="top" class="cflite_td">
<input type="text" name="Telephone_Number" id="Telephone_Number" maxlength="100" style="width:250px">
</td>
</tr>
<tr>
<td valign="top" class="cflite_td">
<label for="Your_Message" class="required">Your Message<span class="required_star"> * </span></label>
</td>
<td valign="top" class="cflite_td">
<textarea style="width:250px;height:120px" name="Your_Message" id="Your_Message" maxlength="2000"></textarea>
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center" class="cflite_td">
<input type="submit" value="Submit">
<br /><br />
<!-- LEGAL NOTICE: YOU MUST KEEP THIS LINK UNCHANGED -->
This form is powered by <a href="http://www.freecontactform.com/">Free Contact Form</a>
<!-- LEGAL NOTICE: YOU MUST KEEP THIS LINK UNCHANGED -->
<br /><br />
</td>
</tr>
</table>
</form>
</body>
</html>

Regards.

djr33
01-11-2010, 07:24 PM
I don't really understand your question.
There is nothing special about using an intranet-- it is just a small version of the internet.

You need a server that will run the php script and, yes, of course you can send emails.

Are you trying to find out how to determine who a user is, then send the email to them?

Without user accounts, the only information you have from the user is their IP address (even on a local network).

If that IP address never changes, you could manually setup a list/array/database of employee IP address to employee email address, then just email based on that. However, this may be difficult, especially if different users share computers, etc. I think this is a bad idea also, because it may confuse everyone. At least you should say "sending to account connected to this computer: [email]"


Because it is on an intranet, you MIGHT be able to do something more complex. If you have some sort of network setup where users login (through the operating system) and this is available on the server, then if you can find a way to make php communicate with the server's user data, you can connect it this way. But there is no way to do this in PHP by default.