Jump to content

[SOLVED] cant get php to work within my tab?


runnerjp

Recommended Posts

ok i have a tab area set up shown below

 

<ul id="countrytabs" class="shadetabs">
<li><a href="#" rel="#default" class="selected">About me</a></li>
<li><a href="hobbies.php" rel="countrycontainer">Hobbies</a></li>
<li><a href="include/profiletab/external3.htm" rel="countrycontainer">Goals</a></li>
<li><a href="include/profiletab/external4.htm" rel="#iframe">Films and Books</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>

 

when i look at hobbies.php my php just wont show!  any1 know why?

 

hobbies.php

<?php 
include '../../../settings.php';
include "../../../info.php"; // sets username/id ect

$getuser = mysql_fetch_assoc(mysql_query("SELECT * from users where Username='$username'"));
$getuserprofile = mysql_fetch_assoc(mysql_query("SELECT * from profile where ID='" .$getuser['ID'] . "'"));
?> 
  <div align="center">
            <p>About me <?php echo $id;?>           </p>
            <p>
            <textarea onKeyPress="return taLimit(this)" onKeyUp="return taCount(this,'myCounter')" name="Description" rows=7 wrap="physical" cols=60><?php echo $username ?></textarea>
            <br>
            <br>
            You have <B><SPAN id=myCounter>255</SPAN></B> characters remaining</p>
</div>

Link to comment
Share on other sites

thats intresting and coinfusing

 

ok so i got

 

Notice: Undefined index: id in /home/runningp/public_html/info.php on line 7

 

Notice: Undefined index: pagenum in /home/runningp/public_html/info.php on line 8

 

Notice: Undefined index: forum in /home/runningp/public_html/info.php on line 9

 

Notice: Undefined index: notify in /home/runningp/public_html/info.php on line 10

 

Notice: Undefined index: username in /home/runningp/public_html/info.php on line 12

 

Notice: Undefined index: HTTPS in /home/runningp/public_html/getuser.php on line 11

 

Notice: Undefined index: HTTPS in /home/runningp/public_html/getuser.php on line 11

 

but info.php relys on sessions

 

<?php
/* user sessions */
$username= get_username($_SESSION['user_id']); // gest username of online user
$id = $_SESSION['user_id']; // gets the online users id

/* forum sessions */
$forumpostid=$_GET['id'];// gets the forum post id
$pagenum=$_GET['pagenum'];// gets the page number of the forum  thread
$forum=$_GET['forum']; // gets the forum board name
$notify=$_GET['notify']; // see if users doesnt want any more replys

$profilename=$_GET['username'];// gets the page number of the forum  thread

/* time and date functions */
$thedate=date("U"); //get unix timestamp

/* get user info from profive via $getuserprofile['gender'] or $getuser['Username']*/
$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']."'"));	
?>

Link to comment
Share on other sites

ok this is very wired... i tried making a page called text.php and entering a bit of code to show my id so i did

 

<?php 
require_once 'settings.php'; 
echo $_SESSION['user_id'];
?> 

 

and it shows nothing :S

 

i go to an onld page and enter the code and it shows it???

 

how/why is this happening

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.