Jump to content

TheMovieman

Members
  • Posts

    254
  • Joined

  • Last visited

Everything posted by TheMovieman

  1. Got it fixed finally. Dumb mistake (all I had to do is remove studio.id). Duh.
  2. Edit: Nevermind. Somehow fixed it... Dunno what happened but I redid the code and now it works. Edit #2: Now I've come across another problem. Even though the data displays fine, when I try to add a link, I can't get the dvd_reviews.id to pass through to a variable. Here's how I have it set up now: ><?php $movielist = @mysql_query("SELECT title, year, movieid, studioid, dvd_reviews.id, studio.id FROM dvd_reviews, studio, moviestudio WHERE movieid=dvd_reviews.id AND studioid='$id' AND studio.id='$id'"); if (!$movielist) { exit('<p>Error retrieving information from database.<br />'. 'Error: ' . mysql_error() . '</p>'); } while ($listing = mysql_fetch_array($movielist)) { $title = $listing['title']; $year = $listing['year']; $dvdlink = $listing['dvd_reviews.id']; echo "<tr><td><a href='http://www.moviemansguide.com/reviews/DVD/read.php? id=$dvdlink'>$title</a></td><td>$year</td></tr>"; } ?> If you look in the echo part, $dvdlink is supposed to have the id for that particular review, yet when I scroll over on the page, it's blank. Here's the page to look at: http://www.moviemansguide.com/studios/index.php?id=49
  3. And I know I missed a " ; " at the end of the echo statement. I've put it in and still get the parse error.
  4. I'm sure this is a dumb mistake on my part (it's been some time since I've coded a join), but I've been having problems with this latest one. I'm making a page to display all my reviews that pertain to a single studio. For example, when one types in ****/index.php?id=1, it'll take you to "Warner Bros." and it will list all the reviews associated with Warner Bros. Here's how I have my tables set up, with the column names pertaining to this code: dvd_reviews (id, title, year) studio (id, name) moviestudio (movieid, studioid) I have a $_GET function for the studio id and everything on the page works fine as far as getting the Studio Name in the places I want it. Here's what I've been trying: > <?php $movietitles = @mysql_query("SELECT title, year, dvd_reviews.id, movieid, studioid FROM dvd_reviews, moviestudio WHERE studioid='$id' AND movieid=dvd_reviews.id"); if (!$movietitles) { exit('<p>Error retrieving information from database.<br />'. 'Error: ' . mysql_error() . '</p>'); } while ($title-dvd = mysql_fetch_array($movietitles)) { $dvdtitle = $title-dvd['title']; $year = $title-dvd['year']; echo "<tr><td>$dvdtitle ($year)</td></tr>" } ?> I've tried other variations on that but get a parse error everytime: "Parse error: syntax error, unexpected '=' in /home2/*removed*/public_html/studios/index.php on line 114" I know I'm missing something, but I can't figure out what. Thanks in advance Brian
  5. Hi all, Ok, I'm having an issue with one of my e-mail accounts. It shows that 10mb have been used up yet when I've gone into the account and cleared out every folder (including TRASH, etc), but it still shows the same amount of space used. What am I missing? Since it's an important e-mail account, I've had to increase the quota so e-mails won't bounce. Thanks, Brian
  6. Nevermind, I made a dumb mistake Everything works now. Thanks again for your help Jim
  7. Thanks for your help Jim. This one worked for my review page: $display_edition = ($edition)?" - $edition":""; echo "$title($year)$display_edition"; But when I tried the other for my review index page, all the editions were absent. Not sure why because that's the same code as the other code that worked. I also tried it with the dash instead of parantheses, but same result.
  8. Hopefully I can explain this well enough, but I run a movie/DVD review website and after a couple hundred DVD reviews, I've run across a slight problem. In MySQL, I have a entry within my dvdreviews DB with a column called "edition". Well, what my problem is I don't know how to handle the coding side on my dvd review page if that entry is blank. Right now I have: ><?php $titleinfo2 = @mysql_query("SELECT title, year, edition FROM dvd_reviews WHERE id='$id'"); if (!$titleinfo2) { exit('<p>Error retrieving information from database.<br />'. 'Error: ' . mysql_error() . '</p>'); } while ($info2 = mysql_fetch_array($titleinfo2)) { $title = $info2['title']; $year = $info2['year']; $edition = $info2['edition']; echo "$title ($year)[b] - $edition[/b]"; } ?> If $edition is empty, how do I handle that dash? Also, I have a DVD reviews archive page where I have the same kind of issue: >$titlelist = @mysql_query("SELECT name, dvd_reviews.id, year, rating_overall, title, list_title, edition FROM critic, dvd_reviews WHERE criticid=critic.id ORDER BY list_title ASC"); while ($listing = mysql_fetch_array($titlelist)) { $id = $listing['id']; $title = $listing['title']; $edition = $listing['edition']; $year = $listing['year']; $name = $listing['name']; $rating = $listing['rating_overall']; echo" <TR> <TD CLASS='rindex-year'>$year</TD> <TD CLASS='rindex-link'><a href='reviews/DVD/read.php?id=$id'><b>$title</b></a>[b] ($edition)[/b]</TD> <TD CLASS='rindex-critic'>$name</TD> <TD CLASS='rindex-rating'><img src='images/star_ratings/$rating.gif' HEIGHT='25' ALT='$rating'></TD> </TR>"; } Here, the edition is in parenthesis and I obviously don't want it to look like: Movie Title (), Any help in this would be appreciated. Thanks
  9. Haha, yes. Sorry
  10. The first part (the array) is all together (in the code box). I tried editing before and I could only get a part of it to separate. I should've said paragraph breaks or something, lol. If that makes any sense...
  11. Whoops, thanks for pointing that out Don. And thanks, finally got a style/format I like and will stick with (the site has gone through many changes over the year).
  12. Thanks so much Don! That's exactly what I was looking for. Something simple and easy to adjust. I've made some (minor) changes if someone wanted an alt tag as well: ><?php srand((float) microtime() * 10000000); $image[1]['pic']='http://www.moviemansguide.com/images/randomimages/dvdcover_number23.jpg'; $image[1]['link']='http://www.moviemansguide.com/reviews/DVD/read.php?id=number23'; $image[1]['alt']='The Number 23 (DVD)'; $image[2]['pic']='http://www.moviemansguide.com/images/randomimages/dvdcover_zodiac.jpg'; $image[2]['link']='http://www.moviemansguide.com/reviews/DVD/read.php?id=zodiac'; $image[2]['alt']='Zodiac (DVD)'; $image[3]['pic']='http://www.moviemansguide.com/images/randomimages/dvdcover_hills2.jpg'; $image[3]['link']='http://www.moviemansguide.com/reviews/DVD/read.php?id=hills-season2'; $image[3]['alt']='The Hills (Season 2)'; $rn = array_rand($image); echo '<a href="'.$image[$rn]['link'].'" target="_self">'; echo '<center><img src="'.$image[$rn]['pic'].'" alt="'.$image[$rn]['alt'].'" ></center>'; ?> For some reason, the breaks aren't showing up so it's tough to read...
  13. Rather than start a new topic, I thought I'd ask it here. I'm looking for a random image generator with a corresponding link. I found one here: http://www.scriptarchive.com/ssi_image.html, but I can't get it to work. It looked simple enough but when I tried it, I got this message: "Warning: main(http://www.moviemansguide.com/external/ssi_rand_image.pl'>http://www.moviemansguide.com/external/ssi_rand_image.pl) [function.main]: failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error in /home2/**edited**/public_html/index2.php on line 51 Warning: main(http://www.moviemansguide.com/external/ssi_rand_image.pl) [function.main]: failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error in /home2/**edited**/public_html/index2.php on line 51 Warning: main() [function.include]: Failed opening 'http://www.moviemansguide.com/external/ssi_rand_image.pl' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home2/**edited**/public_html/index2.php on line 51" I was wondering if there were other scripts out there that are easier to implement?
  14. Excellent. Worked like a charm Thanks!
  15. So, is there some extra code I need to add to make it work in IE?
  16. Ok, I think I got the code right but for some reason when I click the link to go to another part of a page, it doesn't work. Here's the page I'm referring to: http://www.moviemansguide.com/theatricalsc...007releases.php If you click one of the months, it should take you to the beginning of that month. Now, I have them linked like so: <a href="#july">JULY</a> And in the section for July: <a name="july"></a> This should work, right?
  17. Yeah, I guess the theme doesn't work for this current version since the image isn't in the zip file I have. I went ahead and just chose a new theme. Thanks for the help guys
  18. Well, I upgraded and it went pretty much OK, but now on the forum the "Last Post" image is missing from one of my themes. Now, this theme wasn't overwritten during the upgrade so I don't know what happened. Here's the page to see what I'm talking about: http://moviemansguide.com/forums/index.php/board,2.0.html
  19. Thanks Thomas and carbonize. I'll give it a try in a little bit (did both backups as suggested).
  20. Oh, and I downloaded the zip file with the updated version, I just don't know how to do a proper backup of my current forum and then how to actually install this one...
  21. See, I don't know how to manually upgrade. I've checked out SMF's forum but I'm just getting more and more confused...
  22. I can't seem to find it, no.
  23. Oh, my SMF forum.
  24. One other thing, I'm trying to upgrade to the latest version but the last time I did this using Fantastico I got a fatal error and had to open a ticket to have them restore the backup. Just curious if I should try this again as I'm getting too far behind with the updates (I'm at 1.0.8 and the current one is 1.1.12, yet according to Fantastico, it's at 1.0.5).
  25. OK, so that issue has been fixed but now when I try to upload a new smilie I get this error: 2: move_uploaded_file() [<a href='function.move-uploaded-file'>function.move-uploaded-file</a>]: open_basedir restriction in effect. File(/home/*removed*/public_html/forums/Smileys/default/Shrug4.gif) is not within the allowed path(s): (/home/*removed*/:/usr/local/sqmail/:/usr/lib/php:/usr/local/lib/php:/tmp) File: /home2/*removed*/public_html/forums/Sources/ManageSmileys.php Line: 345 Anyone encounter this?
×
×
  • Create New...