Jump to content

Archived

This topic is now archived and is closed to further replies.

craigtb

Not including

Recommended Posts

I have a script that is fully functional. I am trying to implement a layout to it. I have the layout working (kinda). On the pictures that are links its not sending me to thr right page. Its taking me to a blank page with the info. I want it to include the info in the layout. here is what i have.

[code]<html>

<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<title>Untitled </title>
</head>

<body>

<table border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td colspan="2"><img
        src="images/index_01.gif"
        width="800" height="182"></td>
    </tr>
    <tr>
        <td valign="top" width="194"><a href="?logos=view.php"><img
        src="images/index_02.gif"
        border="0" width="194" height="50"></a><br>
        <a href="?logos=add.php"><img
        src="images/index_07.gif"
        border="0" width="194" height="40"></a><br>
        <a href="?logos=list.php"><img
        src="images/index_08.gif"
        border="0" width="194" height="48"></a><br>
        <a href="?logos=deletelist.php"><img
        src="images/index_09.gif"
        border="0" width="194" height="49"></a></td>
        <td width="500"><font size="2"
        face="Geneva,Arial,sans-serif"><?php if ($logos == "") {
$rarrr ="view.php";
}
include("$logos");
?></font></td>
    </tr>
</table>
</body>
</html>[/code]

Any help?

Share this post


Link to post
Share on other sites
I have 3 questions about your script:
-From where did the "$logos" come from?
-What is $rarrr doing?
-Why do include $logos if it's empty or if it's not?

Orio.

Share this post


Link to post
Share on other sites
[!--quoteo(post=381035:date=Jun 7 2006, 11:40 AM:name=Orio)--][div class=\'quotetop\']QUOTE(Orio @ Jun 7 2006, 11:40 AM) [snapback]381035[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I have 3 questions about your script:
-From where did the "$logos" come from?
-What is $rarrr doing?
-Why do include $logos if it's empty or if it's not?

Orio.
[/quote]
I was told you could make the if ($whatever == "") could be anythign so i called it logos because its related to the site.
The rarrr was supposed to be changed, that was my mistake but i changed it and it still doesnt work.
Its supposed to if its the home page just automatically include view.php but if its site.com/?logos=page.php then it should include page.php.

Share this post


Link to post
Share on other sites
Ok for some reason the file i was using didnt have the ?logos=page.php in the link. But i put it in and now it jsut goes cycles through the log in, so thats jsut somethign i will have to work on.

Share this post


Link to post
Share on other sites
Ok so you are using GET.
Here's what the php part should look like:
[code]<?php
if(!isset($_GET['logos'])){
$logos="view.php";
}
else{
$logos=$_GET['logos'];
};
include($logos);
?>[/code]

Orio.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.