I did not get what you meant by "if i put the code in the history still no message box displays."
Actually what should be done is,
-> If your action file is the same as form containing file, you have to do message displaying in the same file
-> If your action file is a separate file and after completing the database accessing it not redirecting to some other view you have to display the message in the action file.
-> If your action file is a separate file and after completing the database accessing it is redirecting to some other view, you have to pass a GET parameter to identify the status(Succeeded or Not) of the database action.
actually ignore that i am going to change what i want to do on the save button.
My layout.php form has many buttons it and a current date field, which all have a unique id/name. when the button is clicked it uses the id and date on the new.php, so when the record is saved it is saved relating to the id and date and other fields are filled in.
the save button takes the user back to layout.php and i want the button to change colour when the record is saved, it would need to use both button id and date because the user might not get all data entered in one day, therfore would have to go back to a particular date to see which buttons where done, as they would display a different colour.
As I understood your layout.php gets populated from the saved data, right? So when you are repopulating just after saving, I think you can perform a conditional check to see which data has been already entered and change the color of the relevant button by adding a css class to that button. Hope I understood your explanation correctly.
root = tkinter.Tk()
buttons=[i for i in range(10)]
#If specific button is pressed, output "YES"
for num in buttons: