0 votes
in SoSci Survey (dt.) by s109993 (10.3k points)

Ich will zwei PDF Verlinken die sich ändern auf Basis der Seriennummer. Das sollte eigentlich relativ einfach sein, aber ich habe irgendwo einen Denk- oder Codefehler. Vielleicht kann jemand da kurz drüberschauen. Der Text/Code ist in einem Textbaustein mit der Formatierung "html Code" abgespeichert.

<?php
$bw = 'PerFair_HE_MZP1_Begleitschreiben_EFB_BW_eng_anIEA.pdf';
$sa = 'PerFair_HE_MZP1_Begleitschreiben_EFB_SN_eng_anIEA.pdf';

$t =caseSerial();
$t2 =  substr($t, 0, 2);
?>

Participation in the survey is voluntary.<br><br> 
We need your consent to process your data within the context of the PerFair Study.<br><br> 
Before you give your consent, please read the <a href="<?php if ($t2 == '21') {text('$sa');} if ($t2 == '23') {text('$bw');} ?>" target="_blank"><b>information letter</b></a>, which also includes <b>Notes on Data Protection</b>.

1 Answer

0 votes
by SoSci Survey (305k points)
selected by s109993
 
Best answer

Der Text/Code ist in einem Textbaustein mit der Formatierung "html Code" abgespeichert.

Das wird nicht funktionieren. Bitte folgenden Sie dieser Anleitung:
Einführung in PHP-Code

Damit Sie den passenden Dateinamen in den HTML-Ausgabe bekommen, verwenden Sie am besten Platzhalter.

Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen


Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question

...