Ankündigung

Einklappen
Keine Ankündigung bisher.

Probleme mit der post methode

Einklappen

Neue Werbung 2019

Einklappen
X
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • Probleme mit der post methode

    hallo

    ich habe eine phpseite erstellt die zweisprachig seien soll. Dazu habe ich eine checkbox gewählt. Standartmäsig läuft die seite auf deutsch wenn man in der Box Englisch auswählt soll die schrifft sofort englisch sein.
    mit der methode get funktioniert das auch aber mit post gibt er die meldung

    "HTTP 405 - Ressource nicht zulässig Internet-Informationsdienste"

    PHP4 läuft über den iis.

    Auf apache mit php läuft die seite woran kann das Wohl liegen.
    Ich glaube das es an einen einstellung in IIS liegt kann mir da jemand helfen?




    hier der code:


    <?php
    if (isset($_POST['select_laender']))
    // wenn die Variable existiert dann guke nach der Sprache
    {
    if ($_POST['select_laender'] == "de")
    // wenn de dann alles in deutsch
    {
    print $_POST['select_laender'];
    print "
    <tr>
    <td colspan=\"2\" align=\"right\">Sprache:</td>
    <td colspan=\"3\">
    <select style=\"width:159px;\" name=\"select_laender\" size=\"1\" width=\"100px\" onchange=\"Javascript:form.submit();\">
    <option selected value=\"de\"> Deutsch </option>
    <option value=\"en\"> English </option>
    </select>
    </td>
    </tr>

    <tr>
    <td colspan=\"2\" align=\"right\">Benutzer:</td>
    <td colspan=\"3\">
    <input type=\"text\" name=\"text_benutzer\" size=\"22\" maxlength=\"20\" value=\"\">
    </td>
    </tr>

    <tr>
    <td colspan=\"2\" align=\"right\">Passwort:</td>
    <td colspan=\"3\">
    <input type=\"password\" name=\"text_passwort\" size=\"22\" maxlength=\"20\" value=\"\">
    </td>
    </tr>
    ";
    }
    else
    // andernfals alles in englisch
    {
    print "
    <tr>
    <td colspan=\"2\" align=\"right\">Language:</td>
    <td colspan=\"3\">
    <select style=\"width:159px;\" name=\"select_laender\" size=\"1\" width=\"100px\" onchange=\"Javascript:form.submit();\">
    <option value=\"de\"> Deutsch </option>
    <option selected value=\"en\"> English </option>
    </select>
    </td>
    </tr>

    <tr>
    <td colspan=\"2\" align=\"right\">User:</td>
    <td colspan=\"3\">
    <input type=\"text\" name=\"text_benutzer\" size=\"22\" maxlength=\"20\" value=\"\">
    </td>
    </tr>

    <tr>
    <td colspan=\"2\" align=\"right\">Password:</td>
    <td colspan=\"3\">
    <input type=\"password\" name=\"text_passwort\" size=\"22\" maxlength=\"20\" value=\"\">
    </td>
    </tr>
    ";
    }
    }
    else
    // andernfals gib alles in deutsch aus
    {
    print "
    <tr>
    <td colspan=\"2\" align=\"right\">Sprache:</td>
    <td colspan=\"3\">
    <select style=\"width:159px;\" name=\"select_laender\" size=\"1\" width=\"100px\" onchange=\"Javascript:form.submit();\">
    <option selected value=\"de\"> Deutsch </option>
    <option value=\"en\"> English </option>
    </select>
    </td>
    </tr>

    <tr>
    <td colspan=\"2\" align=\"right\">Benutzer:</td>
    <td colspan=\"3\">
    <input type=\"text\" name=\"text_benutzer\" size=\"22\" maxlength=\"20\" value=\"\">
    </td>
    </tr>

    <tr>
    <td colspan=\"2\" align=\"right\">Passwort:</td>
    <td colspan=\"3\">
    <input type=\"password\" name=\"text_passwort\" size=\"22\" maxlength=\"20\" value=\"\">
    </td>
    </tr>
    ";
    }
    ?>



    MFG
    Andre


  • #2
    da fehlt doch

    <form action="xxx" method="post">
    ...
    </form>

    oder?

    Kommentar


    • #3
      http://support.microsoft.com/default...b;en-us;318380
      405 - HTTP verb used to access this page is not allowed (method not allowed.)
      Der IIS (glaube, der Apache genauso) blockt POST-Daten für statische Seiten ab.
      So wie es aussieht, ist php doch nicht vollstädnig auf dem IIS installiert worden.

      Kommentar


      • #4
        Beiträge: 1
        PS:

        Code:
            
            
            
        
        
        PHP-Code:
         /*  Hier Quellcode posten :-)  */ 

        Kommentar


        • #5
          Code:
          <!doctype html public "-//W3C//DTD HTML 4.0 //EN">
          
          
          
          <html>
          <head>
                 <title>TimeRecord</title>
          </head>
          
          <body bgcolor="#e0dfe3" text="#000000" link="#0000CC" vlink="#000066" alink="#000000"
          		style="font-family:'Times New Roman',Times,serif; font-style:normal;">
          
          	<div  style="font-family:'Times New Roman',Times,serif; font-size:1.35cm; 
          		position: absolute; left:40%; top:0% ">
          		
          		TimeRecord
          	</div>
          	
          	<div style="position: absolute; left:8px; top:25px; width:980px">                        
          			<div style="border:1px solid white ; margin-top:4%"></div>
          	</div>
          	
          <table style="position: relative; left:0px; top:80px;"
          	 		width="98%" border="5" align="center" height="430px" cellspacing="10" cellpadding="20">
          		<tr>
          		
          
          
          			
          		
          			<td width="300px">
          				<table bordercolor="#0066FF" border="0" align="center">
          					<tr>
          						<td>
          							[img]TimeRecord.jpg[/img]</img>
          						</td>
          					</tr>
          				</table>
          			</td>
          			
          
          
          		
          			
          			<td>
          			
          				
          				
          				
          			
          				<table style="position: relative; left:0px; top:0px;"
          	 				width="100%" border="0" align="center">
          			
          					
          					
          					
          			
          					<tr><td><table style="position: relative; left:0px; top:0px;"
          	 							width="100%" border="0" align="center">
          	 							
          						<tr>
          							<td colspan="3" align="center" height="5" >
          								<?php
          											if (isset($select_laender))
          											// wenn die Variable existiert dann guke nach der Sprache
          											{
          												if ($select_laender == "de")
          												// wenn de dann alles in deutsch
          												{
          													print "
          														<h1>Anmeldung</h1>	
          													";
          												}
          												else
          												// andernfals alles in englisch
          												{
          													print "
          														<h1>Appointment</h1>	
          													";
          												}											
          											}											
          											else
          											// andernfals gib alles in deutsch aus
          											{
          												print "
          													<h1>Anmeldung</h1>	
          												";	
          											}	
          										?>
          						
          							</td>
          						</tr>
          						<tr></tr>
          						<tr></tr>
          						<tr></tr>
          						<tr></tr>
          					</table></td></tr>	
          			
          					
          					
          					
          				
          					<tr><td><table style="position: relative; left:0px; top:0px;"
          	 						width="55%" border="1" rules="all" align="center" cellpadding="20" bordercolor="black">
          	 					<tr><td>		
          							<table style="position: relative; left:0px; top:0px;"
          	 								width="50%" border="0" align="center">
          	 							<Form method="POST" name="Anmeldung" action"#">
          										<?php
          											if (isset($_POST['select_laender']))
          											// wenn die Variable existiert dann guke nach der Sprache
          											{
          												if ($_POST['select_laender'] == "de")
          												// wenn de dann alles in deutsch
          												{
          													print $_POST['select_laender'];
          													print "
          														<tr>
          															<td colspan=\"2\" align=\"right\">Sprache:</td>
          															<td colspan=\"3\">
          																<select style=\"width:159px;\" name=\"select_laender\" size=\"1\" width=\"100px\" onchange=\"Javascript:form.submit();\">
          																	<option selected value=\"de\"> Deutsch </option>
          																	<option value=\"en\"> English </option>
          																</select>
          															</td>
          														</tr>
          														
          														<tr>
          															<td colspan=\"2\" align=\"right\">Benutzer:</td>
          															<td colspan=\"3\">
          																<input type=\"text\" name=\"text_benutzer\" size=\"22\" maxlength=\"20\" value=\"\">
          															</td>
          														</tr>
          			
          														<tr>
          															<td colspan=\"2\" align=\"right\">Passwort:</td>
          															<td colspan=\"3\">
          																<input type=\"password\" name=\"text_passwort\" size=\"22\" maxlength=\"20\" value=\"\">
          															</td>
          														</tr>
          													";
          												}
          												else
          												// andernfals alles in englisch
          												{
          													print "
          														<tr>
          															<td colspan=\"2\" align=\"right\">Language:</td>
          															<td colspan=\"3\">
          																<select style=\"width:159px;\" name=\"select_laender\" size=\"1\" width=\"100px\" onchange=\"Javascript:form.submit();\">
          																	<option value=\"de\"> Deutsch </option>
          																	<option selected value=\"en\"> English </option>
          																</select>
          															</td>
          														</tr>
          														
          														<tr>
          															<td colspan=\"2\" align=\"right\">User:</td>
          															<td colspan=\"3\">
          																<input type=\"text\" name=\"text_benutzer\" size=\"22\" maxlength=\"20\" value=\"\">
          															</td>
          														</tr>
          			
          														<tr>
          															<td colspan=\"2\" align=\"right\">Password:</td>
          															<td colspan=\"3\">
          																<input type=\"password\" name=\"text_passwort\" size=\"22\" maxlength=\"20\" value=\"\">
          															</td>
          														</tr>
          													";
          												}											
          											}											
          											else
          											// andernfals gib alles in deutsch aus
          											{
          												print "
          													<tr>
          														<td colspan=\"2\" align=\"right\">Sprache:</td>
          														<td colspan=\"3\">
          															<select style=\"width:159px;\" name=\"select_laender\" size=\"1\" width=\"100px\" onchange=\"Javascript:form.submit();\">
          																<option selected value=\"de\"> Deutsch </option>
          																<option value=\"en\"> English </option>
          															</select>
          														</td>
          													</tr>
          													
          													<tr>
          														<td colspan=\"2\" align=\"right\">Benutzer:</td>
          														<td colspan=\"3\">
          															<input type=\"text\" name=\"text_benutzer\" size=\"22\" maxlength=\"20\" value=\"\">
          														</td>
          													</tr>
          			
          													<tr>
          														<td colspan=\"2\" align=\"right\">Passwort:</td>
          														<td colspan=\"3\">
          															<input type=\"password\" name=\"text_passwort\" size=\"22\" maxlength=\"20\" value=\"\">
          														</td>
          													</tr>
          												";	
          											}	
          										?>	
          									<tr>
          									
          									</tr>
          			
          									<tr height="50">
          										<td></td>
          										<td></td>
          									
          										<td width="50" align="center">
          											<button type="submit" value="OK">
           												[img]apply.png[/img]
          											</button>
          										</td>
          									
          										<td width="50" align="center">
          											<button type="reset" value="RESET">
           												[img]delrec.png[/img]
          											</button>
          										</td>
          									
          										<td width="50" align="center">
          											<button value="ENDE" onClick="Javascript:window.close()">
          												
           												[img]close.png[/img]
          											</button>
          										</td>
          									
          									</tr>
          								</Form>
          								
          							</table>		
          						</td></tr>
          					</table></td></tr>
          					
          					<tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr>
          					<tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr>
          					<tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr>												
          					<tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr>	
          					<tr></tr>	
          				</table>
          				
          			</td>
          		</tr>
          	</table>
          
          </body>
          </html>

          Kommentar


          • #6
            Code:
                
                
                
            
            
            PHP-Code:
             // Hier der PHP-Code 
            , nicht die code-Tags..
            Und was zum Teufel ist
            Code:
                           <tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr>
                           <tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr>
                           <tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr>                                    
                           <tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr>   
                           <tr></tr>
            ?

            Kommentar


            • #7
              Du musst jetzt nicht unbedingt dein ganzen Quellcode hier posten, nur falls erforderlich und nur den relevanten Teil bitte im [PHP]-Tags, nicht in [code].

              Kommentar


              • #8
                Und bisher hat der Quellcode nichts mit dem Problem zu tun.
                405 method not allowed ist kein php-spezifisches Problem.

                http://www.php.net/manual/en/install.windows.iis.php
                *

                Under 'Home Directory', 'Virtual Directory', or 'Directory', do the following:
                *

                Change the Execute Permissions to 'Scripts only'
                Ist das so eingestellt?

                Kommentar


                • #9
                  hier die form mit dem php code

                  PHP-Code:
                  <?php
                  <Form method="POST" name="Anmeldung" action"#">
                                                          <?
                  php
                                                              
                  if (isset($_POST['select_laender']))
                                                              
                  // wenn die Variable existiert dann guke nach der Sprache
                                                              
                  {
                                                                  if (
                  $_POST['select_laender'] == "de")
                                                                  
                  // wenn de dann alles in deutsch
                                                                  
                  {
                                                                      print 
                  $_POST['select_laender'];
                                                                      print 
                  "
                                                                          <tr>
                                                                              <td colspan=\"2\" align=\"right\">Sprache:</td>
                                                                              <td colspan=\"3\">
                                                                                  <select style=\"width:159px;\" name=\"select_laender\" size=\"1\" width=\"100px\" onchange=\"Javascript:form.submit();\">
                                                                                      <option selected value=\"de\"> Deutsch </option>
                                                                                      <option value=\"en\"> English </option>
                                                                                  </select>
                                                                              </td>
                                                                          </tr>
                                                                          
                                                                          <tr>
                                                                              <td colspan=\"2\" align=\"right\">Benutzer:</td>
                                                                              <td colspan=\"3\">
                                                                                  <input type=\"text\" name=\"text_benutzer\" size=\"22\" maxlength=\"20\" value=\"\">
                                                                              </td>
                                                                          </tr>
                              
                                                                          <tr>
                                                                              <td colspan=\"2\" align=\"right\">Passwort:</td>
                                                                              <td colspan=\"3\">
                                                                                  <input type=\"password\" name=\"text_passwort\" size=\"22\" maxlength=\"20\" value=\"\">
                                                                              </td>
                                                                          </tr>
                                                                      "
                  ;
                                                                  }
                                                                  else
                                                                  
                  // andernfals alles in englisch
                                                                  
                  {
                                                                      print 
                  "
                                                                          <tr>
                                                                              <td colspan=\"2\" align=\"right\">Language:</td>
                                                                              <td colspan=\"3\">
                                                                                  <select style=\"width:159px;\" name=\"select_laender\" size=\"1\" width=\"100px\" onchange=\"Javascript:form.submit();\">
                                                                                      <option value=\"de\"> Deutsch </option>
                                                                                      <option selected value=\"en\"> English </option>
                                                                                  </select>
                                                                              </td>
                                                                          </tr>
                                                                          
                                                                          <tr>
                                                                              <td colspan=\"2\" align=\"right\">User:</td>
                                                                              <td colspan=\"3\">
                                                                                  <input type=\"text\" name=\"text_benutzer\" size=\"22\" maxlength=\"20\" value=\"\">
                                                                              </td>
                                                                          </tr>
                              
                                                                          <tr>
                                                                              <td colspan=\"2\" align=\"right\">Password:</td>
                                                                              <td colspan=\"3\">
                                                                                  <input type=\"password\" name=\"text_passwort\" size=\"22\" maxlength=\"20\" value=\"\">
                                                                              </td>
                                                                          </tr>
                                                                      "
                  ;
                                                                  }                                            
                                                              }                                            
                                                              else
                                                              
                  // andernfals gib alles in deutsch aus
                                                              
                  {
                                                                  print 
                  "
                                                                      <tr>
                                                                          <td colspan=\"2\" align=\"right\">Sprache:</td>
                                                                          <td colspan=\"3\">
                                                                              <select style=\"width:159px;\" name=\"select_laender\" size=\"1\" width=\"100px\" onchange=\"Javascript:form.submit();\">
                                                                                  <option selected value=\"de\"> Deutsch </option>
                                                                                  <option value=\"en\"> English </option>
                                                                              </select>
                                                                          </td>
                                                                      </tr>
                                                                      
                                                                      <tr>
                                                                          <td colspan=\"2\" align=\"right\">Benutzer:</td>
                                                                          <td colspan=\"3\">
                                                                              <input type=\"text\" name=\"text_benutzer\" size=\"22\" maxlength=\"20\" value=\"\">
                                                                          </td>
                                                                      </tr>
                              
                                                                      <tr>
                                                                          <td colspan=\"2\" align=\"right\">Passwort:</td>
                                                                          <td colspan=\"3\">
                                                                              <input type=\"password\" name=\"text_passwort\" size=\"22\" maxlength=\"20\" value=\"\">
                                                                          </td>
                                                                      </tr>
                                                                  "
                  ;    
                                                              }    
                                                          
                  ?>    
                                                      <tr>
                                                      
                                                      </tr>
                              
                                                      <tr height="50">
                                                          <td></td>
                                                          <td></td>
                                                      
                                                          <td width="50" align="center">
                                                              <button type="submit" value="OK">
                                                                   [img]apply.png[/img]
                                                              </button>
                                                          </td>
                                                      
                                                          <td width="50" align="center">
                                                              <button type="reset" value="RESET">
                                                                   [img]delrec.png[/img]
                                                              </button>
                                                          </td>
                                                      
                                                          <td width="50" align="center">
                                                              <button value="ENDE" onClick="Javascript:window.close()">
                                                                  
                                                                   [img]close.png[/img]
                                                              </button>
                                                          </td>
                                                      
                                                      </tr>
                                                  </Form>
                  ?>

                  Kommentar


                  • #10
                    woran kann es dann liegen wenn nicht an dem code. Ich habe die php exe auf windows installiert und das lief auch alles gut bis auf das er jetzt kein post nimmt

                    Kommentar


                    • #11
                      Zitat von Bruchpilot
                      http://www.php.net/manual/en/install.windows.iis.php
                      *

                      Under 'Home Directory', 'Virtual Directory', or 'Directory', do the following:
                      *

                      Change the Execute Permissions to 'Scripts only'
                      Ist das so eingestellt?

                      Kommentar


                      • #12
                        Welches windows eigentlich?

                        Kommentar


                        • #13
                          @Bruchpilot

                          << *

                          Under 'Home Directory', 'Virtual Directory', or 'Directory', do the following:
                          *

                          Change the Execute Permissions to 'Scripts only'
                          >>

                          ist so eingestellt

                          Kommentar


                          • #14
                            und welches windows, sprich: welcher IIS?

                            Kommentar


                            • #15
                              @Bruchpilot

                              Windows XP

                              Kommentar

                              Lädt...
                              X