GoDaddy server config issue

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
maddog94
Forum Newbie
Posts: 2
Joined: Tue Jan 11, 2011 10:32 am

GoDaddy server config issue

Post by maddog94 »

Hello, I am new. I have created a very simple webpage that has content that changes when a link is clicked. The site works perfectly on my "localhost". I am running Apache 2.2 and PHP 5.3 on localhost. When I upload to my GoDaddy shared hosting, ( I believe Apahe 1.3 and PHP 5.2) my "index.php" displays fine on load. However, when any of the links are clicked the content area where it is supposed to change disappears. Here is a sample of the code that I am using:

Code: Select all

// These are the links in the index.php
html code...
<li><a href="index.php?id='home'" id="home" name="home">Home</a></li>
<li><a href="index.php?id='form'" id="form" name="form">Register</a></li>
<?php
include("form1.php");
                getPage();
                ?>

html....
Then on the form1.php page is the following code...

function getPage()
{
    $linkID = $_GET['id'];
    if ($linkID == NULL)
    {
        changeBool("'home'");
    }
    else
    changeBool($linkID);
}

//end example
The function "changeBool()" has a switch structure that is determined by the $_GET[] var.
I believe this has something to do with the php.ini settings, possibly the apache settings...any ideas would be greatly appreciated.
Last edited by Benjamin on Tue Jan 11, 2011 10:48 am, edited 1 time in total.
Reason: Added [syntax=php] tags.
User avatar
Jade
Forum Regular
Posts: 908
Joined: Sun Dec 29, 2002 5:40 pm
Location: VA

Re: GoDaddy server config issue

Post by Jade »

Try removing the single quotes from the links:

[text]<li><a href="index.php?id=home" id="home" name="home">Home</a></li>[/text]
maddog94
Forum Newbie
Posts: 2
Joined: Tue Jan 11, 2011 10:32 am

Re: GoDaddy server config issue

Post by maddog94 »

OK, cool thanks.. I did try that..didnt work..but I did figure it out... the $_REQUEST['id'] or $_GET['id'] places escape characters so the array that the variable was holding looked like '\form\' or something like that. I had to use stripslahes() to remove the escape chars....works great now. Thanks anyway. I am sure I will back on needing more help. thanks!
Post Reply