Jump to content

remybink

Members
  • Posts

    40
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

remybink's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Can't hide the span content, I have done this many times no problem, now, it's a problem <div id="nav"> <ul> <li class="fountains"><a href='category_select.php?id=fountains'>fountains <span><?php require('req/nav_select.php'); ?></span></a></li> <li><a href='category_select.php?id=bird'>bird baths</a></li> <li><a href='category_select.php?id=planters'>planters</a></li> <li><a href='category_select.php?id=statues'>statues</a></li> <li><a href='category_select.php?id=tables'>tables</a></li> </ul> </div> I added color just to see if css was being processed, works fine. #nav a{ color: red; } #nav ul li.fountains a { color: blue; } #nav ul li a span { display: none; }
  2. $id = $_GET['id']; if($id == "all"){ $records = "SELECT * FROM (fountains)"; }else if($id == "garden"){ $records = "SELECT * FROM (fountains) WHERE wall='no'"; }else{ $records = "SELECT * FROM (fountains) WHERE wall='yes'"; } hahaha -- you rock!!!!
  3. this is my nav menu code <ul> <li><a href='fountains_page.php?id=all'>all fountains</a></li> <li><a href='fountains_page.php?id=garden'>garden fountains</a></li> <li><a href='fountains_page.php?id=wall'>wall fountains</a></li> </ul> this is my script require('dbconnect.php'); $id = $_GET['id']; if($id = all){ $records = "SELECT * FROM (fountains)"; }else{ if ($id = garden){ $records = "SELECT * FROM (fountains) WHERE wall='no'"; }else{ if($id = wall){ $records = "SELECT * FROM (fountains) WHERE wall='yes'"; } } } $query_records = mysql_query($records); $num_records = mysql_num_rows($query_records); if ($num_records == 0) { echo "The menu is closed for now."; } else{ $i=1; } echo 'We have'.' '.$num_records.' '.'fountains for your consideration<br />Please visit our store to view hundreds of styles.<br />'; echo $id; $errors = array(); // initialize error array Here is the link http://www.mywebsitepaid.com/stonemans/fountains_page.php I can't get the 'id' to pass. What am I doing wrong? I did another site fine, but here I messed something up.
  4. validate your code for errors, or send link for website
  5. time to update your html to compliance, as in xhtml <br> ? old <br /> new <img src="#"> ? old <img src="#" alt="#" /> new update your entire website apply the correct doctype, in your case transitional and try again, run w3c validator, i am sure you are just full of errors IE 9 interprets compliant code just fine
  6. helloise, the days of coding for IE versions are gone unless you are accounting for ie7 as cssfreakie said -- to be written properly, the css will work in all current browsers
  7. a link to the website would be nice too
  8. That was also part of my question. Because I wanted to grab each feature and apply tags for other purposes this was the only way i thought of doing it and not repeating the data. so i put one feature in each field and the entire column is applied with category to which these features belong this is one table is only for features and nothing else i wanted to use 1 field for common features, 1 field for extra features and apply relation to each category, but i was not sure how to use the explode feature to extract the data. i assume i would need some separator other than space to signal between the key words to which explode would reference as features are not typically one worded. If i knew what i was doing I would not be using this forum i have separate tables for login, items, category, features
  9. it makes no difference how you set up your style use the method which you like the best and can read easier. in your one example I layout like so to show relevance for me, also I separate with comments or symbols if code gets too messed up from constant changes to each his/her own function whatever () { // stuff if (whatever) { //whatever }else if { // whatever } }
  10. I do have a separate table for features. I understand normalization. This is a small db so i use unique terms for primary and foreign keys. my question is can the explode function be used to turn the content in table field into an array and then output the result with added <li> tags? Or is there a better method? Or am i stuck entering features field by field?
  11. <input type="image" src="images/submit1c.png" class="submit" name="submit" value="submit" /> make sure src points to the image with correct path id and class is for styling
  12. That doesn't make sense by using //close whatever this will display on the web page unless you are in php for html <div id="wrapper"> <div id="nav"> </div><!-- end nav --> </div><!-- end wrapper --> <!-- space must be used after the (--) and then the (word) followed by space then (--)> to be compliant with w3c validator You can also download PSPAD and when you click a div tag the opposing div tag will highlight
  13. My products based on category share common features, then I have products where all features are different. right now I have the following code for the features -- in the table is (id, category, feature1, feature2, feature3, ...... feature15) <?php $records = "SELECT * FROM (features) WHERE category='$cat'"; $query_records = mysql_query($records); $num_records = mysql_num_rows($query_records); if ($num_records == 0) { return FALSE; } while($row = mysql_fetch_assoc($query_records)){ echo '<ul class="list">'; $feature = $row['feature1']; if ($feature){ echo '<li>'.$feature.'</li>';} $feature = $row['feature2']; if ($feature){ echo '<li>'.$feature.'</li>';} $feature = $row['feature3']; if ($feature){ echo '<li>'.$feature.'</li>';} $feature = $row['feature4']; if ($feature){ echo '<li>'.$feature.'</li>';} $feature = $row['feature5']; if ($feature){ echo '<li>'.$feature.'</li>';} $feature = $row['feature6']; if ($feature){ echo '<li>'.$feature.'</li>';} $feature = $row['feature7']; if ($feature){ echo '<li>'.$feature.'</li>';} $feature = $row['feature8']; if ($feature){ echo '<li>'.$feature.'</li>';} $feature = $row['feature9']; if ($feature){ echo '<li>'.$feature.'</li>';} $feature = $row['feature10']; if ($feature){ echo '<li>'.$feature.'</li>';} $feature = $row['feature11']; if ($feature){ echo '<li>'.$feature.'</li>';} $feature = $row['feature12']; if ($feature){ echo '<li>'.$feature.'</li>';} $feature = $row['feature13']; if ($feature){ echo '<li>'.$feature.'</li>';} $feature = $row['feature14']; if ($feature){ echo '<li>'.$feature.'</li>';} $feature = $row['feature15']; if ($feature){ echo '<li>'.$feature.'</li>';} echo '</ul>'; } ?> this format is just not suitable. how can i make this easier and versatile for some products i think i will add a "model" to the table and pull data based on "model" on some products. I don't want to have to rewrite the common features for each product, yet, i need to add additional special features. So, can I just add common features into 1 field labeled "common-features" and have additional fields for "additional-features" and then call the field and pass it through "explode" function? Will i be able to add "<li></li>" tags in the output?
  14. Thanks Marcus I should have taken a break a bit ago, had a different array problem and I fixed it, and fixed all the other errors prior, thanks for your help, I got it.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.