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.

GET ohne Formular

Empfohlene Antworten

Veröffentlicht

Hallo,

kann ich einfach ohne das ich ein Formular dafür habe an einen Link einen GET-Parameter anhängen und diesen verwerten.

Mein Link lautet etwa so

http://localhost/meineDatei.php

Meine Überlegung war, dass ich den Link so aufrufe

http://localhost/meineDatei.php?variable=1

Dann wollte ich in die die das verarbeiten mit

$variable=$_GET('variable');

Ist sowas möglich?

sicher ist sowas möglich, aber da wirst um JavaScript nicht drum rumm kommen, wenn das ganze ohne Formular gehen soll.

Warum nicht einfach mit Formular?

Gruß,

Markus

Ja klappt

zu Kills warum sollte das nich Funktionieren ^^ ;)

aber so ist es richtig:

$variable=$_GET['variable'];

 $variable=isset($_GET['variable']) ? $_GET['variable'] : '';

so ist es besser, denn wenn nichts gesendet wurde ( Fehler oder sonstiges)

bringt PHP keinen Fehler, denn ihr wurde der Wert 0 zugewiesen

Ja klappt

zu Kills warum sollte das nich Funktionieren ^^ ;)

aber so ist es richtig:

$variable=$_GET['variable'];

 $variable=isset($_GET['variable']) ? $_GET['variable'] : '';

so ist es besser, denn wenn nichts gesendet wurde ( Fehler oder sonstiges)

bringt PHP keinen Fehler, denn ihr wurde der Wert 0 zugewiesen

Oh, meine Syntax :floet:

Danke

Bitte schön :)

Ja klappt

zu Kills warum sollte das nich Funktionieren ^^ ;)

Ich hab die Frage falsch gelesen.

Ich dachte er will die variable aus einem Formularfeld an den Link anhängen.

Aber er wollte ja bloß ein ganz normales GET Request absetzen..... :rolleyes:

Gruß,

Markus

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.