Jump to content


Photo

Not including


  • Please log in to reply
4 replies to this topic

#1 craigtb

craigtb
  • Members
  • PipPip
  • Member
  • 24 posts

Posted 07 June 2006 - 02:51 PM

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.

<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>

Any help?

#2 Orio

Orio
  • Staff Alumni
  • Advanced Member
  • 2,491 posts

Posted 07 June 2006 - 03:40 PM

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.
Think you're smarty?

(Gone until 20 to November)

#3 craigtb

craigtb
  • Members
  • PipPip
  • Member
  • 24 posts

Posted 07 June 2006 - 06:15 PM

[!--quoteo(post=381035:date=Jun 7 2006, 11:40 AM:name=Orio)--][div class=\'quotetop\']QUOTE(Orio @ Jun 7 2006, 11:40 AM) View Post[/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.

#4 craigtb

craigtb
  • Members
  • PipPip
  • Member
  • 24 posts

Posted 07 June 2006 - 06:49 PM

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.

#5 Orio

Orio
  • Staff Alumni
  • Advanced Member
  • 2,491 posts

Posted 07 June 2006 - 06:54 PM

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

Orio.
Think you're smarty?

(Gone until 20 to November)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users