if $_POST[''] + IE

maarian

Erfahrenes Mitglied
Hallo,

Wenn ich zb einen Query ausführen möchte mit

if(isset($_POST['test'])){


ausführen

}

macht er das nur im Firefox nicht im IE warum
 
zb so etwas...

Im Firefox funktioniert es


PHP:
 if (isset($_POST['update_main_picture'])){
 
 
 if(empty($_FILES['main_picture']['name']))
 {
  
 }
 else{
 
$dest = "user_img/".$user_info['username'].""; 
if (is_dir($dest)) 
{ } 
else 
{ mkdir ("user_img/".$user_info['username']."", 0755); }

 $check_exists = mysql_query("SELECT * FROM bilder 
 WHERE username = '".$user_info['username']."' AND position_user = '".$_POST['position_user']."' AND typ='user' AND status='0'");

 //$ext = strstr($_FILES['main_picture']['name'],".");
 $ext = strtolower(strchr($_FILES['main_picture']['name'],"."));
 $temp_small = Tuneety_de;
 $temp_number = rand(2, 999999999);
 $name = $_FILES['main_picture']['name'];
 $file = "user_img/".$user_info['username']."/".$temp_number."_".$temp_small.$ext;
 
 
  $checked_exists = mysql_fetch_array($check_exists);
   @unlink($checked_exists['pfad_user']);
   
   
 // CHECK 
 if($user_info['status'] !="User"){
 
 $freigabe = '0';
 
 }
 
 else{
 
 if ($einstellungen['img_freigabe'] =="ja"){
 
 $freigabe = '1';
 
 } else {
 
 $freigabe = '0';
 
 }
 
}


$size = $_FILES['main_picture']['size'];

$maxdatasize = 150000;

if ($size > $maxdatasize){
	
	
	 header ('Location: fotos.php?action=error_size');
	
	exit();
}
          
          else if (($ext!= ".jpg") && ($ext!= ".gif") && ($ext!= ".jpeg") && ($ext!= ".png") && ($ext!= ".GIF")){
 
 header ('Location: fotos.php?action=error_type');
 
 	exit();

 }
  else if (preg_match("/php/i", $_FILES['main_picture']['name'])) {
 
 header ('Location: fotos.php?action=error_type');

 } else if  (mysql_num_rows($check_exists) == 1){
  

							  

 if (copy($_FILES['main_picture']['tmp_name'], 'user_img/'.$user_info['username'].'/'.$temp_number.'_'.$temp_small.$ext)){

 mysql_query("UPDATE bilder
			  SET pfad_user='".$file."', 
			  status='".$freigabe."' 
			  WHERE username='".$user_info['username']."' 
			  AND position_user='".$_POST['position_user']."' AND typ='user'");

if($_POST['position_user'] == 1){

  mysql_query("UPDATE user SET checked='0' WHERE username='".$user_info['username']."'");  
  
 mysql_query("UPDATE user 
			  SET profile_picture='".$freigabe."' 
			  WHERE username='".$user_info['username']."'");
	}
 
 }
 
HTML:
		   <form action="fotos.php" method="post" name="form" id="form" enctype="multipart/form-data">
				
				    <table width="510" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td width="10" align="right"><img src="img/layout_03.gif" width="4" height="25"></td>
                      <td width="484" align="left" valign="middle" background="img/layout_05.gif" class="ueberschriften_angebote">
					  
					  
					  
					  <table width="184" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td width="184" height="20" valign="top" class="ueberschriften_angebote">Fotoupload 'Person </td>
                          </tr>
                        </table>
						
						
						</td>
                      <td width="16" align="left"><img src="img/layout_07.gif" width="5" height="25"></td>
                    </tr>
                  </table>
				  
				  
				  
							 <table width="510" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td width="210" align="center" valign="middle"><?php echo $profile_picture;?>&nbsp;</td>
                      <td width="300">
					  
					  
					  		<table width="70%" border="0" align="center" cellpadding="4" cellspacing="4">
                        <tr>
                          <td width="51%" height="111" align="center" valign="middle"><?php echo $profile_picture2;?></td>
                          <td width="49%" align="center" valign="middle"><?php echo $profile_picture3;?></td>
                        </tr>
                        <tr>
                          <td align="center" valign="middle"><?php echo $profile_picture4;?></td>
                          <td align="center" valign="middle"><?php echo $profile_picture5;?></td>
                        </tr>
                      </table>
<!-- Content Anfang --></td>
</tr>
                  </table>


   
		            <table width="411" border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr>
                        <td width="129" valign="top"><table width="100%" border="0" cellspacing="2" cellpadding="2">
                            <tr>
                              <td height="24" align="right"><span class="ueberschriften_angebote">Datei w&auml;hlen: </span></td>
                            </tr>
                            <tr>
                              <td height="38" align="right" class="ueberschriften_angebote">Position:</td>
                            </tr>
                        </table></td>
                        <td width="282" valign="top"><table width="100%" border="0" cellspacing="2" cellpadding="2">
                            <tr>
                              <td><input name="main_picture" type="file" id="main_picture"  src="img/layout_button_sende.gif" />                              </td>
                            </tr>
                            <tr>
                              <td height="32"><table width="250" border="0" cellspacing="0" cellpadding="0">
                                  <tr>
                                    <td width="141"><select name="position_user" id="position_user">
                                      <option value="1">1</option>
                                      <option value="2">2</option>
                                      <option value="3">3</option>
                                      <option value="4">4</option>
                                      <option value="5">5</option>
                                    </select></td>
                                    <td width="109"><input name="delete_main_picture" type="image" id="delete_main_picture" value="Absenden" src="img/button_löschen_fotos.gif" /></td>
                                  </tr>
                                </table>                              </td>
                            </tr>
                        </table></td>
                      </tr>
                      <tr>
                        <td align="right" valign="top" class="navigation_pfeil"><table width="100%" border="0" cellspacing="1" cellpadding="4">
                          <tr>
                            <td align="right" valign="top" class="profilangaben">Status Freigabe: </td>
                          </tr>
                        </table></td>
                        <td class="profilangaben_ergebnis"><table width="100%" border="0" cellspacing="1" cellpadding="4">
                          <tr>
                            <td valign="top" class="profilangaben_ergebnis"><?php if ($einstellungen['img_freigabe'] =="ja"){?>
                              Freigabe erfolgt durch Mitarbeiter.
                              <?php }else{?>
                              Freigabe erfolgt automatisch.
                              <?php }?>                            </td>
                          </tr>
                        </table></td>
                      </tr>
                      <tr>
                        <td valign="top">&nbsp;</td>
                        <td></td>
                      </tr>
                      <tr>
                        <td valign="top">&nbsp;</td>
                        <td><input name="update_main_picture" type="image" id="update_main_picture" value="Absenden" src="img/button_upload.gif" /></td>
                      </tr>
                      <tr>
                        <td valign="top">&nbsp;</td>
                        <td>&nbsp;</td>
                      </tr>
                      <tr>
                        <td valign="top">&nbsp;</td>
                        <td></td>
                      </tr>
                    </table>
		          </form>
 
Hi,

nur mal so zum Verständnis: PHP-Code wird nicht "im Browser" ausgeführt, sondern auf dem Server.
Lass Dir doch mal mit print_r oder var_dump das $_POST- und das $_FILES-Array ausgeben. Welcher Wert genau wird denn vom IE nicht übertragen?
Wenn Du HTML-Quelltext postest, dann bitte den Response, also das, was im Browser ankommt.
Auf den ersten Blick: ein <input type="file"> hat kein src-Attribut.

LG
 
Zurück