close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Creating queries

Thread began 2/18/2020 7:38 pm by balexander389215 | Last modified 3/16/2020 12:18 pm by balexander389215 | 2066 views | 20 replies

balexander389215

i am still trying to figure out how to allow users to select the State to create the query. Doing a lot of research I can't find a way to include a variable from the form submit in the Recordset that would allow for a dynamic query. Perhaps it would work better if did the the query in PHP rather than a Record set. I created a simple only allowing for a state dropdown.

<div id="RichRegistration_NewFromBlank_Default_ProgressWrapper">
<form class="NewFromBlank_Default" id="RichRegistration_NewFromBlank_Default" name="RichRegistration_NewFromBlank_Default" method="post" action="">
<!--
WebAssist CSS Form Builder - Form v1
CC: Registration
CP: Rich Registration
TC: <New From Blank>
TP: Default
-->
<fieldset class="NewFromBlank_Default" id="Registration">
<legend class="groupHeader"></legend> <span class="buttonFieldGroup" >
<input class="formButton" name="RichRegistration_submit" type="submit" id="RichRegistration_submit" value="Enter" undefined title="Please enter a value">
</span>
<span class="fieldsetDescription"> </span>
<div class="lineGroup">
<label for="State" class="sublabel" > State:</label>
<select class="formMenufield_Medium" name="State" id="State" rel="<?php echo((isset($_GET["invalid"])?ValidatedField("state","State"):"")); ?>"undefined title="Please enter a value">
<option value="" <?php if (!(strcmp("", (isset($_GET["invalid"])?ValidatedField("state","State"):"")))) {echo "selected=\"selected\"";} ?>>Select a State</option>
<option value=" " <?php if (!(strcmp(" ", (isset($_GET["invalid"])?ValidatedField("state","State"):"")))) {echo "selected=\"selected\"";} ?>>N/A</option>
<option value="AL" <?php

.....

<option value="WI" <?php if (!(strcmp("WI", (isset($_GET["invalid"])?ValidatedField("state","State"):"")))) {echo "selected=\"selected\"";} ?>>Wisconsin</option>
<option value="WY" <?php if (!(strcmp("WY", (isset($_GET["invalid"])?ValidatedField("state","State"):"")))) {echo "selected=\"selected\"";} ?>>Wyoming</option>
</select>
</div>

</fieldset>
</form>
</div>
<div id="RichRegistration_NewFromBlank_Default_ProgressMessageWrapper" class="blockUIOverlay" style="display:none;">
<script type="text/javascript">
WADFP_SetProgressToForm('RichRegistration_NewFromBlank_Default', 'RichRegistration_NewFromBlank_Default_ProgressMessageWrapper', WADFP_Theme_Options['BigSpin:CaboSunset']);
</script>
<div id="RichRegistration_NewFromBlank_Default_ProgressMessage" >
<p style="margin:10px; padding:5px;" ><img src="webassist/progress_bar/images/cabo-largespin.gif" alt="" title="" style="vertical-align:middle;" />&nbsp;&nbsp;Please wait</p>
</div>


Whether it is done in PHP or the record set I have the same question, what do I put in the select statement that would allow the query to use the State selected from form submit?


$sql = "SELECT * FROM venue WHERE Country = 'USA' and state = (what do I put in here that would indicate the state selected from submit from the form?) ORDER BY City ASC limit $row,".$rowperpage;

Thanks

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...