Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
added 12 characters in body
Source Link
Tom J Nowell
  • 60.6k
  • 7
  • 77
  • 147

I am trying to create a Wordpress webpage that has an input text box and a button. what I want to do is take the input text from the text box and use it as a parameter to search a table I put into the website database and print the results on the screen. I tried using PHP to no avail. what is the best to do this? here is the code Search the Film Database [php] global $wpdb; echo 'Search'; $text = sanitize_text_field($_POST['input']); echo $text; $wpdb->query('USE vcuw2938212664'); function myFunction(){ $txt = sanitize_text_field($_POST['input']); echo 'text is "$txt; $query = 'SELECT * FROM documentaries WHERE English_Title = '%Li%';'; echo $query; $results = $wpdb->get_results($query); if ($results != Null){ echo "{$results}"; } else { echo 'no results returned'; } } [/php]

Search the Film Database <input id="input" name="input" type="text" /> [php] global $wpdb; echo '<button type="button" onclick="myFunction()">Search</button>'; $text = sanitize_text_field($_POST['input']); echo $text; $wpdb->query('USE vcuw2938212664'); function myFunction(){ $txt = sanitize_text_field($_POST['input']); echo 'text is "$txt; $query = 'SELECT * FROM documentaries WHERE English_Title = \'%Li%\';'; echo $query; $results = $wpdb->get_results($query); if ($results != Null){ echo "{$results}"; } else { echo 'no results returned'; } } [/php] 

I am trying to create a Wordpress webpage that has an input text box and a button. what I want to do is take the input text from the text box and use it as a parameter to search a table I put into the website database and print the results on the screen. I tried using PHP to no avail. what is the best to do this? here is the code Search the Film Database [php] global $wpdb; echo 'Search'; $text = sanitize_text_field($_POST['input']); echo $text; $wpdb->query('USE vcuw2938212664'); function myFunction(){ $txt = sanitize_text_field($_POST['input']); echo 'text is "$txt; $query = 'SELECT * FROM documentaries WHERE English_Title = '%Li%';'; echo $query; $results = $wpdb->get_results($query); if ($results != Null){ echo "{$results}"; } else { echo 'no results returned'; } } [/php]

I am trying to create a Wordpress webpage that has an input text box and a button. what I want to do is take the input text from the text box and use it as a parameter to search a table I put into the website database and print the results on the screen. I tried using PHP to no avail. what is the best to do this? here is the code

Search the Film Database <input id="input" name="input" type="text" /> [php] global $wpdb; echo '<button type="button" onclick="myFunction()">Search</button>'; $text = sanitize_text_field($_POST['input']); echo $text; $wpdb->query('USE vcuw2938212664'); function myFunction(){ $txt = sanitize_text_field($_POST['input']); echo 'text is "$txt; $query = 'SELECT * FROM documentaries WHERE English_Title = \'%Li%\';'; echo $query; $results = $wpdb->get_results($query); if ($results != Null){ echo "{$results}"; } else { echo 'no results returned'; } } [/php] 
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
added 577 characters in body
Source Link

I am trying to create a Wordpress webpage that has an input text box and a button. what I want to do is take the input text from the text box and use it as a parameter to search a table I put into the website database and print the results on the screen. I tried using PHP to no avail. what is the best to do this? here is the code Search the Film Database [php] global $wpdb; echo 'Search'; $text = sanitize_text_field($_POST['input']); echo $text; $wpdb->query('USE vcuw2938212664'); function myFunction(){ $txt = sanitize_text_field($_POST['input']); echo 'text is "$txt; $query = 'SELECT * FROM documentaries WHERE English_Title = '%Li%';'; echo $query; $results = $wpdb->get_results($query); if ($results != Null){ echo "{$results}"; } else { echo 'no results returned'; } } [/php]

I am trying to create a Wordpress webpage that has an input text box and a button. what I want to do is take the input text from the text box and use it as a parameter to search a table I put into the website database and print the results on the screen. I tried using PHP to no avail. what is the best to do this?

I am trying to create a Wordpress webpage that has an input text box and a button. what I want to do is take the input text from the text box and use it as a parameter to search a table I put into the website database and print the results on the screen. I tried using PHP to no avail. what is the best to do this? here is the code Search the Film Database [php] global $wpdb; echo 'Search'; $text = sanitize_text_field($_POST['input']); echo $text; $wpdb->query('USE vcuw2938212664'); function myFunction(){ $txt = sanitize_text_field($_POST['input']); echo 'text is "$txt; $query = 'SELECT * FROM documentaries WHERE English_Title = '%Li%';'; echo $query; $results = $wpdb->get_results($query); if ($results != Null){ echo "{$results}"; } else { echo 'no results returned'; } } [/php]

Source Link

SQL Query Search page

I am trying to create a Wordpress webpage that has an input text box and a button. what I want to do is take the input text from the text box and use it as a parameter to search a table I put into the website database and print the results on the screen. I tried using PHP to no avail. what is the best to do this?