CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Dynamically change a link value.

Print topic Send  topic

Author Message
saseow

Posts: 744
Posted: 02/21/2005, 6:14 AM

Please will someone help on this topic.

I have a link on a page that I want to change to a different page depending on a boolean If statement. How can one set the page the link points to in PHP code?

Thanks in advance!
Trevor
View profile  Send private message
aradi

Posts: 66
Posted: 02/21/2005, 7:53 AM

By placing code in the Before Show event, the user can change the URL of the Link control and the text value:


global $LinkName;
// Write your own code here.
if ( $result) {
$Linkname->SetValue("Link text 1here");
$Linkename->SetLink("page1.php");
}
else {
$Linkname->SetValue("Link text 2 here");
$Linkename->SetLink("page2.php");
}
View profile  Send private message
saseow

Posts: 744
Posted: 02/21/2005, 9:43 AM

Thanks Aradi, got it!!
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.