PDA

View Full Version : Whats Wrong With...



Jargit
06-10-2006, 05:59 PM
This Code...


<?php
if ($_POST['submit']){
$user = strip_tags($_POST['user']);
$pass = strip_tags($_POST['pass']);
$passconf = strip_tags($_POST['passconf']);
$email = strip_tags($_POST['email']);
$userid = strip_tags($_POST['userid']);
$typesite = strip_tags($_POST['typesite']);
$domain = strip_tags($_POST['domain']);
$ip = $_SERVER['REMOTE_ADDR'];
$to = "claim@****************";
$subject = "Contact us";
$headers = "From: $email";
$message = "Contact us reply:
User: $user
Password: $pass
IP: $ip
Confirm Password: $passconf
Email: $email
User ID: $userid
Type Of Site: $typesite
(sub)Domain: $domain;
mail($to,$subject,$message,$headers);
echo "Sent!";
}
else
{
?>
<form method="post">
<p align="center" class="style2"> Desired Username:
<input type="text" name="user">
<br>
Desired Password:
<input type="password" name="pass">
<br>
Confirm Password:
<input type="password" name="passconf">
<br>
E-mail Address:
<input name="email" type="text" value="">
<br>
EzyRewards UserID:
<input type="text" name="userid">
<br>
<br>
Type Of Site:
<input type="text" name="typesite">
<br>
(Sub)Domain:
<input type="text" name="domain">
<br>
<input ="submit" name="submit" value="Claim">
<input type="reset" name="reset" value="Reset" />
</p>
</form>

:Blob
06-10-2006, 06:12 PM
Whats the error..

Jargit
06-10-2006, 07:05 PM
Oops forgot to say, thanks

When i click submit(claim) it doesnt send anything. All The Boxes Go Back And nothing is in the e-mail inbox.

reindeer.
06-10-2006, 07:57 PM
It might have sent, perhaps the code doesnt send it to a page after its sent.

Jargit
06-10-2006, 08:00 PM
Inbox Is Empty, Wen I Check... :P

Dentafrice1
06-10-2006, 08:23 PM
Change <form method="post"> <form method="post" action="filename.php">

Jargit
07-10-2006, 08:34 AM
kk ill try that. Thanks dentafrice

Dentafrice1
07-10-2006, 11:49 AM
;) Post what happens.. im pretty sure thats it because when you hit the form you have no action specified so its basicly reseting it.

You at least need to set the action as that page.. or if you want to have multiple things

Make a drop down box with like three to emails.

if($_POST[to] == "[email protected]") {
mail(balblabl;jk;ljadfj klsdj);
}
and just keep repeating that :P

joshspk4
07-10-2006, 10:33 PM
I don't know much about PHP but I was gonna say change it to what Dent was gonna say, Maybe it did send and it is in your junk email folder?

Want to hide these adverts? Register an account for free!