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: variable "übergeben"

Empfohlene Antworten

Veröffentlicht

Hi ich probier grad einige Sachen mit php aus.

Jetzt habe ich das Problem, das bei einem mysqlquery ein Leerstring in die DB geschrieben wird, obwohl ich eigentlich dachte das ich alles korrekt gemacht habe, aber irgendwo bei der Übergabe des Wertes der Variable hapert es wohl.


<?PHP

if($action == "update" )

 {

         $new_password = trim($new_password);

 	 mysql_query("UPDATE phpSP_users SET password = '$new_password'  WHERE primary_key = '$ID'");

}

?>

User: <? echo $login ?>

<br>

Level: <? echo $userLevel ?>

<br>

Password: <? echo $password ?>

<br>

New Password: <input type=text name ="new_password" value="<? echo $password ?>">

<br>

<br>


<?PHP

echo "<p><a href=$PHP_SELF>Zur Startseite - </a>";

echo "<A href=\"$PHP_SELF?new_password=$new_password&action=update\">Daten Updaten</A>";

?>

Kann mir jemand weiterhelfen?

Danke!

  • Autor

Falls es noch jemanden interessiert, so gehts besser:

<form method=post action="<?= $PHP_SELF ?>">

<input type=hidden name="action" value="update">

<input type=text name="new_password"><br><br>

<input type=submit value="Daten Updaten">

</form>

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.