Everything posted by deb0and
-
getting a web form to add up numbers
Hello, I am struggling with javascript. I have an input box and would like it when numbers are inserted it will add them together defined on a set number. So for example a price set at £50 when 2 is entered it shows the sum of £100. The part of my form is below when I would like to implement this functionality., <div class="controls"> <input type="text" placeholder="How many would you like?" id="ENI_WHtest_ipCount" class="inputWide" maxlength="30"> </div>
-
How do I align lists side by side equally accross the page
Hello, I am struggling to get my 3 lists aligned equally accross the page. I have created a class(square) and then wrapped each ul in a div, however this is not giving me my desired results. here is my css code #container { margin: 0 auto; width: 750px; background:#fff; } #footer { background:#white; text-align: center; padding: 20px; height: 1%; } .square { float:left; width:210px; margin: 0 10px 10px 30px; } the html that corresponds to the lists is below also <div class="square"> <ul> <li>1</li> <li>1</li> <li>1</li> <li>1</li> <li>1</li> </ul> <img src= "download_button.gif" /> </div> <div class="square"> <ul> <li>1</li> <li>1</li> <li>1</li> <li>1</li> <li>1</li> </ul> <img src= "download_button.gif" /> </div> <div class="square"> <ul> <li>1</li> <li>1</li> <li>1</li> <li>1</li> <li>1</li> </ul> <img src= "download_button.gif" /> </div>
-
run an exe file server side?
Hello I am wondering If i can run an exe file server side when a page is loaded, so for example the file loads when someone navigates to that page. This would be for iis5 in the wwwroot folder. ASP or php ideas welcome, not sure how to go about it.
-
Stop header movement
Fantastic, thank you very much, that worked great
-
Stop header movement
Hello I have header movement on one page of my website that i cant seem to rectify, the page in question has a css table style on it. The website has two external style sheets, the first which is the layout of the whole web site and the second which is just purley for the table. I will post my css and html so you can see what the problem is, sorry for all the code but this problem is really starting to annoy me. So here is the style sheet for the website layout and html below to show how it should look. #container{margin:auto;width: 600px;background:#fff;} .logo img{ margin-bottom: 20px;margin-top: 40px; display: block; margin-left: auto; margin-right: auto;} #logo2 {;clear: both; margin-top:20px;text-align:center;} .nav a {text-decoration: none;color: #666666; margin-right: 10px; margin-bottom: 40px;} .nav a:visited {text-decoration: none; margin-right: 10px; margin-bottom: 40px;} .nav a:active {text-decoration: unerline; color: #cc0000;} .nav a:hover {text-decoration: overline; color: #cc0000;} .text { font-family: Arial; font-size: 14px; color: #808080;text-align:justify;margin-top:20px;} p:first-letter {font-weight: bold; color: #cc0000;} #text1 {margin-left: 74px; margin-right: 83px;margin-top:20px;} div.img { margin: 10px; border: 1px solid #666666; height: auto; width: auto; float: left; text-align: center; } div.img img { display: inline; margin: 3px; border: 1px solid #666666; } div.img a:hover img {border: 1px solid #cc0000;} div.desc { text-align: center; font-weight: normal; width: 120px; margin: 2px; } * { margin: 0; padding: 0; } #page-wrap {width: 600px;background: white;padding: 20px 50px 20px 50px;margin: 20px auto;min-height: 800px;height: auto !important;height: 800px;} #contact-area {width: 500px;margin-top: 25px;} #contact-area input, #contact-area textarea {padding: 5px;width: 420px;font-family: Arial;font-size: 14px; color:#666666;margin-left: 15px;border: 2px solid #ccc;} #contact-area textarea { height:90px; } #contact-area textarea:focus, #contact-area input:focus { border: 2px solid #900; } #contact-area input.submit-button { width: 100px; float: right; } td.left { width: 80px; text-align: left; font-size: 14px; font-style: Arial; color:#666666; background:#cccccc;text-align:center; ] #catpcha-area { margin-left: 200px; } <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title></title> <link rel="stylesheet" type="text/css" href="main.css" /> </head> <body> <div id="container"> <span class="logo"> <img src="images/main_logo.gif" /> </span> <div align="center"> <span class="nav"> <a href="about.html">About </a> <a href="portfolio.html"> Portfolio </a> <a href="coding.html"> Coding </a> <a href="seo.html"> SEO </a> <a href="contact.html"> Contact </a> <a href="tutorials.html"> Tutorials </a> <a href="blog.html"> Blog </a> <a href="sitemap.html"> Sitemap </a> </span> </div> <div id="text1"> <span class="text"> <p>Here at opendesignz we use the latest of technology to ensure your website looks and feels every bit of the 21st century</p> </span> <span class="text"> <p>Here at opendesignz we use the latest of technology to ensure your website looks and feels every bit of the 21st century</p> </span> <span class="text"> <p>Here at opendesignz we use the latest of technology to ensure your website looks and feels every bit of the 21st century</p> </span> <span class="text"> <p>Here at opendesignz we use the latest of technology to ensure your website looks and feels every bit of the 21st century</p> </span> <span class="text"> <p>Here at opendesignz we use the latest of technology to ensure your website looks and feels every bit of the 21st century</p> </span> </div> <div id="logo2"> <img src="images/facebook.png" /> <img src="images/twitter.png" /> </div> </div> </div> </div> <!-- End Content Column --> </body> </html> And now the css style sheet for the table followed by the html .economic-title { float: left; height: 40px; width: 153px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; line-height: 40px; background-color: #ffffff; text-align: center; color: #666666; text-decoration: none; margin-top:20px; } .web-design-text { float: left; width: 482px; font-size: 14px; line-height: 25px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #666666; margin-top:20px; } .nav-footer { float: left; width: 230px; margin-right: 5px; } .web-design-price { float: left; width: 200px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 18px; font-weight: bold; color: #FF6500; text-decoration: none; text-align: center; margin-top: 20px; } .seo-table-title { float: left; width: 674px; border-bottom-width: 1px; border-bottom-style: ; border-bottom-color: #cc0000; height: 40px; margin-top:20px; } .seo-packages-heading { height: 40px; width: 215px; float: left; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; line-height: 40px; font-weight: bold; color: #666666; text-align: center; margin-top:20px; } .gold-title { float: left; height: 40px; width: 153px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; color: #666666; text-decoration: none; text-align: center; background-color: #ffffff; line-height: 40px; margin-top:20px; } .seo-data { float: left; width: 674px; height: 20px; margin-top: 3px; margin-bottom: 3px; margin-top:20px; } .silver-title { float: left; height: 40px; width: 153px; background-color: #ffffff; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; line-height: 40px; color: #666666; text-decoration: none; text-align: center; margin-top:20px; } .seo-packages-points { height: 20px; width: 215px; float: left; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: normal; color: #666666; text-align: center; line-height: 20px; background-color: #ffffcc; } .seo-blue { float: left; height: 20px; width: 153px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; background-color: #ffffcc; text-align: center; color: #cc0000; text-decoration: none; } .web-design-portfolio { float: left; width: 931px; margin-bottom: 20px; padding-bottom: 20px; } .web-page-designed { float: left; width: 684px; text-align: center; height: 306px; } .seo-silver { float: left; height: 20px; width: 153px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; background-color: #ffffcc; text-align: center; color: #cc0000; text-decoration: none; } .web-design-desc { float: left; height: 306px; width: 247px; } .seo-gold { float: left; height: 20px; width: 153px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffcc; text-align: center; color: #cc0000; text-decoration: none; line-height: 20px; } .seo-sub-heading { float: left; width: 674px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #cc0000; font-size: 16px; text-decoration: none; margin-bottom: 5px; font-weight: bold; margin-top: 5px; } h3 { font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; color: #00A8D5; text-decoration: none; font-size: 18px; padding: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; } .web-desc-title { float: left; height: 45px; width: 247px; text-align: center; font-family: Verdana, Arial, Helvetica, sans-serif; color: #FE0000; font-weight: bold; font-size: 16px; text-decoration: none; padding-top: 5px; } .web-desc { float: left; width: 223px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #000000; font-size: 12px; text-decoration: none; padding-top: 5px; line-height: 20px; padding-left: 24px; } .ebook-pair-set { float: left; height: 300px; width: 365px; } .ebooks-set-container { float: left; width: 933px; } .ebooks-set-container-two { float: left; width: 933px; text-align: center; } .messanger-heading { float: left; width: 230px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 18px; font-weight: bold; color: #00A3CC; text-decoration: none; text-align: center; } .names-in-form { float: left; width: 130px; font-size: 18px; font-weight: normal; font-family: Arial, Helvetica, sans-serif; text-align: left; padding-left: 70px; line-height: 35px; } .form-container { float: left; width: 600px; margin-bottom: 20px; } .field-container { width: 400px; float: right; } .text-field { width: 300px; height: 35px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 35px; font-weight: normal; font-variant: normal; color: #000000; text-decoration: none; } .messanger-bold-text { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; color: #CC0000; text-decoration: none; line-height: 35px; height: 35px; float: none; } .text-area { width: 300px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: normal; font-variant: normal; color: #000000; text-decoration: none; line-height: 35px; } <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title></title> <link rel="stylesheet" type="text/css" href="main.css" /> <link href="table.css" rel="stylesheet" type="text/css" media="all" /> </head> <body> <div id="container"> <span class="logo"> <img src="images/main_logo.gif" /> </span> <div align="center"> <span class="nav"> <a href="about.html">About </a> <a href="portfolio.html"> Portfolio </a> <a href="coding.html"> Coding </a> <a href="seo.html"> SEO </a> <a href="contact.html"> Contact </a> <a href="tutorials.html"> Tutorials </a> <a href="blog.html"> Blog </a> <a href="sitemap.html"> Sitemap </a> </span> </div> <div id="container"> <div class="content-text" id="content-text_d"> <div class="seo-table" id="seo-table_d"> <div class="seo-table-title" id="seo-table-title_d"> <div class="seo-packages-heading" id="seo-packages-heading_d">SEO Packages</div> <div class="economic-title" id="economic-title_d">Package 1</div> <div class="silver-title" id="silver-title_d">Package 2</div> <div class="gold-title" id="gold-title_d">Package 3</div> </div> <div class="seo-data" id="seo-data_d"> <div class="seo-packages-points" id="seo-packages-points_d">Monthly Cost </div> <div class="seo-blue" id="seo-blue_d">$200</div> <div class="seo-silver" id="seo-silver_d">$350</div> <div class="seo-gold" id="seo-gold_d">$500</div> </div> <div class="seo-sub-heading" id="seo-sub-heading_d">Review and Analysis</div> <div class="seo-data" id="seo-data_d2"> <div class="seo-packages-points" id="seo-packages-points_d2">Website Analysis<br /> </div> <div class="seo-blue" id="seo-blue_d2">$200</div> <div class="seo-silver" id="seo-silver_d2">$350</div> <div class="seo-gold" id="seo-gold_d2">$500</div> </div> <div class="seo-data" id="seo-data_d3"> <div class="seo-packages-points" id="seo-packages-points_d3">Competitive Analysis </div> <div class="seo-blue" id="seo-blue_d3">YES</div> <div class="seo-silver" id="seo-silver_d3">YES</div> <div class="seo-gold" id="seo-gold_d3">YES</div> </div> <div class="seo-data" id="seo-data_d5"> <div class="seo-packages-points" id="seo-packages-points_d5">Max Keyword Finalize</div> <div class="seo-blue" id="seo-blue_d5">10</div> <div class="seo-silver" id="seo-silver_d5">20</div> <div class="seo-gold" id="seo-gold_d5">25</div> </div> <div class="seo-data" id="seo-data_d7"> <div class="seo-packages-points" id="seo-packages-points_d7"> Initial Ranking Report</div> <div class="seo-blue" id="seo-blue_d7">YES</div> <div class="seo-silver" id="seo-silver_d7">YES</div> <div class="seo-gold" id="seo-gold_d7">YES</div> </div> <div class="seo-sub-heading" id="seo-sub-heading_d2">On page optimization</div> <div class="seo-data" id="seo-data_d8"> <div class="seo-packages-points" id="seo-packages-points_d8">Content Optimization</div> <div class="seo-blue" id="seo-blue_d8">YES</div> <div class="seo-silver" id="seo-silver_d4">YES</div> <div class="seo-gold" id="seo-gold_d4">YES</div> </div> <div class="seo-data" id="seo-data_d9"> <div class="seo-packages-points" id="seo-packages-points_d9">Image Optimization</div> <div class="seo-blue" id="seo-blue_d9">YES</div> <div class="seo-silver" id="seo-silver_d6">YES</div> <div class="seo-gold" id="seo-gold_d6">YES</div> </div> <div class="seo-data" id="seo-data_d10"> <div class="seo-packages-points" id="seo-packages-points_d10">HTML code optimization </div> <div class="seo-blue" id="seo-blue_d10">YES</div> <div class="seo-silver" id="seo-silver_d8">YES</div> <div class="seo-gold" id="seo-gold_d8">YES</div> </div> <div class="seo-data" id="seo-data_d11"> <div class="seo-packages-points" id="seo-packages-points_d11">Meta tag optimization </div> <div class="seo-blue" id="seo-blue_d11">YES</div> <div class="seo-silver" id="seo-silver_d9">YES</div> <div class="seo-gold" id="seo-gold_d9">YES</div> </div> <div class="seo-data" id="seo-data_d12"> <div class="seo-packages-points" id="seo-packages-points_d12">HTML Sitemap creation</div> <div class="seo-blue" id="seo-blue_d12">YES</div> <div class="seo-silver" id="seo-silver_d10">YES</div> <div class="seo-gold" id="seo-gold_d10">YES</div> </div> <div class="seo-data" id="seo-data_d13"> <div class="seo-packages-points" id="seo-packages-points_d13">Google XML Sitemap Creation </div> <div class="seo-blue" id="seo-blue_d13">YES</div> <div class="seo-silver" id="seo-silver_d11">YES</div> <div class="seo-gold" id="seo-gold_d11">YES</div> </div> <div class="seo-data" id="seo-data_d14"> <div class="seo-packages-points" id="seo-packages-points_d14">Google Analytics Setup </div> <div class="seo-blue" id="seo-blue_d14">YES</div> <div class="seo-silver" id="seo-silver_d12">YES</div> <div class="seo-gold" id="seo-gold_d12">YES</div> </div> <div class="seo-data" id="seo-data_d15"> <div class="seo-packages-points" id="seo-packages-points_d15">Robots.txt Optimization </div> <div class="seo-blue" id="seo-blue_d15">YES</div> <div class="seo-silver" id="seo-silver_d13">YES</div> <div class="seo-gold" id="seo-gold_d13">YES</div> </div> <div class="seo-data" id="seo-data_d16"> <div class="seo-packages-points" id="seo-packages-points_d16">RSS Feed Generation</div> <div class="seo-blue" id="seo-blue_d16">NO</div> <div class="seo-silver" id="seo-silver_d16">NO</div> <div class="seo-gold" id="seo-gold_d16">$500</div> </div> <div class="seo-sub-heading" id="seo-sub-heading_d3">OFF page optimization</div> <div class="seo-data" id="seo-data_d18"> <div class="seo-packages-points" id="seo-packages-points_d18"> Search Engine Submission</div> <div class="seo-blue" id="seo-blue_d4">YES</div> <div class="seo-silver" id="seo-silver_d14">YES</div> <div class="seo-gold" id="seo-gold_d14">YES</div> </div> <div class="seo-data" id="seo-data_d18"> <div class="seo-packages-points" id="seo-packages-points_d18">Google Base Optimization</div> <div class="seo-blue" id="seo-blue_d6">YES</div> <div class="seo-silver" id="seo-silver_d15">YES</div> <div class="seo-gold" id="seo-gold_d15">YES</div> </div> <div class="seo-data" id="seo-data_d18"> <div class="seo-packages-points" id="seo-packages-points_d18">Relevant Directory Submission</div> <div class="seo-blue" id="seo-blue_d17">YES</div> <div class="seo-silver" id="seo-silver_d17">YES</div> <div class="seo-gold" id="seo-gold_d17">YES</div> </div> <div class="seo-data" id="seo-data_d18"> <div class="seo-packages-points" id="seo-packages-points_d18">Local Niche Directory ubmission</div> <div class="seo-blue" id="seo-blue_d19">YES</div> <div class="seo-silver" id="seo-silver_d19">YES</div> <div class="seo-gold" id="seo-gold_d19">YES</div> </div> <div class="seo-data" id="seo-data_d18"> <div class="seo-packages-points" id="seo-packages-points_d18">One way link building</div> <div class="seo-blue" id="seo-blue_d20">YES</div> <div class="seo-silver" id="seo-silver_d20">YES</div> <div class="seo-gold" id="seo-gold_d20">YES</div> </div> <div class="seo-data" id="seo-data_d18"> <div class="seo-packages-points" id="seo-packages-points_d18">Article Creation</div> <div class="seo-blue" id="seo-blue_d21">YES</div> <div class="seo-silver" id="seo-silver_d21">YES</div> <div class="seo-gold" id="seo-gold_d21">YES</div> </div> <div class="seo-data" id="seo-data_d18"> <div class="seo-packages-points" id="seo-packages-points_d18">Article submissions</div> <div class="seo-blue" id="seo-blue_d22">YES</div> <div class="seo-silver" id="seo-silver_d22">YES</div> <div class="seo-gold" id="seo-gold_d22">YES</div> </div> <div class="seo-data" id="seo-data_d18"> <div class="seo-packages-points" id="seo-packages-points_d18">Press Release Creation</div> <div class="seo-blue" id="seo-blue_d18">NO</div> <div class="seo-silver" id="seo-silver_d18">NO</div> <div class="seo-gold" id="seo-gold_d23">YES</div> </div> <div class="seo-data" id="seo-data_d18"> <div class="seo-packages-points" id="seo-packages-points_d18">Press Release Distribution</div> <div class="seo-blue" id="seo-blue_d18">YES</div> <div class="seo-silver" id="seo-silver_d18">YES</div> <div class="seo-gold" id="seo-gold_d24">YES</div> </div> <div class="seo-data" id="seo-data_d18"> <div class="seo-packages-points" id="seo-packages-points_d18">Blog commenting</div> <div class="seo-blue" id="seo-blue_d18">NO</div> <div class="seo-silver" id="seo-silver_d18">NO</div> <div class="seo-gold" id="seo-gold_d25">YES</div> </div> <div class="seo-data" id="seo-data_d18"> <div class="seo-packages-points" id="seo-packages-points_d18">Forum posting</div> <div class="seo-blue" id="seo-blue_d18">NO</div> <div class="seo-silver" id="seo-silver_d18">NO</div> <div class="seo-gold" id="seo-gold_d26">YES</div> </div> <div class="seo-data" id="seo-data_d18"> <div class="seo-packages-points" id="seo-packages-points_d18">social bookmarking</div> <div class="seo-blue" id="seo-blue_d18">NO</div> <div class="seo-silver" id="seo-silver_d18">NO</div> <div class="seo-gold" id="seo-gold_d18">YES</div> </div> </div> </div> </div> </div> <div id="logo2"> <img src="images/facebook.png" /> <img src="images/twitter.png" /> </div> </div> </div> </div> <!-- End Content Column --> </body> </html>
-
a.link wont change colour?
OK i have sorted this problem now, must have been a something wrong with firefox. I uninstalled the browser and did a fresh install and it all works good now. Thanks for all your help people Andy
-
a.link wont change colour?
Firefox updated a few days back to latest version, only add-on i have is firebug Hi, no wont detect any colour No missing brackets I have checked and checked
-
a.link wont change colour?
It still doesn't work, no matter what colour i change it to - strange
-
a.link wont change colour?
Hello yes that works fine however i want the .nav a:link {color; grey;} and that doesn't work, it wont change colour in firefox however works perfectly in iexplorer
-
a.link wont change colour?
I understand, but in firefox the links appear blue no matter what colour i specify, however in iexplorer it works perfectly - I can change them to any colour so the code must be correct
-
a.link wont change colour?
How strange, i have just noticed that it works in internet explorer but looks awful, but it doesn't work in firefox browser? Which browser are you using?
-
a.link wont change colour?
Hello Thank you for your reply, but I still have the same problem Andy
-
a.link wont change colour?
Sure thing <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title></title> <link rel="stylesheet" type="text/css" href="main.css" /> </head> <body> <div id="container"> <span class="logo"> <img src="images/main_logo.gif" /> </span> <div align="center"> <span class="nav"> <a href="#">test </a> <a href="#">test </a> <a href="#">test </a> <a href="#">test </a> <a href="#">test </a> <a href="#">test </a> <a href="#">test </a> <a href="#">test </a> </span> </div>
-
a.link wont change colour?
Thanks tried that and it still doesn't work
-
a.link wont change colour?
Hey all! I can't get the a.link to change to any colour, below is the css i am using, everything else works fine .nav A:link {color: #cc0000;} .nav A:visited {text-decoration: none; margin-right: 10px;} .nav A:hover {text-decoration: overline; color: #cc0000;} .nav A:active {text-decoration: overline; color: #cc0000;} cheers Andy
-
Picture doesnt always appear
here is the code to upload images application/x-httpd-php upload_photograph.php PHP script text <? include("includes/session.php"); $_SESSION['refer'] = basename($_SERVER['PHP_SELF']); if(User::isLoggedIn() == true and isset($_REQUEST['property_id'])) { $details = User::getDetails(); $user_id = $_SESSION['user_id']; $property_id = $_REQUEST['property_id']; $query = mysql_query("select * from property where user_id = '$user_id' and property_id = '$property_id'"); $result_num = mysql_num_rows($query); if($result_num >=1) { $row = mysql_fetch_array($query); $photos_tint = $row['photos_tint']; if($photos_tint ==0) { $photos_tint = 8; } else { $photos_tint = $photos_tint + 8; } $query = mysql_query("select count(*) as total from photograph where property_id = '$property_id'"); $row = mysql_fetch_array($query); $total = $row['total']; if($photos_tint > $total) { //pic upload $fileupload = $_FILES['fileupload']; if($fileupload['name'] !="") { if($fileupload['size'] <= 5000000000) { // picupload script starts //Get the file information $userfile_name = $_FILES['fileupload']['name']; $userfile_tmp = $_FILES['fileupload']['tmp_name']; $userfile_size = $_FILES['fileupload']['size']; $filename = basename($_FILES['fileupload']['name']); $file_ext = substr($filename, strrpos($filename, '.') + 1); //Only process if the file is a JPG and below the allowed limit if((!empty($_FILES["fileupload"])) && ($_FILES['fileupload']['error'] == 0)) { if (($file_ext!="jpg") && ($userfile_size > $max_file)) { $error= "ONLY jpeg images under 1MB are accepted for upload"; } }else{ $error= "Select a jpeg image for upload"; } //Everything is ok, so we can upload the image. if (strlen($error)==0){ if (isset($_FILES['fileupload']['name'])){ move_uploaded_file($userfile_tmp, $large_image_location); chmod($large_image_location, 0777); $width = getWidth($large_image_location); $height = getHeight($large_image_location); //Scale the image if it is greater than the width set above if ($width > $max_width){ $scale = $max_width/$width; $uploaded = resizeImage($large_image_location,$width,$height,$scale); }else{ $scale = 1; $uploaded = resizeImage($large_image_location,$width,$height,$scale); } //saving the image in the db mysql_query("insert into photograph(photograph, property_id) values('$uploaded','$property_id')"); //Delete the thumbnail file so the user can create a new one if (file_exists($thumb_image_location)) { unlink($thumb_image_location); } echo "<script>alert('Your picture has been uploaded successfully!'); window.location ='photographs.php?property_id=$property_id'; </script>"; } } // picupload script ends } else { echo "<script> alert('Image couldnt be uploaded. The image size exceeded 500000 bytes.'); window.location ='photographs.php?property_id=$property_id';</script>"; } } } else { echo "<script>alert('Sorry, you cant upload more pictures.'); window.location ='photographs.php?property_id=$property_id'; </script>"; } } else { header("Location: dashboard.php"); } } else { header("Location:".XPROOT."login.php"); } ?>
-
Picture doesnt always appear
Here is the code used application/x-httpd-php photographs.php PHP script text <? include("includes/session.php"); $_SESSION['refer'] = basename($_SERVER['PHP_SELF']); if(User::isLoggedIn() == true and isset($_REQUEST['property_id'])) { $unit_type['1'] = "individual"; $unit_type['2'] = "two unit"; $unit_type['3'] = "three unit"; $unit_type['4'] = "four unit"; $details = User::getDetails(); $user_id = $_SESSION['user_id']; $property_id = $_REQUEST['property_id']; $query = mysql_query("select * from property where user_id = '$user_id' and property_id = '$property_id'"); $result_num = mysql_num_rows($query); if($result_num >=1) { $row = mysql_fetch_array($query); $property_type = $row['property_type']; $photos_tint = $row['photos_tint']; if($photos_tint ==0) { $photos_tint = 8; } else { $photos_tint = $photos_tint + 8; } ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>HolidayHomesInEurope.com :: Photographs</title> <link href="style.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- .style1 { font-size: 10px; font-style: italic; } total { font-size: 15px; } .total { font-size: 18px; } .total { color: #1378BD; } .total { color: #990; } .ex { font-size: 11px; } --> </style> </head> <script src="includes/jquery.js" type="text/javascript" language="javascript"></script> <script src="includes/validation.js" type="text/javascript" language="javascript"></script> <script src="includes/update.js" type="text/javascript" language="javascript"></script> <body> <div class="full"> <div class="container"> <div id="top"> <div class="link"><a HREF="www.holidayhomesineurope.com" title="Lorem ipsum dolor sit amet, consectetur adipiscing elit.">www.holidayhomesineurope.com</a> - Lorem ipsum dolor sit amet, consectetur adipiscing elit.</DIV> <?php include("includes/login.php"); ?> </div> <div id="main"> <div id="menu"> <ul id="menulist"> <li><a href="default.php" class="mm00" title="Home" onMouseOver="this.className='mm00o'" onMouseOut="this.className='mm00'"></a></li> <li><a href="about.php" class="mm01" title="About Us" onMouseOver="this.className='mm01o'" onMouseOut="this.className='mm01'"></a></li> <li><a href="adv_search.php" class="mm02" title="Search" onMouseOver="this.className='mm02o'" onMouseOut="this.className='mm02'"></a></li> <li><a href="advertise.php" class="mm03" title="Advertise" onMouseOver="this.className='mm03o'" onMouseOut="this.className='mm03'"></a></li> <li><a href="login.php" class="mm04" title="Login" onMouseOver="this.className='mm04o'" onMouseOut="this.className='mm04'"></a></li> <li><a href="signup.php" class="mm05" title="Register" onMouseOver="this.className='mm05o'" onMouseOut="this.className='mm05'"></a></li> <li><a href="faqs.php" class="mm06" title="FAQs" onMouseOver="this.className='mm06o'" onMouseOut="this.className='mm06'"></a></li> </ul> </div> <div id="cont_bg"> <div id="content"> <div id="content_bottom"><h1>Update photographs</h1> <div style="padding-left:8px; padding-right:6px;"> <p class="content">Use this form to upload your photographs.<br /> <font size="1">(Maximum 500000 bytes, only .jpg files allowed) </font></p> </div> <table width="100%" border="0" align="center" cellpadding="5" cellspacing="0"> <tbody> <tr> <td align="left"><div style="border-style: solid; border-width: 1px; border-color: #1378bd;width:641px;position:relative;left:20px; "> <div class="property_div">Photographs</div> <table width="100%" border="0" cellpadding="3" cellspacing="2" class="content"> <tbody> <tr bgcolor="#FFEBD9"> <td width="24%" valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="2" cellpadding="2"> <tr> <td width="12%" align="center"><strong>Photograph #</strong></td> <td width="50%" align="center"><strong>Photograph</strong></td> <td width="38%" align="center"><strong>Action</strong></td> </tr> <? $query = mysql_query("select * from photograph where property_id = '$property_id' and photograph !=''"); for($ctr=0; $ctr < $photos_tint; $ctr++) { $row = mysql_fetch_array($query); $photograph = $row['photograph']; ?> <tr> <td align="center"><?=$ctr+1;?></td> <td align="center" class="content2"><? if($photograph =="") { echo "[No Image]"; } else { echo "<img src='$photograph'>"; } ?></td> <td align="center"><span class="content2"> <? if($photograph =="") { ?> </span> <div id="div_<?=$ctr;?>"><form action="upload_photograph.php" method="post" enctype="multipart/form-data" name="form_<?=$ctr;?>" id="form_<?=$ctr;?>"><input name="property_id" type="hidden" value="<?=$property_id;?>" /> <input type="file" name="fileupload" id="fileupload_<?=$ctr;?>" class="input_text" onchange="check_image('fileupload',this.value,'form_<?=$ctr;?>','div_<?=$ctr;?>');" /> </form></div> <span class="content2"> <? } else { ?> <a href="delete_photograph.php?property_id=<?=$property_id;?>&photograph_id=<?=$row['photograph_id'];?>">Delete</a><? if($row['is_thumb'] !="Y") { ?><br /> <br /> <a href="make_thumbnail.php?property_id=<?=$property_id;?>&photograph_id=<?=$row['photograph_id'];?>">Make this thumbnail image</a> <? } } ?> </span></td> </tr> <? } ?> <tr> <td align="center"><strong>Thumbnail</strong></td> <td align="center"><span class="content2"> <? $query = mysql_query("select * from photograph where property_id = '$property_id' and photograph !='' and is_thumb ='Y'"); $result_num = mysql_num_rows($query); if($result_num =="" or $result_num ==0) { echo "[No Thumbnail]"; } else { $row = mysql_fetch_array($query); $photograph = $row['photograph']; echo "<img src='$photograph'>"; } ?> </span></td> <td align="center"><span class="content2"> <? if($result_num !="" or $result_num !=0) { ?><a href="remove_thumbnail.php?property_id=<?=$property_id;?>">Remove thumbnail</a> <? } ?> </span></td> </tr> </table></td> </tr> </tbody> </table> </div></td> </tr> </tbody> </table> </div> </div> </div> </div> <div id="column"> <?php include('column.php'); ?> </div> <div id="footer"> <div class="copy"> <strong>© holidayhomesineurope.com 2010</strong><br />All rights reserved. </div> <div class="pipelist"> <ul> <li><a href="default.php" title="Home">Home</a></li> <li><a href="about.php" title="About Us">About Us</a></li> <li><a href="adv_search.php" title="Search">Search</a></li> <li><a href="advertise.php" title="Advertise">Advertise</a></li> <li><a href="login.php" title="Login">Login</a></li> <li><a href="terms.php" title="Terms">Terms</a></li> <li class="last"><a href="faqs.php" title="FAQs">FAQs</a></li> </ul> </div> </div> </div> </div> </body> </html> <? } else { header("Location: dashboard.php"); } } else { header("Location:".XPROOT."login.php"); } ?>
-
Picture doesnt always appear
Hello, I hope this is the right forum as i suspect it is something to do with my php code as to why this problem is happening. Basically i offer advertising for property owners, now when they advertise they upload 8 pictures, the first picture they upload is used as a taster with a small description next to it see this link, http://www.holidayhomesineurope.com/adv_search1.php as you can see there are some with pictures showing and other not, now i am not sure why this would be? Any help here would be greatly appreciated.
-
not seeing the correct URL
I have sorted this now and surprisingly it was my own fault I had configured the includes/config.php wrongly This is what I had defined define("DB_HOSTNAME","localhost"); define("DB_USER","example"); define("DB_PASS","******"); define("DB_DB","example"); define("XPROOT","http://174.120.96.252/~holidayh/"); define("IMG_ROOT","example/"); I just changes the red text to http://www.holidayhomesineurope.com/ - I have been scratchin my head for ages over that one Thanks for all your replies
-
not seeing the correct URL
Hello I am not sure why but on my website I have URLS like this ..174.120.96.252/~holidayh/dashboard.php.. but should really be ..www.holidayhomesineurope.com/holidayh/dashboard.php.., I dont even think the holidayh bit should be there either i thought i should be seeing ..www.holidayhomesineurope.com/dashboard.php.. I am a bit confused i any one explain why i would be most grateful. Thanks
-
I would like your opinions please
Hello Please could I have your opinions on www.holidayhomesineurope.com, more importantly if you owned a holiday home would you be happy with the how the adverts a laid out? Thanks
-
Wrong positioning
Another thing I was going to ask you experts is I had a lot of trouble getting the 3 content columns to line up. Is my css OK or is there an easier way?
-
Wrong positioning
Thanks a lot that worked great.
-
Wrong positioning
I have added it to original post. Thanks
-
Wrong positioning
Hello, Using the picture attached I have added a border around the footer, what i am wanting is when more content is added to the three seperate text column the footer moved down below the content but this is not happening I can figure out why either. Below is my css I am using, i Think it is to do with the #content 1,2 & 3 part as i struggled to get them all side by side which i think has affected the way in which the footer should operate. Anyway all i am wanting is the footer to move down as more text is added to the content sections #container {position:relative;width:750px;margin: 0 auto;background: #fff;z-index:80;text-align:left;} #header {position:relative; width:750px;height:100px; } .header {position:relative; margin: 30px 0px 0px 10px; float:left;} #nav {position:relative;float:right; margin: 70px 20px 20px 0px} #nav a:link { color: #438016;font-size:12px} #subheader {position:relative; width:750px;height:180px;background:url(grass.gif); } #login { position:relative; margin: 30px 10px 0px 400px; float:right; font-size: 12px; color: white; } #content {position:relative; width:750px;height:200px; } #content1{ position:relative;width:235px; margin:10px 0px 0px 10px;float:left;} #content2{ position:relative;width:235px; margin:10px 0px 0px 0px; float:right;background-color:grey;border-style:dashed} #content3{ position:relative;width:235px; margin:10px 10px 0px 10px; float:right;} #footer {position:absolute; width:750px;height:100px; margin:50 0 0 0; border-style:dashed; } Also below is the html code to accompany the above. <html> <head> <title> test</title> <link rel="stylesheet" type="text/css" href="style1.css"/> </head> <body> <div id="container"> <div id="header"> <div id="nav"> <a href=""> HOME | </a> <a href=""> LISTINGS | </a> <a href=""> ADVERTISE | </a> <a href=""> CONTACTS </a> </div> <img src="header.gif" alt="header" class="header"> </div> <div id="subheader"> <div id="login"> <form method="POST" action=""> <div align="center"> Owner Login </div> Username: <input type="text" name="username" size="15" /><br /> Password: <input type="password" name="password" size="15" /><br /> <div align="right"> <p><input type="submit" value="Login" /></p> </div> </form> </div> </div> <div id="content"> <div id="content1"> lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum </div> <div id="content2"> lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum </div> <div id="content3"> lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum lorum esporum dorum </div> </div> <div id="footer"> </div> </div> </body> </html>