View question

A customer form with customer entry?

i have a form on customer details which contains the field of (id,name,phone,email,address) so when i  fill the form and give submit ,I should insert the customer details into database and simultaneously i have to fetch the data and display in my page...

$sql5 = "SELECT *FROM  customer
                ";
            $result = mysqli_query($conn, $sql5);    
            
            if (mysqli_num_rows($result) >0)
            
            {
                // output data of each row
                while($row = mysqli_fetch_assoc($result)) {
                echo "id: " . $row['id']. " - Name: " . $row["name"]. "<br>".
                "phone:" . $row['phone']. " <br>".
                "email:" . $row['email']. " <br>".
                "address:" . $row['address']. "<br>".
                "state:" . $row['state']. "
                <br>"."city:" . $row['city']. "
                <br>"."pincode:" . $row['pincode']. "
                <br>"."<br>";
                }
                } else {
                echo "0 results";
                }

The above are the codes which i have used for selecting data , fro the above code i m getting all the rows are displayed in my page , but i need only one customer detail which i am latestly submiting in my form.

so how can i change my selecting codes




Asked On2017-05-16 17:29:26 by:PerumalS

Taged users:


Likes:
Be first to like this question

Dislikes:
Be first to dislike this question
  Like  Dislike

Comments


Type your comment here