Jump to content

Help please


vipul

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
Link to comment
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]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.