Page 1 of 1

help with feedback form . .

Posted: Wed May 28, 2008 10:18 am
by callmecheez
Hey guys, really sorry to ask as I'm sure its an irritatingly frequent query but I'm struggling with a feedback form.

I want a feedback form that'll have 4 or 5 fields, one to be text area; and have all info emailed to an address.

I've got an index.html:

Code: Select all

<form method="post" action="sendmail.php">
  Name: <input name="name" type="text" /> <br />
  Email Address: <input name="email" type="text" /><br />
  ISS Username (if known): <input name="username" type="text" /><br />
  Telephone Number: <input name="phone" type="text" /><br />
Message:<br />
  <textarea name="message" rows="15" cols="40">
  </textarea><br />
  <input type="submit" />
</form>

and sendmail.php:

Code: Select all

<?php
  $email = $_REQUEST['email'] ;
  $name = $_REQUEST['name'] ;
  $username = $_REQUEST['username'] ;
  $phone = $_REQUEST['phone'] ;
  $message = $_REQUEST['message'] ;
 
  mail( "callmecheez@gmail.com", "New helpdesk email",
         "From: $name <$email>" );  
     "$message\nCustomer Username:$username\n".
     "$message\nCustomer Contact Number:$phone\n".
     "$message\nDescription: $message\n".
 
  header( "Location: http://www.leeds.ac.uk/iss/contact_test/thankyou.html" );
?>

Been stuck with this all day, and just not knowledgeable enough to figure it out. Any help gratefully received.

Re: help with feedback form . .

Posted: Wed May 28, 2008 5:21 pm
by callmecheez
I've pretty much sorted this now, almost.

Next question - how do I format my form? I'd like to align all the fields and tidy it up etc.

Many thanks :)

Re: help with feedback form . .

Posted: Wed May 28, 2008 7:24 pm
by LSJason
callmecheez wrote:I've pretty much sorted this now, almost.

Next question - how do I format my form? I'd like to align all the fields and tidy it up etc.

Many thanks :)
You'd need to use tables or CSS...quickest way is with tables, most standards-compliant is with CSS. Here's the implementation with tables:

Code: Select all

<form method="post" action="sendmail.php">
<table>
<tr>
<td>Name:</td><td><input name="name" type="text" /></td>
</tr>
<tr>
<td>Email Address:</td><td><input name="email" type="text" /></td>
</tr>
... (and so on...)
</table>
</form>
 

Re: help with feedback form . .

Posted: Thu May 29, 2008 6:17 am
by callmecheez
Thanks for all the help guys. . last question. . !

Anyone know why under firefox it looks fine:
Image


But internet explorer has some yellow fields and the alignment is out?
Image


Thanks again :)

Re: help with feedback form . .

Posted: Thu May 29, 2008 8:26 am
by LSJason
That's the problem with tables--they aren't flush across all browsers. You can try playing with the align and valign properties to obtain the desired alignment.

As to the yellow fields, that's an Internet Explorer plugin for certain versions that allows you to automatically fill in the information (Form-Fill). That's something you can only disable on the client end, and there's no way to change that.

Jason