TheMovieman
Members-
Posts
254 -
Joined
-
Last visited
Everything posted by TheMovieman
-
Well, maybe I'm stretching myself but I've added a new wrinkle to adding a new review... On my add new dvd review page, I can (via checkbox) pick more than one genre for a given review, but now I've added a rank column in my intermediate table (moviegenre) so I can order them. But now I'm not sure how to do this. Here's the code to list the genres: ><p>Place in Genre(s):<br /> <?php while ($genre = mysql_fetch_array($genres)) { $gid = $genre['id']; $gname = htmlspecialchars($genre['category']); echo "<label><input type='checkbox' name='genres[]' " . "value='$gid' />$gname</label><br />\n"; } ?> </p> I was going to make a separate page where for each dvd "id", it'll list the genres for that movie and next a text area to rank them, but I have no idea how to do this. How do I create a text box and name it so that it'll get listed with the correct row? Is there a simpler way to do this? I was going to use the code from my new review form but that won't work since I won't know how many rank text boxes there will be... I hope that made sense, lol.
-
Each review has specific production pics or (in the case of DVD reviews) screencaps; some reviews will not have screencaps and older reviews definitely do not. Anyways, I tested it out and both pages (one without the stills, other without) display fine. And thanks for explaining the error page, I think I get that now, lol. I'll give it a try in a little bit.
-
I figured out the if/else problem. Maybe there's a more proper way to do it, but for now, I'll just name the image files as "NULL" and then in the if statement: >if ($image1 == 'NULL') { echo "..."; } else { echo "..."; }
-
Thanks David, I appreciate the help I got 1 and 3 to work but I'm not quite understanding the second one. How do I test a condition? Basically, I want to make sure if anyone manually typed in a page that doesn't exist, that it'll go to the 404 error page (default Apache page). My knowledge of MySQL (obviously) is limited, so maybe this is something I should wait on until I learn a little more. I apologize for bringing up a new issue before I even understood this other one... but here it is: I have to manually enter all my reviews into the database but some of them don't have images associated. I tried using an if, else statement like >if (isset($image1)) { echo " code with $image1 variable"; } else { echo " code without $image1 variable"; } The page displayed but when I tried one page with the image and the other not, both seemed to display the code from the "else" section (sorry, but I'm not up to speed with sql lingo). The $image1 variable is set like this within the code http://www.example.com/files/stills/$image1.jpg, does that affect the code or am I way off using the if/else like I am?
-
I've finally got the coding to work on my new review pages, but now I have some general coding queries that I need help with. 1. On these pages, I list what genres they're listed under and the coding for that goes like this: ><?php $genreinfo = @mysql_query("SELECT category, movieid, genreid, dvd_reviews.id FROM genre, moviegenre, dvd_reviews WHERE movieid='$id' AND genreid=genre.id AND dvd_reviews.id='$id'"); while ($ginfo = mysql_fetch_array($genreinfo)) { $cat = $ginfo['category']; echo "$cat /"; } ?> And while the output is basically right (I'm considering adding another column to the "moviegenre" table so I can order them right), it does add the slash at the very end, but I need the slash when there are multiple categories. Is there a piece of code to eliminate that? Also, I noticed that if there's a wrong address to a regular page, it would give a 404 error, but when I mistype in the "id" portion of the address (like www.site.com/read.php?id=this when its supposed to be id=that), can I redirect it to my homepage or even the 404 error page? 2. I plan on making a review index page to list all my reviews. Now, is there a code that I can split each up by the first letter and let's say the movie is The Sisters, how can I list it within the "S" section rather than "T"? I did make a column called "listtitle" that take the "The" and place it at the end (ie Sisters, The), but I notice sites like IMDb lists movies correctly. I appreciate any help you can offer.
-
Supplied Argument Is Not A Valid Mysql Result Resource
TheMovieman replied to TheMovieman's topic in Scripting Talk
Yeah, I had tried that and while the warning is gone, what I have in the echo, does not display (and when viewing the code through IE, there's nothing in the title area... I've done this before with an old database and it worked fine so I don't know why I'm having such problems now. I have updated the code with those double quotes, I figure it's some kind of progress. EDIT: Problem fixed. With those double quotes, I also removed the periods from either side of the $id, and now it works. So thanks Steve -
Supplied Argument Is Not A Valid Mysql Result Resource
TheMovieman replied to TheMovieman's topic in Scripting Talk
Update: I've added an error code and got this now: Error retrieving information from database. Error: Unknown column 'runningscared' in 'where clause' Now, I know it exists so I'm still confused. I am going to try one more thing though... -
Hope someone can help because my eyes at this point are bleeding... I've been working on this code for a while and had converted a page with some queries but each one I would get this: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/moviema/public_html/reviews/backup/read.php on line xx So, I figured I made a big mistake somewhere along the line so I started over and decided to go step by step for each place I needed the database info. The first one (in the head section) gave me the same warning. It has something to do with the $id = $_GET['id']; part as I had created a page to make sure the data was actually there. Taking out the get part and just grabbing the data, it displayed fine, put it back in, and that warning was there. Here's a link to the test page I made just displaying the fields (I only have one row): http://www.moviemansguide.com/reviewtest2.php and here's the main page I'm working on (the other sections will be coded later, but I wanted to solve this problem first): http://www.moviemansguide.com/reviews/back...d=runningscared and the particular php code giving me troubles: ><?php $dbcnx = @mysql_connect('localhost', 'username', 'password'); if (!$dbcnx) { exit('<p>Unable to connect to the ' . 'database server at this time.</p>'); } if (!@mysql_select_db('database')) { exit('<p>Unable to locate the review ' . 'database at this time.</p>'); } $id = $_GET['id']; $titleinfo = @mysql_query('SELECT title, year, edition FROM dvd_reviews WHERE id='.$id.''); while ($info = mysql_fetch_array($titleinfo)) { $title = $info['title']; $year = $info['year']; $edition = $info['edition']; echo "<title>Movieman's Guide to the Movies >> DVD Review >> $title ($year) - $edition</title>"; } ?> The line the error occurs at the "while" function. I've looked at that code and cannot figure out why I'm getting this warning so I'm missing something (and probably obvious). I'd appreciate any help at all.
-
Hello once again OK, I got this code out of a book and changed it to suit my needs. I thought I understood it and actually had it working, but I guess not. So... the problem is I enter data using a form, click submit and. I made a simple page to show the movie title and critic associated and the first entry showed up fine. However, when I did it again for the next movie and I refresh the page, and the new entry isn't there (and it fits the parameters). So, I used an edit page created which fills in the forms with the already entered data (which all shows up correct), I then click the "submit" button on that page, then refresh my test page and now the entry shows up... I've gone through the coding for both pages (newreview, edit) but I can't figure out why this is happening. Here's the coding for the "newreview" page: ><HTML> <head> <title>Review CMS: Add New Review</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> </head> <BODY> <?php include '../includes/connection.php'; if (isset($_POST['intro'])): // A new review has been entered // using the form. $id = $_POST['id']; $keywords = $_POST['keywords']; $title = $_POST['title']; $listtitle = $_POST['listtitle']; $year = $_POST['year']; $releasedate = $_POST['releasedate']; $intro = $_POST['intro']; $reviewbody1 = $_POST['reviewbody1']; $reviewbody2 = $_POST['reviewbody2']; $image1 = $_POST['image1']; $image2 = $_POST['image2']; $poster = $_POST['poster']; $mpaa_rating = $_POST['mpaa_rating']; $mpaa_reason = $_POST['mpaa_reason']; $runtime = $_POST['runtime']; $star_rating = $_POST['star_rating']; $cid = $_POST['cid']; $genres = $_POST['genres']; if ($cid == '') { exit('<p>You must choose a critic for this review. Click "Back" and try again.</p>'); } $sql = "INSERT INTO movie_reviews SET id='$id', title='$title', year='$year', reviewdate=CURDATE(), releasedate='$releasedate', intro='$intro', reviewbody1='$reviewbody1', reviewbody2='$reviewbody2', image1='$image1', image2='$image2', mpaa_rating='$mpaa_rating', mpaa_reason='$mpaa_reason', runtime='$runtime', star_rating='$star_rating', criticid='$cid', poster='$poster', keywords='$keywords', listtitle='$listtitle'"; if (@mysql_query($sql)) { echo '<p>New review added</p>'; } else { exit('<p>Error adding new review: ' . mysql_error() . '</p>'); } if (isset($_POST['genres'])) { $genres = $_POST['genres']; } else { $genres = array(); } $numGenres = 0; foreach ($genres as $genreID) { $sql = "INSERT IGNORE INTO moviegenre SET movieid='$id', genreid=$genreID"; $ok = @mysql_query($sql); if ($ok) { $numGenres = $numGenres + 1; } else { echo "<p>Error inserting review into category $genreID: " . mysql_error() . '</p>'; } } ?> <p>Review was added to <?php echo $numGenre; ?> categories.</p> <p><a href="<?php echo $_SERVER['PHP_SELF']; ?>">Add another movie review</a></p> <p><a href="../index.html">INDEX PAGE</a></p> <?php else: $critics = @mysql_query('SELECT id, name FROM critic'); if (!$critics) { exit('<p>Unable to obtain critic list from the database.</p>'); } $genres = @mysql_query('SELECT id, category FROM genre'); if (!$genres) { exit('<p>Unable to obtain genre list from the database.</p>'); } ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <p>Movie ID:<br /> <textarea name="id" rows="1" cols="30"> </textarea></p> <p>Keywords:<br /> <textarea name="keywords" rows="4" cols="45"> </textarea></p> <p>Movie Title:<br /> <textarea name="title" rows="1" cols="45"> </textarea></p> <p>Listing Title: (title that will appear on review index pages)<br /> <textarea name="listtitle" rows="1" cols="45"> </textarea></p> <p>Year:<br /> <textarea name="year" rows="1" cols="8"> </textarea></p> <p>Release Date:<br /> <textarea name="releasedate" rows="1" cols="30"> </textarea></p> <p>Introduction:<br /> <textarea name="intro" rows="8" cols="70"> </textarea></p> <p>Review Part 1:<br /> <textarea name="reviewbody1" rows="15" cols="70"> </textarea></p> <p>Review Part 2:<br /> <textarea name="reviewbody2" rows="15" cols="70"> </textarea></p> <p>Image #1:<br /> <textarea name="image1" rows="1" cols="45"> </textarea></p> <p>Image #2:<br /> <textarea name="image2" rows="1" cols="45"> </textarea></p> <p>Poster:<br /> <textarea name="poster" rows="1" cols="45"> </textarea></p> <P>MPAA Rating: <select name="mpaa_rating" size="1"> <option selected value="">Select One</option> <option value="">--------------------</option> <option value="g">G</option> <option value="pg">PG</option> <option value="pg13">PG-13</option> <option value="r">R</option> <option value="nc17">NC-17</option> <option value="nr">Not Rated</option> </select></p> <p>MPAA Reason:<br /> <textarea name="mpaa_reason" rows="3" cols="45"> </textarea></p> <p>Runtime:<br /> <textarea name="runtime" rows="1" cols="8"> </textarea></p> <P>Star Rating: <select name="star_rating" size="1"> <option selected value="">Select One</option> <option value="">----------------</option> <option value="1star">1 STAR</option> <option value="1.25stars">1.25 STARS</option> <option value="1.5stars">1.5 STARS</option> <option value="1.75stars">1.75 STARS</option> <option value="2stars">2 STARS</option> <option value="2.25stars">2.25 STARS</option> <option value="2.5stars">2.5 STARS</option> <option value="2.75stars">2.75 STARS</option> <option value="3stars">3 STARS</option> <option value="3.25stars">3.25 STARS</option> <option value="3.5stars">3.5 STARS</option> <option value="3.75stars">3.75 STARS</option> <option value="4stars">4 STARS</option> <option value="4.25stars">4.25 STARS</option> <option value="4.5stars">4.5 STARS</option> <option value="4.75stars">4.75 STARS</option> <option value="5stars">5 STARS</option> </select></p> <P>Critic: <select name="cid" size="1"> <option selected value="">Select One</option> <option value="">-----------</option> <?php while ($critic = mysql_fetch_array($critics)) { $cid = $critic['id']; $cname = htmlspecialchars($critic['name']); echo "<option value='cid'>$cname</option>\n"; } ?> </select></p> <p>Place in Genre(s):<br /> <?php while ($genre = mysql_fetch_array($genres)) { $gid = $genre['id']; $gname = htmlspecialchars($genre['category']); echo "<label><input type='checkbox' name='genres[]' " . "value='$gid' />$gname</label><br />\n"; } ?> </p> <P><input type="submit" value="INSERT RECORD" /></P> </form> <?php endif; ?> </BODY> </HTML> And now the code for the "edit" page: ><HTML> <head> <title>Review CMS: Add New Review</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> </head> <BODY> <?php include '../includes/connection.php'; if (isset($_POST['intro'])): // A new review has been entered // using the form. $id = $_POST['id']; $keywords = $_POST['keywords']; $title = $_POST['title']; $listtitle = $_POST['listtitle']; $year = $_POST['year']; $releasedate = $_POST['releasedate']; $intro = $_POST['intro']; $reviewbody1 = $_POST['reviewbody1']; $reviewbody2 = $_POST['reviewbody2']; $image1 = $_POST['image1']; $image2 = $_POST['image2']; $poster = $_POST['poster']; $mpaa_rating = $_POST['mpaa_rating']; $mpaa_reason = $_POST['mpaa_reason']; $runtime = $_POST['runtime']; $star_rating = $_POST['star_rating']; $cid = $_POST['cid']; $genres = $_POST['genres']; if ($cid == '') { exit('<p>You must choose a critic for this review. Click "Back" and try again.</p>'); } $sql = "INSERT INTO movie_reviews SET id='$id', title='$title', year='$year', reviewdate=CURDATE(), releasedate='$releasedate', intro='$intro', reviewbody1='$reviewbody1', reviewbody2='$reviewbody2', image1='$image1', image2='$image2', mpaa_rating='$mpaa_rating', mpaa_reason='$mpaa_reason', runtime='$runtime', star_rating='$star_rating', criticid='$cid', poster='$poster', keywords='$keywords', listtitle='$listtitle'"; if (@mysql_query($sql)) { echo '<p>New review added</p>'; } else { exit('<p>Error adding new review: ' . mysql_error() . '</p>'); } if (isset($_POST['genres'])) { $genres = $_POST['genres']; } else { $genres = array(); } $numGenres = 0; foreach ($genres as $genreID) { $sql = "INSERT IGNORE INTO moviegenre SET movieid='$id', genreid=$genreID"; $ok = @mysql_query($sql); if ($ok) { $numGenres = $numGenres + 1; } else { echo "<p>Error inserting review into category $genreID: " . mysql_error() . '</p>'; } } ?> <p>Review was added to <?php echo $numGenre; ?> categories.</p> <p><a href="<?php echo $_SERVER['PHP_SELF']; ?>">Add another movie review</a></p> <p><a href="../index.html">INDEX PAGE</a></p> <?php else: $critics = @mysql_query('SELECT id, name FROM critic'); if (!$critics) { exit('<p>Unable to obtain critic list from the database.</p>'); } $genres = @mysql_query('SELECT id, category FROM genre'); if (!$genres) { exit('<p>Unable to obtain genre list from the database.</p>'); } ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <p>Movie ID:<br /> <textarea name="id" rows="1" cols="30"> </textarea></p> <p>Keywords:<br /> <textarea name="keywords" rows="4" cols="45"> </textarea></p> <p>Movie Title:<br /> <textarea name="title" rows="1" cols="45"> </textarea></p> <p>Listing Title: (title that will appear on review index pages)<br /> <textarea name="listtitle" rows="1" cols="45"> </textarea></p> <p>Year:<br /> <textarea name="year" rows="1" cols="8"> </textarea></p> <p>Release Date:<br /> <textarea name="releasedate" rows="1" cols="30"> </textarea></p> <p>Introduction:<br /> <textarea name="intro" rows="8" cols="70"> </textarea></p> <p>Review Part 1:<br /> <textarea name="reviewbody1" rows="15" cols="70"> </textarea></p> <p>Review Part 2:<br /> <textarea name="reviewbody2" rows="15" cols="70"> </textarea></p> <p>Image #1:<br /> <textarea name="image1" rows="1" cols="45"> </textarea></p> <p>Image #2:<br /> <textarea name="image2" rows="1" cols="45"> </textarea></p> <p>Poster:<br /> <textarea name="poster" rows="1" cols="45"> </textarea></p> <P>MPAA Rating: <select name="mpaa_rating" size="1"> <option selected value="">Select One</option> <option value="">--------------------</option> <option value="g">G</option> <option value="pg">PG</option> <option value="pg13">PG-13</option> <option value="r">R</option> <option value="nc17">NC-17</option> <option value="nr">Not Rated</option> </select></p> <p>MPAA Reason:<br /> <textarea name="mpaa_reason" rows="3" cols="45"> </textarea></p> <p>Runtime:<br /> <textarea name="runtime" rows="1" cols="8"> </textarea></p> <P>Star Rating: <select name="star_rating" size="1"> <option selected value="">Select One</option> <option value="">----------------</option> <option value="1star">1 STAR</option> <option value="1.25stars">1.25 STARS</option> <option value="1.5stars">1.5 STARS</option> <option value="1.75stars">1.75 STARS</option> <option value="2stars">2 STARS</option> <option value="2.25stars">2.25 STARS</option> <option value="2.5stars">2.5 STARS</option> <option value="2.75stars">2.75 STARS</option> <option value="3stars">3 STARS</option> <option value="3.25stars">3.25 STARS</option> <option value="3.5stars">3.5 STARS</option> <option value="3.75stars">3.75 STARS</option> <option value="4stars">4 STARS</option> <option value="4.25stars">4.25 STARS</option> <option value="4.5stars">4.5 STARS</option> <option value="4.75stars">4.75 STARS</option> <option value="5stars">5 STARS</option> </select></p> <P>Critic: <select name="cid" size="1"> <option selected value="">Select One</option> <option value="">-----------</option> <?php while ($critic = mysql_fetch_array($critics)) { $cid = $critic['id']; $cname = htmlspecialchars($critic['name']); echo "<option value='cid'>$cname</option>\n"; } ?> </select></p> <p>Place in Genre(s):<br /> <?php while ($genre = mysql_fetch_array($genres)) { $gid = $genre['id']; $gname = htmlspecialchars($genre['category']); echo "<label><input type='checkbox' name='genres[]' " . "value='$gid' />$gname</label><br />\n"; } ?> </p> <P><input type="submit" value="INSERT RECORD" /></P> </form> <?php endif; ?> </BODY> </HTML> And here's the test results page in case I'm not entering the query correctly: ><?php $dbcnx = @mysql_connect('localhost', 'username', 'password'); if (!$dbcnx) { exit('<p>Unable to connect to the ' . 'database server at this time.</p>'); } if (!@mysql_select_db('moviema_mmdb')) { exit('<p>Unable to locate the review ' . 'database at this time.</p>'); } $id = $_GET['id']; $genreinfo = @mysql_query("SELECT listtitle, name FROM moviegenre, genre, movie_reviews, critic WHERE genreid=genre.id AND movieid=movie_reviews.id AND criticid=critic.id AND genre.category='$id'"); while ($cats = mysql_fetch_array($genreinfo)) { $title = $cats['listtitle']; $critic = $cats['name']; echo "$title - $critic<br />"; } ?> I apologize for the excessive length but I thought I should include everything that applies. I'm getting a tad frustrated as I thought I was making headway with this and it's probably some minor error on my part. I appreciate any help that can be provided
-
(mysql) Parse Error: Unexpected T_variable
TheMovieman replied to TheMovieman's topic in Scripting Talk
Thanks Tim. Yeah, I noticed and corrected some. I'll give this a try though and see. EDIT: Well, no parse errors (thankfully), but now all I get is a blank white screen, lol. I was thinking about thinking about removing all the insert code above and have one page for the form and another to insert the data... EDIT #2: (lol) I had taken out a piece of the code before and did not insert it again. Once I did so, it worked, sort of. The critic lists just fine but there are no genres. Probably just some table naming error. Thanks again Tim OK, more of a curiosity than a problem but I got the genres to list (wrong row name). Anyways, it lists all but one of them. There are 14 genres but the second one (Drama) isn't listed. The rest are listed fine and in the order I entered them. Don't know why, though. Here's a screenshot: -
Hello, With the help of a tutorial book, I've experimented with ways to insert a movie review but before I can test it and see if it'll enter the information correctly, I get this error: Parse error: syntax error, unexpected T_VARIABLE in /home/username/public_html/folder/subfolder/addnewreview.php on line 199 I had gotten a parse error before because of an "else:" statement which after taking out, got to this (and that error was much higher up). Here's the code: ><HTML> <head> <title>Review CMS: Add New Review</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> </head> <BODY> $connection = @mysql_connect('localhost', 'username', 'password'); if (!$connection) { exit('<p>Unable to connect to the ' . 'database server at this time.</p>'); } if (!@mysql_select_db('databasename')) { exit('<p>Unable to locate the movie ' . 'database at this time.</p>'); } if (isset($_POST['intro'])): // A new review has been entered // using the form. $id = $_POST['id']; $title = $_POST['title']; $year = $_POST['year']; $releasedate = $_POST['releasedate']; $intro = $_POST['intro']; $reviewbody1 = $_POST['reviewbody1']; $reviewbody2 = $_POST['reviewbody2']; $image1 = $_POST['image1']; $image2 = $_POST['image2']; $poster = $_POST['poster']; $mpaa_rating = $_POST['mpaa_rating']; $mpaa_reason = $_POST['mpaa_reason']; $runtime = $_POST['runtime']; $star_rating = $_POST['star_rating']; $cid = $_POST['cid']; $genres = $_POST['genres']; if ($cid == '') { exit('<p>You must choose a critic for this joke. Click "Back" and try again.</p>'); } $sql = "INSERT INTO movie_reviews SET id='$id', title='$title', year='$year', reviewdate=CURDATE(), releasedate='$releasedate', intro='$intro', reviewbody1='$reviewbody1', reviewbody2='$reviewbody2', image1='$image1', image2='$image2', mpaa_rating='$mpaa_rating', mpaa_reason='$mpaa_reason', runtime='$runtime', star_rating='$star_rating', criticid='$cid', poster='$poster'"; if (@mysql_query($sql)) { echo '<p>New review added</p>'; } else { exit('<p>Error adding new review: ' . mysql_error() . '</p>'); } $mid = mysql_insert_id(); if (isset($_POST['genres'])) { $genres = $_POST['genres']; } else { $genres = array(); } $numGenres = 0; foreach ($genres as $genreID) { $sql = "INSERT IGNORE INTO moviegenre SET movieid=$mid, genreid=$genreID"; $ok = @mysql_query($sql); if ($ok) { $numGenres = $numGenres + 1; } else { echo "<p>Error inserting joke into category $genreID: " . mysql_error() . '</p>'; } } ?> <p>Review was added to <?php echo $numGenre; ?> categories.</p> <p><a href="<?php echo $_SERVER['PHP_SELF']; ?>">Add another movie review</a></p> <p><a href="index.php">INDEX PAGE</a></p> <?php $critics = @mysql_query('SELECT id, name FROM critic'); if (!$critics) { exit('<p>Unable to obtain critic list from the database.</p>'); } $genres = @mysql_query('SELECT id, category FROM genre'); if (!$genres) { exit('<p>Unable to obtain genre list from the database.</p>'); } ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <p>Movie ID:<br /> <textarea name="id" rows="1" cols="30"> </textarea></p> <p>Movie Title:<br /> <textarea name="title" rows="1" cols="45"> </textarea></p> <p>Year:<br /> <textarea name="year" rows="1" cols="10"> </textarea></p> <p>Release Date:<br /> <textarea name="releasedate" rows="1" cols="10"> </textarea></p> <p>Introduction:<br /> <textarea name="intro" rows="5" cols="45"> </textarea></p> <p>Review Part 1:<br /> <textarea name="reviewbody1" rows="10" cols="45"> </textarea></p> <p>Review Part 2:<br /> <textarea name="reviewbody2" rows="10" cols="45"> </textarea></p> <p>Image #1:<br /> <textarea name="image1" rows="1" cols="45"> </textarea></p> <p>Image #2:<br /> <textarea name="image2" rows="1" cols="45"> </textarea></p> <p>Poster:<br /> <textarea name="poster" rows="1" cols="45"> </textarea></p> <P>MPAA Rating: <select name="mpaa_rating" size="1"> <option selected value="">Select One</option> <option value="">--------------------</option> <option value="g">G</option> <option value="pg">PG</option> <option value="pg13">PG-13</option> <option value="r">R</option> <option value="nc17">NC-17</option> <option value="nr">Not Rated</option> </select></p> <p>MPAA Reason:<br /> <textarea name="mpaa_reason" rows="3" cols="45"> </textarea></p> <p>Runtime:<br /> <textarea name="runtime" rows="1" cols="10"> </textarea></p> <P>Star Rating: <select name="star_rating" size="1"> <option selected value="">Select One</option> <option value="">----------------</option> <option value="1star">*</option> <option value="1.25stars">*¼</option> <option value="1.5stars">*½</option> <option value="1.75stars">*¾</option> <option value="2stars">**</option> <option value="2.25stars">**¼</option> <option value="2.5stars">**½</option> <option value="2.75stars">**¾</option> <option value="3stars">***</option> <option value="3.25stars">***¼</option> <option value="3.5stars">***½</option> <option value="3.75stars">***¾</option> <option value="4stars">****</option> <option value="4.25stars">****¼</option> <option value="4.5stars">****½</option> <option value="4.75stars">****¾</option> <option value="5stars">*****</option> </select></p> <P>Critic: <select name="cid" size="1"> <option selected value="">Select One</option> <option value="">-----------</option> <?php while ($critic = mysql_fetch_array($critics)) { $cid = $critic['id'] $cname = htmlspecialchars($critic['name']); echo "option value='cid'>$cname</option>\n"; } ?> </select></p> <p>Place in Genre(s):<br /> <?php while ($genre = mysql_fetch_array($genres)) { $gid = $genre['id']; $gname = htmlspecialchars($genre['name']); echo "<label><input type='checkbox' name='genres[]' " . "value='$gid' />$gname</label><br />\n"; } ?> </p> <P><input type="submit" value="INSERT RECORD" /></P> </form> <?php endif; ?> </BODY> </HTML> I'd appreciate any help at all
-
I went ahead and did the last resort. I used my recovery disk and just started over. Oh well, at least I can get online now... Actually, this wasn't too bad as I didn't have much stuff I needed to back up, it was just a matter of time as I would have to download the Symantec updates and such.
-
Well, downloaded and ran Microsoft's Anti-Spyware program which found and deleted 11 items. It restarted but the dang Symantec Email Proxy popped up again... I tried to go online, same result.
-
Another one I tried was to check the registry for a missing subkey "CurrentVersion"... This was already there, so at this point I have no idea, how to fix this... I'm going to try and download another spyware protector on this computer, put it on my jump drive and load on the laptop.
-
Nope. I only had maybe 4 restore points, tried them all and upon restarting I get "Restoration Incomplete". Now I'm really frustrated...
-
OK, I'll give that a try.
-
Don't know if this is in the right forum, but I have been working on my laptop trying to get all the virus updates and the such done (as I have not used it in a while). Anyways, along with getting updates from Symantec for my antivirus and internet security, I also downloaded Ad-Aware. So, I ran a virus check which caught a few things as well as Ad-Aware which got other stuff (which I did not take note of at the time). The problem is, I had not gotten the Ad-Aware update yet and for some reason could not even though I was online. I think this is where everything started. I then got a Norton Antivirus pop-up stating: "Symantec Email Proxy cannot scan your email because your network is not properly configured". I tried rebooting and this stupid thing popped up again, and not only that, I could not get online. It would dial in as usual and the monitor thing would show in the system tray telling me what the connection speed is. However, MSN would not sign in and then would tell me that there is no connection (though I was technically online, I even tried opening IE browser and it would not open the page). I googled this and tried some suggestions which included checking the TCP/IP protocol and that was in good order. I then even uninstalled and installed Norton SystemWorks and Internet Security and the problem pursisted. Another suggestion was to download an anti-spyware program (which I already did) with all the currect updates (which, not being able to go online, I cannot get). Is there anyway to download the latest updates on another computer and install it on another computer? Does anyone know how to fix this? I have tried running tests and several virus scans/spyware scans and nothing has worked... It's pretty annoying now that I can't get online. Thanks in advance, Brian PS: By the way, even after uninstalling both SystemWorks and Internet Security, I still could not get online...
-
An Established Connection Was Aborted...
TheMovieman replied to TheMovieman's topic in CPanel and Site Maintenance
Yes, he put the domain name after his username. We did turn off the virus protection but never thought about the firewall, so we'll try that next. -
Hey all, One of my friends is trying to connect to my site using SmartFTP to upload a large file. But when he tries to connect he gets this message: "An established connection was aborted by the software in your host machine." I set him up with a username and password (and tried it myself, and it worked). I googled this problem and came up with it being because of a windows update. One site said to uninstall it, he did and he still gets this message. He tried using another ftp client, still no dice. Anyone have any suggestions?
-
5 years ago I started my movie review site with a free service where you didn't have to have any knowledge of HTML coding. It was great for a while as it was unlimited space and all that but then (like the other WYSIWYG) they started charging. At first it was ok, a bit on the spendy side but unless I was willing to give up my site, I had no choice. Then the cost came to nearly $100 / yr (no domain name, 15 GB of bandwidth and 100 MB of disk space)... Anyways, I learned how to write HTML and PHP code and converted all my pages (wouldn't be able to take 'em with me) and found TCH and am glad I did!
-
Thanks David, I think I'm getting a hang on this. I do have one more question, I now have a temp page to test the codes but I looked at the table I created and wondered if I could have the user sort the information. Right now, it's sorted by the release date (desc) but I'd like to have links for the user to sort by the movie title or gross. I did a google search and I did find one thing that pertained to what I want but didn't understand what it meant: "Use mysql's "order by" phrase in your select statement to determine ordering; this makes the code you use to convert from data -> html presentation pretty much independent of any ordering. Use a query string in the HTML you place in the column headers that calls the same php file; all you do is use that query string when you need to construct your select statement." I get the first part of it about ordering but what about using a query string in the html?
-
Yeah, I figured that out, thanks I do have one more problem. This isn't a big deal as I can use the command line but it would make things quicker. When clicking the "delete" link, it goes through like it has, but it's still in the database... Here's the code: >$id = $_GET['id']; "DELETE FROM actor_table WHERE ActorID='$id'"; I apologize for the questions, but anything I google (or read) doesn't clearly explain how these things work. In this case, I believe the $id variable (the id from the URL) is supposed to store the ActorID and then place it in the DELETE function. By the way, this code is in conjunction with the previous one and is supposed to carry over (the address is something like: http://www.domain.com/folder/deleteactor.php?id=3 What am I missing? Thanks again for any help
-
Hello all again, I'm working on an Edit/Delete page to manage my actors/movies tables. I got the page and links to work fine but I get a warning... Here's a copy of the page: Manage Authors Ben Affleck Edit Delete Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/moviema/public_html/admin/actors.php on line 32 Add new author Return to front page Here's the code: ><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <html> <head> <title>Movie Management System: Manage Actors</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> </head> <body> <h1>Manage Authors</h1> <ul> <?php $dbcnx = @mysql_connect('localhost', 'database_name, 'password'); if (!$dbcnx) { exit('<p>Unable to connect to the ' . 'database server at this time.</p>'); } if (!@mysql_select_db('database_name')) { exit('<p>Unable to locate the movie ' . 'database at this time.</p>'); } $actors = @mysql_query('SELECT ActorID, FirstName, LastName FROM actor_table'); if (!$actors) { exit('<p>Error retrieving actors from database!<br />'. 'Error: ' . mysql_error() . '</p>'); } // HERE'S WHERE THE TROUBLE IS while ($actors = mysql_fetch_array($actors)) { // END $id = $actors['ActorID']; $first_name = htmlspecialchars($actors['FirstName']); $last_name = htmlspecialchars($actors['LastName']); echo "<li>$first_name $last_name ". "<a href='editactor.php?id=$id'>Edit</a> ". "<a href='deleteactor.php?id=$id'>Delete</a></li>"; } ?> </ul> <p><a href="newauthor.php">Add new author</a></p> <p><a href="index.html">Return to front page</a></p> </body> </html> I've marked where the trouble is. When fiddling around with that, I actually got the warning removed, but then the script didn't get the actor's first or last name. The edit/delete links were there, however, it was blank after the "id=". This is probably something really dumb, but I thought maybe somebody can set me right here... -Brian
-
Haha, what'd you? It did work! Thanks David!
-
I'm a little slow today, what do you mean?
