Title: using POST parameters in SQL
Last modified: August 30, 2016

---

# using POST parameters in SQL

 *  [PJAlagna](https://wordpress.org/support/users/pjalagna/)
 * (@pjalagna)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/using-post-parameters-in-sql/)
 * I have a sub-type/super-type set of tables
 * CUSTOMER ( id, name , type )
    where the type attribute is a data switch into 
   3 subordinate tables
 * CNonProfit ( id, 501c3Status, … )
 * CCompany (id, owner … )
 * CPerson (id, wifesName … )
 * I want to select by name from the master table (CUSTOMER) and depending on the
   retrieved type go to 1 of 3 different pages to display that id’s information.
   
   so.. in the second page (CPerson) i’m going to need the retrieved type and the
   id – how do i pass them from the first (CUSTOMER) page?
 * [https://wordpress.org/plugins/abase/](https://wordpress.org/plugins/abase/)

Viewing 1 replies (of 1 total)

 *  [gerarddijkstra](https://wordpress.org/support/users/gerarddijkstra/)
 * (@gerarddijkstra)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/using-post-parameters-in-sql/#post-6636312)
 * Maybe this will help you… you need the [insert_php] plugin installed.
    I had 
   the same problem with resubmitting the $_POST array from a form to a new page.
   This small code in your page to will reconstruct your $_POST data in the variable
   $postvals. With some adjustements you could solve your problem… and sorry for
   the ugly indent:
 * [insert_php]
    $postvals=”;$thv=’ type=’.'”hidden”‘.’ value=’; foreach ($_POST
   as $key=>$values){ if(is_array($values)){ $iv=0; foreach ($values as $value){
   $postvals.='<inputname=’.'”‘.$key.'[‘.$iv.’]’.'”‘.$thv.'”‘.$value.'”‘.’>’; $iv
   +=1; }; }else{ $postvals.='<input name=’.'”‘.$key.'”‘.$thv.'”‘.$values.'”‘.’>’;};};
   echo $postvals; [/insert_php]

Viewing 1 replies (of 1 total)

The topic ‘using POST parameters in SQL’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/abase.svg)
 * [ABASE](https://wordpress.org/plugins/abase/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/abase/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/abase/)
 * [Active Topics](https://wordpress.org/support/plugin/abase/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/abase/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/abase/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [gerarddijkstra](https://wordpress.org/support/users/gerarddijkstra/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/using-post-parameters-in-sql/#post-6636312)
 * Status: not resolved