vipul Posted May 9, 2006 Share Posted May 9, 2006 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 https://forums.phpfreaks.com/topic/9406-help-please/ Share on other sites More sharing options...
michaellunsford Posted May 9, 2006 Share Posted May 9, 2006 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 https://forums.phpfreaks.com/topic/9406-help-please/#findComment-34682 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.