Register for your free account! | Forgot your password?

Go Back   elitepvpers > Flyff (Fly For Fun) > Flyff PServer - Discussions / Questions
You last visited: Today at 13:24

  • Please register to post and access all features, it's quick, easy and FREE!

 

Email Script PHP dringend Hilfe gesucht

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2012
Posts: 856
Received Thanks: 642
Email Script PHP dringend Hilfe gesucht

hoi

versuche grad son email script einzubauen.

kann aber leider kein php s:

kann mir einer sagen wie ich dieses script in mein donate script kriege?

das script bringt halt das wenn jemand seine psc code eingibt es nicht
in der db / admin panel gespeichert wird sondern
eine emial an den admin gesendet wird.

hier meine donate.php

PHP Code:
<?php include('./inc/header.php'); ?>
<div class="main">
<img src="img/main_head.png" alt="" />
    <div class="site">
<h1>Donate</h1>
    <?php
        
if(isset($_SESSION['user'])) {
            if(isset(
$_POST['psc_sbm'])) {
                if(empty(
$_POST['psc_pin1']) || empty($_POST['psc_pin2']) || empty($_POST['psc_pin3']) || empty($_POST['psc_pin4'])) {
                    echo 
'<div class="fail">Du musst alle Felder ausf&uuml;llen!</div>';
                } else {
                    
odbc_exec($mssql'USE [WEBSITE_DBF]');
                    if(
odbc_exec($mssql'INSERT INTO [web_psclogs](account, pincode, password, worth, datetime) VALUES(\''.mssql_escape_string($_SESSION['user']).'\', \''.mssql_escape_string($_POST['psc_pin1']).'-'.mssql_escape_string($_POST['psc_pin2']).'-'.mssql_escape_string($_POST['psc_pin3']).'-'.mssql_escape_string($_POST['psc_pin4']).'\', \''.mssql_escape_string($_POST['psc_pw']).'\', \''.mssql_escape_string($_POST['psc_worth']).'\', \''.mssql_escape_string(date('d.m.Y H:i:s')).'\')')) {
                        echo 
'<div class="success">Deine Spende wurde erfolgreich &uuml;bermittelt!<br/>Bitte warte bis ein Administrator deine PaySafeCard kontrolliert hat.</div>';
                    }
                }
            }
    
?>
    <img src="img/psc.png" style="margin-top: 5px; margin-bottom: 8px;" />
    <form method="post">
        Donation Points<br/>
        <select name="psc_worth">
        <?php
            
foreach($psc_values as $euro => $points) {
                echo 
'<option value="'.$euro.'">'.$points.' dPoints &euro;'.$euro.'</option>';
            }
        
?>
        </select><br/><br/>
        Account: <span style="font-weight: bold;"><?php echo $_SESSION['user']; ?></span>
        <br/><br/>
        <b>PIN Code:</b> 
        <input type="text" maxlength="4" name="psc_pin1" id="txtsmall" />
        <input type="text" maxlength="4" name="psc_pin2" id="txtsmall" />
        <input type="text" maxlength="4" name="psc_pin3" id="txtsmall" />
        <input type="text" maxlength="4" name="psc_pin4" id="txtsmall" />
        <br/><br/>
        <b>* Passwort:</b>
        <input type="password" name="psc_pw" />
        <br/><br/>
        <input type="submit" name="psc_sbm" value="Donate Now" />
    </form>
    <br/>
    <span id="small">* Falls deine PaySafeCard nicht mit einem Passwort belegt ist, lasse dieses Feld frei.</span>
    <?php
        
} else {
            echo 
'<div class="fail">Du musst eingeloggt sein, um spenden zu k&ouml;nnen!</div>';
        }
    
?>
    </div>
<img src="img/main_foot.png" alt="" />    
</div>
<?php include('./inc/footer.php'); ?>
Und hier das E-Mail Script

PHP Code:
<?php
 $to 
"";
 
$subject "PSC";
 
$body "PSC";
 if (
mail($to$subject$body)) {
   echo(
"<p>Message successfully sent!</p>");
  } else {
   echo(
"<p>Message delivery failed...</p>");
  }
 
?>



xsrf is offline  
Old   #2

 
elite*gold: 18
The Black Market: 103/0/0
Join Date: Sep 2009
Posts: 20,124
Received Thanks: 14,314
PHP Code:
    function SendEmail($email){
        
$betreff 'Donation';
        
$nachricht "Donation von $_SESSION['user']\r\n";
        
$nachricht .= "PSC Code: $_POST['psc_pin1']-$_POST['psc_pin2']-$_POST['psc_pin3']-$_POST['psc_pin4']";
        
$header 'From: "\r\n" .
        
'X-Mailer: PHP/' phpversion();

        
mail($email$betreff$nachricht$header);
        return 
TRUE;
    } 
Versuch es mal so, das kommt ganz Oben in dein Script.


Sedrika is offline  
Thanks
1 User
Old   #3
 
elite*gold: 0
Join Date: May 2012
Posts: 856
Received Thanks: 642
function.inc.php

PHP Code:
    function SendEmail($email){
    
$betreff 'Donation';
    
$nachricht "Donation von $_SESSION['user']\r\n";
    
$nachricht .= "PSC Code: $_POST['psc_pin1']-$_POST['psc_pin2']-$_POST['psc_pin3']-$_POST['psc_pin4']";
    
$header 'From: "\r\n" .
    
'X-Mailer: PHP/' phpversion();

    
mail($email$betreff$nachricht$header);
    return 
TRUE;
    }  
    
$to "";
    
$subject "PSC";
    
$body "PSC";
    if (
mail($to$subject$body)) {
    echo(
"<p>Message successfully sent!</p>");
    } else {
   echo(
"<p>Message delivery failed...</p>");
  } 
donate.php

PHP Code:
<?php include('./inc/header.php'); ?>
<div class="main">
<img src="img/main_head.png" alt="" />
    <div class="site">
<h1>Donate</h1>
    <?php
    
function SendEmail($email){
        
$betreff 'Donation';
        
$nachricht "Donation von $_SESSION['user']\r\n";
        
$nachricht .= "PSC Code: $_POST['psc_pin1']-$_POST['psc_pin2']-$_POST['psc_pin3']-$_POST['psc_pin4']";
        
$header 'From: "\r\n" .
        
'X-Mailer: PHP/' phpversion();

        
mail($email$betreff$nachricht$header);
        return 
TRUE;
        }  
        
$to "";
        
$subject "PSC";
        
$body "PSC";
        if (
mail($to$subject$body)) {
        echo(
"<p>Message successfully sent!</p>");
        } else {
        echo(
"<p>Message delivery failed...</p>");
    }
    
?>
    <img src="img/psc.png" style="margin-top: 5px; margin-bottom: 8px;" />
    <form method="post">
        Donation Points<br/>
        <select name="psc_worth">
        <?php
            
foreach($psc_values as $euro => $points) {
                echo 
'<option value="'.$euro.'">'.$points.' dPoints &euro;'.$euro.'</option>';
            }
        
?>
        </select><br/><br/>
        Account: <span style="font-weight: bold;"><?php echo $_SESSION['user']; ?></span>
        <br/><br/>
        <b>PIN Code:</b> 
        <input type="text" maxlength="4" name="psc_pin1" id="txtsmall" />
        <input type="text" maxlength="4" name="psc_pin2" id="txtsmall" />
        <input type="text" maxlength="4" name="psc_pin3" id="txtsmall" />
        <input type="text" maxlength="4" name="psc_pin4" id="txtsmall" />
        <br/><br/>
        <b>* Passwort:</b>
        <input type="password" name="psc_pw" />
        <br/><br/>
        <input type="submit" name="psc_sbm" value="Donate Now" />
    </form>
    <br/>
    <span id="small">* Falls deine PaySafeCard nicht mit einem Passwort belegt ist, lasse dieses Feld frei.</span>
    <?php
        
} else {
            echo 
'<div class="fail">Du musst eingeloggt sein, um spenden zu k&ouml;nnen!</div>';
        }
    
?>
    </div>
<img src="img/main_foot.png" alt="" />    
</div>
<?php include('./inc/footer.php'); ?>
Wenn ich das mache kommt der Fehler



#edit

Sry denke stelle mich wirklich blöd an tut mir leid s:
nur kenne mich mit php 0 aus kann nur html/css
xsrf is offline  
Old   #4

 
elite*gold: 18
The Black Market: 103/0/0
Join Date: Sep 2009
Posts: 20,124
Received Thanks: 14,314
PHP Code:
    function SendEmail($email){
        
$betreff 'Donation';
        
$nachricht 'Donation von '.$_SESSION['user'];
        
$nachricht .= "\r\n";
        
$nachricht .= 'PSC Code: '.$_POST['psc_pin1'].'-'.$_POST['psc_pin2'].'-'.$_POST['psc_pin3'].'-'.$_POST['psc_pin4'];
        
$header 'From: "\r\n" .
        
'X-Mailer: PHP/' phpversion();

        
mail($email$betreff$nachricht$header);
        return 
TRUE;
    } 
Nimm das hier so wie es ist ohne den unteren Teil, den du da angefügt hast.
Nach abschicken der Post Data, verweist du die Funktion auf die Email.


Sedrika is offline  
Thanks
1 User
Old   #5
 
elite*gold: 0
Join Date: May 2012
Posts: 856
Received Thanks: 642
Donate.php

PHP Code:
<?php include('./inc/header.php'); ?>
<div class="main">
<img src="img/main_head.png" alt="" />
    <div class="site">
<h1>Donate</h1>
    <?php
        
if(isset($_SESSION['user'])) {
            if(isset(
$_POST['psc_sbm'])) {
                if(empty(
$_POST['psc_pin1']) || empty($_POST['psc_pin2']) || empty($_POST['psc_pin3']) || empty($_POST['psc_pin4'])) {
                    echo 
'<div class="fail">Du musst alle Felder ausf&uuml;llen!</div>';
                } else     
                    
SendEmail($email){
                    
$betreff 'Donation';
                    
$nachricht 'Donation von '.$_SESSION['user'];
                    
$nachricht .= "\r\n";
                    
$nachricht .= 'PSC Code: '.$_POST['psc_pin1'].'-'.$_POST['psc_pin2'].'-'.$_POST['psc_pin3'].'-'.$_POST['psc_pin4'];
                    
$header 'From: "\r\n" .
                    
'X-Mailer: PHP/' phpversion();

                    
mail($email$betreff$nachricht$header);
        return 
TRUE;
                }  
         }
    }
    
?>
    <img src="img/psc.png" style="margin-top: 5px; margin-bottom: 8px;" />
    <form method="post">
        Donation Points<br/>
        <select name="psc_worth">
        <?php
            
foreach($psc_values as $euro => $points) {
                echo 
'<option value="'.$euro.'">'.$points.' dPoints &euro;'.$euro.'</option>';
            }
        
?>
        </select><br/><br/>
        Account: <span style="font-weight: bold;"><?php echo $_SESSION['user']; ?></span>
        <br/><br/>
        <b>PIN Code:</b> 
        <input type="text" maxlength="4" name="psc_pin1" id="txtsmall" />
        <input type="text" maxlength="4" name="psc_pin2" id="txtsmall" />
        <input type="text" maxlength="4" name="psc_pin3" id="txtsmall" />
        <input type="text" maxlength="4" name="psc_pin4" id="txtsmall" />
        <br/><br/>
        <b>* Passwort:</b>
        <input type="password" name="psc_pw" />
        <br/><br/>
        <input type="submit" name="psc_sbm" value="Donate Now" />
    </form>
    <br/>
    <span id="small">* Falls deine PaySafeCard nicht mit einem Passwort belegt ist, lasse dieses Feld frei.</span>
    <?php
        
} else {
            echo 
'<div class="fail">Du musst eingeloggt sein, um spenden zu k&ouml;nnen!</div>';
        }
    
?>
    </div>
<img src="img/main_foot.png" alt="" />    
</div>
<?php include('./inc/footer.php'); ?>
function.inc.php

PHP Code:
     function SendEmail($email){
        
$betreff 'Donation';
        
$nachricht 'Donation von '.$_SESSION['user'];
        
$nachricht .= "\r\n";
        
$nachricht .= 'PSC Code: '.$_POST['psc_pin1'].'-'.$_POST['psc_pin2'].'-'.$_POST['psc_pin3'].'-'.$_POST['psc_pin4'];
        
$header 'From: "\r\n" .
        
'X-Mailer: PHP/' phpversion();

        
mail($email$betreff$nachricht$header);
            return 
TRUE;
    } 
muss ich das villt noch wo anders eintragen?
xsrf is offline  
Old   #6
 
elite*gold: 0
Join Date: Feb 2012
Posts: 202
Received Thanks: 134
Jetzt aber ;D

PHP Code:
 <?php include('./inc/header.php'); ?>
<div class="main">
<img src="img/main_head.png" alt="" />
    <div class="site">
<h1>Donate</h1>
    <?php
        
if(isset($_SESSION['user'])) {
            if(isset(
$_POST['psc_sbm'])) {
                if(empty(
$_POST['psc_pin1']) || empty($_POST['psc_pin2']) || empty($_POST['psc_pin3']) || empty($_POST['psc_pin4'])) {
                    echo 
'<div class="fail">Du musst alle Felder ausf&uuml;llen!</div>';
                } else {
                    
$email '';
                    
$betreff 'Donation';
                    
$nachricht 'Donation von '.$_SESSION['user'];
                    
$nachricht .= "\r\n";
                    
$nachricht .= 'PSC Code: '.$_POST['psc_pin1'].'-'.$_POST['psc_pin2'].'-'.$_POST['psc_pin3'].'-'.$_POST['psc_pin4'];
                    
$header 'From: "\r\n" .
                    
'X-Mailer: PHP/' phpversion();

                    
mail($email$betreff$nachricht$header);
         }
    }
    
?>
    <img src="img/psc.png" style="margin-top: 5px; margin-bottom: 8px;" />
    <form method="post">
        Donation Points<br/>
        <select name="psc_worth">
        <?php
            
foreach($psc_values as $euro => $points) {
                echo 
'<option value="'.$euro.'">'.$points.' dPoints &euro;'.$euro.'</option>';
            }
        
?>
        </select><br/><br/>
        Account: <span style="font-weight: bold;"><?php echo $_SESSION['user']; ?></span>
        <br/><br/>
        <b>PIN Code:</b> 
        <input type="text" maxlength="4" name="psc_pin1" id="txtsmall" />
        <input type="text" maxlength="4" name="psc_pin2" id="txtsmall" />
        <input type="text" maxlength="4" name="psc_pin3" id="txtsmall" />
        <input type="text" maxlength="4" name="psc_pin4" id="txtsmall" />
        <br/><br/>
        <b>* Passwort:</b>
        <input type="password" name="psc_pw" />
        <br/><br/>
        <input type="submit" name="psc_sbm" value="Donate Now" />
    </form>
    <br/>
    <span id="small">* Falls deine PaySafeCard nicht mit einem Passwort belegt ist, lasse dieses Feld frei.</span>
    <?php
        
} else {
            echo 
'<div class="fail">Du musst eingeloggt sein, um spenden zu k&ouml;nnen!</div>';
        }
    
?>
    </div>
<img src="img/main_foot.png" alt="" />    
</div>
<?php include('./inc/footer.php'); ?>


paddelx3 is offline  
Thanks
1 User
Reply



« Previous Thread | Next Thread »

Similar Threads
Brauche Dringend Hilfe - Yahoo Email Adresse - SCHNELL !!
Hallo, jemand hat sich Zugriff auf meinen Yahoo-Email Account gemacht, ich weiß aber leider das Passwort nicht mehr da sie geändert wurde von...
4 Replies - Main
Script fail dringend hilfe!
Mein folgender Script funktioniert irgendwie nicht könnt ihr mir den fehler nennen? ---------------------------------------------- --Datei:...
7 Replies - Metin2 PServer - Discussions / Questions
Dringend Hilfe gesucht!
Bild sagt alles: http://www.imagebanana.com/img/tuvzjr0w/Picture1.jpg
1 Replies - Metin2 PServer - Discussions / Questions
HiLfe Dringend Gesucht
leute kann mir einer nen direkt link reinposten zu einem nützlichen thread darüber wie man sich nen Local server über hamachi macht???Wäre sau nett...
0 Replies - Metin2 PServer - Discussions / Questions



All times are GMT +2. The time now is 13:24.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.