• Resolved overdog1981

    (@overdog1981)


    I woulid like to have an input form aka search form
    and show the results from the submitted search can I use sql reports to make this happen how can I post to the sql query and display results

    <form action=”what goes here to call the sql query I built in query builder ” method=”post”></form>

    Thank you very much great plugin !

    http://wordpress.org/extend/plugins/elisqlreports/

Viewing 1 replies (of 1 total)
  • Plugin Author Eli

    (@scheeeli)

    You can accomplish this by utilizing global variables in your SQL Report. Just insert the $_POST[x] variable you want to use, wrapped in PHP brackets, into the appropriate place in your query (but don’t use quotes in the element index or it will not work). An example might look something like this:
    SELECT * FROM table WHERE fieldname = '<?php $_POST[formvariable] ?>'

    A query like this may not return the desired results unless the requested variable is posted to the page. You may want to use the global $_REQUEST variable instead of $_POST because then it would accept values from the QUERY_STRING too.

    These global variable are automatically escaped using mysql_real_escape_string to prevent SQL injection attacks.

    Please let me know if this was helpful or not, and feel free to contact me directly if you would like more help with your specific query. My email address is: wordpress at ieonly dot com

    Aloha, Eli

Viewing 1 replies (of 1 total)
  • The topic ‘Can I post to a report and get results to display ?’ is closed to new replies.