Jump to content

hashkash

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

hashkash's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello! Im using Joomla to develop a portal.Im posting here bcoz i need some help with my php script. Basically i need to extract the user name of the user that has logged in i.e when he clicks on a link I would like to retrieve certain information regarding that user. People have told me that i can get it by a global variable $my->username. I keep getting REstricted access.Could anyone who has used Joomla please help me [code] defined ('_VALID_MOS') or die('Restricted access'); global $my; echo $my->username; [/code]
  2. Thanks alot!!! haha, it was just staring right at us!
  3. I did try it out but im still getting the warning i mentioned earlier. What could be the problem?
  4. Im getting a warning Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\showinfo.php on line 7. here is the showinfo.php code [code] <?php     $con=mysql_connect("localhost","root","")     or die("Couldnt Connect :" . mysql_error());     mysql_select_db("joomla");     $uname=$_GET['name'];     $query="select * from j_userdetails where name= '$uname' ";     while ($line = mysql_fetch_array($query, MYSQL_ASSOC))           {             echo "\t<tr>\n";             foreach ($line as $col_value)             {             echo "\t\t<td>$col_value</td>\n";             }             echo "\t</tr>\n";           }           echo "</table>"; ?> [/code]
  5. thanks for the help,will try it out and let u know
  6. hey thanks alot!! Could you elaborate on the showinfo.php please
  7. Hello! Im new to php.My problem is this. I have some user info stored in the db.Now i would like to display only the names from the userinfo table. (this i can do).I would like the clients to be able click on the names displayed so that they can view that users information. Pls help me!! Thanks! Kashyap
×
×
  • 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.