Jump to content

Need a solution for passing variables in php


kappity

Recommended Posts

Ok, well basically i'm not sure if this can be done or not.  Basically I have a IM type bar for my website similar to facebook.  It's from CometChat.com.  Anyway the place to edit the links to all the modules for the bar are done in the config.php file.  What I'm trying to do is put a link for users to click to go directly to their profile on the site.  To do this i get the user's ID, and reference it to the mysql database, get the nickname, pass it to a varaiable and plug the variable into the url in the config file.  The problem I'm having is when I run ANY mysql commands in the config file it kills the CometChat script from showing at all on the site.  I'm not sure why since the whole config file is in php... so i don't see how mysql statements would keep the script from showing.  Another Idea I thought about was running the mysql statements in another php file and somehow get that variable from a php code in the config.php file.. but i'm not really sure what code will run the mysql file and return the variable i need.  Any help is greatly appreciated.

Link to comment
Share on other sites

OOpsss.. I guess a bad sql syntax would mess it up! lol.. i checked it over and over.. guess sometimes we should take a break.  But now I do have one more error...  It won't allow me to put the variable into the url... it's set in an array and it's just recognizing it as a string and not a variable... heres a sample of the array.

 

$trayicon[] = array('profile','Profile','[$profileurl]','','','','','');

 

I've tried with the brackets, without the brackes, with out the quotes (doesn't take the url anywhere but the same page)... not sure how to get the variable to show

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.