Autor Beitrag
csigg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: So 31.07.05 13:11 
Wie kann ich bei PHP über einen Link mehrere Parameter übergeben??
Als mit einem komm ich nicht zurecht index.php?$name=test, aber wie trenn ich den nächsten parameter??
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: So 31.07.05 13:13 
AFAIK mit einem &

z.B. (absichtlich keine URL-Tags) http://www.delphi-forum.de/posting.php?mode=editpost&p=277858

AXMD
csigg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: So 31.07.05 13:38 
Danke, klappt wunderbar.
Allerdings hab ich jetzt bei folgender Zeile ein Problem:
ausblenden Quelltext
1:
<img src=\"galerie/$name/Thumb_$name_$i.jpg \">					

Angenommen $name = test und $i = 1

Dabei wird das $name nach dem Thumb und das $i einfach weggelassen, also die URL ist im Moment galerie/test/Thumb_.jpg

Es sollte am Schluss rauskommen:
galerie/test/Thumb_test_1.jpg

Wie mach ich das??
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: So 31.07.05 13:50 
Was benutzt du denn für Zeichen außenrum? Ein ' oder ein "?

ausblenden Quelltext
1:
echo ('<img src=\"galerie/$name/Thumb_'.$name.'_'.$i.'.jpg \">');					

Das bringt auf jeden Fall das Ergebnis, das du haben möchtest. ;)
SMO
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 120
Erhaltene Danke: 18


D2005 Personal
BeitragVerfasst: So 31.07.05 13:51 
Der PHP Parser erkennt nicht "$name" in "Thumb_$name_$i.jpg", weil die Variable nicht richtig abgegrenzt ist. Er sieht stattdessen "$name_". Mit dem $i wird es wohl ähnlich sein. Probiere es mal so: "Thumb_{$name}_{$i}.jpg" oder so: "Thumb_${name}_${i}.jpg".
Mein PHP ist schon etwas eingerostet, aber wenn ich mich recht erinnere, funktioniert beides.