PDA

View Full Version : Please help me. php problem



swiftmed
03 Feb 2007, 10:26 AM
Hey Guys,

im really confused over this issue. basically if you go to http://www.4design4style.com/directory.php and click on any one of the images in the centre of the page it takes you to another page.

You will see that the url changes to somthing like http://www.4design4style.com/boutique/4%20Travel/4%20Hotels/4%20Oceanic%20Cities#809. The problem i have is the page that it goes to is all buggered up. there is no styles to it, all the colours and fonts are wrong etc, and i cannot find the page that controls to output on that page.

As you can see in the url it goes to www.4design4style.com/boutique/.... but that boutique directory doesnt exist, so why is it going to there, and how can i find the page that controls the styles. i have looked into the code on the database page and this seems to be the line that controls the url it goes to when an image is clicked:


while($randarray = mysql_fetch_assoc($randq))
{
$randomarray[] = $randarray['photo'];
$randomlinkarray[] = 'boutique/' . $randarray['Sub1'] . '/' . $randarray['Sub2'] . '/' . $randarray['Sub3'] . '#' . $randarray['id'];

}

Can anybody please help or advise please?

Littlened
26 Apr 2007, 04:04 AM
Hey Guys,

im really confused over this issue. basically if you go to http://www.4design4style.com/directory.php and click on any one of the images in the centre of the page it takes you to another page.

You will see that the url changes to somthing like http://www.4design4style.com/boutique/4%20Travel/4%20Hotels/4%20Oceanic%20Cities#809. The problem i have is the page that it goes to is all buggered up. there is no styles to it, all the colours and fonts are wrong etc, and i cannot find the page that controls to output on that page.

As you can see in the url it goes to www.4design4style.com/boutique/.... but that boutique directory doesnt exist, so why is it going to there, and how can i find the page that controls the styles. i have looked into the code on the database page and this seems to be the line that controls the url it goes to when an image is clicked:


while($randarray = mysql_fetch_assoc($randq))
{
$randomarray[] = $randarray['photo'];
$randomlinkarray[] = 'boutique/' . $randarray['Sub1'] . '/' . $randarray['Sub2'] . '/' . $randarray['Sub3'] . '#' . $randarray['id'];

}

Can anybody please help or advise please?

thats because the site is using somesort of mod rewrite which allows the urls to be entered like this to help with search engine optimisation.

Basically the text inside the / ????? / is the value of a variable being passed to the next page. Without the full code of the site it's difficult to know what the variables may be.

For example, the for variable is boutique, which could be anything, but the code could use it to determine what page is opened, i.e. it might add .php to that value and open the page boutique.php, or it might go to a database and get the content of the page from there.