Jump to content

PHP If command not working when returning a value


jonnewbie12

Recommended Posts

Sorry to be a newbie.

 

I am writing some code that is supposed to query a row in my database. If that row returns the value "yes" I want to display a text or image.  It is currently being written within a pop up box, hence within the <span> parameters. 

 

Problem is it just doesnt work and was hoping someone could tell me why.  Have I got too many brackets? Should the values in the PHP admin table be set differently?  The bit I am having trouble is the 'IF commands".  Although the row 'moisture' has a yes value in the database it does not perform the echo.  The code is below:[/b][/b]

 

 

 

 

 

 

<a href="<?php echo $row_Recordset1['fabricpicture']; ?>" class="MagicZoomPlus" rel="caption-source:span;caption-position:right" title="<?php echo $row_Recordset1['fabricgroup']; ?> <?php echo $row_Recordset1['E']; ?>">

 

<img src="<?php echo $row_Recordset1['fabricpicture']; ?>" name="Grey" width="100" height="100" border="0" class="MagicZoomPlus" id="Grey"/>

 

 

<span><strong><?php echo $row_Recordset1['fabricgroup']; ?> <?php echo $row_Recordset1['E']; ?></strong> </p> <?php echo $row_Recordset1['fabricmaterial']?> </P> Max Width = <?php echo $row_Recordset1['width']?> </p> Max Drop = <?php echo $row_Recordset1['drop']?> </p> <?php if ($rowRecordset1['moisture']=="yes") {echo "moisture resistant";} ?> </p> <?php if ($rowRecordset1['flame'] == "yes") {echo "flame retardant";} ?></span>.

</a>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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