We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
  • Pages:
  • 1
PHP Forum; A little help :-/
Topic Started: Sep 18 2005, 02:07 PM (1,328 Views)
Ryan47
13 year old Web Person :D
[ *  * ]
Okay, I am trying to make a forum so people can sign up for My Clan. I am new to php, and tried making something. I got everything right.... but it still won't send me the email with the stuff filled out :(. Here are my codes. What am I doing worng???

sendmail3.php
Code:
 

<?
 $rsname = $_REQUEST['rsname'];
 $pass = $_REQUEST['pass'];
 $pass1 = $_REQUEST['pass1'];
 $email = $_REQUEST['email'];
 $combat = $_REQUEST['combat'];
 $magic = $_REQUEST['magic'];
 $ranged = $_REQUEST['ranged'];
 $pure = $_REQUEST['pure'];
 if($pass1==$pass)
 {
mail( "Raynus@comcast.net", "New Rebellion of Fire Sign-up",
   "$rsname, $pass, $pass1, $email, $combat, $magic, $ranged, $pure,", "From: $email" );
    header( "Location: thankyou.htm" );
 }
  else
{
print("Sorry, your passwords do not match, Please go back and makesure they are correct.");
}
?>


form.htm
Code:
 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<form name="form1" method="post" action="sendmail3.php">
 <p>  
   <input type="text" name="rsname">
RuneScape Name</p>
 <p>
   <input type="password" name="pass">
   Password (what you want your forum pass to be)</p>
 <p>
   <input type="password" name="pass1">
 Password Again</p>
 <p>
   <input type="text" name="email">
Email</p>
 <p>
   <input name="combat" type="text" size="10">
 Combat Level</p>
 <p>
   <input name="magic" type="text" size="10">
Magic Level</p>
 <p>
   <input name="ranged" type="text" size="10">
   Ranged Level</p>
 <p>
   <select name="pure">
     <option value="yes">yes</option>
     <option value="no">no</option>
   </select>
 Are you a pure? </p>
 <p>Do you have any Messengers? If so List them</p>
 <p>
   <input name="aim" type="text" value="AIM">
 </p>
 <p>
   <input name="msn" type="text" value="MSN">
</p>
 <p>
   <input name="yim" type="text" value="YIM">
</p>
 <p>
   <input name="icq" type="text" value="ICQ">
</p>
 <p>    <input type="reset" name="Submit2" value="Reset">
   <input type="submit" name="Submit" value="Submit">
 </p>
</form>
</body>
</html>


thankyou.htm
Code:
 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.style1 {font-size: 24px}
-->
</style>
</head>

<body>
<div align="center">
 <p class="style1">Thank you.</p>
 <p>Your message has been sent. We will get back to you as soon as possible.  </p>
</div>
</body>
</html>
Offline Profile Quote Post Goto Top
 
Das
Member Avatar
Smells of rich mahogany
[ *  *  *  *  *  *  * ]
Use $_POST['name'] instead of $_REQUEST['name']
Offline Profile Quote Post Goto Top
 
Ryan47
13 year old Web Person :D
[ *  * ]
Okay, I changed that but I'm still not getting the email. Maybe it takes a few minutes ??? :blink: :/
Offline Profile Quote Post Goto Top
 
Das
Member Avatar
Smells of rich mahogany
[ *  *  *  *  *  *  * ]
Code:
 
<?
$rsname = $_POST['rsname'];
$pass = $_POST['pass'];
$pass1 = $_POST['pass1'];
$email = $_POST['email'];
$combat = $_POST['combat'];
$magic = $_POST['magic'];
$ranged = $_POST['ranged'];
$pure = $_POST['pure'];
$message = "RS Name: " . $rsname . "Pass: " . $pass . "Pass2: " . $pass1 . "Email: " . email . "Combat: " . $combat . "Magic: " . $magic . "Ranged: " . $ranged . "Pure: " . $pure;
if($pass1==$pass)
{
mail('Raynus@comcast.net', 'New Rebellion of Fire Sign-up', $message);
echo '<script language = "Javascript">window.location="thankyou.htm"</script>';
}
 else
{
print("Sorry, your passwords do not match, Please go back and makesure they are correct.");
}
?>


Try that.
Offline Profile Quote Post Goto Top
 
Ryan47
13 year old Web Person :D
[ *  * ]
OKay, I just tried it but when I pressed submit, it came up with this:

Code:
 
Parse error: parse error, unexpected T_VARIABLE in \\192.168.0.107\webfiles\files\2005-9\434188\sendmail3.php on line 10
Offline Profile Quote Post Goto Top
 
Das
Member Avatar
Smells of rich mahogany
[ *  *  *  *  *  *  * ]
Sorry, I updated my previous post.
Offline Profile Quote Post Goto Top
 
Ryan47
13 year old Web Person :D
[ *  * ]
i tried it, and a quick error popped up, but then almost imeaditly took me to thankyou.htm. I kept looking back to see what it said and it was something like no authorization on line 14 ?
Offline Profile Quote Post Goto Top
 
Das
Member Avatar
Smells of rich mahogany
[ *  *  *  *  *  *  * ]
Run:
Code:
 
<?
$rsname = $_POST['rsname'];
$pass = $_POST['pass'];
$pass1 = $_POST['pass1'];
$email = $_POST['email'];
$combat = $_POST['combat'];
$magic = $_POST['magic'];
$ranged = $_POST['ranged'];
$pure = $_POST['pure'];
$message = "RS Name: " . $rsname . "Pass: " . $pass . "Pass2: " . $pass1 . "Email: " . email . "Combat: " . $combat . "Magic: " . $magic . "Ranged: " . $ranged . "Pure: " . $pure;
if($pass1==$pass)
{
mail('Raynus@comcast.net', 'New Rebellion of Fire Sign-up', $message);
// echo '<script language ="Javascript">window.location="thankyou.htm"</script>';
}
else
{
print("Sorry, your passwords do not match, Please go back and makesure they are correct.");
}
?>


and see what error it returns.
Offline Profile Quote Post Goto Top
 
Ryan47
13 year old Web Person :D
[ *  * ]
It says this:
Code:
 
Warning: mail(): SMTP server response: 530 5.7.3 Client was not authenticated in \\192.168.0.107\webfiles\files\2005-9\434188\sendmail3.php on line 13
Offline Profile Quote Post Goto Top
 
Das
Member Avatar
Smells of rich mahogany
[ *  *  *  *  *  *  * ]
Hmmm never seen that, can I get a link to the website?
Offline Profile Quote Post Goto Top
 
Ryan47
13 year old Web Person :D
[ *  * ]
here:

http://home.ripway.com/2005-9/434188/index.htm
http://home.ripway.com/2005-9/434188/form.htm

http://home.ripway.com/2005-9/434188/sendmail3.php

http://home.ripway.com/2005-9/434188/thankyou.htm

Now you know why I have a redirect...
Offline Profile Quote Post Goto Top
 
Das
Member Avatar
Smells of rich mahogany
[ *  *  *  *  *  *  * ]
Ripway is blocking you ... actually I think they are stopping transfer of info between pages, because I just ran it on my server, and it worked.
So my suggestion is find another free host.
Offline Profile Quote Post Goto Top
 
Ben
Member Avatar
Quantum-locked when observed.

Ripway disables many functions, including mail().
Offline Profile Quote Post Goto Top
 
Ryan47
13 year old Web Person :D
[ *  * ]
What free host would you reccomend for php? (least ammount of opo-ups as possible)
Offline Profile Quote Post Goto Top
 
Das
Member Avatar
Smells of rich mahogany
[ *  *  *  *  *  *  * ]
http://www.free-webhosts.com/webhosting-01.php
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Technology Chat · Next Topic »
Add Reply
  • Pages:
  • 1