Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

PHP-Übergabe in MySQL-DB

Empfohlene Antworten

Veröffentlicht

sers leute!

zwar ein bissl beschämend, aber ich kriege das einfach nicht hin.... mein problem ist, dass die einträge der textfelder einfach nicht in die DB eingetragen werden, bzw. auch gar nicht übergeben werden?

kann jemand den fehler sehen???

danke & gruß

oscha


<?php

if ($submit)
{
include 'dbconnect.inc.php';
$sql = "INSERT INTO meldungen (betreff,meldung,standort,) VALUES ('$betreff','$meldung','$standort')";
$eintragen = mysql_query($sql);

echo "<meta http-equiv=\"refresh\" content=\0; URL=index.php\">";
mysql_close($verbindung);
}


$betreff = $HTTP_POST_VARS["betreff"];
$meldung = $HTTP_POST_VARS["meldung"];
$standort = $HTTP_POST_VARS["standort"];
?>


<center>
<form action="<?php echo $PHP_SELF; ?>" method="post">
<table border="0" width="550">
<input type="hidden" name="senden" value="1">
<tr>
<td><b>Betreff:</b></td>
<td colspan="2"><input name="betreff" size="70"></td>
</tr>
<tr>
<td><b>Meldung:</b></td>
<td colspan="2"><textarea name="meldung" rows="13" cols="55"></textarea></td>
</tr>
<tr>
<td><b>Standort:</b</td>
<td colspan="2"><input name="standort" size="20"></td>
</tr>
<tr>
<td colspan="2" align="center"><br><br><input type="submit" name="submit" value="Hinzufügen">  <input type="reset" value="Löschen"></td>
</tr>
</table>
</form>

</center>

</body>
</html>
[/PHP]

was mich stutzt ist folgendes:

im compilierten quelltext steht beim form action nicht drin (<form action="" ). ist da vielleicht etwas falsch???

hat sich erledigt....

hatte register_globals = Off stehen :/

Was auch vollkommen richtig ist, wieso greifst du nicht im select aufs $_POST Array zu?

Gruß Jaraz

inwiefern??


$betreff = $HTTP_POST_VARS["betreff"];
$meldung = $HTTP_POST_VARS["meldung"];
$standort = $HTTP_POST_VARS["standort"];
[/PHP]

kannst du auch so schreiben

[PHP]
$betreff = $_POST["betreff"];
$meldung = $_POST["meldung"];
$standort = $_POST["standort"];

und damit wieder register_globals = Off setzen :)

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.