Reply
How do I...?
Old 04-13-2008, 11:44 AM How do I...?
jguk's Avatar
Experienced Talker

Posts: 41
Name: Jamie Gordon
Location: Middlesbrough UK
Hi guys, I'm having a bit of trouble with my website. I am really confused. I alway turn to Webmaster-Talk for reference and help which I always happily recieve from you guys ...

Problem is, I have created my website www.flashmedia.org.uk/test/index.html - This site is only a test one for now until it's fully built. I am havig trouble creating my 'contact' and 'quotation' forms.

On my contact form I'd like fields for Name, E-mail Address, Telephone Number, Subject (drop down menu) and a text area for comments.

On my quotation for I'd like, Name, E-mail Address, Subject (drop down menu) and a text area for a description of some sort.

Trouble is my PHP isn't up to scratch and I was wondering if any of you kind people could help me out?

Thanks in advance,

JAMiE
__________________
Jamie 'Flash' Gordon
MSN Messenger: jguk@hotmail.co.uk
jguk is offline
Reply With Quote
View Public Profile Visit jguk's homepage!
 
When You Register, These Ads Go Away!
Old 04-13-2008, 06:27 PM Re: How do I...?
Skilled Talker

Posts: 55
Name: Tobias Eichner
Location: Germany
You may hire a web designer or "borrow" some forms from other websites adjusting them for your needs :-)
__________________
Business consulting services: http://www.starenterprise.com
CGI Perl scripts and software development: http://www.sunnyscript.com
tobias is offline
Reply With Quote
View Public Profile Visit tobias's homepage!
 
Old 04-14-2008, 04:36 PM Re: How do I...?
jguk's Avatar
Experienced Talker

Posts: 41
Name: Jamie Gordon
Location: Middlesbrough UK
Quote:
Originally Posted by tobias View Post
You may hire a web designer or "borrow" some forms from other websites adjusting them for your needs :-)
I tried to copy and paste th code from another php form of mine on another site and paste it into the new one but it doesn't work ?
__________________
Jamie 'Flash' Gordon
MSN Messenger: jguk@hotmail.co.uk
jguk is offline
Reply With Quote
View Public Profile Visit jguk's homepage!
 
Old 04-14-2008, 06:25 PM Re: How do I...?
Webmaster Talker

Posts: 560
Try this http://www.ibdhost.com/contact/. You will need to customize the look of it of course, but that should do the trick. Then just adjust/add the field names for the quotes page.

Matt
170 Designs is offline
Reply With Quote
View Public Profile
 
Old 04-14-2008, 07:39 PM Re: How do I...?
Gilligan's Avatar
Dead Like Me

Posts: 1,608
Name: Stefan
Location: London, UK
Heres a basic php to do this trick.

Code:
<form action="send.php" method="post">
<input type="text" name="name">
<input type="text" name="email">
<input type="text" name="tel">
<select name="subject">
  <option selected>- - Select - -</option>
  <option value="Subject 1">Subject 1</option>
  <option value="subject 2">Subject 2</option>
</select>
<textarea name="message"></textarea>
<input type="submit" value="Submit">
</form>
send.php

PHP Code:
<?php 

// sets the variables

$name $_POST['name'];
$email $_POST['email'];
$tel $_POST['tel'];
$message $_POST['message'];
$subject $_POST['subject'];

// checks empty fields and if email has '.' and '@'

if(empty($name) || empty($email) || empty($message) || empty($tel) || $subject == '- - Select - -' || !$email == "" && (!strstr($email,"@") || !strstr($email,"."))) {

echo 
'Some fields were left empty';

// display the form again for this page.

echo '<form action="send.php" method="post">
<input type="text" name="name">
<input type="text" name="email">
<input type="text" name="tel">
<select name="subject">
  <option selected>- - Select - -</option>
  <option value="Subject 1">Subject 1</option>
  <option value="subject 2">Subject 2</option>
</select>
<textarea name="message"></textarea>
<input type="submit" value="Submit">
</form>'
;

}

$from "From: $email\r\n";

else {
mail("your@email.com"$subject$message$from); 

echo 
'Thank you. Your email has been sent.';

}
Gilligan is offline
Reply With Quote
View Public Profile
 
Old 04-15-2008, 06:20 PM Re: How do I...?
jguk's Avatar
Experienced Talker

Posts: 41
Name: Jamie Gordon
Location: Middlesbrough UK
Thanks Gilligan, I'll try this script tomorrow... I'll let you know how I get on
__________________
Jamie 'Flash' Gordon
MSN Messenger: jguk@hotmail.co.uk
jguk is offline
Reply With Quote
View Public Profile Visit jguk's homepage!
 
Reply     « Reply to How do I...?
 

Thread Tools

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

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




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13044 seconds with 12 queries