Jump to content

suttercain

Members
  • Posts

    17
  • Joined

  • Last visited

Everything posted by suttercain

  1. Hi everyone,I am having a major issue with a homepage I am working on, http://supermandatabase.com/index2.phpTake a look at it in Firefox and IE. As you can see the left column is aligned at the top, yet in IE it isn't and floats in the center. Is there a way to fix this?Here is the code that generate the page: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">@import url("sd_style.css");</style><?phprequire ('get_connected.php');if (isset($_GET['id'])) { $sql = "SELECT * FROM news WHERE story_id = '" . mysql_real_escape_string($_GET['id']) . "'"; if ($result = mysql_query($sql)) { if (mysql_num_rows($result)) { $row = mysql_fetch_assoc($result); } } } $date = date('F jS, Y');?><title><?php echo $row['title']; ?></title></head><body><tr><td><?php include ('head.php'); ?></td></tr> <table width="986" border="0" cellspacing="0" cellpadding="5"> <tr> <td colspan="2" valign="top" bgcolor="#FFFFFF"> <?php echo "<h2>$date</h2>"; ?></td> <td width="17%" rowspan="4" valign="top" bgcolor="#CCCCCC"><script type="text/javascript"><!-- amazon_ad_tag = "thesupermanda-20"; amazon_ad_width = "160"; amazon_ad_height = "600";//--></script> <script type="text/javascript" src="http://www.assoc-amazon.com/s/ads.js"></script><br><br> <script language="JavaScript" src="http://lapi.ebay.com/ws/eBayISAPI.dll?EKServer&ai=snn%7Fhz&bdrcolor=000000&cid=0&eksize=10&encode=ISO-8859-1&endcolor=FF0000&endtime=y&fbgcolor=253b5a&fntcolor=000000&fs=0&gallery=y&hdrcolor=253b5a&hdrimage=1&hdrsrch=n&img=y&lnkcolor=000000&logo=3&num=25&numbid=y&paypal=n&popup=n&prvd=1&query=Superman+Comics&r0=4&shipcost=n&siteid=0&sort=MetaEndSort&sortby=endtime&sortdir=asc&srchdesc=y&tbgcolor=FFFFFF&tlecolor=FF0000&tlefs=0&tlfcolor=000000&track=2176471&width=570"></script></td> </tr> <tr> <td width="32%" valign="top" bgcolor="#FFFFFF"> </td> </tr> <tr> <td> <div class="topcontainer">LATEST HEADLINE:</div> <div class="curlycontainer"> <div class="innerdiv"> <?php $sqls = mysql_query ("SELECT title, story_id, story_date, body, image FROM news ORDER BY story_id DESC LIMIT 0, 1"); while ($rows = mysql_fetch_assoc($sqls)) { $body = $rows['body']; $short = substr("$body", 0, 140); echo "<img src='images/news/" . $rows['image'] . "'/><br><br>"; echo "<font size ='4'><b><a href='view_news.php?id={$rows['story_id']}'>" . $rows['title'] . "</a></b></font><br>"; echo $rows['story_date'] . "<br>"; echo $short; } ?><br><br> </div> </div> <div class="topcontainer">VISIT OUR SPONSORS:</div> <div class="curlycontainer"> <div class="innerdiv"> <script type="text/javascript"><!--google_ad_client = "pub-5010266620835785";google_ad_width = 300;google_ad_height = 250;google_ad_format = "300x250_as";google_ad_type = "text_image";//2007-04-07: News Pagegoogle_ad_channel = "3594419381";google_color_border = "FFFFFF";google_color_bg = "FFFFFF";google_color_link = "000000";google_color_text = "000000";google_color_url = "263B5A";//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div> </div> </td></td> <td width="51%" rowspan="3" valign="top" bgcolor="#FFFFFF"> <div class="leftcontainer">RECENT HEADLINES:</div> <div class="curlycontainer1"> <div class="innerdiv"> <table width="468" border="0" cellspacing="0" cellpadding="2"> <?php //Daily Planet News Genrator! $sql = mysql_query ("SELECT title, story_id, story_date, body FROM news ORDER BY story_id DESC LIMIT 1, 5"); while ($row = mysql_fetch_assoc($sql)){ $body = $row['body']; $short1 = substr("$body", 0, 80); echo "<b><a href='view_news.php?id={$row['story_id']}'>" . $row['title'] . "</a></b><br>"; echo $row['story_date'] . "<br>"; echo $short1 . "<br>"; echo "<br>"; } ?> </table> </div> </div> <div class="leftcontainer">RECENT COMICS:</div> <div class="curlycontainer1"> <div class="innerdiv"> <table width="468" border="0" cellspacing="0" cellpadding="2"> <?php //COMIC Genrator $sql1 = mysql_query ("SELECT title, comic_id, issue_number, cover_art, cover_artists, writers, pencillers, cover_date FROM comics ORDER BY comic_id DESC LIMIT 0, 5"); while ($row1 = mysql_fetch_assoc($sql1)){ $cover_date = date('F, Y', strtotime($row1['cover_date'])); echo "<tr>"; echo "<td width='70'><a href='view_comics.php?id={$row1['comic_id']}'><img src='images/4ndvddb/" . $row1['cover_art'] . "' height='75px' width='50px'/></a><br></td>"; echo "<td><b><a href='view_comics.php?id={$row1['comic_id']}'>" . $row1['title'] . " #" . $row1['issue_number'] . "</a></b><br>Cover Date: " . $cover_date . "<br>Written By: " . $row1['writers'] . "<br>Cover Artists: " . $row1['cover_artists'] . "<br>Artists: " . $row1['pencillers'] . "</td>"; echo "</tr>"; } ?> </table> <?php $count_comics = mysql_query("SELECT comic_id FROM comics"); $comic_count =mysql_num_rows($count_comics); echo "<br>There are currently $comic_count comics in the database."; ?> </div> </div> <div class="leftcontainer">RECENT REVIEWS:</div> <div class="curlycontainer1"> <div class="innerdiv"> <table width="468" border="0" cellspacing="0" cellpadding="2"> <?php //REVIEW Genrator $query = "SELECT * FROM comics, reviews WHERE comics.comic_id=reviews.comic_id ORDER BY review_id DESC LIMIT 3";if ($result = mysql_query($query)) { while ($row = mysql_fetch_assoc($result)) { echo "<tr>"; echo "<td width='70'><a href='view_reviews.php?id={$row['review_id']}'><img src='images/4ndvddb/" . $row['cover_art'] . "' height='75px' width='50px'/></a><br></td>"; echo "<td><b><a href='view_reviews.php?id={$row['review_id']}'>" . $row['title'] . " #" . $row['issue_number'] . "</a></b><br>Review Date: " . $row['review_date'] . "<br>Reviewed By: Michael Bailey <br>"; echo "</tr>"; } } ?> </table> <?php $count_reviews = mysql_query("SELECT review_id FROM reviews"); $reviews_count = mysql_num_rows($count_reviews); echo "<br>There are currently $reviews_count reviews in the database."; ?> </div> </div> </td> </tr> <tr> </tr> </table><?php include('foot.php'); ?></body></html>
  2. Hi everyone,Hope you all had a nice weekend.I am running into an issue with the <table valign='top'> tag. I have it set, yet I the table des not go to the top, it stays in the center. Here is the site, http://www.supermandatabase.com/comic_index.phpAs you can see the drop down menu is in the ceter of the page. I actually would like it at the top beneath the Comics title. If you select a query, the results also show up in the center instead of the top.Here is the code I am using... be warned, it's long, <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">@import url("sd_style.css");</style><?php require ('get_connected.php'); ?><title>Superman Database :: Comics</title><?php include ('header.html'); ?><body> <table width="986" border="0" cellspacing="0" cellpadding="5"> <tr> <td valign="top" colspan="2" bgcolor="#FFFFFF"> <h2>Comics</h2> </td> <td width="31%" rowspan="2" valign="top" bgcolor="#CCCCCC"><script type="text/javascript"><!--google_color_link = "000000";google_color_text = "000000";google_color_url = "263B5A";//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script><br><br><script language="JavaScript" src="http://lapi.ebay.com/ws/eBayISAPI.dll?EKServer&ai=snn%7Fhz&bdrcolor=666666&cid=0&eksize=5&encode=ISO-8859-1&endcolor=FF0000&endtime=y&fbgcolor=EFEFEF&fntcolor=000000&fs=0&gallery=y&hdrcolor=FFFFCC&hdrimage=10&hdrsrch=n&img=y&lnkcolor=0000FF&logo=12&num=25&numbid=y&paypal=n&popup=n&prvd=1&query=Comics+Superman&r0=4&shipcost=n&sid=2176471&siteid=0&sort=MetaEndSort&sortby=endtime&sortdir=asc&srchdesc=n&tbgcolor=FFFFFF&tlecolor=333333&tlefs=0&tlfcolor=FFFFFF&track=comics&width=570"></script></td> </tr> <tr> <td colspan="2" align="center" valign="top" bgcolor="#FFFFFF"><table width="650" border="0" cellspacing="2" cellpadding="2"> <tr> <td valign="top"><strong>A List of Every Comic in our Database Grouped by Title </strong></td> </tr> <tr> <td width="665"> <form action="comic_index_view.php" method="post"> <?php $result = mysql_query("SELECT title, COUNT(title) AS count FROM comics GROUP BY title") or die(mysql_error()); $options=""; echo "<select name='title'>"; while($row = mysql_fetch_array($result)) { $title=$row["title"]; echo "<option value='" . $title . "'>".$title. " (" . $row['count'] . " Issues)</option>'"; } echo "</select>"; ?> <input type="submit" name="submit"> </form> </td> </tr> <tr> <td> </td> </tr> </table> </td> </tr> <tr> <td width="17%"></td> </tr></table> </table><?php include('footing.html'); ?></body></html> Any help would be much appreciated. Thank you in advance.SC
  3. Hi Everyone,I am not that familiar with JavaScript but I am trying to use a script that uses it. I know more PHP than JavaScript. I was hoping someone could assist me.Here is the code I am running: echo" <form action=\"".$forumpath."/login.php\" method=post onsubmit=md5hash(vb_login_password,vb_login_md5password,vb_login_md5password_utf)> <script type=text/javascript src=\"".$forumpath."/clientscript/vbulletin_md5.js\"></script>"; ?><table width="350" border="0" cellspacing="0" cellpadding="2"> <tr> <td><font size='2'>User Name</font></td> <td><?php echo "<input name=vb_login_username type=text id=navbar_username onfocus=if (this.value == '$vbphrase[username]') this.value = ''; size=10 />"; ?></td> <td><?php echo "<label for=cb_cookieuser_navbar><input name=cookieuser type=checkbox id=cb_cookieuser_navbar value=1 checked=checked /><font size='2'> Remember Me?</font></label>"; ?></td> </tr> <tr> <td><font size="2">Password</font></td> <td><?php echo "<input name=vb_login_password type=password size=10 />"; ?></td> <td><?php echo "<input type=submit title=$vbphrase[enter_username_to_login_or_register] value=\"Log In\" />"; ?> <td colspan="2"><?php echo " <a href=\"".$forumpath."/register.php?s=$session[sessionhash]\" target=\"_parent\"><font size='2'><b>register</b></font></a> "; ?></td> This is the error I am getting when I run IE "JavaScript Error Expecting "(" on Line 9" This only happens in IE but runs and executes in Firefox with no issue.Can someone tell me if there is a way to resolve this?Thank you in advance for your time.SC
  4. Hi everyone,I have been working on this since 11:00AM and have not yanked my hair out... yet.I tried doing this with a bigger form but could not get it to work. So I went back to square one and decided to to go basic and build from there.I have a form that is being populated from MySQL. When I change any of the values in the form and select submit I would like it to update the record in MySQL. I cannot get this. I have managed to get INSERT and DELETE going okay... but not UPDATE <?php require ('get_connected.php'); $reload= true; if (isset($_POST['title'])) { $title= mysql_real_escape_string($_POST['title']); // Assuming only one row is in the table, otherwise WHERE clause is needed $res= mysql_query("UPDATE TABLE news SET title='$title' WHERE story_id='1'"); $reload= false; } else { $title= ''; } if ($reload) { // Populate the from $hent = mysql_query("SELECT title FROM news WHERE story_id='1'"); while ($vis = mysql_fetch_array($hent)){ $title = $vis['title']; } }?> <form method='post' action="edit_news.php"> <textarea rows="1" cols="40" name="title"><?php echo $title ?></textarea> <input type="hidden" name="story_id" value="<?php echo $story_id; ?>"> <input type='submit' value='submit'></form> Can anyone make any suggestions or lend some adivse?Thank you in advance for your help.
  5. Or you can pay someone to do the work.
  6. Hello everyone,I have two questions. One deals with the <form> tag and the other the <border> tag for tables. Question 1:How can I have two input types that go to two different place in a single form? <form action="final_news.php" method="post"><input type="submit" value="submit" name="submit"><input type="submit" value="go back" name="go_back"></form> I would like the Submit button to go onto final_news.php, which it does, but I would like the Go Back button to go to a different URL. Is this possible?Question 2:Internet Explorer and Firefox display table borders in two very different ways when running this code <table width="986" border="10" cellspacing="0" cellpadding="0" bordercolor="#000066""> Internet Explorer displays it as a solid color, which is what I want, while Firefox displays it more like an embossed color with 2 different shades. Are there any tags within the <table border> tage I can use to make Firefox display it like Explorer? I tried <border-style="solid> but it didn't work.Thank you in advance for your assistance and suggestions.-SC
×
×
  • Create New...