Jump to content

flowingwindrider

Members
  • Posts

    54
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling
  • Location
    Michigan

flowingwindrider's Achievements

Member

Member (2/5)

0

Reputation

  1. I have a series of tables in a database, each one pertaining to a classified ad category. I need another table that groups all of their id's together in one place. Do I set the foreign keys in the new table to reference the others, or do I set the fk's in each table to reference the new one?
  2. I'm having trouble learning to use foreign keys. Does anyone know of a good tutorial they could point me to?
  3. Any guesses as to why the border was just a single line across the top? I added the code exactly as you had it, and I've had this problem trying to add borders before.
  4. Hmmm, I see what you mean. First of all, that's a good trick to check things like this, thanks for the tip. Second, should that red border have gone completely around the box or just been a line on the top? As to the 'imbalance', I'll just have to try adjusting my tables.
  5. This didn't work, and I'm not sure what you mean by resetting the table, td, and tr elements
  6. Oh, I forgot to mention, this is happening in both FF and IE6
  7. There are in fact several divs contained inside the 'main' one, with different widths specified. It might be easier to see what I mean if you see the page. It is located at bransonentertainersguild.com/Members/classifieds.php Each column is a separate table, and I want to center the whole mess of it without loosing the form that it has now. The full code of the page is: <!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>Classifieds Categories</title> <style type="text/css"> #center{ margin: 0 auto; width: 90%; } a{ color: #0000ff; } .b1{ position: relative; top: 2px; left: 2px; float: left; width: 5%; font-size: 22pt; } .b2{ float: left; width: 43%; } .b3{ float: left; width: 43%; } .t1{ font-family: Poor Richard; font-size: 14pt; } .t2{ font-family: Verdana; font-size: 8pt; } .t3, .t4{ position: relative; font-family: Poor Richard; font-size: x-large; text-align: center; } .t3{ top: 8px; } .t4{ clear: both; } .t5{ font-size: 12pt; font-style: italic; } </style> </head> <body style="background-color: #0ACCF5; background-image: url('../images/InsetBackground.jpg')"> <?php $db = "bransone_classifieds"; include("connect.php"); $query_count = "SELECT COUNT(Ad_Id) AS Total FROM employment"; $result_count = mysql_query($query_count) or die ("Error in query" . mysql_error()); $fetch_result = mysql_fetch_assoc($result_count) or die ("Error in query" . mysql_error()); $totalrows = $fetch_result['Total']; $img = "\"../images/folder.gif\" width=\"17\" height=\"14\""; mysql_close($dbh); echo("<div class=\"t3\">Classified Ad Categories</div>"); echo("<br /><br />"); echo("<div id=\"center\"><div class=\"b1\"><table> <tr><td><img src=".$img." /><br><br></td></tr> <tr><td><img src=".$img." /><br><br></td></tr> <tr><td><img src=".$img." /><br><br></td></tr> <tr><td><img src=".$img." /><br><br></td></tr> <tr><td><img src=".$img." /></td></tr> </table></div> <div class=\"b2\"><table> <tr><td><span class=\"t1\"><a href=\"classifieds/automobiles/automobiles.htm\" title=\"Click to see Automobile Listings\">Automobiles</a><br></span> <span class=\"t2\">Cars, trucks, vans, sport utilities<br><br></span></td></tr> <tr><td><span class=\"t1\"><a href=\"classifieds/employment/employment_listings.php\" title=\"Click to see Employment Oppertunities\">Employment</a></span><span class=\"t5\"> (".$totalrows.")</span><br> <span class=\"t2\">Non-Performance or Tech Opportunities<br><br></span></td></tr> <tr><td><span class=\"t1\"><a href=\"classifieds/general/general_merchandise.htm\" title=\"Click to see General Merchandise Listings\">General Merchandise</a></span><br> <span class=\"t2\">Appliances, electronics, books, music, video games, etc.<br><br></span></td></tr> <tr><td><span class=\"t1\"><a href=\"classifieds/pets/pets_and_supplies.htm\" title=\"Click to see Pet Listings\">Pets & Supplies</a></span><br> <span class=\"t2\">Pets, animals, supplies<br><br></span></td></tr> <tr><td><span class=\"t1\"><a href=\"classifieds/rentals/rentals_and_roomates.htm\" title=\"Click to see Rental Listings\">Rentals & Roommates</a></span><br> <span class=\"t2\">Apartments, condo rentals, roommates, seasonal housing</span></td></tr> </table></div> <div class=\"b1\"><table> <tr><td><img src=".$img." /><br><br></td></tr> <tr><td><img src=".$img." /><br><br></td></tr> <tr><td><img src=".$img." /><br><br></td></tr> <tr><td><img src=".$img." /><br><br></td></tr> <tr><td><img src=".$img." /></td></tr> </table></div> <div class=\"b3\"><table> <tr><td><span class=\"t1\"><a href=\"classifieds/computers/computers_and_software.htm\" title=\"Click to see Technology Listings\">Computers & Software</a></span><br> <span class=\"t2\">Desktops, laptops, accessories, software<br><br></span></td></tr> <tr><td><span class=\"t1\"><a href=\"classifieds/furniture/furniture.htm\" title=\"Click to see Furniture Listings\">Furniture</a></span><br> <span class=\"t2\">Sofas, tables, beds, etc.<br><br></span></td></tr> <tr><td><span class=\"t1\"><a href=\"classifieds/music/music_and_musical_equipment.htm\" title=\"Click to see Music Listings\">Musical & Musical Equipment</a></span><br> <span class=\"t2\">Sheet music, instruments, sound equipment, etc.<br><br></span></td></tr> <tr><td><span class=\"t1\"><a href=\"classifieds/real estate/real_estate.htm\" title=\"Click to see Real Estate Listings\">Real Estate</a></span><br> <span class=\"t2\">Homes, condos, properties<br><br></span></td></tr> <tr><td><span class=\"t1\"><a href=\"classifieds/theatrical/theatrical_equipment.htm\" title=\"Click to see Theatrical Equipment Listings\">Theatrical Equipment</a></span><br> <span class=\"t2\">Lights, gels, costumes, props, etc.</span></td></tr> </table><br /><br /></div></div>"); echo("<div class=\"t4\">Have a Classified Ad to Submit? <a href=\"classifieds/submission.htm\">Click here</a>.</div>"); ?> </body> </html>
  8. I've spent quite some time now searching the web for info on how to center a div. I've tried several different ways, but my div is still off-center by roughly 1/2 inch to the left. I've named a div 'center' and put all my other divs inside of it. Here is the css code that I am trying: #center{ margin: 0 auto; width: 90%; } Any thoughts as to why it is so far off-center? I've also tried setting the css code as: #center{ margin-right: auto; margin-left: auto; width: 90%; }
  9. What do you want to have happen after the folder is open?
  10. Do you mean that you want someone to be able to input the code again at a later time and have the computer check to make sure that the code is valid? If so, it sounds like you need to store the code in a database for later comparison.
  11. I have a page that displays information grouped into tables and arranged with div tags. The problem is, for some reason most of the links on the page show up as links but aren't clickable. It's like they aren't there at all. That's the Firefox problem. In IE6 the links work fine, but the last echo command doesn't write to the browser at all. Would someone mind looking at the code and seeing if they know why this is happening? If you want to see the page in action it is located at bransonentertainersguild.com/Members/classifieds.php The code for the page is: <!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>Classifieds Categories</title> <style type="text/css"> a{ color: #0000ff; } .b1{ position: relative; top: 2px; left: 2px; float: left; width: 5%; font-size: 22pt; } .b2{ float: left; width: 43%; } .t1{ font-family: Poor Richard; font-size: 14pt; } .t2{ font-family: Verdana; font-size: 8pt; } .t3, .t4{ position: relative; font-family: Poor Richard; font-size: x-large; text-align: center; } .t3{ top: 8px; } .t4{ top: 30px; } .t5{ font-size: 12pt; font-style: italic; } </style> </head> <body style="background-color: #0ACCF5; background-image: url('../images/InsetBackground.jpg')"> <?php $db = "bransone_classifieds"; include("connect.php"); $query_count = "SELECT COUNT(Ad_Id) AS Total FROM employment"; $result_count = mysql_query($query_count) or die ("Error in query" . mysql_error()); $fetch_result = mysql_fetch_assoc($result_count) or die ("Error in query" . mysql_error()); $totalrows = $fetch_result['Total']; $img = "\"../images/folder.gif\" width=\"17\" height=\"14\""; mysql_close($dbh); echo("<div class=\"t3\">Classified Ad Categories</div>"); echo("<br />"); echo("<div class=\"b1\"><table> <tr><td><img src=".$img." /><br><br></td></tr> <tr><td><img src=".$img." /><br><br></td></tr> <tr><td><img src=".$img." /><br><br></td></tr> <tr><td><img src=".$img." /><br><br></td></tr> <tr><td><img src=".$img." /></td></tr> </table></div> <div class=\"b2\"><table> <tr><td><span class=\"t1\"><a href=\"classifieds/automobiles/automobiles.htm\" title=\"Click to see Automobile Listings\">Automobiles</a><br></span> <span class=\"t2\">Cars, trucks, vans, sport utilities<br><br></span></td></tr> <tr><td><span class=\"t1\"><a href=\"classifieds/employment/employment_listings.php\" title=\"Click to see Employment Oppertunities\">Employment</a></span><span class=\"t5\"> (".$totalrows.")</span><br> <span class=\"t2\">Non-Performance or Tech Opportunities<br><br></span></td></tr> <tr><td><span class=\"t1\"><a href=\"classifieds/general/general_merchandise.htm\" title=\"Click to see General Merchandise Listings\">General Merchandise</a></span><br> <span class=\"t2\">Appliances, electronics, books, music, video games, etc.<br><br></span></td></tr> <tr><td><span class=\"t1\"><a href=\"classifieds/pets/pets_and_supplies.htm\" title=\"Click to see Pet Listings\">Pets & Supplies</a></span><br> <span class=\"t2\">Pets, animals, supplies<br><br></span></td></tr> <tr><td><span class=\"t1\"><a href=\"classifieds/rentals/rentals_and_roomates.htm\" title=\"Click to see Rental Listings\">Rentals & Roommates</a></span><br> <span class=\"t2\">Apartments, condo rentals, roommates, seasonal housing</span></td></tr> </table></div> <div class=\"b1\"><table> <tr><td><img src=".$img." /><br><br></td></tr> <tr><td><img src=".$img." /><br><br></td></tr> <tr><td><img src=".$img." /><br><br></td></tr> <tr><td><img src=".$img." /><br><br></td></tr> <tr><td><img src=".$img." /></td></tr> </table></div> <div class=\"b2\"><table> <tr><td><span class=\"t1\"><a href=\"classifieds/computers/computers_and_software.htm\" title=\"Click to see Technology Listings\">Computers & Software</a></span><br> <span class=\"t2\">Desktops, laptops, accessories, software<br><br></span></td></tr> <tr><td><span class=\"t1\"><a href=\"classifieds/furniture/furniture.htm\" title=\"Click to see Furniture Listings\">Furniture</a></span><br> <span class=\"t2\">Sofas, tables, beds, etc.<br><br></span></td></tr> <tr><td><span class=\"t1\"><a href=\"classifieds/music/music_and_musical_equipment.htm\" title=\"Click to see Music Listings\">Musical & Musical Equipment</a></span><br> <span class=\"t2\">Sheet music, instruments, sound equipment, etc.<br><br></span></td></tr> <tr><td><span class=\"t1\"><a href=\"classifieds/real estate/real_estate.htm\" title=\"Click to see Real Estate Listings\">Real Estate</a></span><br> <span class=\"t2\">Homes, condos, properties<br><br></span></td></tr> <tr><td><span class=\"t1\"><a href=\"classifieds/theatrical/theatrical_equipment.htm\" title=\"Click to see Theatrical Equipment Listings\">Theatrical Equipment</a></span><br> <span class=\"t2\">Lights, gels, costumes, props, etc.</span></td></tr> </table></div>"); echo("<div class=\"t4\">Have a Classified Ad to Submit? <a href=\"classifieds/submission.htm\">Click here</a>.</div>"); ?> </body> </html>
  12. I'm trying to learn to replace the tables on my website with div tags. I've figured out some of the positioning to make it look like my old table, but I can't seem to get a border around the entire thing. Below is my code (this is just a test page for experimentation). Can anyone help me to understand why this border doesn't go around the whole thing? <!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>Employment Listings</title> <style type="text/css"> #border { border: 3px solid #FFFFFF; } .s2, .s3, .s4, .s6{ font-family: "Poor Richard"; font-weight: normal; font-size: 16pt; text-align: center; background-color: #FFFFFF; position: relative; float: left; } .s2{ width: 10%; } .s3{ left: 6px; width: 20%; } .s4{ left: 9px; width: 15%; } .s5{ text-align: center; font-family: "Poor Richard"; font-size: 18pt; } .s6{ left: 3px; width: 53%; } </style> </head> <body style="background-color: #0ACCF5; background-image: url('../../../images/InsetBackground.jpg')"> <p class="s5">Employment Listings</p> <div id=border> <div><span class="s2">#</span></div> <div><span class="s6">Type of Job</span></div> <div><span class="s3">Posted On</span></div> <div><span class="s4">Details</span></div> </div> </body> </html>
  13. oh for heaven's sake! Can you see the idiot light shining over my head? Thanks for finding my error.
  14. This one's really got me. I have a 10 pages that all display results from their matching databases. Since they all need the same formatting and paginating I have chosen to insert this code using include(). Now, everything works just fine until you try to follow one of the pagination links. When you do, it sends you to an error page that I had created. The thing is, the error page you go to is in no way linked to the page that you started on! They aren't even in the same directory. The included file is name 'paginate.php' and it looks like this: <!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>Untitled Document</title> <style type="text/css"> .style1{ font-family: "Poor Richard"; font-weight: normal; font-size: 16pt; text-align: center; background-color: #FFFFFF; } .style2{ font-family: "Poor Richard"; font-size: 14pt; background-color: #57A8F9; text-align: left; } .style3{ font-family: "Poor Richard"; font-size: 14pt; background-color: #57A8F9; text-align: center; } .style4{ font-family: "Poor Richard"; font-size: 18pt; text-align: center; } .style5{ border: 2px solid #FFFFFF; padding: 2px; border-spacing: 3px; width: 100%; } .style6{ font-family: "Poor Richard"; font-size: 14pt; text-align: center; width: 100%; } </style> </head> <body> <?php echo ("<br>"); echo ("<table class=\"style6\">"); echo ("<tr>"); if($page != 1) { $pageprev = $page - 1; echo("<td style=\"width: 33%\"><a href=\"".$name."?page=$pageprev\">Previous ".$limit." Listings</a></td>"); } else { echo("<td style=\"width: 33%\">Previous ".$limit." Listings</td>"); } echo ("<td style=\"width: 33%\">"); $numofpages = $totalrows / $limit; for($i = 1; $i <= $numofpages; $i++) { if($i == $page) { echo($i." "); } else { echo("<a href=\"".$name."?page=$i\">$i</a> "); } } if(($totalrows % $limit) != 0) { if($i == $page) { echo($i." "); } else { echo("<a href=\"".$name."?page=$i\">$i</a> "); } } echo("</td>"); if(($totalrows - $limit * $page) > 0) { $pagenext = $page + 1; echo("<td style=\"width: 33%\"><a href=\"".$name."?page=$pagenext\">Next ".$limit." Listings</a></td>"); } else { echo("<td style=\"width: 33%\">Next ".$limit." Listings</td>"); } echo ("</tr></table"); mysql_close($dbh); ?> </body> </html> The file that includes paginate.php is called employ.php and it looks like this: <!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>Employment Listings</title> </head> <body style="background-color: #0ACCF5; background-image: url('../../../images/InsetBackground.jpg')"> <?php $db = "bransone_classifieds"; $name = "employment.php"; include("connect.php"); $limit = 10; $query_count = "SELECT COUNT(Ad_Id) AS Total FROM employment"; $result_count = mysql_query($query_count) or die ("Error in query" . mysql_error()); $fetch_result = mysql_fetch_assoc($result_count) or die ("Error in query" . mysql_error()); $totalrows = $fetch_result['Total']; if(isset($_GET['page'])) { $page = $_GET['page']; } else { $page = 1; } $limitvalue = $page * $limit - $limit; $query = "SELECT Ad_Id, `Date`, Type_Job FROM employment ORDER BY `Date` DESC, Ad_Id DESC LIMIT $limitvalue, $limit"; $result = mysql_query($query) or die("Error: " . mysql_error()); echo "<p class=\"style4\">Employment Listings</p>"; if(mysql_num_rows($result) == 0) { echo ("<p class=\"style1\">There are currently no ads in this category.<\\p>"); } echo "<table class=\"style5\"> <tr class=\"style1\"> <td style=\"width: 10%\">#</td> <td>Type of Job</td> <td style=\"width: 20%\">Posted On</td> <td style=\"width: 15%\">Details</td> </tr>"; while($row = mysql_fetch_assoc($result)) { echo "<tr>"; echo "<td class=\"style3\">". $row['Ad_Id']."</td>"; echo "<td class=\"style2\">". $row['Type_Job']."</td>"; echo "<td class =\"style3\">". $row['Date']."</td>"; echo "<td class =\"style3\"><a href=\"details.php?id=". $row['Ad_Id']."\">Details</a></td>"; } echo "</table>"; include("paginate.php"); ?> <br /> <form> <div class="style6"> <input type="button" value="Back" onClick="history.go(-1);return true;"></div> </form> </body> </html> I can't see how I'm linking to a page that I haven't linked to, but that's what its doing. Since I have 10 pages that will all use the same code I'd really like to make this work. Any ideas? (sorry this is such a long post)
×
×
  • 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.