Jump to content

adamhhh

Members
  • Posts

    37
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

adamhhh's Achievements

Member

Member (2/5)

0

Reputation

  1. is it possible to have a standard php form, but with the submit button not at the end but halfway down? Obviously the stuff above it will submit as per usual but what about the form elements below it? thanks
  2. bit stumped here, how do i return the first x amount of characters from a field in a mysql database?
  3. the fragment_heading is just standard text headings in varchar format.
  4. hello there, i have 2 queries, one which i use ORDER BY to order by a text heading, however the results return no logical order. (e.g. their all over the place). heres a brief breakdown of the code: $query = "SELECT * FROM sections WHERE document_id = $document_id ORDER BY section_heading DESC"; $result = mysql_query($query) or die ("This entry hasn't been found."); while($row = mysql_fetch_array($result)) { $section_heading = $row['section_heading']; $section_id = $row['section_id']; $today = date("Y-d-m"); $dateArray=explode('-',$today); $start_date = date('Y-d-m', mktime(0, 0, 0, $dateArray[2], $dateArray[1], $dateArray[0])); $correct_year = $dateArray[0]; $test = $dateArray[2]; //echo $test; $current_day = date("d"); //echo $dateArray[0]; // take 6 off the month $end_date = $test - 6; //echo $end_date; // if less than jan, take 1 off the year $current_year = "2007"; if ($end_date < 10) { $end_date2 = "0" . $end_date; //echo $end_date2; } $new_date22 = $current_year . "-" . $end_date2 . "-" . $current_day; $today2 = date("Y-m-d"); //echo $today2; $query2 = "SELECT * FROM fragments WHERE section_id = $section_id AND date_created BETWEEN '$new_date22 00:00:00' AND '$today2 23:59:59' ORDER BY fragment_heading DESC"; any idea?
  5. adamhhh

    css overflow?

    right say if i have overflow: auto or visible (doesnt matter) is there a way to then show the scrollbar at the top rather than at the bottom if it overflows?
  6. right i hope this is the right forum- we have html files which contain standard php code (including php tags etc). Is there a way to set up your web server to read these .html files to recognise the php? at the moment its just printing out the code. And nope we cant simply rename to .php
  7. ok problem not solved, i thought it was
  8. Ok i have this problem with $query2, <? //$document_id = $_REQUEST['document_id']; //echo $document_id; $document_id = 110; $host = ""; $user = ""; $password = ""; $database = ""; $connection = mysql_connect($host,$user,$password) or die ("Couldn't connect to server."); $db = mysql_select_db($database, $connection) or die ("Couldn't select database."); $query = "SELECT * FROM sections WHERE document_id = $document_id"; $result = mysql_query($query) or die ("This entry hasn't been found."); while($row = mysql_fetch_array($result)) { $section_heading = $row['section_heading']; $section_id = $row['section_id']; //echo "<strong> $section_heading,</strong>"; //echo $section_id; $query1 = "SELECT * FROM fragments WHERE section_id = $section_id ORDER BY date_created"; $result1 = mysql_query($query1) or die ("This entry hasn't been found."); while($row1 = mysql_fetch_array($result1)) { $fragment_heading = $row1['fragment_heading']; $date_created = $row1['date_created']; //echo "<a href=\"index.php?section_id=$section_id&document_type_id=2\">$fragment_heading</a>"; //echo "<br />"; //echo $date_created; $dateArray=explode('-',$date_created); // $dateArray[0]= 2007 // $dateArray[1] = 02 // $dateArray[2] = 05 $start_date = date('Y-m-d', mktime(0, 0, 0, $dateArray[1], $dateArray[2], $dateArray[0])); echo $start_date; $test = $dateArray[1]; //echo $test; $end_date = $test - 6; if ($end_date < 1) { $new_end_date = $end_date + 12; $dateArray[0] --; //echo $new_year; //echo $end_date; echo "<br />"; //echo $new_end_date; $new_end_date2 = "0" . $new_end_date; //echo $new_end_date2; $date1 = $dateArray[1] . $new_end_date2 . $dateArray[0]; echo "<br />"; //echo $date1; //$today = date("j, n, Y") $new_date = date('Y-d-m', mktime(0, 0, 0, $dateArray[1], $new_end_date2, $dateArray[0])); // $new_date is the end date we use echo $new_date; } $new_date = $new_date1; $start_date = $start_date1; $query2 = "SELECT * FROM fragments WHERE section_id = $section_id AND date_created BETWEEN $new_date1 AND $start_date1"; echo $query2; $result2 = mysql_query($query2) or die ("This entry hasn't been found."); while($row2 = mysql_fetch_array($result2)) { $fragment_heading = $row2['fragment_heading']; $date_created = $row2['date_created']; //echo "<a href=\"index.php?section_id=$section_id&document_type_id=2\">$fragment_heading</a>"; echo "<br />"; echo $fragment_heading; } } } ?> hmm at the moment its nearly working, however im a bit confused as in $query2 im looking at the $section_id (of which there are multiple) and $new_date and $start_date (1 of each). Ive retrieved the $new_date and $start_date from the database so they are i think 2007-09-26 and 2006-03-26. However I cannot get the query to run so its multiple section ids based on one of each $start_date and $new_date. Any ideas?? At the moment when I test the query it gets multiple start and finish dates based on multiple section ids. I need multiple section ids based on 1 start and 1 end date. ???
  9. <? //$document_id = $_REQUEST['document_id']; //echo $document_id; $document_id = 110; $host = ""; $user = ""; $password = ""; $database = ""; $connection = mysql_connect($host,$user,$password) or die ("Couldn't connect to server."); $db = mysql_select_db($database, $connection) or die ("Couldn't select database."); $query = "SELECT * FROM sections WHERE document_id = $document_id"; $result = mysql_query($query) or die ("This entry hasn't been found."); while($row = mysql_fetch_array($result)) { $section_heading = $row['section_heading']; $section_id = $row['section_id']; //echo "<strong> $section_heading,</strong>"; //echo $section_id; $query1 = "SELECT * FROM fragments WHERE section_id = $section_id ORDER BY date_created"; $result1 = mysql_query($query1) or die ("This entry hasn't been found."); while($row1 = mysql_fetch_array($result1)) { $fragment_heading = $row1['fragment_heading']; $date_created = $row1['date_created']; //echo "<a href=\"index.php?section_id=$section_id&document_type_id=2\">$fragment_heading</a>"; //echo "<br />"; //echo $date_created; $dateArray=explode('-',$date_created); // $dateArray[0]= 2007 // $dateArray[1] = 02 // $dateArray[2] = 05 $start_date = date('Y-m-d', mktime(0, 0, 0, $dateArray[1], $dateArray[2], $dateArray[0])); echo $start_date; $test = $dateArray[1]; //echo $test; $end_date = $test - 6; if ($end_date < 1) { $new_end_date = $end_date + 12; $dateArray[0] --; //echo $new_year; //echo $end_date; echo "<br />"; //echo $new_end_date; $new_end_date2 = "0" . $new_end_date; //echo $new_end_date2; $date1 = $dateArray[1] . $new_end_date2 . $dateArray[0]; echo "<br />"; //echo $date1; //$today = date("j, n, Y") $new_date = date('Y-d-m', mktime(0, 0, 0, $dateArray[1], $new_end_date2, $dateArray[0])); // $new_date is the end date we use echo $new_date; } $new_date = $new_date1; $start_date = $start_date1; $query2 = "SELECT * FROM fragments WHERE section_id = $section_id AND date_created BETWEEN $new_date1 AND $start_date1"; echo $query2; $result2 = mysql_query($query2) or die ("This entry hasn't been found."); while($row2 = mysql_fetch_array($result2)) { $fragment_heading = $row2['fragment_heading']; $date_created = $row2['date_created']; //echo "<a href=\"index.php?section_id=$section_id&document_type_id=2\">$fragment_heading</a>"; echo "<br />"; echo $fragment_heading; } } } ?> hmm at the moment its nearly working, however im a bit confused as in $query2 im loking at the $section_id (of which there are multiple) and $new_date and $start_date (1 of each). Ive retrieved the $new_date and $start_date from the database so they are i think 2007-09-26 and 2006-03-26. However I cannot get the query to run so its multiple section ids based on one of each $start_date and $new_date. Any ideas??
  10. Hello, i was wondering if this was possible as I cant quite think how (maybe too early in the morning) I need to run a query based on the last 6 months of entries. In my table i have the usual headers e.g. name and body of text etc, but also a date_created column with stuff like 2005-12-20 15:44:37 in it. Any ideas?
  11. oops! never mind i still had my accessibility option- ignore font sizes turned on
  12. hi guys is there a way to change style sheets for Ie6, ive tried tons of different ways but all only work in firefox. any ideas?
  13. hi been banging my head over these errors for a few days now and still cant fix, any ideas? error in parsing value for property 'margin-bottom'. Declaration dropped. heres an example of where the error is referring to as the error is basically occurring everywhere: #block2 { width: 495px; float: left; background-color: #FFFFFF; margin-top: 5px; margin-bottom: 5px; margin-left: 5px; } heres the full style sheet: body { background-color: #CCCCCC; } #container { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; width: 800px; height: auto; line-height: 16px; padding-bottom: 20px; margin-right: auto; margin-left: auto; margin-top: -20px; margin-bottom: -20px; border: 1px solid #5F9E4F; background-color: #FFFFFF; } #header { height: 155px; width: 800px; } #version { width: 100px; height: auto; margin-left: 688px; padding-top: 20px; } #username { float: left; line-height: 20px; padding-right: 5px; } #logout { width: 165px; margin-left: 645px; padding-top: 20px; } #updates { width: auto; margin-left: 530px; padding-top: 15px; height: auto; } #container #header #bottomhead { float: left; width: 800px; background-repeat: repeat; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #78AD6D; } .button { width: auto; margin-right: 5px; float: left; } .newbutton { width: auto; margin-right: 20px; float: right; } .newbutton2 { width: auto; margin-right: 5px; float: right; } .bluetext { color: #00236B; font-weight: bold; } #breadcrumbs { margin-left: 20px; height: auto; width: auto; margin-top: 10px; } #container #content #buttons #menudropdown { float: left; width: 100px; margin-left: 162px; } #container #content #minicontainer { float: left; width: 760px; margin-left: 20px; margin-right: 20px; background-color: #054177; padding-bottom: 5px; height: auto; } #container #content #bottomborder { float: left; width: 760px; margin-left: 20px; margin-right: 20px; } #navi { width: 170px; background-color: #FFFFFF; float: left; margin-top: 5px; margin-left: 5px; height: auto; } #buttons { margin-left: 20px; width: auto; padding-top: 10px; } #feedback { margin-top: 20px; width: 104px; margin-left: 630px; } #logo { width: auto; margin-left: 20px; height: auto; float: left; padding-top: 15px; } #search { width: 245px; margin-left: 585px; padding-top: 15px; } #content { height: auto; width: 800px; } #block { width: 570px; float: left; background-color: #FFFFFF; margin: 5px; } .boldfont { font-weight: bold; } .cornerbluetopright { background-image: url(images/corner7.jpg); background-repeat: no-repeat; float: right; width: 3px; height: 3px; } .cornerwhitetopleft { background-image: url(images/corner1.jpg); background-repeat: no-repeat; float: left; width: 2px; height: 2px; } .bottom { height: 3px; width: 710px; margin-left: 20px; margin-right: 20px; background-color: #054177; } .cornerwhitetopright { background-image: url(images/corner2.jpg); background-repeat: no-repeat; float: right; width: 2px; height: 2px; } .floatright { float: right; } .floatleft { float: left; } .navi2 { padding: 5px; list-style:none; } .navi12 { margin-top: -200px; padding: 5px; float: left; } .menubox { float: none; width: 40%; } #rightdiv { font-size: 11px; } /* for calculators.php */ #block2 { width: 495px; float: left; background-color: #FFFFFF; margin-top: 5px; margin-bottom: 5px; margin-left: 5px; } #block3 { width: 750px; float: left; background-color: #FFFFFF; margin-top: 5px; margin-bottom: 1px; margin-left: 5px; } #block4 { width: 750px; float: left; background-color: #FFFFFF; margin-top: 5px; margin-left: 5px; background-color: #054177; } #block5 { width: 420px; float: left; background-color: #FFFFFF; margin-top: 5px; margin-left: 5px; } #navi3 { width: 250px; background-color: #FFFFFF; float: left; margin-top: 5px; margin-left: 5px; height: auto; margin-bottom: 5px; } .navi5 { width: 160px; background-color: #FFFFFF; float: left; margin-top: 5px; margin-left: 5px; height: auto; margin-bottom: 5px; } .calc { margin-right: 5px; width: 200px; border: 1px solid #CCCCCC; padding: 5px; visibility: hidden; height: 120px; } .imagedetails { float: none; text-align: right; padding-right: 15px; } .calc2 { margin-right: 5px; width: 200px; border: 1px solid #CCCCCC; padding: 5px; visibility: hidden; height: 120px; } .calc3 { margin-right: 5px; width: 200px; border: 1px solid #CCCCCC; padding: 5px; visibility: hidden; height: 120px; } .calc4 { margin-right: 5px; width: 225px; border: 1px solid #CCCCCC; padding: 5px; margin-top: 5px; margin-bottom: 5px; height: 160px; } .calc5 { margin-right: 5px; width: 225px; border: 1px solid #CCCCCC; padding: 5px; margin-top: 5px; margin-bottom: 5px; height: 130px; } .calc6 { margin-right: 5px; width: 225px; border: 1px solid #CCCCCC; padding: 5px; margin-top: 5px; margin-bottom: 5px; height: 140px; } .calc7 { margin-right: 5px; width: 225px; border: 1px solid #CCCCCC; padding: 5px; margin-top: 5px; margin-bottom: 5px; height: 100px; } .calc8 { margin-right: 5px; width: 225px; border: 1px solid #CCCCCC; padding: 5px; margin-top: 5px; margin-bottom: 5px; height: 200px; } .calc9 { margin-right: 5px; width: 225px; border: 1px solid #CCCCCC; padding: 5px; margin-top: 5px; margin-bottom: 5px; height: 180px; } .navi4 { list-style:none; padding-top: 5px; padding-bottom: 5px; padding-left: 5px; } /* for feedback */ #feedbackblock { width: 700px; float: left; background-color: #FFFFFF; margin: 5px; } .feedback { width: 300px; } .feedbackform { width: 350px; margin-left: 200px; margin-top: 10px; margin-bottom: 10px; } .searchform { width: 740px; margin-top: 10px; margin-bottom: 10px; } .image_thumbs{ margin:3px; padding-left: 2px; padding-right: 2px; width:160px; height: 190px; float:left; text-decoration:none; border: 1px solid black; background: white; overflow: hidden; } #admin_right_col{float:left;width:70%;margin:0px; padding:5px;font-size:12px} #admin_right_col2{ float:left; width: 97%; margin-left: 5px; margin-top: 5px; padding:5px; font-size:12px; background-color: #FFFFFF; } #admin_right_col3{ float:left; width: 97%; margin-left: 5px; margin-top: 5px; padding:5px; font-size:12px; background-color: #FFFFFF; } #imagedetails2 { width: 200px; margin-left: 296px; margin-top: 10px; padding: 2px; margin-bottom: 10px; background-color: #CCCCCC; border: 1px solid #000000; } #newimagedetails { width: 200px; margin-left: 520px; margin-top: 10px; padding: 2px; margin-bottom: 10px; background-color: #CCCCCC; border: 1px solid #000000; } #admin_left_col{float:left;width:27%;margin:0px; padding:5px; font-size:12px; border-right: 1px solid black; border-bottom: 1px solid black; background: white; margin-top: 5px; } #admin_left_col2{float:left;width:27%;margin:0px; padding:5px; font-size:12px; background: white; margin-top: 5px; } #image_container{width: 550px } .navigation_row { background: white; margin-left: 5px; padding: 1px; width: 505px; } .maxwidth { max-width: 100%; overflow: auto; } .maxwidth2 { max-width: 100%; } /* admin styles */ .thumb_text { width: 100%; float: left; } .thumb_text2 { width: 100%; float: left; } .thumb_text3 { background-color:#000000; } .exampleA { } .boldtextindent { font-weight: bold; padding-left: 3px; } .page_box { width: 300px; }.test { margin-top: 200px; background-color: #FFFFFF; } Some of the html <body> <div id="container"> <div id="header"> <div id="logo"><?php include 'includes/logo.html' ?></div> <div id="version"><?php include 'includes/version.php' ?></div> <div id="search"> <?php include 'includes/search.php' ?> </div> <div id="logout"> <div id="username"><?php include 'includes/login.php' ?></div> </div> <div id="bottomhead"> <div class="newbutton"><a href="feedback.php"><img src="images/feedbackdown.jpg" alt="feedback" width="105" height="23" border="0" /></a></div> <div class="newbutton2"><a href="updates.php"><img src="images/updatesdown.jpg" alt="feedback" width="93" height="23" border="0" /></a></div> </div> </div> <div id="content"> <div class="bluetext" id="breadcrumbs"><?php include 'includes/home.html' ?>/<a href="raillinks.php">Raillinks</a></div> <div id="buttons"> <div class="button"><img src="images/navigationdown.jpg" alt="navigation button" width="110" height="24" /></div> <div class="button"><a href="calculators.php"><img src="images/calculatorsdown.jpg" alt="calculators button" width="120" height="24" border="0" /></a></div> <div class="button"><a href="imagesprog/images.php"><img src="images/mapsdown.jpg" alt="maps button" width="66" height="24" border="0" /></a></div> <div class="button"><a href="raillinks.php"><img src="images/raillinksup.jpg" alt="Raillinks button" width="95" height="24" border="0" /></a></div> <div class="button"><a href="tickets/index2.php"><img src="images/ticketsdown.jpg" alt="navigation button" width="85" height="24" border="0" /></a></div> <div id="menudropdown"></div> </div> <div id="minicontainer"> <div class="cornerbluetopright"></div> <div class="thumb_text3" id="block3"> <div class="cornerwhitetopleft"></div> <div class="cornerwhitetopright"></div> <div class="navi2"><?php include 'index5.php' ?></div> <div><img src="images/corner3.jpg" class="floatleft" /><img src="images/corner4.jpg" class="floatright" /></div> </div> </div> <div id="bottomborder"><img src="images/bigborder.jpg" width="760" height="5" /></div> </div><div style="clear:both;"></div> </div> </body> and yes there is a link to the style sheet any ideas?
×
×
  • 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.