It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming HTML Forum

Help with form html not working

Help with form html not working

Postby dannyshaw on Mon Nov 06, 2006 3:08 am

hi guys new here

seems this topic is quite a hot one neways ive used a code off here from the admin i think he seems very intelligant but its not working for me at all, i dont know whether i can use this code in a simple html page or php page, heres the code :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<?php

if(isset($_POST['submit'])) {

$to = "youremail.com";
$subject = $_POST['subject'];
$message = $_POST['message'];
mail($to, $subject, $message);

echo "Your mail has been sent!";

} else { ?>

<form method="post">
Subject: <input type="text" name="subject" /><br />
Message: <textarea name="message"></textarea><br />
<input type="submit" name="submit" value="send the mail" />

<?php } ?>
<body>
</body>
</html>

can anyone identify the problem, i am copy and pasting this in a html page

cheers
dannyshaw
 
Posts: 4
Joined: Mon Nov 06, 2006 2:51 am

Postby dannyshaw on Mon Nov 06, 2006 6:10 am

"BUMP"

please help guys cmon seems like an active froum

"BUMP"
dannyshaw
 
Posts: 4
Joined: Mon Nov 06, 2006 2:51 am

Postby The Poot on Mon Nov 06, 2006 10:22 pm

I simply copied the code directly into notepad and named it testPage.html and got the following error message:

Method Not Allowed
The requested method POST is not allowed for the URL /testPage.html.

The same code with file testPage.php worked.

Just save it as .php and give it a whirl.

Hope this works for you

The Poot
The Poot
 
Posts: 15
Joined: Fri Sep 02, 2005 10:31 pm

Postby dannyshaw on Tue Nov 07, 2006 2:08 pm

hmm does not still seem to work, do i need another html file to this? their is no email been sent to me
dannyshaw
 
Posts: 4
Joined: Mon Nov 06, 2006 2:51 am

Postby dannyshaw on Tue Nov 07, 2006 2:36 pm

ok ive got this code to work guys its a differnet one because i cant seem to get an email, this new 1 is differnet but when people send their login and password to me you get a confirmation page which is what i dont really want its made a by a form generator :

<table width="295" height="141" border="1">
<tr>
<td><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title></title>
</head>
<!-- Begin Freedback Form -->
<!-- DO NOT EDIT YOUR FORM HERE, PLEASE LOG IN AND EDIT AT FREEDBACK.COM -->
<form enctype="multipart/form-data" method="POST" action="http://www.freedback.com/mail.php" accept-charset="ISO-8859-1">
<div>
<input type="hidden" name="acctid" id="acctid" value="ss241nibkxfot9ia" />
<input type="hidden" name="formid" id="formid" value="131740" />
<input type="hidden" name="required_vars" id="required_vars" value="name,email" />
</div>
<table border="0" align="center" cellpadding="10" cellspacing="10">
<tr>
<td width="43" valign="top">
<p><strong>Handle:</strong> </p></td>
<td width="162" valign="top">
<input type="text" name="name" id="name" size="23" value="" />

</td>
</tr>
<tr>
<td valign="top">
<strong>Password:</strong>
</td>
<td valign="top">
<input type="text" name="email" id="email" size="23" value="" />

</td>
</tr>
<tr>
<td colspan="2" align="center">
<div align="right">
<input type="submit" value=" Login " />
</div></td>
</tr>
</table>
</form>
<!-- End Freedback Form -->&nbsp;</td>
</tr>
</table>

problem with this is that i would like the password to be in stars like normally which it aint at the moment :lol:
cheers
dannyshaw
 
Posts: 4
Joined: Mon Nov 06, 2006 2:51 am

Postby mwa103 on Tue Nov 07, 2006 7:56 pm

to get password in *'s all you need to do is change:

<input type="text" name="email" id="email" size="23" value="" />

to

<input type="password" name="email" id="email" size="23" value="" />

-Mike
mwa103
100+ Club
 
Posts: 206
Joined: Mon Mar 07, 2005 10:55 pm


Who is online

Users browsing this forum: No registered users and 4 guests