|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Hi everyone i have been reading through some of the articles, this is my first post, and a lot of you guys really seem to know your stuff.
This question i am sure has a very simple answer, basically i have a php mysql website and want to show a list of entries in a repeated region, this is fine so far, however i want to use a button that people can click on to send mail or visit a website. I have managed to do this and it all works, my problem is that i do not have a web and email all my entries so i would like to use a command that will only show the button if there is data in the email or web field. The script is below <?php if ($Row_web = IS NOT NULL) { // Show if field not empty ?> <input name="Button2" type="button" onClick="MM_openBrWindow('<?php echo $row_artisan['Web']; ?>','site','toolbar=yes,status=yes,menubar=yes,scrol lbars=yes,resizable=yes')" value="Visit Website"> <?php } This is obviously wrong but i dont know what to put in place of ($Row_web = IS NOT NULL) to make it work, please could you advise me as to the correct syntax to use in this case. Also i would appreciate advice on any good php books. many thanks dave ![]() |
|
#2
|
||||
|
||||
|
You could use either if(strlen($Row_web) > 0) or if($Row_web != "") to accomplish what you're after.
__________________
Please don't PM me asking for solutions outside the scope of a thread. Keeping all responses in a thread stands to help others who come along later, which is after all what this forum's all about. |
|
#3
|
|||
|
|||
|
Show IF
Thanks very much that worked a treat
![]() |
|
#4
|
|||
|
|||
|
Hi there , i have the same problem only that the above didn`t work to me.Don`t know much from php programming.i use dreamweaver and much of the code comes as wisiwyg.here `s a part of the code:
<td width="55%"><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong><font face="Times New Roman, Times, serif"><?php echo $row_Recordset1['name']; ?></font></strong><font face="Times New Roman, Times, serif">, <?php echo $row_Recordset1['category']; ?></font></font></div> <div align="center"><font size="2" face="Times New Roman, Times, serif"><?php echo $row_Recordset1['place']; ?>, <font size="1">Υπεύθυνος:</font> <?php echo $row_Recordset1['owner']; ?></font></div> <div align="center"><font size="2" face="Times New Roman, Times, serif"><font size="1">Τήλ:<strong> </strong></font><?php echo $row_Recordset1['phone']; ?>,Φάξ<strong>: </strong><?php echo $row_Recordset1['fax']; ?>,</font></div> <div align="center"><font size="2" face="Times New Roman, Times, serif"><font size="1">Email:</font> <?php echo MakeHyperlink($row_Recordset1['email']); ?></font></div> <div align="center"><font size="1" face="Times New Roman, Times, serif">Url:</font><font size="2" face="Times New Roman, Times, serif"> <?php echo MakeHyperlink($row_Recordset1['web']); ?></font></div></td> </tr> \ what i want to have is:when there is no email in the table , the "email" explanation shouldn`t show but when there is an email in the table, an image should show up linking to that email(mailto:....) please help me .................. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > Show IF ??? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|