Help - Search - Members - Calendar
Full Version: I Have Created A Submit File Form - Problem - Helpppp!
Zymic Webmaster Forums > Zymic Free Web Hosting > Zymic Free Web Hosting - General Discussion & Help
loverboy420
Hello!!
Heyy guys, I have created a file sumit form like said there
http://www.zymic.com/tutorials/php/creatin...-form-with-php/

but after uploading a file it show only this
"your file has uploaded. Click here to see the file"

but I want show the link of the file after uploading a file.
Like
"Your file has been uploaded.
File Link : http://youdomain.com/files/file-uploaded.jpg"

Like this.
How to do this...

PLZ PLZ PLZ help!!!!!!!!
Ed
Not quite sure I follow, but you just sculpt the HTML to output it as you wish:

CODE
echo 'Your file upload was successful, view the file <a href="' . $upload_path . $filename . '" title="Your File">here</a>';


Replace with:
CODE
echo 'Your file upload was successful. <p>View the file <a href="' . $upload_path . $filename . '" title="Your File">here</a></p>';
loverboy420
It does not works...
Anyone Else
Frankster
You could try this - http://net.tutsplus.com/tutorials/php/onli...orage-with-php/

loverboy420
The same thing is in that web also....?


But I want to show the file url after uploadig file....
Like many sites, after uploading the show the file url...
Dave

Think I get you now... try this:

CODE
echo 'Your file upload was successful.<br /><a href="' . $upload_path . $filename . '" title="Your File">' . $upload_path . $filename . '</a>';
loverboy420
But where to paste it Dave...

Plz reply
imkingdavid
QUOTE(loverboy420 @ Jul 24 2009, 02:44 PM) *
Hello!!
Heyy guys, I have created a file sumit form like said there
http://www.zymic.com/tutorials/php/creatin...-form-with-php/

but after uploading a file it show only this
"your file has uploaded. Click here to see the file"

but I want show the link of the file after uploading a file.
Like
"Your file has been uploaded.
File Link : http://youdomain.com/files/file-uploaded.jpg"

Like this.
How to do this...

PLZ PLZ PLZ help!!!!!!!!

From the site you linked to,
replace:
CODE
echo 'Your file upload was successful, view the file <a href="' . $upload_path . $filename . '" title="Your File">here</a>'; // It worked.

with
CODE
echo 'Your file upload was successful, view the file here: <a href="' . $upload_path . $filname . '" title="Your File">' . $upload_path . $filename . '</a>'; //It worked.

Let me know if that works. wink.gif

EDIT: That should output: [quote]Your file upload was successful, view the file here: http://www.site.com/file.html[/url]
Basically, what I did was took the url it put into the <a href> tag and put it where the text usually goes. That makes the url a link to itself. wink.gif
loverboy420
It doesnot worked...
It shows like this
'./files/file-name.zip' etc..

But I want to show full path
like
"http://www.mastipk.vndv.com/files/uploaded-file.exe"
like this..

Its possible, But how......
Mael
QUOTE(loverboy420 @ Jul 28 2009, 04:20 AM) *
It doesnot worked...
It shows like this
'./files/file-name.zip' etc..

But I want to show full path
like
"http://www.mastipk.vndv.com/files/uploaded-file.exe"
like this..

Its possible, But how......

Just prefix your URL to it... This is extremely basic PHP and you really need to understand it if you're going to be using PHP with your site, or wishing to change functionality of pre-existing scripts you will use.
CODE
echo 'Your file upload was successful, view the file here: <a href="' . $upload_path . $filename . '" title="Your File">' . $_SERVER['SERVER_NAME'] . $upload_path . $filename . '</a>';
loverboy420
It worked but without "http://"

Can someone give the code that how to show the URL in a Box after Uploading and a bit larger. biggrin.gif

You can see here how it is showing after uploading a file
www.mastipk.vndv.com
Mael
QUOTE(loverboy420 @ Jul 29 2009, 05:36 AM) *
It worked but without "http://"

Can someone give the code that how to show the URL in a Box after Uploading and a bit larger. biggrin.gif

You can see here how it is showing after uploading a file
www.mastipk.vndv.com

Hate to put it bluntly, but learn HTML and CSS. I don't see how you expect to create and maintain any form of website without this basic knowledge. You can't ask other people to write code for every single thing that you need to be done for your site (at least not for free).

By the way, your URL didn't work.
loverboy420
I know HTML but not PHP.
Mael
QUOTE(loverboy420 @ Jul 30 2009, 04:09 AM) *
I know HTML but not PHP.

Your question was not relevant to PHP. You asked for the text to appear in a box and larger - this is not done with PHP, that's just HTML and CSS.
loverboy420
I asked that how to do this using PHP.

Now, plz help me only 1 last time. sad.gif sad.gif sad.gif
I'll be your thankful.
Mael
QUOTE(loverboy420 @ Jul 30 2009, 01:25 PM) *
I asked that how to do this using PHP.

Now, plz help me only 1 last time. sad.gif sad.gif sad.gif
I'll be your thankful.

I don't understand what you mean... PHP is a scripting language - it has nothing to do with the visual side of things; that's what HTML and CSS is for. If you want to change what the output looks like from the PHP, you have to adjust the HTML/CSS that it outputs. I'd suggest creating a CSS style for your box and applying that within the code:
(Prefixed http://)
CODE
echo '<div class="file-uploaded-box">Your file upload was successful, view the file here: <a href="http://' . $upload_path . $filename . '" title="Your File">' . $_SERVER['SERVER_NAME'] . $upload_path . $filename . '</a></div>';

I'll let you control the CSS yourself as you know what you want, but an example (from what I imagine you mean by a box) would be:
CODE
.file-uploaded-box { margin: 1em; padding: 1em; border: 1px solid #000; }
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.