Jump to content

Garath531

Members
  • Posts

    42
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Garath531's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I can't seem to find the edit button, but the registration code is now working.
  2. Thanks for the response. The banner is changed. The registration function is currently not working. My host is experiencing some problems.
  3. Please rate my new site. The comment system is unavailable at this time. http://garath531.x10hosting.com
  4. It works fine then, but it needs to be fixed.
  5. I have a div with an id of pic and I want it to float in the center. Here's the code I have. #pic { position: fixed; margin-left: auto; margin-right: auto; width: 60px; background-color: #FFFFFF; } It worked up until I put in "position: fixed" then everything just completely disappeared. Does anyone know why?
  6. I also suggest PHP and MySQL for Dummies.
  7. $_GET sends the information through the url, a security risk for somethings, but not for others. If you have an add on to the url (?do=), use get to retrieve it. ($_GET['do']). Does that explain things?
  8. <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 WHERE type ='Comic Book' ORDER BY comic_id DESC LIMIT 0, 4"); $i = 0; echo "<tr>\n"; while ($row1 = mysql_fetch_assoc($sql1)){ $i++; $cover_date = date('F, Y', strtotime($row1['cover_date'])); echo "<td width='70'><a href='/comics/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='/comics/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 (($i % 2 == 0) ? ("</tr><tr>") : ("")); } ?> </tr> </table> Does that work?
  9. Ahhhhh... I didn't know php could use O.O.P, just like Java, or C++. Thanks for your help.
  10. I've seen the -> combination several times, but I have been unable to figure out what it means (mainly because Google doesn't read it). Can anybody tell me what it does?
  11. Yours. $query = "SELECT * FROM Mixes"; $result=mysql_query($query); $num=mysql_numrows($result); if ($rating_total != 0){ $i=0; while ($i < num) { $ratings=mysql_result($result,$i,"total_votes"); $ratings_made=mysql_result($result,$i,"total_voted"); $rating = ($ratings / $ratings_made); $query = "UPDATE * Mixes SET rating = '$rating' "; $result=mysql_query($query); $i++; }} ?> Mine. $query = "SELECT * FROM Mixes"; $result=mysql_query($query); $num=mysql_numrows($result); if ($rating_total != 0){ $i=0; while ($i < $num) { $ratings=mysql_result($result,$i,"total_votes"); $ratings_made=mysql_result($result,$i,"total_voted"); $rating = ($ratings / $ratings_made); $query = "UPDATE * Mixes SET rating = '$rating' "; $result=mysql_query($query); $i++; }} ?>
  12. I have to agree with you there.
  13. $query = "SELECT * FROM Mixes"; $result=mysql_query($query); $num=mysql_numrows($result); if ($rating_total != 0){ $i=0; while ($i < $num) { $ratings=mysql_result($result,$i,"total_votes"); $ratings_made=mysql_result($result,$i,"total_voted"); $rating = ($ratings / $ratings_made); $query = "UPDATE * Mixes SET rating = '$rating' "; $result=mysql_query($query); $i++; }} ?> You forgot the dollar sign in the while statement.
  14. I would suggest reading the sticky on it and then (if that doesn't work) google "unidentified function mysql_connect()" and try everything you can find. Sorry, but I tried several and I'm not sure which one worked. Sorry I can't help you further.
×
×
  • 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.