Jump to content

Passing query to another page.


thangappan

Recommended Posts

I passed the psql query to another page using http_build_array() function.In that I have a problem to receive the query as the same what I have sent.

 

Example:

 

$query = "select  * from test where first_name ilike '%page%';";

$string = http_build_array(array('query' => $query));

echo "<script language=\"javascript\" > window.location=\"Pagination.php?$string\"  </script>";

 

In receiving end,

 

echo $_GET['query'];

It prints,

select  * from test where first_name ilike \'%page%\';

 

In this page I want to execute this query.Because of \ database tells error.

Please solve my problem.

 

 

Link to comment
https://forums.phpfreaks.com/topic/143883-passing-query-to-another-page/
Share on other sites

I'll repeat what corbin already told you. DON'T pass a query string through a URL or any other method where the user has the ability to change it. As soon as a hacker finds your site, they will read every table in your database and then they will add, change, and delete your data.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.