Jump to content

[SOLVED] tabs and php


runnerjp

Recommended Posts

im using tabs to display different types of inforamtion on a profile page....

 

<div align="center" class="style5">
            <p class="style9"><u>Welcome to Admins profile</u></p>
            <p class="style9"> </p>
          </div>
            <ul id="countrytabs" class="shadetabs">
<li><a href="#" rel="#default" class="selected">About me</a></li>
<li><a href="include/profiletab/showgoals.php" rel="countrycontainer">Goals</a></li>
<li><a href="include/profiletab/external3.htm" rel="countrycontainer">Idols</a></li>
<li><a href="include/profiletab/external4.htm" rel="#iframe">Thanks to</a> </li>
</ul>

<div id="countrydivcontainer" style="border:1px solid gray; width:800px; margin-bottom: 1em; padding: 10px">
<?php echo $getuserprofile['about_me']?></div>
<script type="text/javascript">

var countries=new ddajaxtabs("countrytabs", "countrydivcontainer")
countries.setpersist(true)
countries.setselectedClassTarget("link") //"link" or "linkparent"
countries.init()

</script>

 

 

the thing is when i click on one of the tabs such as  <li><a href="include/profiletab/showgoals.php" rel="countrycontainer">Goals</a></li>, then the php on the page wont work

<?php
session_start();
require_once '../../../settings.php';
include "../../../info.php"; // sets username/id ect
$go= $_GET['username'];
echo $go;
$getuser = mysql_fetch_assoc(mysql_query("SELECT * from users where Username='$profilename'"));
$getuserprofile = mysql_fetch_assoc(mysql_query("SELECT * from profile where ID='".$getuser['ID']."'"));
echo $getuserprofile['mygoals'];
?>

 

the reason for this seams to be the fact that $_GET['username']; does not grab the username in the url... how can i carry the url to one of the linked pages so that i can get information in the tabs dependent on the users profile page?

Link to comment
Share on other sites

the reason for this seams to be the fact that $_GET['username']; does not grab the username in the url... how can i carry the url to one of the linked pages so that i can get information in the tabs dependent on the users profile page?

<a href="include/profiletab/showgoals.php" rel="countrycontainer"> doesn't have a username in the URL to get

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.