Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
added 2 characters in body
Source Link
Rasclatt
  • 12.5k
  • 3
  • 28
  • 33
<a href="edit_confirm.php?id=<?echo $row['cd_id'];?>" type="submit" class="btn btn-primary">Update Record</a> 

This is not the proper way to submit a form - it won't work at all.

You need to have a form opening and closing tag, the target address is in the action attribute of the form element, and the method is on there too and should be post for this form (method="POST"method="POST"). In your code you have a link where you should have a submit input so it won't submit the data, it will just redirect you to that URL. You should have something like this:

<input type="submit" value="Update Record" /> 

http://www.w3schools.com/html/html_forms.asp

<a href="edit_confirm.php?id=<?echo $row['cd_id'];?>" type="submit" class="btn btn-primary">Update Record</a> 

This is not the proper way to submit a form - it won't work at all.

You need to have a form opening and closing tag, the target address is in the action attribute of the form element, and the method is on there too and should be post for this form (method="POST"). In your code you have a link where you should have a submit input so it won't submit the data, it will just redirect you to that URL. You should have something like this:

<input type="submit" value="Update Record" /> 

http://www.w3schools.com/html/html_forms.asp

<a href="edit_confirm.php?id=<?echo $row['cd_id'];?>" type="submit" class="btn btn-primary">Update Record</a> 

This is not the proper way to submit a form - it won't work at all.

You need to have a form opening and closing tag, the target address is in the action attribute of the form element, and the method is on there too and should be post for this form (method="POST"). In your code you have a link where you should have a submit input so it won't submit the data, it will just redirect you to that URL. You should have something like this:

<input type="submit" value="Update Record" /> 

http://www.w3schools.com/html/html_forms.asp

Source Link
Octo
  • 129
  • 4

<a href="edit_confirm.php?id=<?echo $row['cd_id'];?>" type="submit" class="btn btn-primary">Update Record</a> 

This is not the proper way to submit a form - it won't work at all.

You need to have a form opening and closing tag, the target address is in the action attribute of the form element, and the method is on there too and should be post for this form (method="POST"). In your code you have a link where you should have a submit input so it won't submit the data, it will just redirect you to that URL. You should have something like this:

<input type="submit" value="Update Record" /> 

http://www.w3schools.com/html/html_forms.asp