|
#1
|
|||
|
|||
|
Send Query Results through a link in PHP
Hello again,
I've been doing some experimenting, and I'm trying to figure out the best way to handle displaying some results from a database query. I have a file (FILE 1) that performs a query on a database. What I want to do is transfer those results to another file (FILE 2) so they can be processed and displayed. What are my options for performing this? I was thinking the results could be transfered through the URL, but I'm not quite sure how to do that, plus, I'm not sure if its a good idea to send query results through a URL for security reasons. Would using "require()" allow me access to call that function in FILE 2? The rest of FILE 2 (it contains several functions) isn't needed. This is probably a very simple question to answer, but even as a programmer I'm just drawing a complete blank. I probably know the answer, but its escaping me. ![]() FILE 1 = PERFORMS QUERY FILE 2 = PROCESSES AND DISPLAYS QUERY RESULTS Thanks for the help! |
|
#2
|
||||
|
||||
|
Actually, only way to do it is to add conditionals all in one page to show information after the query is run. You can have one page with two completely separate displays. There is no easy way to pass query data between documents. In addition, it's an EXTREME security risk. Queries should always be in the script that displays them.
In order to help further, you need to expand on why the query is run. If it's just a form submission or something you can use hidden form fields to change the page to the data display.
__________________
Scott Moderator : Macintosh : Website & Graphics Adobe Certified Expert: Illustrator Royalty-Free Vector Stock Art |
|
#3
|
|||
|
|||
|
Quote:
And I figured it would be a very large security issue with query data. I've never done it before and it felt like common sense. Thanks again for the help! |
|
#4
|
||||
|
||||
|
It would be better to style the plug in to match the rest of the site if possible. Users would never know it's a plug in. You can easily pass the search term from any page to the search page and allow the search page to run the query and display results. And no security risks that way.
__________________
Scott Moderator : Macintosh : Website & Graphics Adobe Certified Expert: Illustrator Royalty-Free Vector Stock Art |
![]() |
| Bookmarks |
«
Previous Topic
|
Next Topic
»
| Topic Tools | |
|
|
All times are GMT +1. The time now is 11:59 AM.
[
RSS ]










