HTML とページにサイトがあり、訪問者を dj のプロファイルに移動するためのボタンがあります。
各ボタンは、訪問者を別の dj プロファイルに移動します。DJ の情報を取得する XML ドキュメントに移動する html でページを作成します。それで、私の質問は、どうすれば php ページのリンクに dj の名前を追加して、彼が個人的なリンクにとどまることができるかということです。
プロパティの取得を試みましたが、PHP がその dj の情報を取得するには、投稿も必要です。
djspace.html ページの html には次のものがあります。
<form name="form" id="form" method="post" action="allProfiles.php">
<input type="submit" name="dj_name" value="Blowdrop"/>
</form>
...
<form name="form" id="form" method="post" action="allProfiles.php">
<input type="submit" name="dj_name" value="Psychokiller"/>
</form>
そして、私の allprofiles.php ページ:
<?php
$counter = 0;
$dj_name = ($_POST['dj_name']);
$xml = simplexml_load_file("Profiles.xml");
foreach ($xml as $newprofile){
if($xml->newprofile[$counter]->Anome == $dj_name){
$Anome = $xml->newprofile[$counter]->Anome;
$nacionalidade = $xml->newprofile[$counter]->nacionalidade;
$naturalidade = $xml->newprofile[$counter]->naturalidade;
$residencia = $xml->newprofile[$counter]->residencia;
$emprego = $xml->newprofile[$counter]->emprego;
$generos = $xml->newprofile[$counter]->generos;
$disponibilidade = $xml->newprofile[$counter]->disponibilidade;
$partilha = $xml->newprofile[$counter]->partilha;
$sitios = $xml->newprofile[$counter]->sitios;
$tempo = $xml->newprofile[$counter]->tempo;
$editora = $xml->newprofile[$counter]->editora;
$promotora = $xml->newprofile[$counter]->promotora;
$influencias = $xml->newprofile[$counter]->influencias;
$fblink = $xml->newprofile[$counter]->fb;
$scloud = $xml->newprofile[$counter]->scloud;
$mail = $xml->newprofile[$counter]->email;
$img = $xml->newprofile[$counter]->foto;
}
$counter = $counter + 1;
}
?>
すべての情報を取得できますが、get を適用すると取得できません。
明らかに、php ページに直接アクセスすると、何も情報が得られません。 http://roundhillevents.com/allProfiles.php
ただし、このリンクに移動し、次に dj's、dj space をクリックして、情報を表示したいものをクリックしてください。