Input and display data from database mysqli using php | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Input and display data from database mysqli using php

How to input data into database then auto display the inputted data to different page after submit button clicked on prev page ? I need codes guidance in php tyvm.

11th Dec 2018, 2:14 PM
Nazhyff Mustoffa
Nazhyff Mustoffa - avatar
1 Answer
0
Create the "next page" first with SELECT query, to read the data from db and put it in place you wanted to Now you have to create a new php file to process the input, use this http://php.net/manual/en/mysqli.quickstart.prepared-statements.php (i recommend this than query() because its less vurnerable to sql injection) there's an example in there for INSERT, after the process done redirect the page to "next page" you've created before. Because the database is now updated, that page will also show the updated data
11th Dec 2018, 3:48 PM
Taste
Taste - avatar