Hello I have many inputs radiobutton
but i don't need to send them all to my insert php. How can I choose some input and send it to another page with one button ?
MY code is very long
something like this x7
This is my autocomplete page
<!-- fonction doubler la rangꥠdu dimanche -->
<div >
<form method="post" >
<div id="itemRows">
<?php
if ($result != false && mysqli_num_rows($result) > 0) {
while ($product = mysqli_fetch_array($result)):
?>
<p id="oldRow<?= $product['id'] ?>"> <input type="text" name="client1<?= $product['id'] ?>" size="4" value="<?= $product['client1'] ?>" /> <input type="text" name="name<?= $product['id'] ?>" value="<?= $product['name'] ?>" /> </p>
<?php
endwhile;
}
?>
</div>
</form>
</div>
</td>
<!-- client du dimanche -->
<td>
<span id="proclient">
<input type="text" name="client1" size="12" class = "client1" id ="client1" disabled />
</span>
</td>
<!-- description du projet de dimanche -->
<td>
<span id="prodesc">
<input type="text" name="desc1" size="30" id ="desc1" class "desc" disabled />
</span>
</td>
<!-- ddescription de la tache du dimanche -->
<td>
<span id="protache">
<textarea rows="1" cols="20" name="taskDesc1" id ="task1" class "task"> </textarea>
</span>
</td>
<!-- lieu pour dimanche -->
<td>
<span id="prolieu">
<input type="text" name="prolieu1" size="10" id ="lieu1" class "lieu">
</span>
</td>
<!-- tache -->
<td>
<span id="tache">
<!-- <input type="text" name="tache" size="30" id="tache"class= "tache" /> -->
<!-- dꣵt section combobox tache avec tool tip -->
<label title="Select your state"> <select title="Select your state" id="state" name="state">
<?php
$stmt->execute();
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
echo ' <option title="';
echo $row['tacName'];
echo '">';
echo $row['tacId'];
echo '</option>' . "\n";
$task = array();
}
?>
</select>
</label>
<!-- Fin section cobobox tache avec tool tip -->
</span>
</td>
<!-- calculter le temps pour le diamnche -->
<td>
<span id="calculTemps">
<input type="number" id="input1" class="temps" name="tempsdi" size="10" min="0" max="24" value="0"/><br/>
</span>
</td>
<br>
like I said i don' need to send all value of the input, how do I choose the one I need?
EDIT Here is theinsert php, I want to take some VAR from my autocomplete cause I will insert them to the database afterwards.
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
<LINK rel=stylesheet type="text/css" href="main.css">
<?php
session_start();
$client1 = $_POST['client1'] ;
// Connect to the DB
$link = mysqli_connect("localhost","root","","cruel") or die("Error " . mysqli_error($link));
// adding new recherche
if(!empty($_POST['name']))
{
foreach($_POST['name'] as $name)
{
// THIS IS NOTÉ FINISH MY INSERT AND NEED TO BE MODIFY LATER
$sql = "INSERT INTO recherche (name) VALUES ('".mysqli_real_escape_string($link,$name)."')";
$link->query($sql);
}
}
$date = $_POST['data'] ;
echo($client1);
echo($date);
?>