HTML - How To Store Image Or Pdf Files
hi all
this is Sarah i am new to html and asp, i was trying to upload the image files and tried to store to oracle database,the text and number are storing fine but when i try to save the pdf or image file to the database its throughing error. here is the table. SQL> desc table1 Name Null? Type ----------------------------------------- -------- ----------------- ROLL NOT NULL NUMBER NAM NOT NULL VARCHAR2(20) SUB NOT NULL VARCHAR2(20) MARK NOT NULL NUMBER FILE_NAME BLOB i am using using ASP for connectivity via ODBC.I am able to store the data but when i try to store image files then i am getting error. here is the html code. <html> <head><titl> My Page</titl> </head> <body bgcolor=tan> <pre> <Form Action=insert.asp Method=Post> Roll No:-<input Name=roll><br> Name :-<input Name=nam><br> Subject:-<input Name=sub><br> Marks :-<input Name=mark><br> Attach :-<input type=file accept="image/gif,image/jpeg" Name=att><br> </pre> <input type=Submit value=Insert> <input type=reset value=Reset> </form> </body> </html> plz guide me thanks in advance. sarah Similar TutorialsHi I am wondering if there is a way to create a composite image of different images in a website folder? So if I have a folder with image01.png, image02.png, image03.png, is there a way (on a website) to take those three images and create on composite image out of them, and then maybe place this new image in another folder? I don't want to use Flash. Thanks for your time and help. Shaun Hi I am wondering if there is a way to create a composite image of different images in a website folder? So if I have a folder with image01.png, image02.png, image03.png, is there a way (on a website) to take those three images and create on composite image out of them, and then maybe place this new image in another folder? I don't want to use Flash. Thanks for your time and help. Shaun I have this website that i run for a person selling select products. Everything is going fine, but it would really help if i could make an adminstrator's page for the client, that would let them input a picture, name, description, price and have that posted to the product listing page. Ive seen some related posts in different places that mentioned use of php and mysql, but i havent found the right combo for what im looking for. If someone could help me out, it would be very appreciated. Hey guys thanks to a hand full of sleepless nights, and some valuable guidance I received from some of you guys I finally have my first site-www.palmettogoldandsilver.com up and running smoothly... even on IE! So now I want to expand the site so I can list items on it for sale. I would like to list items with prices and have visitors be able to purchase the items online. Where do I go first? lol What do I need to do to get a shop up and functioning? Javascript? php? other? If someone could lay out some steps to take it would be great help thanks -Travis I'm building a website in which user after logging in can upload videos, but I've no idea how to create a database that can store videos. I'm using PHP mySQL PLZ help Hi guys, I need a help from you guys. I'm having some html pages, and i want to give the option to change the background and font color in the html pages by clicking buttons. And that setting should be saved in the user system, when the user loads the page again in the system, that the page should load with the saved settings. I don't want to go for server side scriptings. Is it possible just in html and Java script. Can you guys help me in this. Thanks in Advanse Kumar Hey guys, I'm new to HTML... Well not completely new, I know the basics like how to bold stuff, how to make a new paragraph, line-breakers, all that easy stuff. Now I have a project to do by the end of this summer... I'm expected to make a site where people can Rent Toys online (dont ask ) . So I have to be able to have Paypal Access in my site. Now I need a bit of help... I started reading a couple of tutorials on this site and I'm trying my best to understand them. My question is, where do I start writing or developing my site? I can't just put it on Microsoft Word, there has to be a web page developing server or site I can use.... Any recommendations? I can pay whatever the cost is; After all in the end (if I finish everything) my reward is breath-taking... If there is a specific web developing company or server that deals with Paypal, or online purchasing, that would be helpful information to know as well. Thanks guys! That's all the questions I have for now Hi all -- I'm having an interesting problem. I'm designing a web page that has a navigation banner (home - programs - schedule of events - contact us - downloads) that is made up of a .png for each page (i.e. home.png, programs.png, etc). My page is 1000px wide and all of the navigation banner's images add up to 1000px wide. I'm using JavaScript to create an onMouseOver and onMouseOut effect on each of the images. The problem that I'm having occurs when I tried to add a link (either by <A HREF= or using an image map). Whenever I add a link to the image, a small (3px) area of white space shows up to the right of the image. This shifts all of my other images 3px to the right (and 3 more for each link I add to subsequent images) thus making the total width of the navigation banner over 1000px and the last image gets shoved to a new line. I can find no way to get rid of this white space other than to remove the link from the image. There is no property on the page that adds any sort of padding, margins, or borders to images or links, so I can see no property that has to be changed. Help! How do I get rid of this white space but still keep the link on the image?? [I posted this question on the Adobe forum to no avail, below is a screencap I took of the issue I'm having] Thanks in advance! //kl PS - I am using both IE8 and Chrome to view this webpage. I've set all the margins/padding/borders to 0px. Here is my CSS and the part of the code that pertains to the navigation banner. CSS: Code: <style type="text/css"> <!-- body { font: 100% Verdana, Arial, Helvetica, sans-serif; background: #666666; margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */ padding: 0; text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */ color: #000000; background-image: url(images/blue.bg.png); background-repeat: repeat; background-color: #009; } .oneColFixCtr #container { width: 1000px; /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */ background: #FFFFFF; margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */ border: 0px solid #000000; text-align: left; /* this overrides the text-align: center on the body element. */ } .oneColFixCtr #mainContent { padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */ } body, td, th { color: #333; } #main_banner2 { margin: 0px; padding: 0px; height: auto; width: 1000px; } --> </style> </head> Nav Banner: NOTE:: below HAS to be all one paragraph because if i insert a carriage return in between images, it also adds the white space... Code: <body class="oneColFixCtr"> <!-- MAIN NAVIGATION BANNER --> <!--HOME--><img src="images/nav/home.png" alt="home" name="home" width="82" height="30" border="0" onMouseOver="document.images.home.src='images/nav/home_over.png'" onMouseOut ="document.images.home.src='images/nav/home.png'"/><!--PROGRAMS--><img src="images/nav/programs.png" width="111" height="30" border="0" name="programs" onMouseOver="document.images.programs.src='images/nav/programs_over.png'" onMouseOut ="document.images.programs.src='images/nav/programs.png'"/><!--SCHEDULE OF EVENTS--><img src="images/nav/scheduleofevents.png" width="189" height="30" border="0" name="scheduleofevents" onMouseOver="document.images.scheduleofevents.src='images/nav/scheduleofevents_ over.png'" onMouseOut ="document.images.scheduleofevents.src='images/nav/scheduleofevents.png'"/><!-- CONTACT US--><img src="images/nav/contactus.png" width="119" height="30" border="0" name="contactus" onMouseOver="document.images.contactus.src='images/nav/contactus_over.png'" onMouseOut ="document.images.contactus.src='images/nav/contactus.png'"/><!--DOWNLOADS--><i mg src="images/nav/downloads.png" width="267" height="30" border="0" name="downloads" onMouseOver="document.images.downloads.src='images/nav/downloads_over.png'" onMouseOut ="document.images.downloads.src='images/nav/downloads.png'"/><!--FACEBOOK--><im g src="images/nav/facebook.png" width="90" height="30" border="0" name="facebook" onMouseOver="document.images.facebook.src='images/nav/facebook_over.png'" onMouseOut ="document.images.facebook.src='images/nav/facebook.png'"/><!--TWITTER--><img src="images/nav/twitter.png" width="67" height="30" border="0" name="twitter" onMouseOver="document.images.twitter.src='images/nav/twitter_over.png'" onMouseOut ="document.images.twitter.src='images/nav/twitter.png'"/><!--BLOGGER--><img src="images/nav/blogger.png" width="75" height="30" border="0" name="blogger" onMouseOver="document.images.blogger.src='images/nav/blogger_over.png'" onMouseOut ="document.images.blogger.src='images/nav/blogger.png'"/><img src="images/home_banner.png" alt="home_border" width="1000" height="7" /><br /> Hi all, not sure if this is posted in the correct place... please move if not...! I am after some information about how to build OFT (Files Outlook File Templates). I cant find any information about how to build/develop them. It may be pretty straight forward but need some guidance. Any help or pointers would be greatly accepted! Thanks all Hurley! I have some .tif files that I want to display on my web site but they don't show up. What are my options? Thanks... hey... i didnt know what forum to post this in, so admins, do what you want with this thread... I've recently taken over the web designing for a company... the site is already made, and the previous designer has dropped out, and the company needs me to make updates, add articles, etc. There are .htaccess files in almost every directory and subdirectory throughout the site. When I go to add an image, and make a link to it on a page, the image is not found, even though the source is correct. ex - initially, the page links to an image at "images/image1.jpg" . I make an image2.jpg, place it in the right folder, and try to link to it - "images/image2.jpg" but the image cannot be displayed on the site (says it cannot be found - same as a 404). I am assuming this has to do with the htaccess permissions and all that stuff (also in each directory is a "_notes" subdirectory and another directory like that) but I'm not sure. I wikipedia'd htaccess files, and read that they were made for apache servers... the server hosting the site I am working on uses IIS... another confusing problem. Is there anyway to edit these .htaccess files so that I can add more images to the site? Also, why cant I see images these 'blocked' images? Is there any way to disable this blocking? I have some text embedded within a '.gif' file and dont know how to change the text. I downloaded Adove Photoshop Elements 6.0 but when i use the horizontal type tool and type over the text, it makes the original text fuzzy and does not enter the new text. What am i doing wrong ? Thanks hi guys.. hope sm1 gonna sort out my problem i am just a beginner to html script,and my problem is that i smhow manage to get script to include media player into my webpage but i am not able to add song file into in it for e.g if i want to add akon.mp3 or any other song i am not able to do it hope sm will help me thanx in advance script is here Code: <!-- Multi WM Player at www.rainbow.arch.scriptmania.com/scripts/music/ --> <OBJECT ID="music" height=70 width=230 classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=,1,52,701" standby="Loading Microsoft Windows Media Player components..." <!-- Change to value=0 to hide status --> <param name="ShowStatusBar" value="1"> <param name="AudioStream" value="-1"> <param name="AutoSize" value="0"> <param name="AutoStart" value="-1"> <param name="AnimationAtStart" value="-1"> <param name="AllowScan" value="-1"> <param name="AllowChangeDisplaySize" value="-1"> <param name="AutoRewind" value="-1"> <param name="Balance" value="0"> <param name="BaseURL" value> <param name="BufferingTime" value="5"> <param name="CaptioningID" value> <param name="ClickToPlay" value="-1"> <param name="CursorType" value="0"> <param name="CurrentPosition" value="-1"> <param name="CurrentMarker" value="0"> <param name="DefaultFrame" value> <param name="DisplayBackColor" value="0"> <param name="DisplayForeColor" value="16777215"> <param name="DisplayMode" value="0"> <param name="DisplaySize" value="0"> <param name="Enabled" value="-1"> <param name="EnableContextMenu" value="-1"> <param name="EnablePositionControls" value="-1"> <param name="EnableFullScreenControls" value="0"> <param name="EnableTracker" value="-1"> <param name="Filename" value> <param name="InvokeURLs" value="-1"> <param name="Language" value="-1"> <param name="Mute" value="0"> <param name="PlayCount" value="1"> <param name="PreviewMode" value="0"> <param name="Rate" value="1"> <param name="SAMILang" value> <param name="SAMIStyle" value> <param name="SAMIFileName" value> <param name="SelectionStart" value="-1"> <param name="SelectionEnd" value="-1"> <param name="SendOpenStateChangeEvents" value="-1"> <param name="SendWarningEvents" value="-1"> <param name="SendErrorEvents" value="-1"> <param name="SendKeyboardEvents" value="0"> <param name="SendMouseClickEvents" value="0"> <param name="SendMouseMoveEvents" value="0"> <param name="SendPlayStateChangeEvents" value="-1"> <param name="ShowCaptioning" value="0"> <param name="ShowControls" value="-1"> <param name="ShowAudioControls" value="-1"> <param name="ShowDisplay" value="0"> <param name="ShowGotoBar" value="0"> <param name="ShowPositionControls" value="-1"> <param name="ShowTracker" value="-1"> <param name="TransparentAtStart" value="-1"> <param name="VideoBorderWidth" value="0"> <param name="VideoBorderColor" value="0"> <param name="VideoBorder3D" value="0"> <param name="Volume" value="0"> <param name="WindowlessVideo" value="0"> <EMBED type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" SRC="http://myserver/mypath/myfile.asf" name="MediaPlayer" height=70 width=230> </EMBED> </OBJECT> </div> <p> <BR> <INPUT id=song1 onclick=document.all.music.filename=document.all.song1.value; TYPE="RADIO" NAME="Music" VALUE="http://www.uploadhut.com/id153745/Crazy Frog Remixx ( WARNING VERY FUNNY!!).WAV"> Song 1</p> <p> <INPUT id=song2 onclick=document.all.music.filename=document.all.song2.value; TYPE="RADIO" NAME="Music" VALUE="http://servername/path/to/media.file"> Song 2</p> <p> <INPUT id=song3 onclick=document.all.music.filename=document.all.song3.value; TYPE="RADIO" NAME="Music" VALUE="http://servername/path/to/media.file"> Song 3</p> if i choose song 1 it should play akon.mp3 and so on...... plz help me Open Mozilla Firefox and go to this site: http://www.mm-theory.com Scroll down a bit until you see a table titled "Download PDFs" on the left-hand side. Click any one of them. Does anything happen, or do you get what I get: a blank window? Explorer doesn't seem to have this problem. I click on any of the links, I get the option to either open the PDF file in the browser or download it. If I choose to open in the browser, it does just that. Why would it not do the same in Firefox? The code for the links are as follows: Code: ... <tr><td class="PDFs"><a class="PDFs" href="../PDFs/Website Introduction.pdf">Website Introduction</a></td></tr> <tr><td class="PDFs"><a class="PDFs" href="../PDFs/Preliminary Concepts.pdf">Preliminary Concepts</a></td></tr> ... Thanks for any forthcoming help. I'm sure this is probably one of the dumbest questions to appear here, but how would I get a link to a file to open that file in its native program - i.e. a .doc into Word or a .xls with Excel rather than in an IE plugin? Problem is, of course, whilst the IE plugins work, they don't have full functionality. I read somewhere that you could change the default settings in Windows, but part of what I'm trying to set up is on a business computer and of course, things like file associations and registry are tied down pretty tight so they can't be accessed, so I need to do it from within a page of links. Many thanks (in hope) Hi all. I am redoing my homepages but have a problem that is driving me sane! A set of files work perfectly when checked by Firefox on my computer. When that same set of files are uploaded to the Homepage a few (not all) embedded jpgs do not appear, though their titles do. The files are not corrupted, I have checked. The jpg's are right there where they belong. To see the effect the Url is. http://homepages.ihug.co.nz/~Sspinett/Index.html Internet Explorer 7 has the same result Cheers. Pete. Hello, I need some help to get a HTML file to load from a PHP file. I got a host who cannot use files from PHP, only from HTML and then PHP, so can someone help me to get the register.php to load from a html file? If this is possible I would be thankfull CODE: Code: <?php ################# # # # # # Enjoy! # # # # # ################# include("config.php"); error_reporting(E_ALL ^ E_NOTICE); session_start(); $msg = Array(); $error = Array(); function addUser(){ if (empty($_POST)) return false; global $config, $msg, $error; if (empty($_POST['login'])) $error[] = 'Error, You forgot to enter a account name!'; if (empty($_POST['password'][0]) || empty($_POST['password'][1])) $error[] = 'Error, You forgot to enter a password!'; if ($_POST['password'][0] !== $_POST['password'][1]) $error[] = 'Password does not match!'; if (empty($_POST['email'])) $error[] = 'Please fill in a valid email adress!'; if (!empty($error)) return false; $db = @mysql_connect($config['mysql_host'], $config['mysql_user'], $config['mysql_pass']); if (!$db) return $error[] = 'Database: '.mysql_error(); if (!@mysql_select_db($config['mysql_dbname'], $db)) return $error[] = 'Database: '.mysql_error(); $query = "SELECT `acct` FROM `accounts` WHERE `login` = '".mysql_real_escape_string($_POST['login'])."'"; $res = mysql_query($query, $db); if (!$res) return $error[] = 'Database: '.mysql_error(); if (mysql_num_rows($res) > 0) return $error[] = 'Username already in use.'; //Modified by Jerq $query = "INSERT INTO `accounts` (`login`,`password`,`lastip`, `flags`) VALUES ('".mysql_real_escape_string($_POST['login'])."', '".mysql_real_escape_string($_POST['password'][0])."', '".$_SERVER['REMOTE_ADDR']."','".mysql_real_escape_string($_POST['tbc'][0])."')"; //Modified by Jerq $res = mysql_query($query, $db); if (!$res) return $error[] = 'Database: '.mysql_error(); $msg[] = 'The Account <span style="color:#00FF00"><strong>'.htmlentities($_POST['login']).'</strong></span> has been created!'; mysql_close($db); return true; } { addUser(); } ?> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>Account Registration Page</title> <meta http-equiv="Pragma" content="no-cache"/> <meta http-equiv="Cache-Control" content="no-cache"/> <style type="text/css" media="screen">@import url(server_stats.css);</style> <!--[if lt IE 7.]> <script defer type="text/javascript" src="pngfix.js"></script> <![endif]--> </head> <body> <center> <div class="logo"></div> <div style="width:300px"> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST"> <table width="100%" border="0" cellspacing="1" cellpadding="3"> <tr class="head"><th colspan="2">Account Creation</th></tr> <tr> <th>Username: </th><td align="center"><input class="button" type="text" name="login" size="30" maxlength="16"/></td> </tr> <tr> <th>Password: </th><td align="center"><input class="button" type="password" name="password[]" size="30" maxlength="16"/></td> </tr> <tr> <th>Retype Password: </th><td align="center"><input class="button" type="password" name="password[]" size="30" maxlength="16"/></td> </tr> <tr> <th>E-mail: </th><td align="center"><input class="button" type="text" name="email" size="30" maxlength="30"/></td> </tr> <!--Added by Jerq--> <th>Account Type:</th><td align="center"> <select name="tbc" type="select"> <option value="0">Normal</option> <option selected value="8">Burning Crusade</option> </select></td> <!--Added By Jerq--> </table> <input type="button" class="button" value="Back" onClick="history.go(-1)" /> <input type="submit" value="Create" class="button"/> </form> <?php if (!empty($error)){ echo '<table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td class="error" align="center">'; foreach($error as $text) echo $text.'</br>'; echo '</td></tr></table>'; }; if (!empty($msg)){ echo '<table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td align="center">'; foreach($msg as $text) echo $text.'</br>'; echo '</td></tr></table>'; exit(); }; ?> </div> </center> </body> </html> THE CONFIG.PHP: Code: <?php ################# # # # # # Enjoy! # # # # # ################# $config['mysql_host'] = 'wowserver.serveftp.com'; //MySQL Host $config['mysql_user'] = 'root'; //MySQL Username $config['mysql_pass'] = 'wHoSYoURDaDy65'; //MySQL Password $config['mysql_dbname'] = 'antrix'; //Database Name ?> guys i have a page with a link. when i click the link i want to print a file. assuming the file already exits.. say a doc file or something thanks guys your help would be mightily appreciated Could anyone please tell me the code to call an external html file? I need to refresh my memories! |