DarkTerror Posted August 28, 2007 Share Posted August 28, 2007 Friends, How can i make a text box having default text in it. Actually i want that to implement on image pages of my website so that people can have the image codes to post in their forums blogs etc. So I want that the text inside the text box should change according to the image name. For example, see this link http://www.glowfoto.com/viewimage.php?img=01-041403L&y=2007&m=01&t=jpg&rand=8652&srv=img4 on the bottom of the image page theres a button called "get link codes" which when pressed will redirect to another getcode.php page which shows the different codes in text boxes for the image. (http://www.glowfoto.com/getcode.php?srv=img4&img=01-041403L&t=jpg&rand=8652&m=01&y=2007) I know to create text boxes,text fields having default text but not be able to create the links which changes according to image,i tried using some variable names but it also can't help me. Please Help! Quote Link to comment https://forums.phpfreaks.com/topic/67052-solved-help-required-in-some-coding/ Share on other sites More sharing options...
Jessica Posted August 28, 2007 Share Posted August 28, 2007 <textarea name="name">Text Here</textarea>[code] We can't help with your code if you don't post it, and actually what doesn't work. [/code] Quote Link to comment https://forums.phpfreaks.com/topic/67052-solved-help-required-in-some-coding/#findComment-336236 Share on other sites More sharing options...
sstangle73 Posted August 28, 2007 Share Posted August 28, 2007 do you want like <textarea name=html><a href="<?php echo $URL; ?>"><img src="<?php echo $imgurl; ?>" alt="free image hosting" border=0 /></a></textarea> Quote Link to comment https://forums.phpfreaks.com/topic/67052-solved-help-required-in-some-coding/#findComment-336255 Share on other sites More sharing options...
DarkTerror Posted August 28, 2007 Author Share Posted August 28, 2007 do you want like <textarea name=html><a href="<?php echo $URL; ?>"><img src="<?php echo $imgurl; ?>" alt="free image hosting" border=0 /></a></textarea> Cool man,You Simply Rock!!! Just a little mod to your code and it worked, i just put it something like: <textarea name=html><a href="<?php echo "http://my-site.com/$image";?> "><img src="<?php echo "http://my-site.com/t_$image"; ?>" alt="free image hosting" border=0 /></a></textarea> $image and t_$image are the variable names assigned for the image and its thumbnail respectively.The HTML and direct link for the images are working fine. but when I put the BBCode to show something like this: <textarea name=html><?php echo "[url=http://my-site.com/$image][img=http://my-site.com/t_$image][/url]"; ?></textarea> It giving an error like: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING on line 28 Can anyone help plzz!! Quote Link to comment https://forums.phpfreaks.com/topic/67052-solved-help-required-in-some-coding/#findComment-336602 Share on other sites More sharing options...
Jessica Posted August 28, 2007 Share Posted August 28, 2007 Show us lines 26-30 or so. Quote Link to comment https://forums.phpfreaks.com/topic/67052-solved-help-required-in-some-coding/#findComment-336611 Share on other sites More sharing options...
DarkTerror Posted August 28, 2007 Author Share Posted August 28, 2007 22nd Line---><b><font color="#FF0000">DIRECT LINK:</font></b> 23rd Line---><center><textarea name=html cols=100 rows=3><?php echo "http://my-url/folder/image.php?image=$image"; ?></textarea></center> 24th Line---> 25th Line---><br> 26th Line---> 27th Line---><b><font color="#538f00">BBCODE-1</font></b> 28th Line---><center><textarea name=html cols=100 rows=3><?php echo "[url=http://my-url/folder/image.php?image=$image][img=http://my-url/folder/t_$image][/url]"; ?></textarea></center> 29th Line---> 30th Line---><br> 31st Line---><b><font color="#538f00">BBCODE-2</font></b> 32nd Line---><center><textarea name=html cols=100 rows=3><?php echo "[url=http://my-url/folder/image.php?image=$image][img=http://my-url/folder/t_$image][/url]"; ?></textarea></center> Also one more thing, BBCODE-2(Line 31st) is working fine only the problem is with BBCODE-1. Kindly Help! Quote Link to comment https://forums.phpfreaks.com/topic/67052-solved-help-required-in-some-coding/#findComment-336638 Share on other sites More sharing options...
Jessica Posted August 28, 2007 Share Posted August 28, 2007 I don't see a problem with the string, but try this instead: <textarea name=html>[url=http://my-site.com/<?php echo $image; ?>][img=http://my-site.com/t_<?php echo $image; ?>][/url]</textarea> Quote Link to comment https://forums.phpfreaks.com/topic/67052-solved-help-required-in-some-coding/#findComment-336642 Share on other sites More sharing options...
DarkTerror Posted August 28, 2007 Author Share Posted August 28, 2007 I don't see a problem with the string, but try this instead: <textarea name=html>[url=http://my-site.com/<?php echo $image; ?>][img=http://my-site.com/t_<?php echo $image; ?>][/url]</textarea> You guys rock!! It worked finally,Thank you! Quote Link to comment https://forums.phpfreaks.com/topic/67052-solved-help-required-in-some-coding/#findComment-336672 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.