August 07, 2020, 08:16:16 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
   Home   Help Search Login Register  
Pages: [1]
Author Topic: Need a little help  (Read 4918 times)
Posts: 2

« on: January 26, 2009, 06:51:27 PM »

This my review.php

//enter mysql info
$server "localhost";
$username "joey_submited";
$password "batman99";
$database "joey_submited";

$id $_GET['id'];
$anime $_GET['anime'];

if (
$id == "reviews" && $anime != "") {
$connect mysql_connect($server$username$password) or die(mysql_error());
mysql_select_db($database) or die(mysql_error());

$result mysql_query("SELECT * FROM reviews WHERE anime_name='".$anime."' ORDER BY anime_name") or die(mysql_error());
$row=mysql_fetch_assoc($result)) {  
"<h2>".$row['anime_name']." Review</h2>".$row['anime_review'];
else {
List of reviews here.

This is the MYSQL Database

-- phpMyAdmin SQL Dump
-- version
-- http://www.phpmyadmin.net
-- Host: localhost
-- Generation Time: Jan 26, 2009 at 06:44 PM
-- Server version: 5.0.67
-- PHP Version: 5.2.6


-- Database: `joey_submited`

-- --------------------------------------------------------

-- Table structure for table `reviews`

  `id` int(11) NOT NULL auto_increment,
  `anime_name` varchar(250) default NULL,
  `anime_review` mediumtext,
  PRIMARY KEY  (`id`)

-- Dumping data for table `reviews`

INSERT INTO `reviews` (`id`, `anime_name`, `anime_review`) VALUES
(16, 'His and Hers Circumstances', 'Reported by <a href="?id=account&user=109">akumaxkami</a> on 26 January 2009\r\n<div style="border-top: 1px dotted rgb(235, 235, 235); padding: 3px; text-align: justify; margin-top: 3px; margin-bottom: 5px; border-color:#000000">\r\nName: His and Hers Circumstances (Licensed by Geneon)<br />\r\nLength: 26 Episodes<br />\r\nRating: 5/5\r\n<br>\r\n<br>\r\nSynopsis:<br />\r\nA high school love story between Yukino Miyazawa and Soichiro Arima, two model students with seemingly perfect lives.\r\nYukino is a freshman in high school and the envy of all the students with her perfect grades and put-together appearance. But her &quot;perfection&quot; is all a facade, a character she plays to gain praise from those around her. Underneath it all, she''s a spoiled, selfish, and stubborn and studies nonstop to maintain her perfect grades.\r\nEnter Soichiro Arima, Yukino''s rival. Soichiro knocks Yukino out of her number one spot in the class and threatens her very existence. Yukino is determined to destroy him.\r\nBut once Soichiro sees her for who she really is - an awful person - he comes to admit that he too is also pretty rotten and two vow to start being themselves more often instead of caring about how they appear to others.\r\n<br>\r\n<br>\r\nReview:<br />\r\nI found Kare Kano to be initially a light-hearted high school romance about two teens pretending to be the perfect students, a recurring theme in high school based anime. But after getting deeper into the series, I noticed a lot of darker elements that might appeal to those who like a series with more character depth.\r\nThe comedic elements are spot on and I often found myself laughing at some of Yukino''s antics. There are a few scenes, particularly later in the series that brought tears to my eyes and left me hoping that everything was going to work out for the characters in question.\r\nAll in all though, I really enjoyed this series and with an understanding of the complexity of high school life in Japan, I was very pleased at how &quot;real&quot; the plot felt.\r\n</em></div><div style="margin-bottom:30px;"></div>');

Now that I have that out of the way. What I want to do is make a PHP script that i would insert right here

else {
echo "<h2>Reviews</h2>
List of reviews here.

in reviews.php page that would place a list of all the well in this case anime review names in the anime_name row in the database there as links like this

<a href ="http://mysite.com/index.php?id=reviews&anime=anime_name"/>anime_name</a>

and that would auto update as more in added to the anime_name row in the database!

If anyone could help that would be great!

Posts: 6

« Reply #1 on: February 05, 2009, 07:25:44 AM »

my english suck! its hard to read your code

i cant help you with that, but i want to let you know that you will have a better code using MVC framework such as Symfony, CakePHP or CodeIgniter. I am personally using Zend framework, please check out my sample website eYeew!
Pages: [1]
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC