Display field varies according to the content. PHP MYSQL

Hi all

A little riddle that I am sure is easy, but have no idea how do;

I have a list of products in a table and one of the cells contains this <? PHP echo $row_rsLanterns ["product_Stock"];? >. product_Stock is a value set is inStock and OutOfStock. I'd llike to be able to display something different for every thing. That is, if the field contains inStock I would print in Stock and if OutOfStock, then it shows sold out. And also changes the color of each one.

Any ideas would be great.

Thank you

Tom

in stock stuff here. Add html or any message you want people to know that the product is in stock.

out of stock stuff here

Tags: Dreamweaver

Similar Questions

  • Make the iframe automatically adjust the height according to the content without using the scroll bar?

    Hello

    I develop the site (www.meninasreais.com.br) and have a doubt. I created the basic html - menu, header - in Adobe Muse. I'm trying to insert an iframe that automatically adjust the height according to the content of the blog.

    I tried with different codes, the framework is installed on the same domain as the site and none of them worked. What can I do it wrong? Thank you.

    The code that was inserted below:

    < script language='JavaScript'>

    <!--

    Function autoResize (id) {}

    var newheight;

    var NewWidth;

    if (document.getElementById) {}

    newHeight = document.getElementById (id). contentWindow.document. body.scrollHeight;

    NewWidth = document.getElementById (id). contentWindow.document. body.scrollWidth;

    }

    document.getElementById (id) .height = (newheight) + 'px';

    document.getElementById (id) .width = (newwidth) + 'px';

    }

    ->

    < /script >

    < IFRAME SRC='www.meninasreais.com.br' width='600px' height='200px' id='iframe1' marginheight='0' frameborder='0'onLoad="autoResize ("iframe1");" > < / iframe >

    Hi, I successfully did this for my blogging engine.

    I use jquery.autoheight.js

    In the property of my page:

    In my html box:

    This work in Adobe muse. My iframe it set itself with the content of my blog.

    Example: http://www.solutionsip.ca/blog.html

  • Firefox displays its own menus and the content of the website in black

    No reason, that I am aware that I have not changed any other components / configuration. Firefox displays all of the content of any web site, generally I use www.bbc.co.uk as a test in the dark site, although if I click randomly around pieces of content are exposed as true / color. I can't use Firefox as I do not see the menu etc.

    I uninstalled / reinstalled / moved to the latest version and was started in safe mode, deleted all caches, etc. but there's always black

    Try disabling hardware acceleration in Firefox.

    • Tools > Options > advanced > General > Browsing: "use hardware acceleration when available.

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox/Firefox/tools > Modules > appearance).

    • Do NOT click on the reset button on the startup window Mode without failure.
  • Text size varies according to the length of the answer. How to standardize?

    I use Adobe sign to make the forms to fill out for the employee references. According to the person who fills out the form, the answers can be one or more fifty words long.

    How to make sure that that the size of the text is the same regardless of the number of words before?

    Thank you

    Hi iano46358492,

    When adding fields to the document form please double click on text fields & Validation "String" value and maximum length according to your requirement.

    Kind regards

    Nicos

  • Update the field Date according to the date of another field

    Hi I have a field called "contract end Date" which I update manually according to the contract, and a field called "notify contract end Date" I want to be updated automatically with the "end of contract date" - 45 days.
    Is this possible via workflow? can someone give me the syntax that works? If I want to manually insert the value of the field 'Date to end the contract to notify' it will overwrite it?
    Thank you, David

    Hello!

    Create your workflow on your object type, select the before saving the trigger modification event, put the following condition:

    [< contract end date >] <>MEADOW ("< the contract end date > '")

    And in action, update the field End Date of the contract to notify with end Date of contract - 45 and check the replacement value. You contract end Date field must be with the type date.

    I hope this will help, do not hesitate to ask for more!

    Max

  • How to sort the rows according to the contents in cells

    Hello

    Is it possible to use a formula to sort the rows according to their cell contents? I will include a screenshot of my table. What I want to do is group together people based on where they live. I wish that all rows with an 'x' in a certain State of group. Who is? Thank you!

    Nevemind, I thought about it.

  • How to display a value according to the position of the arrow of the mouse?

    Hello world

    I change the color of the background of some indicators according to temperature measurements. Each context is bound to a temperature. I want to show the value of the temperature during the passage of my mouse on the indicator arrow. I don't want the before diagram with all temperatures cooler.

    Is this possible? The temperature might appear in a single, fixed, indicator or related to the arrow...

    Any help would be great,

    Thank you

    User

    Is this what you need?

  • ID of the laptop varies according to the method

    Using various methods, I get different answers to what is the model of my laptop: (have installed the latest version of the bios)

    Confirmation of the order of Hp said: Presario V6000Z CTO NB

    Label on Notebook: Presario V6000 Nr RD181AV

    Support Center assistance request: Presario V6000 product no., EX993AV #ABA series 16295

    HP Support Center Online Auto Detect: Presario V6100 produces no #ABA EX993AV

    Online HP product detection: Presario V6100 CTO Notebook PC, Nr EX993AV

    Which should I use for the purpose of updates?  For the purposes of the present case NVIDIA?

    Good question,

    use

    HP Support Center Online Auto Detect: Presario V6100 produces no #ABA EX993AV

    Online HP product detection: Presario V6100 CTO Notebook PC, Nr EX993AV

  • Same App but .cod size varies according to the other version of the OS?

    Hi all

    I have an application when Im trying to build in 5.0 the size shown me cod 71 KB
    App even when Im trying to build 6.0 size shown me cod 71 KB
    But the size 7.0 disclosed only 35 KB

    Why such different files sizes of cod occur for a single application.

    with this .cod file minimum IE 35 KB file works fine in all simulators, it will get any problem if I deploy different versions in the device?

    OS 7.0 update of applications may work but are not supported on previous levels of the operating system.  If you want to run with the smaller version, it's on your own head.

    Take a look at the related to its application jar file, compare the jar compiled OS 5.0 with the pot compiled OS 7.0 to see what makes the difference.

  • Accordion list of the Recordset (php &amp; mysql)

    So, I have a list of office locations coded hard in my Web page and need to have the data retrieved from a database. I created a recordset and I can get all the data I need to shoot. I've been struggling on how to get this data formatted so that each office location has its own menu accordion. In the comic book, I have a desktop with locationID table defined for each office. What I was thinking is... implemented each accordion with an id that withdrew in the locationID from the database.

    I have the Recordset currently pulling in about 30 offices all at once. I thought about the inclusion of a clause in the sql statement where clause-

    WHERE officelocations_tbl.locationID = '21 '.

    then I would need a separate Recordset for each location, I think that the exception.

    So here is my sql statement:--(encore une fois c'est sans ajouter la clause WHERE comme indiqué ci-dessus).

    SELECT contact1.firstName AS c1Firstname, contact1.lastName AS c1lastName, contact1.middleInitial AS c1middleInitial, contact1.suffix AS c1suffix, contact1.accredations AS c1accredations, contact1.phone AS c1Phone, contact1.faxNumber AS c1FaxNumber, contact2.firstName AS c2Firstname, contact2.lastName AS c2lastName, contact2.middleInitial AS c2middleInitial, contact2.suffix AS c2suffix, contact2.accredations AS c2accredations, contact2.phone AS c2Phone, contact2.faxNumber AS c2FaxNumber, partner.firstName AS c3Firstname, partner.lastName AS c3lastName, partner.middleInitial AS c3middleInitial, partner.suffix AS c3suffix, officelocations_tbl.*, city_tbl.*, state_tbl.* , partner.accredations AS c3accredations, partner.phone AS c3Phone, partner.faxNumber AS c3FaxNumber FROM officelocations_tbl JOIN city_tbl WE (officelocations_tbl.cityID = city_tbl.cityID) LEFT OUTER JOIN state_tbl ON (officelocations_tbl.stateID = state_tbl.stateID) LEFT OUTER JOIN staff_tbl contact1 WE (contact1.staffID = officelocations_tbl.contact1) LEFT OUTER JOIN staff_tbl contact2 WE (contact2.staffID = officelocations_tbl.contact2) LEFT OUTER JOIN staff_tbl partner WE (partner.staffID = officelocations_tbl.partner)

    Here is the code for one of accordions:

    <li><a href="#" class="opener"><strong>Some Office Name</strong></a>
    <div class="slide-holder">
    <div class="slide">
      <!-- ***************** - START Contact Table - ***************** -->
      <div class="contact_table grey_table">
          <div class="border">
    
            <!-- Featured Column -->
    
                <div class="column featured">
    
                  <div class="included">
                      <ul>
                          <li>some address</li>
                          <li>city, state zip</li>
                          <br />
                          <!--<li class="email"><strong>Contact: </strong><a href="mailto:[email protected]">John Doe</a></li>
                          <li>Tel: 000-000-0000 / Fax: 000-000-0000</li>
                          <br />
                          <li class="email"><strong>Contact: </strong><a href="mailto:[email protected]">John Doe</a></li>
                          <li>Tel: 000-000-0000 / Fax: 000-000-0000</li>
    
                          <br />-->
                          <li class="email"><strong>Partner: </strong><a href="mailto:[email protected]">John Doe</a></li>
                          <li>Tel: 000-000-0000 / Fax: 000-000-0000</li>
    
                          <br />
                      </ul>
                  </div>      
              </div>
              <!-- End Featured Column -->
          </div>
      </div>
    <!-- ***************** - END Contact Table - ***************** -->
    
    
    
    </div></div></li>
    
    

    Can someone help me out here?

    Post edited by: MaxTal

    Installs on the forum of development of applications in Dreamweaver server side .

    This sounds like a simple repeat region. Wrap your basic accordion in a repeat region (in other words a loop) and fill the Accordion with database results.

  • Connection to the database: PHP, mySql, WAMP

    I am new to Dreamweaver and try to walk through setting up a page via PHP to be able to connect through my database. I get the following error:


    ( ! ) WARNING: unknown: failed to open stream: Permission denied in Unknown on line 0


    ( ! ) Fatal error: unknown: failed to realize "C: / wamp/www/cosmo_shop/timetest.php ' (include_path ='.;)" C:\PHP\pear') in Unknown on line 0

    Any ideas? It's quite frustrating because I don't know that there is a simple solution.

    Thanks for the quick response... This tutorial uses XAMPP instead of WAMP. Thought I would try to install the XAMPP instead. Seemed to solve the problem... Thank you

  • Inserted HTML does NOT have the content during resizing

    Hello

    We are building a website for a hotel and are required to register their channel Manager module in the site. To do this, you must follow these steps:

    1 paste the JavaScript code into the head section to load the module.

    2. place a small line of code with "insert HTML" in the site where the module should appear and that's all.

    The module is generated by a script the way Manager Server server-side and stuck in an iFrame is also generated by this same script. The thing is: it is resized at the height of the iFrame according to the content displayed in the iFrame. So we start by 301 px height when we call the page and search free rooms. The results are displayed on a 1400 px iFrame, which resizes properly when displaying results.

    THE PROBLEM: Footers stays put and the iFrame works behind her and out of the view port. There is also no scroll bar appears allowing me to scroll to the bottom of the iFrame.

    We got three layers:

    3 layer (containing and footer top navigation, both defined in a master page that is applied to the content page)

    2. content layer (containing the HTML inserted with the generated iFrame)

    1 background (well, it contains substantive items)

    WE NEED: The footer to be pushed by resizing never iFrame and get a scroll bar when necessary due to the height of the iFrame.

    What we're doing wrong?

    We just found the solution:

    If correct you the position of the html box inserted (in our case high in the Center), do not push any content. I don't know how the html-box has been checked in the first place, but the moment where I removed the position fix fromt the HTML, everything worked as expected. We will now try to return to the master page on the booking page, and everything will be good. Thank you for your comments, he did we check everything twice.

  • Price with PHP/MySQL

    I want to use numbers from a database, prices. In the database (PHP/MySQL), the structure is ' decimal (9.2). If I put it out with PHP a number as is €9.02 9,02 but 9.20 looks like this €9,2. How can I set prices with PHP/MySQL?

    I hope that my question is simple... Thankx for any other help.

    Use number_format() functionof PHP.

  • Shows field on the form, print only the content

    How can I get the field to display in the form, but does not print the background shading of box or field - only prints the user filled in the content.

    Thank you

    MDawn50

    Hello

    You must have the script in the pre-press and postPrint events in each field that has a background fill color. Alternatively, you can set up a loop to go through all the object and change the background color, but it's a little more complicated. Try this first.

    Pre-publication:

    VNAME var = this.somExpression;
    var fieldObj = xfa.resolveNode (VNAME + "#textEdit.border.fill.color .ui.");

    fieldObj.value = "255,255,255";

    / * Check the type of object and change the .ui reference:

    Field date = #dateTimeEdit
    DropDown = #choiceList
    CheckBox = #checkButton
    Text field = #textEdit
    Digital field = #numericEdit

    */

    postPrint:

    VNAME var = this.somExpression;
    var fieldObj = xfa.resolveNode (VNAME + "#textEdit.border.fill.color .ui.");

    fieldObj.value = "225,255,225"; the original RGB of the object

    / * Check the type of object and change the .ui reference:

    Field date = #dateTimeEdit
    DropDown = #choiceList
    CheckBox = #checkButton
    Text field = #textEdit
    Digital field = #numericEdit

    */

    You will need to change the .ui reference according to the object type. For example, the script above is to a textField.

    Good luck

    Niall

  • Hide and unhide the field in a form according to the conditions

    Hello Experts,

    Is it possible to hide and show fields in a form according to requirements based on an LOV?

    Thank you

    Hey Kevin,

    You can use javascript to capture all changes to the LOV.

    Put this in a header or some other place where you can put html attributes:

    then, you need the name of the field that you want to hide. That is to say mine is

    div href = "#" id = "f09" style = "" display: none; ">"

    (there is a ' ")<" missing,="" else="" it="" cannot="" be="" shown="/">

    Then you put a javascript function in the header as follows:

    function body_on()
    {
    body var = document.getElementById ('P41_body');
    Body.style.Display = 'block ';
    var head = document.getElementById ('head_image');
    Head.SRC = "#IMAGE_PREFIX#themes/theme_20/collapse_minus.gif";
    }

    function body_off()
    {
    body var = document.getElementById ('P41_body');
    Body.style.display = 'none ';
    var head = document.getElementById ('head_image');
    Head.SRC = "#IMAGE_PREFIX#themes/theme_20/collapse_plus.gif";
    }

    It's to hide / show regions of course.

    Kind regards
    jR

    Published by: jR - ora on 05.01.2010 01:22

Maybe you are looking for

  • Re: Satellite L70 - B - game crashes when the battery removed

    I have a portable Satellite L70 b - 130 and I have the following problem:If I remove the battery from the laptop and turn it on, when I start the game it crashes... If the battery is connected and I enter the game, it works

  • Satellite P300 - 18 M - VGA to S-video / RCA cable - no picture on the TV

    Hello First of all, I am trying to use my other laptop (Dell Lattitude D630) I have with my TV, however, this other laptop has only a VGA output. So I bought a VGA adapter S-video and RCA e - Bay: [photo: http://members.lycos.co.uk/jtfearnley/Hosting

  • ThinkPad t400 not turn on!

    Help! I just poured the water on my thinkpad a little water just for fun, but when I turned it on, it does not fuel upward!I'm sobbing on this loss.I thought that my thinkpad had also the drainage holes. Please help, please help!

  • Multimedia players

    Everyone I talk to media players universally despise Windows Media Player. Suggestions for other programs. I need something that is easy and intuitive to my new Fuze 8 gig. I'm new to all this and any help would be appreciated

  • Install HP ends soon on Windows 7

    I try to install HP Solution Center so that my wife can use his C4180 all-in-One printer and the installation program will come to the step 8/11-79% (Software\Microsoft\Active Setup) and it just end.  It's on Windows 7 64-bit.  I use the recommended