Home arrow Forum
Input box, Help
  Welcome, Guest. Please login or register.
December 04, 2008, 11:57:20 PM
Home New Posts Search Calendar


Login with username, password and session length
Forum  |  Techies Zone  |  How-To's  |  Topic: Input box, Help « previous next »
Pages: [1] Go Down Print
Author Topic: Input box, Help  (Read 4878 times)
aravot
Jr. Member
**

Karma: +0/-0
Offline Offline

Posts: 89


test/test


View Profile WWW
Input box, Help
« on: April 23, 2005, 12:56:50 AM »

I am trying to create a input box where a user would write his/here website address once saved the address would be displayed with an appended code.

input box
Code:
<param name="link" type="text" default="" label="Link" description="URL to Galler2 folder" />

-----------
get address
Code:
$link = $params->get( 'link' );

      echo "<a href=" . $link . "main.php?g2_view=imageblock:External&g2_blocks=randomImage";

?>

example;
user write this http://www.mywebsite.com


displayed this http://www.mywebsite.com/main.php?g2_view=imageblock:External&g2_blocks=randomImage

Thanks
Logged
cowboy
Administrator
Hero Member
*****

Karma: +30/-0
Offline Offline

Posts: 663



View Profile WWW
Re: Input box, Help
« Reply #1 on: April 26, 2005, 10:26:32 AM »

all looks fine, except here...

Code:
<?php
$link 
$params->get'link' );
$link =  $link."/main.php?g2_view=imageblock:External&g2_blocks=randomImage";
?>

<a href="<?php echo $link?>">text</a>
Logged
aravot
Jr. Member
**

Karma: +0/-0
Offline Offline

Posts: 89


test/test


View Profile WWW
Re: Input box, Help
« Reply #2 on: April 26, 2005, 03:07:44 PM »

all looks fine, except here...

Code:
<?php
$link 
$params->get'link' );
$link =  $link."/main.php?g2_view=imageblock:External&g2_blocks=randomImage";
?>

<a href="<?php echo $link?>">text</a>

Thank you, but instead of displaying 'text' I want to display output of the link which should be an image from gallery
Logged
aravot
Jr. Member
**

Karma: +0/-0
Offline Offline

Posts: 89


test/test


View Profile WWW
Re: Input box, Help
« Reply #3 on: April 27, 2005, 03:01:10 PM »

Finally got it to work.

Code:
<?php

defined
'_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

$link $params->get'link' );
$link =  $link."/main.php?g2_view=imageblock:External&g2_blocks=randomImage";
@
readfile($link)
?>
Logged
Pages: [1] Go Up Print 
Forum  |  Techies Zone  |  How-To's  |  Topic: Input box, Help « previous next »
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Forum | Powered by SMF 1.0.5 & Mambo-SMF.
© 2001-2005, Lewis Media. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!
None of the text or images in this public website may be copied without the expressed written consent of the authors.
Copyright 2005 by MamboHacks.com. Powered by Mambo. All rights reserved.
TERMS OF USE