Forums
This topic is locked
empty fields
Posted 27 Aug 2001 20:38:07
1
has voted
27 Aug 2001 20:38:07 Keith Slater posted:
Hello again! I need to find a way so if some one leaves a field blank and that one field is blank in the database it wont show anything on the page it displays on. So say the field they leave empty is a picture field... If they don't select a picture currently it acts like a dead picture is their a special show region thats not just for the recordset but for a fieldthanks
Keith Slater
Replies
Replied 27 Aug 2001 23:51:51
27 Aug 2001 23:51:51 Bruno Mairlot replied:
Hi Keith,
I'm sorry, but I don't fully understand what you exactly want to do <img src=../images/dmxzone/forum/icon_smile_blush.gif border=0 align=middle>
Could you please, explain a little more, cause I have the feeling that I can help you, but I'm not sure how exactly.
If you use conditional region, where the condition is based on the value of the field, shouldn't it work ?
let's suppose you'll have something like this :
<pre id=code><font face=courier size=2 id=code>
<?php
if($Recordset1->Fields("Picture"!=""{
?>
<i>// Show picture here</i>
<img src="<?php echo $Recordset1->Fields("Picture"?>">
<?php
} else echo " ";
?>
</font id=code></pre id=code>
Bruno
"First they laugh at you, then they fight you, then you Win..." Ghandi
I'm sorry, but I don't fully understand what you exactly want to do <img src=../images/dmxzone/forum/icon_smile_blush.gif border=0 align=middle>
Could you please, explain a little more, cause I have the feeling that I can help you, but I'm not sure how exactly.
If you use conditional region, where the condition is based on the value of the field, shouldn't it work ?
let's suppose you'll have something like this :
<pre id=code><font face=courier size=2 id=code>
<?php
if($Recordset1->Fields("Picture"!=""{
?>
<i>// Show picture here</i>
<img src="<?php echo $Recordset1->Fields("Picture"?>">
<?php
} else echo " ";
?>
</font id=code></pre id=code>
Bruno
"First they laugh at you, then they fight you, then you Win..." Ghandi
Replied 28 Aug 2001 14:57:02
28 Aug 2001 14:57:02 Keith Slater replied:
ok let me show you, go to www.finaltribute.com/FindAnObituary.php and click on Erma Mae Jones. If you scrolls down to the bottom it says blank, I need a away so that if the perosn who submits the form doesnt select anything to go there, nothing shows up.
thanks again
Keith Slater
thanks again
Keith Slater
Replied 29 Aug 2001 13:58:02
29 Aug 2001 13:58:02 chief monkey replied:
What Maehdros says should work
<?php
if($Recordset1->Fields("Picture"!=""{
?>
//display code and picture
<?
} else {
?>
// display alternative code
<?
}
?>
Everybody has got to be somewhere
<?php
if($Recordset1->Fields("Picture"!=""{
?>
//display code and picture
<?
} else {
?>
// display alternative code
<?
}
?>
Everybody has got to be somewhere