close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Search menu initial value is not working

Thread began 9/14/2015 12:45 pm by jo271221 | Last modified 9/22/2015 3:12 pm by Ray Borduin | 292 views | 5 replies |

jo271221

Search menu initial value is not working

My dynamic search menu has an initial value but the initial value that displays is actually from the recordset and not the static value of "Post Type" that I have intended. <select name="post_type" class="formTextfield_Medium" id="post_type" title="Please enter a value." rel="<?php echo((isset($_GET["post_type"])?$_GET["post_type"]:"")); ?>">
<option value="" selected <?php if (!(strcmp("", $row_WADAtbl_posts['post_type']))) {echo "selected=\"selected\"";} ?>>Post Type</option>
<?php
do {
?>
<option value="<?php echo $row_post_type['post_type']?>"<?php if (!(strcmp($row_post_type['post_type'], $row_WADAtbl_posts['post_type']))) {echo "selected=\"selected\"";} ?>><?php echo $row_post_type['post_type']?></option>
<?php
} while ($row_post_type = mysql_fetch_assoc($post_type));
$rows = mysql_num_rows($post_type);
if($rows > 0) {
mysql_data_seek($post_type, 0);
$row_post_type = mysql_fetch_assoc($post_type);
}
?>
</select>

Sign in to reply to this post

jo271221

I just figured it out - <select name="post_type" class="formTextfield_Medium" id="post_type" title="Please enter a value." rel="<?php echo((isset($_GET["post_type"])?$_GET["post_type"]:"")); ?>">
<option value="" selected <?php if (!(strcmp("", $row_WADAtbl_posts['post_type']))) {echo "selected=\"selected\"";} ?>>All</option>

Sign in to reply to this post

jo271221

Well - I guess not. This will at least allow the user to select "All" and view all posts however in the visible select menu "For Sale" appears when you select "All" and if I put all in the value then "All" is inserted in the query and of course the search result is off.

<select name="post_type" class="formTextfield_Medium" id="post_type" title="Please enter a value." rel="<?php echo((isset($_GET["post_type"])?$_GET["post_type"]:"")); ?>">
<option value="" selected <?php if (!(strcmp("", $row_WADAtbl_posts['post_type']))) {echo "selected=\"selected\"";} ?>>All</option>
<?php
do {
?>
<option value="<?php echo $row_post_type['post_type']?>"<?php if (!(strcmp($row_post_type['post_type'], $row_WADAtbl_posts['post_type']))) {echo "selected=\"selected\"";} ?>><?php echo $row_post_type['post_type']?></option>
<?php
} while ($row_post_type = mysql_fetch_assoc($post_type));
$rows = mysql_num_rows($post_type);
if($rows > 0) {
mysql_data_seek($post_type, 0);
$row_post_type = mysql_fetch_assoc($post_type);
}
?>

Sign in to reply to this post

Ray BorduinWebAssist

What do you mean by:

  the visible select menu "For Sale" appears when you select "All"  



Maybe if you sent me a URL it would make sense, but I'm not understanding what is wrong at this point so I can't give advice.

Sign in to reply to this post

jo271221

Please see PM

Sign in to reply to this post

Ray BorduinWebAssist

The FTP information you provided doesn't seem to work for me. Maybe just attach a copy of the page and I should be able to spot the problem.

Sign in to reply to this post

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...