hello, I have this line in my upload script code #If link is to be shown, show link if ($see_url) { $uploaderinfo .= $f_link . "<br><a href=\"" . $url_path . "/uploads27/" . $newfilename . "\" target=\"_blank\">" . $url_path . "/uploads27/" . $newfilename . "</a><br><br>\n"; } PHP: This part of teh code shows the link of the file uploaded. I would like to add below it the following forms with the links in it but they are in html ,, when i place them i get an error in php , how do i place the following code correctly in the php file. I would like to add it below the above code, like under the link showed. <form name="uteam_uploader"> <p align="center">[<span lang="en-us">Click once to copy</span><br> <input name="linkcode" onclick="Click2Copy('uteam_uploader.linkcode')" value="" . $url_path . "/uploads27/" . $newfilename . "" size="20"> </p> <p align="center">[<span lang="en-us">Forums use</span><br> <input name="forumcode" onclick="Click2Copy('uteam_uploader.forumcode')" type="text" value="[img]" . $url_path . "/uploads27/" . $newfilename . "[/img]" size="20"></form> Code (markup): Thanks for any help
put ?> after the ending braces of if } and paste html code after that and in html to show php variable values use these tags <?= ?> like <input name="linkcode" onclick="Click2Copy('uteam_uploader.linkcode')" value="" . <?= $url_path ?>. "/uploads27/" . <?= $newfilename ?> . "" size="20"> or simple echo or print variable <? echo $newfilename; ?>
hello, that works but then the form shows on the top of the page, and has all links correctly ,, but i want to show it under the link in the php code shown above..
what i have understand is that you want to show HTML after this line $uploaderinfo .= $f_link . "<br><a href=\"" . $url_path . "/uploads27/" . $newfilename . "\" target=\"_blank\">" . $url_path . "/uploads27/" . $newfilename . "</a><br><br>\n"; right? if yes than put ?> after above line and place all html after this tag. Than start php tag <? and close if statement with } ?>
mm not exactly,, you see in this line what i have understand is that you want to show HTML after this line $uploaderinfo .= $f_link . "<br><a href=\"" . $url_path . "/uploads27/" . $newfilename . "\" target=\"_blank\">" . $url_path . "/uploads27/" . $newfilename . "</a><br><br>\n"; it shows a link correct, i would like to put the html after here $newfilename . "</a><br><br> I tried what you said, but then the form went at the top,,
<? //...........code #If link is to be shown, show link if ($see_url) { $uploaderinfo .= $f_link . "<br><a href=\"" . $url_path . "/uploads27/" . $newfilename . "\" target=\"_blank\">" . $url_path . "/uploads27/" . $newfilename . "</a><br><br>\n"; ?> <form name="uteam_uploader"> <p align="center">[<span lang="en-us">Click once to copy</span><br> <input name="linkcode" onclick="Click2Copy('uteam_uploader.linkcode')" value="" . $url_path . "/uploads27/" . $newfilename . "" size="20"> </p> <p align="center">[<span lang="en-us">Forums use</span><br> <input name="forumcode" onclick="Click2Copy('uteam_uploader.forumcode')" type="text" value="[img]" . $url_path . "/uploads27/" . $newfilename . "[/img]" size="20"></form> <? } // ............more code ?> PHP: Did you try above code and it did not work. please confirm. I did not see that you are printing line in your if statement. $uploaderinfo .=..... PHP: where you echo or print $uploaderinfo? it should be before <form... tag
hello this is what i have #If link is to be shown, show link if ($see_url) { $uploaderinfo .= $f_link . "<br><a href=\"" . $url_path . "/uploads27/" . $newfilename . "\" target=\"_blank\">" . $url_path . "/uploads27/" . $newfilename . "</a><br><br>\n"; ?> <form name="uteam_uploader"> <p align="center">[<span lang="en-us">Click once to copy</span><br> <input name="linkcode" onclick="Click2Copy('uteam_uploader.linkcode')" value="<?= $url_path ?>./uploads27/<?= $newfilename ?> " size="20"> </p> <p align="center">[<span lang="en-us">Forums use</span><br> <input name="forumcode" onclick="Click2Copy('uteam_uploader.forumcode')" type="text" value="[img]<?= $url_path ?>/uploads27/<?= $newfilename ?>[/img]" size="20"></form> <? } #If entries are to be logged, log them PHP: but the form appears on the top after i upload a file.
where is echo $uploaderinfo; or print( $uploaderinfo); statement. You must do it in if condition. if ($see_url) { $uploaderinfo .= $f_link . "<br><a href=\"" . $url_path . "/uploads27/" . $newfilename . "\" target=\"_blank\">" . $url_path . "/uploads27/" . $newfilename . "</a><br><br>\n"; echo $uploaderinfo; // print link here ?> html code here PHP: