Irish SEO,  Marketing & Webmaster Discussion
 
nominate sites now!
 

Go Back   Irish SEO, Marketing & Webmaster Discussion > Webmaster Help > Coding Help


Notices

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 20-03-2006, 10:14 PM
Frontpage User
 
Join Date: Jan 2006
Location: Carlow
Posts: 18
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
splashIT.net will become famous soon enough
Send a message via MSN to splashIT.net
Default forms

hi all..


they have puzzeled me for long enough.. and now i want to learn...

i have a few q's.

1. how do i set up a form... well i use dreamweaver and front page
2. what do i have to type into the code
3. what do i submit the stuff that people fill in to. (ie. to an email address or to a text file .txt or something else)
4. if i was using a form for a links page how do i get the results to appear on the site?

many thanks to anyone who can help
__________________
spla****.net - splashing ideas for IT solutions
www.spla****.net
info@spla****.net
247@spla****.net (247 Helpdesk)
Reply With Quote
  #2 (permalink)  
Old 20-03-2006, 11:13 PM
louie's Avatar
Senior Member
 
Join Date: Jan 2006
Location: Dublin, Ireland
Posts: 1,934
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
louie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud of
Send a message via Yahoo to louie Send a message via Skype™ to louie
Default

you are missing the most important part.
what language do you use asp or php?

forget about frontpage stick with dreamweaver.
both of them has the capabilities of helping you creating the form itself.

for the last question we need an answer to the first question i asked.
on both language you can use the request mode depending on the setup of the form post or get.

you need to decide what you want to do with the form itself - email it or save to a database or probably a text file(don't see the point in that)
__________________
:. Web Design & Development Web Design Ireland
:. Search Engines Optimization Search Engines Optimization
:. Directory Submission Directory Submission
:. News & Press Release Ireland GiveItSocks.com
:. Used Cars Ireland, Car Parts & Car Audio Cars For Sale, Car Parts & Accessories
:. I Have 2 Find It Directory SEF Directory
Reply With Quote
  #3 (permalink)  
Old 20-03-2006, 11:16 PM
Frontpage User
 
Join Date: Jan 2006
Location: Carlow
Posts: 18
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
splashIT.net will become famous soon enough
Send a message via MSN to splashIT.net
Default

php all the way as i am on a linux server.

secondly i am totally new to this so i dont mind weather i use a database txt file for email..

i just want to make a working form first of all.. start with something basic to practice and then slowly develop it
__________________
spla****.net - splashing ideas for IT solutions
www.spla****.net
info@spla****.net
247@spla****.net (247 Helpdesk)
Reply With Quote
  #4 (permalink)  
Old 20-03-2006, 11:23 PM
louie's Avatar
Senior Member
 
Join Date: Jan 2006
Location: Dublin, Ireland
Posts: 1,934
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
louie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud of
Send a message via Yahoo to louie Send a message via Skype™ to louie
Default

forms are the most complicated thing cause they need to be checked and rechecked especially if you do an insert in the database.
using the post method you can get the field value in php by using
<?php @$HTTP_POST_VARS['youformfieldname'];?>

if using get (not recommend it)
<?php @$HTTP_GET_VARS['youformfieldname'];?>

hope this help
__________________
:. Web Design & Development Web Design Ireland
:. Search Engines Optimization Search Engines Optimization
:. Directory Submission Directory Submission
:. News & Press Release Ireland GiveItSocks.com
:. Used Cars Ireland, Car Parts & Car Audio Cars For Sale, Car Parts & Accessories
:. I Have 2 Find It Directory SEF Directory
Reply With Quote
  #5 (permalink)  
Old 20-03-2006, 11:38 PM
Frontpage User
 
Join Date: Jan 2006
Location: Carlow
Posts: 18
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
splashIT.net will become famous soon enough
Send a message via MSN to splashIT.net
Default

HTML Code:
<body>
<?php @$HTTP_POST_VARS['feedback.txt'];?>
  <p>
    <input type="text" name="textfield">
  </p>
  <p> 
    <textarea name="textarea"></textarea>
  </p>
  <p>
    <input type="submit" name="Submit" value="Submit">
  </p>
</form>
</body>
</html> 

is that it??? sorry i am very at see with these forms!
__________________
spla****.net - splashing ideas for IT solutions
www.spla****.net
info@spla****.net
247@spla****.net (247 Helpdesk)
Reply With Quote
  #6 (permalink)  
Old 21-03-2006, 12:21 AM
blacknight's Avatar
Web Slave
 
Join Date: Jan 2006
Location: Ireland
Posts: 5,998
blacknight is just really niceblacknight is just really niceblacknight is just really niceblacknight is just really nice
Send a message via ICQ to blacknight Send a message via AIM to blacknight Send a message via MSN to blacknight
Default

What are you going to use the forms for?
Is it to gather information?
A replacement for a mailto: link?
Reply With Quote
  #7 (permalink)  
Old 21-03-2006, 07:54 AM
louie's Avatar
Senior Member
 
Join Date: Jan 2006
Location: Dublin, Ireland
Posts: 1,934
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
louie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud of
Send a message via Yahoo to louie Send a message via Skype™ to louie
Default

you can not asle for a text file from you form but a textfield by name or id.
Code:
<body>
<?php @$HTTP_POST_VARS['textfield'];?> <form method="post" action="" name="form1"> <p> <input type="text" name="textfield" value="<?php echo @$HTTP_POST_VARS['textfield'];?>"> </p> <p> <textarea name="textarea"></textarea> </p> <p> <input type="submit" name="Submit" value="Submit"> </p> </form> </body> </html>
__________________
:. Web Design & Development Web Design Ireland
:. Search Engines Optimization Search Engines Optimization
:. Directory Submission Directory Submission
:. News & Press Release Ireland GiveItSocks.com
:. Used Cars Ireland, Car Parts & Car Audio Cars For Sale, Car Parts & Accessories
:. I Have 2 Find It Directory SEF Directory
Reply With Quote
  #8 (permalink)  
Old 21-03-2006, 06:17 PM
Frontpage User
 
Join Date: Jan 2006
Location: Carlow
Posts: 18
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
splashIT.net will become famous soon enough
Send a message via MSN to splashIT.net
Default

Quote:
Originally Posted by blacknight
What are you going to use the forms for?
Is it to gather information?
A replacement for a mailto: link?
initially yes but i have never successfully used forms so i just want to get one to work and then try and slowly develop it to such an extent that i can make forms to add stuff to websites. Similar to php nuke websites or forums and the like.
__________________
spla****.net - splashing ideas for IT solutions
www.spla****.net
info@spla****.net
247@spla****.net (247 Helpdesk)
Reply With Quote
  #9 (permalink)  
Old 22-03-2006, 11:50 PM
Frontpage User
 
Join Date: Jan 2006
Location: Carlow
Posts: 18
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
splashIT.net will become famous soon enough
Send a message via MSN to splashIT.net
Default

so is there anyone that would be so kind as to make a small bit of code for a email feedback form and what to do to get it to work.

name:
email:
subject:
feedback:

thats it.

many many thanks
__________________
spla****.net - splashing ideas for IT solutions
www.spla****.net
info@spla****.net
247@spla****.net (247 Helpdesk)
Reply With Quote
  #10 (permalink)  
Old 23-03-2006, 08:38 AM
louie's Avatar
Senior Member
 
Join Date: Jan 2006
Location: Dublin, Ireland
Posts: 1,934
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
louie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud of
Send a message via Yahoo to louie Send a message via Skype™ to louie
Default

Code:
<?
// ------------- CONFIGURABLE SECTION ------------------------
// $mailto - set to the email address you want the form
// sent to, eg
//$mailto  = "youremailaddress@example.com" ;
$mailto = 'youemailaddress@server.com' ;
// $subject - set to the Subject line of the email, eg
//$subject = "Feedback Form" ;
$subject = "Feedback Form" ;
// the pages to be displayed, eg
//$formurl  = "http://www.example.com/feedback.html" ;
//$errorurl  = "http://www.example.com/error.html" ;
//$thankyouurl = "http://www.example.com/thankyou.html" ;
$formurl = "http://yourwebsite.com" ;
$errorurl = "http://yourerrorpage.com" ;
$thankyouurl = "http://youtThankyoupage.com" ;
$uself = 1;
// -------------------- END OF CONFIGURABLE SECTION ---------------
$headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" : "\n" ;
$name = $_POST['name'] ;
$email = $_POST['email'] ;
$comments = $_POST['comments'] ;
$http_referrer = getenv( "HTTP_REFERER" );
if (!isset($_POST['email'])) {
 header( "Location: $formurl" );
 exit ;
}
if (empty($name) || empty($email) || empty($comments)) {
   header( "Location: $errorurl" );
   exit ;
}
if ( ereg( "[\r\n]", $name ) || ereg( "[\r\n]", $email ) ) {
 header( "Location: $errorurl" );
 exit ;
}
if (get_magic_quotes_gpc()) {
 $comments = stripslashes( $comments );
}
$messageproper =
 "This message was sent from:\n" .
 "$http_referrer\n" .
 "------------------------------------------------------------\n" .
 "Name of sender: $name\n" .
 "Email of sender: $email\n" .
 "------------------------- COMMENTS -------------------------\n\n" .
 $comments .
 "\n\n------------------------------------------------------------\n" ;
mail($mailto, $subject, $messageproper,
 "From: \"$name\" <$email>" . $headersep . "Reply-To: \"$name\" <$email>" . $headersep . "X-Mailer: chfeedback.php 2.07" );
header( "Location: $thankyouurl" );
exit ;
?>
<form action="feedback.php" method="post">
<table border="0" cellpadding="8" cellspacing="8" summary="feedback form">
<tr><td>Name:</td><td><input type="text" name="name" size="25" /></td></tr>
<tr><td>Email address:</td><td><input type="text" name="email" size="25" /></td></tr>
<tr>
<td colspan="2">
Comments<br />
<textarea rows="15" cols="45" name="comments"></textarea>
</td>
</tr>
<tr>
<td align="center" colspan="2">
<input type="submit" value="Send Feedback" /><br />
</td>
</tr>
</table>
</form>
__________________
:. Web Design & Development Web Design Ireland
:. Search Engines Optimization Search Engines Optimization
:. Directory Submission Directory Submission
:. News & Press Release Ireland GiveItSocks.com
:. Used Cars Ireland, Car Parts & Car Audio Cars For Sale, Car Parts & Accessories
:. I Have 2 Find It Directory SEF Directory
Reply With Quote
Reply

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
Forum Jump


All times are GMT +1. The time now is 08:08 AM.


Powered by: vBulletin Version 3.7.2, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.

Search Engine Friendly URLs by vBSEO 3.2.0