Home

Forums

Web development

 

 

 

 
     
 
dna88 Web development and Technology Forum
 
Profile   Register   Memberlist   Usergroups   FAQ   Search  Log in
Web Form making

 
Post new topic   Reply to topic    dna88 Forum Index -> Web design and solution Discussion Forum
Author Message
himel
Beginner User
Beginner User


Joined: 09 Oct 2004
Posts: 25

Post Post subject: Web Form making Reply with quote

Sometimes we see on webpages there is a place to post comments. A box. you can write on that box and submit or post your comments. And that commnets goes to webmaster. How Can i make this system?
Sun Oct 24, 04 3:20 am
Back to top
himel View user's profile Send private message
emm
Power User
Power User


Joined: 13 Jul 2004
Posts: 310

Post Post subject: Reply with quote

Oh, you want a contact form. You can very easily write code for such a program, but you need the help of your host. You need to know if your host has a CGI script ruuning that can send mail from a form. All paid hosts have that. But free hosts usualy don't allow you access to the CGI scripts. If you cannot use a CGI form mail script, you can use code to start the user's email application to send an email to you. But that's very bad. Nobody wants to send email with outlook express from your webpage. First try to know if your host gives you access to CGI formmail.
_________________
“You might say reality is the result of complex negotiations between the observer and the observed. But that is simply a point of view…”
Digital Bangladesh
Sun Oct 24, 04 4:28 am
Back to top
emm View user's profile Send private message
hasnut
Expert User
Expert User


Joined: 28 Aug 2004
Posts: 201

Post Post subject: Reply with quote

Three files
1. The form that shows to client
2. Send mail script
3. Thankyou page

1. the form
file name: contact.php
Code:
<html>
<title>Contact Form</title>

<head>

</head>
<form name="form" method="post" action="sendmail.php">
  <table width="400" border="0" cellpadding="2" cellspacing="2" summary="">
    <tr>
      <td width="200" valign="top" align="right">Your Name: </td>
      <td width="200" valign="top" align="left">
        <input type="text" name="name" size="25" maxlength="200" />
      </td>
    </tr>
    <tr>
      <td width="200" valign="top" align="right">Your Email:</td>
      <td width="200" valign="top" align="left">
        <input type="text" name="email" size="25" maxlength="100" />
      </td>
    </tr>
    <tr>
      <td width="200" valign="top" align="right">Your Comments: </td>
      <td width="200" valign="top" align="left">
        <textarea name="msg" cols="25" rows="4"></textarea>
      </td>
    </tr>
    <tr>
      <td width="200" valign="top">&nbsp;</td>
      <td width="200" valign="top" align="left">
        <input type="reset" name="Reset" value="Reset" />
        <input type="submit" name="Submit" value="Submit" />
      </td>
    </tr>
  </table>
  </form>

</html>


2. Mail Script
file name:sendmail.php
Code:
<?php


$header .= "From: $name <$email>\n";
$header .= "Content-Type: text/plain; charset=iso-8859-1\n"; // mime type
$recipient = "youremail@yourdomain.com"; // Your email address here
$subject = "Contct Form filled"; // Subject of the email

$msg = wordwrap( $msg, 1024 ); //worping the message

mail($recipient, $subject, stripslashes($msg), $header); // the mail() function sends the message to you

//show thank you
   header("location: thankyou.php");
?>


3. Thank you page
file name:thankyou.php
Code:
<h1>Thank You</h1>



Note: This is done by PHP, if you need cgi/perl then let me know. And one issue is your server need to support php/cgi and Free servers don't have access to mail component. so you can't use it on free server.
_________________
Sarder Hasnut
MCSD, CIW A

Need Low Cost Prefessional Hosting Contact me
Sun Oct 24, 04 1:08 pm
Back to top
hasnut View user's profile Send private message Visit poster's website MSN Messenger
himel
Beginner User
Beginner User


Joined: 09 Oct 2004
Posts: 25

Post Post subject: Reply with quote

I want to make a forum. Pleae give me the address of free banerles forum hosting. I want to change my forums colour. Can you give me nice skin for forums?
Sun Oct 24, 04 7:39 pm
Back to top
himel View user's profile Send private message
quantum
Site Admin
Site Admin


Joined: 07 Mar 2004
Posts: 1048
Location: Dhaka, Bangladesh

Post Post subject: Reply with quote

You cannot find a free bannerless hosting. There is nothing like free lunch. Disk space and bandwidth cost money. If you want that much control over your website, buy it. Hasnut provides such a service for only 1500tk./year.

Look up this thread and email him.

http://www.quantumcloud.com/forum/viewtopic.php?t=492

You can also try free invision forum at http://www.invisionfree.com. That's probably the most popular free one around this time.

Get your own forum and leave us alone.
_________________

Dust fills my eyes / Clouds roll by / and I roll with them / Centuries cry / Orders fly / and I fall again
Afford best design, implement best solution. Outsource your web design.
Sun Oct 24, 04 9:57 pm
Back to top
quantum View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    dna88 Forum Index -> Web design and solution Discussion Forum All times are GMT - 7 Hours
Page 1 of 1

 

Partners and Resources

Bangladesh hosting company

Bangladesh web design

Driven by phpBB © phpBB Group