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
post Jun 9 2020, 10:54 PM
Post #1

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

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:
$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);
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);
echo "";

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

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

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


- Lo-Fi Version Time is now: 4th August 2020 - 12:17 AM