I need a script written to take the place of my old script which will allow me to add information to the table I use for my CMS in MySQL, then see the information, without making modifications to the PHP script. Detailed list of requirements below.
When user clicks a link containing a hash at the start (e.g. <a href="#home">Home</a>), the script will go to the table and find the entry with the unique id "home". It will take the data in row with the id "home" (which consists of title(document title) and code(html code)) and display it as follows:
title - as [url removed, login to view]
code - in a div called #content
So once again, I need to be able to get database entries and show them without having to change the PHP code. I already have the jQuery code I am using and the database is already set up, so all you need to focus on is the PHP. The jQuery that I am using and the PHP from my current setup are attached so that you can get a feel for the project and deliver what I need first go.
I WILL ONLY BE ACCEPTING PROJECTS THAT:
- Use PHP's PDO
- Have protection against MySQL injection, like using execute()
The files provided are:
[url removed, login to view] - working PHP script, but uses outdated terms and very inefficient.
[url removed, login to view] - working to an extent; loads data but only shows the row at the top of the table in my database, no matter what the # request is.
[url removed, login to view] - jQuery script which I will be using in my finished website. The only edits to this allowed are the $.ajax commands, which may be changed to suit the PHP script, but definitely not necessary and I would prefer if you did not edit this.
Also, I have to use urls such as [url removed, login to view] because I am using history.js.
Thanks, and good luck!