The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> 2 query in the same page, I need to place 2 query and a get method + a post method in the same p
NiceGuy
post Jun 9 2020, 10:54 PM
Post #1





Group: Members
Posts: 1
Joined: 9-June 20
Member No.: 27,393



Hi,
i'm having some problems with my page, it has to permit the users to modify some data.
I this page i need to recive ( i'm using a get method) a name of a person.
With that name and a query i show all the person data.

The problem is that, in the same page, you have to compile some text box and than use a submit boutton to make another query modify the data on the database.
['m using sql for the database]

I've no idea how to deal with that.

First query:
<?php
$conn = miaConnect();
$codiceF = $_GET["codiceF"];
$query = " select *"
." from Account a"
. " join Utente u on u.nomeUtente = a.FK_nomeUtente"
." where a.codiceFiscale = '$codiceF'";
$res = mysqli_query($conn,$query);
if(!$res){
die("Impossibile eseguire listruzione DML...");
}
$row = mysqli_fetch_assoc($res);
?>

Table + submit:
<table class="datiDipendenti" style="width:100%">
<form action = "modifica.php" method="POST">
<tr class="d0">
<th class="dipendenti">NOME</th>
<?php echo"<td class='dipendenti'>".$row["nome"]."</td>";?>
<td class="dipendenti"><input type="text" name="nome" value="<?php
if (isset ($row["nome"])){
$nome =$row["nome"];
echo ($nome);
}else{
echo "";
}
?>"/></td>
</table>

Ty so much 4 the help!
</tr>
<tr>
<td><input type = "submit" value ="Modifica" /></td>
<td>&emsp;<input type = "reset" value ="Reset" /></td>
</tr>
</form>

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 19th March 2024 - 12:48 AM