Hallo,
ich habe eine PHP seite erstellt und wundere mich das
bei Aktuallisierung der webseite ein eintrag in die DB
gemacht wird.
Hier der Ganze Text:
	
Ich verstehe das nicht. Ich habe doch vorgegeben das 
nur beim klicken des sendebuttem der eintrag gemacht werden soll.
Warum macht er Ihn trozdem. Ok ich möcht zusätzlich noch einbauen das
alle felder ausgefüllt werden müssen damit man senden kann aber da
dieses Problem mit der aktuallisierung besteht denke ich sollte ich ds erstmal beheben.
MFG
Ich hoffe mir kann jemand helfen
					ich habe eine PHP seite erstellt und wundere mich das
bei Aktuallisierung der webseite ein eintrag in die DB
gemacht wird.
Hier der Ganze Text:
PHP Code:
	
	
<?php
      session_start();    
include 'sqlvars.php';      
  $abfrage = "SELECT id, empf_mail, status, umsatz FROM bonus";
  $ergebnis = mysql_query($abfrage);
 
      
echo'
<table border="1" cellspacing="1" style="border-collapse: collapse; border-
width: 0" bordercolor="#111111" width="100%">
  <tr>
    <td width="100%" style="border-style: none; border-width: medium">
    <table border="1" cellspacing="1" style="border-collapse: collapse; 
border-width: 0" bordercolor="#111111" width="100%">
      <tr>
        <td width="44%" style="border-style: none; border-width: medium">';
        
 echo"<form action=\"bonus.php?\" method=\"get\">";
 echo'
<table border="1" cellspacing="1" style="border-collapse: collapse; border-
top-width:0" bordercolor="#111111" width="37%">
  <tr>
    <td width="100%" colspan="2" style="border-left:1px solid #111111; 
border-right:1px solid #111111; border-top:1px solid #111111; border-
bottom-style:none; border-bottom-width:medium">
    <p align="left"><b><font size="2">Ihre Empfehlung 
versenden</font></b></td>
  </tr>
  <tr>
    <td width="35%" style="border-left:1px solid #111111; border-right-
style:none; border-right-width:medium; border-top-style:none; border-top-
width:medium; border-bottom-style:none; border-bottom-width:medium">
    <b><font size="2">Betreff:</font></b></td>
    <td width="65%" style="border-right:1px solid #111111; border-left-
style:none; border-left-width:medium; border-top-style:none; border-top-
width:medium; border-bottom-style:none; border-bottom-width:medium">
<b>
<input type="text" maxlength="70" size="21" name="betreff"></b></td>
  </tr>
  <tr>
    <td width="35%" style="border-left:1px solid #111111; border-right-
style:none; border-right-width:medium; border-top-style:none; border-top-
width:medium; border-bottom-style:none; border-bottom-width:medium">
    <b><font size="2">Nachricht:</font></b></td>
    <td width="65%" style="border-right:1px solid #111111; border-left-
style:none; border-left-width:medium; border-top-style:none; border-top-
width:medium; border-bottom-style:none; border-bottom-width:medium">  
<b>  
<input type="text" maxlength="300" size="21" name="text1"></b></td>
  </tr>
  <tr>
    <td width="35%" style="border-left:1px solid #111111; border-right-
style:none; border-right-width:medium; border-top-style:none; border-top-
width:medium; border-bottom-style:none; border-bottom-width:medium">
    <b><font size="2">Ihre 
    E-Mail:</font></b></td>
    <td width="65%" style="border-right:1px solid #111111; border-left-
style:none; border-left-width:medium; border-top-style:none; border-top-
width:medium; border-bottom-style:none; border-bottom-width:medium">  
<b>  
<input type="text" maxlength="300" size="21" name="sendermail"></b></td>
  </tr>
  <tr>
    <td width="35%" style="border-left:1px solid #111111; border-right-
style:none; border-right-width:medium; border-top-style:none; border-top-
width:medium; border-bottom-style:none; border-bottom-width:medium">
    <b><font size="2">
    E-Mail an:</font></b></td>
    <td width="65%" style="border-right:1px solid #111111; border-left-
style:none; border-left-width:medium; border-top-style:none; border-top-
width:medium; border-bottom-style:none; border-bottom-width:medium">  
<b>  
<input type="text" maxlength="300" size="21" name="emailen"></b></td>
  </tr> 
  <tr>
    <td width="100%" style="border-right:1px solid #111111; border-left-
style:solid; border-left-width:1; border-top-style:none; border-top-
width:medium; border-bottom-style:solid; border-bottom-width:1" 
colspan="2">
<input type="submit" name="senden11" value="E-Mail Abschicken"></td>
  </tr>
</table>';    
        
include 'sqlvars.php';
    
      $user = $_SESSION['user'];
      $empf_mail = $_REQUEST['emailen'];  
// beschreibungsmail senden
 
    if (isset($_REQUEST['senden11'])) {
#$emailen="info@all4you-online.com";
  mail($emailen, $betreff, $text1,
       "From: $sender <$sendermail>");    
          
      $anfuegen=mysql_query("INSERT INTO bonus (id, empf_mail, 
status, umsatz)
      VALUES ('$user','$empf_mail','$status','$umsatz')");
      if (!$anfuegen) {echo 'Anfuegen fehler';}                   
                        }        
        
    echo" </form>";        
        
        
echo'        </td>
        <td width="22%" style="border-style: none; border-width: 
medium"> </td>
        <td width="34%" style="border-style: none; border-width: medium">
        <table border="1" cellspacing="1" style="border-collapse: collapse" 
bordercolor="#111111" width="100%">
          <tr>
            <td width="33%">Gesamtumsatz: </td>
            <td width="67%">gesamte bet##</td>
          </tr>
          <tr>
            <td width="100%" colspan="2"> </td>
          </tr>
        </table>
        </td>
      </tr>
    </table>
    <table border="1" cellspacing="1" style="border-collapse: collapse; 
border-width: 0" bordercolor="#111111" width="100%">
      <tr>
        <td width="40%" style="border-style: none; border-width: medium">
        Geworben:</td>
        <td width="34%" style="border-style: none; border-width: medium">
        Angemeldet:</td>
        <td width="26%" style="border-style: none; border-width: medium">
        Umsatzbeteiligung:</td>
      </tr>
      <tr>
        <td width="40%" style="border-style: none; border-width: 
medium">';
  while($row = mysql_fetch_object($ergebnis))
    {
    echo $row->empf_mail;
    echo '<br>';
    }
       echo'</td>
        <td width="34%" style="border-style: none; border-width: medium">
        angemeldet ja nein##</td>
        <td width="26%" style="border-style: none; border-width: medium">umsatz 
        der mail##</td>
      </tr>
    </table>
    </td>
  </tr>
</table>
';        
                        
?>
<?php   echo '<pre>'; print_r ($_REQUEST); echo '</pre>'; ?>
nur beim klicken des sendebuttem der eintrag gemacht werden soll.
Warum macht er Ihn trozdem. Ok ich möcht zusätzlich noch einbauen das
alle felder ausgefüllt werden müssen damit man senden kann aber da
dieses Problem mit der aktuallisierung besteht denke ich sollte ich ds erstmal beheben.
MFG
Ich hoffe mir kann jemand helfen
 
          
Comment