Learning my first php search form, be gentle!
I'm looking to fill the 'value' with the number input on the search form. Everything I have tried either breaks the page or has no effect.
I'm trying to input my $input_price into the value part of my argument.
Here is my search form
<form method="post" action="http://mysite/searchresults">
<fieldset>
<!-- TEXT INPUT SELECTION -->
<input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />
<!-- END TEXT INPUT SELECTION -->
<input type="text" name="input_price"/>
<input type="submit" id="searchsubmit" value="Search" />
</fieldset>
</form>
And here is the receiving page
<?php
$args['meta_query'][] = array(
'key' => 'price',
'value' => '($input_price)',
'type' => 'numeric',
'compare' => '<=',
'order' => 'DSC'
);
$the_query = new WP_Query( $args );
?>
<?php if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<h1><?php the_title() ;?></h1>
<?php the_excerpt(); ?>
<?php endwhile; else: ?>
<p>Sorry, there are no posts to display</p>
<?php endif; ?>
Thanks!