Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



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

Posts: 41
Name: Jamie Gordon
Location: Middlesbrough UK
Trades: 0
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 Gordon

Please login or register to view this content. Registration is FREE
jguk is offline
Reply With Quote
View Public Profile Visit jguk's homepage!
 
 
Register now for full access!
Old 04-13-2008, 07:27 PM Re: How do I...?
Skilled Talker

Posts: 55
Name: Tobias Eichner
Location: Germany
Trades: 0
You may hire a web designer or "borrow" some forms from other websites adjusting them for your needs :-)
__________________
Business consulting services:
Please login or register to view this content. Registration is FREE

CGI Perl scripts and software development:
Please login or register to view this content. Registration is FREE
tobias is offline
Reply With Quote
View Public Profile Visit tobias's homepage!
 
Old 04-14-2008, 05:36 PM Re: How do I...?
jguk's Avatar
Experienced Talker

Posts: 41
Name: Jamie Gordon
Location: Middlesbrough UK
Trades: 0
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 Gordon

Please login or register to view this content. Registration is FREE
jguk is offline
Reply With Quote
View Public Profile Visit jguk's homepage!
 
Old 04-14-2008, 07:25 PM Re: How do I...?
Webmaster Talker

Posts: 560
Trades: 0
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
__________________

Please login or register to view this content. Registration is FREE
170 Designs is offline
Reply With Quote
View Public Profile
 
Old 04-14-2008, 08:39 PM Re: How do I...?
Gilligan's Avatar
Website Designer

Posts: 1,670
Name: Stefan
Location: London, UK
Trades: 0
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.';

}
__________________

Please login or register to view this content. Registration is FREE
Gilligan is offline
Reply With Quote
View Public Profile
 
Old 04-15-2008, 07:20 PM Re: How do I...?
jguk's Avatar
Experienced Talker

Posts: 41
Name: Jamie Gordon
Location: Middlesbrough UK
Trades: 0
Thanks Gilligan, I'll try this script tomorrow... I'll let you know how I get on
__________________
Jamie Gordon

Please login or register to view this content. Registration is FREE
jguk is offline
Reply With Quote
View Public Profile Visit jguk's homepage!
 
Reply     « Reply to How do I...?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 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.22748 seconds with 12 queries