Jump to content

Archived

This topic is now archived and is closed to further replies.

vipul

Help please

Recommended Posts


hi there..im creating a new site [a href=\"http://www.sg-god.com\" target=\"_blank\"]http://www.sg-god.com[/a] a mobile portal i need help in displaying the image.. here is the code ..


[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]echo '<a href="' . RewriteLink('index.php?categoryid=' . $categoryid . '&p13_sectionid=' . $sectionid . '&p13_action=submitfileform') . '">' . $language['click_here_to_submit_file'] . '</a><br />';[/quote]

in this line, 'click here to submit file' is a link to submit a file ..a hyperlink.. i want to put an from some location like
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]
'http://www.yourdomain.com/image1.jpg'[/quote]

what the format? or how to do that?
need help please

Share this post


Link to post
Share on other sites
typically to upload a file, you'll need to create a <form> with a <input type="file">, then write a php script to handle the file upload.

there is a section of the PHP manual discussing the handling of file uploads:

[a href=\"http://us3.php.net/features.file-upload\" target=\"_blank\"]http://us3.php.net/features.file-upload[/a]

quickie:
[code]<?
if($_FILES) {
    move_uploaded_file($_FILES[key($_FILES)]['tmp_name'],"/root/example/directory/".$_FILES[key($_FILES)]['name']); // moves a file to the directory you specify.
} else {
?>
<form enctype="multipart/form-data"><input type="file" name="userfile"><input type="submit"></form>
<? } ?>
[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.