What is the exact problem??

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
pHp_n0ob
Forum Commoner
Posts: 35
Joined: Mon Jul 09, 2012 7:30 am
Location: India

What is the exact problem??

Post by pHp_n0ob »

This link is opening..http://topz.iwebs.ws but why this one is not opening http://topz.iwebs.ws/category.php or http://topz.iwebs.ws/footer.php . Its saying Connection Closed By Remote Serverin Opera Mini 4.4. here is the simple code that I'm using on category.php

Code: Select all

<?php
include "main_head.php";
include "mycss.css";
$category=isset($_GET['category']);
$err="err.php";

if($category=='amateur')
$page='amateur.php';
elseif($category=='beach')
$page='beach.php';
elseif($category=='college_girls')
$page='college_girls.php';
elseif($category=='lesbians')
$page='lesbians.php';
elseif($category=='mature_sex')
$page='mature_sex.php';
elseif($category=='teen_sex')
$page='teen_sex.php';
else $page=$err;
include $page;
include "main_foot.php";
?>
Can't guess the actual problem :(
User avatar
twinedev
Forum Regular
Posts: 984
Joined: Tue Sep 28, 2010 11:41 am
Location: Columbus, Ohio

Re: What is the exact problem??

Post by twinedev »

Well, I would say that you have a problem on err.php as that is the file that will get included whenever $_GET['category'] is set to anything, since on the 4th line you are saying $category is either True or False, depending if $_GET['category'] is set. So therefore, none of your if conditions will ever be true, so $page will get set to $err.

To go further than this, we would need to see the contents of err.php,

-Greg
pHp_n0ob
Forum Commoner
Posts: 35
Joined: Mon Jul 09, 2012 7:30 am
Location: India

Re: What is the exact problem??

Post by pHp_n0ob »

Code: Select all

<?php
echo '<font color="red">Category Doesnot Exits!</font><a href="index.php">Go Back</a>';
?>
User avatar
twinedev
Forum Regular
Posts: 984
Joined: Tue Sep 28, 2010 11:41 am
Location: Columbus, Ohio

Re: What is the exact problem??

Post by twinedev »

Ok, it could be in one of the other included files... LOL (I was tired when I posted last night)
pHp_n0ob
Forum Commoner
Posts: 35
Joined: Mon Jul 09, 2012 7:30 am
Location: India

Re: What is the exact problem??

Post by pHp_n0ob »

I got it! Problem was in mycss.css
Here's my new script which I'm using on category.php and its working well.

Code: Select all

<?php
include "main_head.php";
include "css.html";
$category=$_GET['category'];
$file=$category.'.php';
if(file_exists($file))
{
include($file);
}
else echo "Category Not Found!";
include "main_foot.php";?>
Now about the problem....Due to my carelessness,this problem occured! :-(
The file "mycss.css" has format .css,but I added a php script on it...check here http://topz.iwebs.ws/mycss.css


Thanx for the help anyway....please suggest me if you think there's another problem.
Post Reply