Clicking the button does not refresh the page and records the row data of the button into the database.
默年
默年 2020-04-24 10:41:44
0
2
1056

QQ截图20200413113719.png

##$sql = "SELECT * FROM student";$result=mysqli_query($conn,$sql);if(!$ result){ die('Unable to read data:'.mysqli_error($conn));}echo '';echo '';echo '';echo '';echo '';while($row = mysqli_fetch_array($result)){ echo '' ; echo'';}echo '';echo '

Class Information Table

Student NumberName< /th>PasswordGenderCollegeProfessional ClassOperation< ;/th>Status
'.$row['stu_id'].' '.$row['username'].'  ;'.$row['password'].' '.$row['sex'].'  '.$row[ 'academy'].' '.$row['major_class'].' & #12288
';

How can I click a button to record the data of the row where the button is located into the database without refreshing the page? I am a novice and I am not good at learning. This is my graduation project and I lack this function. There are two days left for the defense. Can anyone please help me? Based on my code, help me write the code to implement this function. Many thanks! We can help for a fee!

默年
默年

reply all (2)
!

I don’t understand what you mean. Isn’t this data displayed from the data path? Why do you need to click the button to get the data of the row into the database?

Or do you want to modify the data? Then update the data? If so, then use ajax to submit, get the id and data of the row, and then modify the data according to the id! I don’t know if you understand what I say, you can take a look at Baidu

    凉官灰

    You can use Ajax in JS

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!