SunQuest
 
           PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
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  
Old July 15th, 2004, 10:31 AM
davedavey davedavey is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 2 davedavey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Red face Show IF ???

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

Reply With Quote
  #2  
Old July 15th, 2004, 10:47 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
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.

Reply With Quote
  #3  
Old July 15th, 2004, 01:39 PM
davedavey davedavey is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 2 davedavey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Show IF

Thanks very much that worked a treat

Reply With Quote
  #4  
Old September 5th, 2004, 01:17 PM
tharsdim tharsdim is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Greece
Posts: 1 tharsdim User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy help needed

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

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > Show IF ???


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway