Create a general php page that allows the user to retrieve html fragments from mysql stored procedures. ? The stored procedure, along with any arguments are supplied on the URL. ? The php page simply calls the stored procedure and dumps any html received as a concatenated stream.
## Deliverables
Provide single php page that takes one or more arguments in the following format
[login to view URL]
The php page responds by parsing the URL and calls a stored procedure named "sp_myproc" with the arguments and a userID (hardcode the userid as 55555 for now)
In other words, append sp_ to the beginning of the procedure name and send the arguments with userID first:
sp_myproc 55555, arg1, arg2, arg3...
The results are returned from the mysql database as a static dataset with 1 or more records, with fieldnames that begin with "title" or "html"
For example the stored procedure might contain
SELECT?
? ? ? ? html1= "Hello World",
? ? ? ? html2= "<p>This is my first argument: " + @arg1
? ? ? ? html3= "<p>Second argument: " + @arg2
? ? ? ? html4 = "<p>This is from the table" + myfield
? ? ? ?
? ? FROM mytesttable where userid=@userid and testid=@arg1
Keep in mind that the stored procedure might return multiple rows. ? Simply concatenate all of the html fields together. ?
The job of the php page is to simply display as a webpage
"Hello World<p>This is my first argument: 17<p>Second argument: 22<p>this is from the table: mydata"
So your php result will simply look something like
...Header stuff...
<title>This is a Test page</title>
<body>
*********DUMP CONCATENATED HTML HERE*********
</body>