this is my first post on this forum - it'll probably be the first of many ;)
I'm in my final year at uni, and I have a piece of coursework which requires me to set up and query a MySQL database using php. I have an HTML page which allows the user to either add or update an existing field, depending on whether or not it already exists, which calls a pretty simple php script. I won't go into the coding because there's no problem with that.
The problem is the retrieve part - I can retrieve the fields, but I am supposed to be doing this with another HTML file with an embedded php script (the coursework spec is very specific on this point). Currently, the retrieve is a php script with embedded HTML to format the page correctly. (which doesn't satisfy the criteria of the coursework, but does function correctly.)
What I need to be able to do is run an embedded php script when the 'submit' button is pressed (when the php will query the MySQL database based on the unique key.) The problem is, I can't seem to get the command $PHP_SELF working ( I read on a site somewhere that this should call any embedded php in the current HTML file.) - If I could get this working, my problem would be solved.
Essentially, all I want to know, is what is the correct syntax for calling an embedded php script in this way - is $PHP_SELF the command I should be using, or is there another way of doing it?
I would be very grateful if someone could give me the line I would need to use in HTML.
If I need to give you the code, I can, I was just hoping that this wouldn't be necessary since this is probably a pretty elementary problem.
Any help appreciated.