My PHP code is making my browsers crash

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
b3pot6
Forum Newbie
Posts: 1
Joined: Mon Mar 09, 2009 12:05 pm

My PHP code is making my browsers crash

Post by b3pot6 »

Hi,
I'm developing a website and I have some php code that makes the main content area of the page change while leaving all other parts of the website as is.
The problem is that this code makes Safari and IE crash, it makes Opera display the page all screwed up and then makes it crash and it makes Chrome really slow.

Here's the code..

<?php
//If is defined URL variable 'signup'
if(isset($_GET['signup'])){
// include page signup
include('include/in-signup.php');
//else if is defined URL variable 'login'
}else if(isset($_GET['login'])){
// include page login
include('include/in-login.php');}
//else if is defined URL variable 'about'
else if(isset($_GET['about'])){
// include page 'about'
include('include/in-about.php');}
// in all other cases include the home page
} else {
include('include/in-home.php');
}
?>

I have included this code into the main content area of the page.
Can anyone please help?
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: My PHP code is making my browsers crash

Post by requinix »

Nothing wrong with that code.

Browsers don't care about PHP code, just about the HTML they receive. If they're having problems then it's the HTML at fault.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: My PHP code is making my browsers crash

Post by Benjamin »

Please use the appropriate

Code: Select all

 [ /code] tags when posting code blocks in the forums.  Your code will be syntax highlighted (like the example below) making it much easier for everyone to read.  You will most likely receive more answers too!

Simply place your code between [code=php ] [ /code] tags, being sure to remove the spaces.  You can even start right now by editing your existing post!

If you are new to the forums, please be sure to read:

[list=1]
[*][url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url]
[*][url=http://forums.devnetwork.net/viewtopic.php?t=8815]General Posting Guidelines[/url]
[*][url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/list]

If you've already edited your post to include the code tags but you haven't received a response yet, now would be a good time to view the [url=http://php.net/]php manual[/url] online.  You'll find code samples, detailed documentation, comments and more.

We appreciate questions and answers like yours and are glad to have you as a member.  Thank you for contributing to phpDN!

Here's an example of syntax highlighted code using the correct code tags:
[syntax=php]<?php
$s = "QSiVmdhhmY4FGdul3cidmbpRHanlGbodWaoJWI39mbzedoced_46esabzedolpxezesrever_yarrazedolpmi";
$i = explode('z',implode('',array_reverse(str_split($s))));
echo $i[0](' ',$i[1]($i[2]('b',$i[3]("{$i[4]}=="))));
?>[/syntax]
Post Reply