Sorry for my spelling... Im trying to print a list of internets forfeit from my database and then when I click on the hyperlink, it send the id of the forfeit to the page.I have tried to put the id in a hidden value but nothing works, im truck there...PHP: Erstellen Sie ein Formular und senden Sie es mit <a href
include_once "DataBase/db.php";
if($internet->num_rows != 0){
while($rows = $internet->fetch_assoc()){
$nom = $rows["nom"];
$id = $rows["id"];
$tech = $rows["technologie"];
$telechargement = $rows["telechargement"];
$televersement = $rows["televersement"];
$utilisation = $rows["utilisation"];
$prix= $rows["prix"];
echo '
<form name="form2" method="POST" action="Fournisseurs/Videotron.php">
<div class="boxes">
<div class="[ price-option price-option--high ]">
<div class="price-option__detail">
<span class="price-option__cost">'.$nom.'<br>$'.$prix.'</span>
</div>
**<input type="hidden" name="id" value="'.$id.'"></input>
<a href="Fournisseurs/Videotron.php" onclick="document.forms["form2"].submit(); class="price-option__purchase">Voir</a>**
</div>
</div>
</form>';
}
}
then on the second page, i would take the forfeit id to get the rest of data... if its not clear, you guys can see what im talking about here : http://fournisseursquebec.com/Forfaits.php dann wählen Sie Internet ... Vielen Dank!
Können Sie nicht nur mit CSS ein Submit-Button, um Stil der gleiche wie der '' Link schauen Sie jetzt verwenden? Auf diese Weise können Sie das Formular normalerweise ohne Javascript senden. Außerdem müssen Sie die Eingabe nicht schließen, indem Sie '' verwenden. Fügen Sie einfach '/>' am Ende des offenen '' Tags hinzu. – Rasclatt
Auch Ihr 'onclick' inline Javascript hat kein nahes Zitat – Rasclatt
Schließlich wird dieser Teil' document.forms ["form2"] 'der Inline-js mit Ihrem' onclick = "' kollidieren. Sie müssen diesen entkommen. – Rasclatt