Jump to content

Mysql Variable


zonerdck

Recommended Posts

Sorry if i am posting in the wrong thread but my topic deals with Mysql and php. in my php form I am calling some text and an ahref link from my mysql database. The problem I am having is that I want to be able to put a PHP variable in the text of the database call. Right now when the page renders it just prints out the variable because PHP has already rendered the page. Below is the code now the variables for the hrefs work fine but I dont quite understand how. The variable for the font color is what just prints out.

 

Does anyone know of a way for me to do this. I know there is because some of the stuff in the database are variables that look like this...

 

 

<a href='profile.php?user=%1$s'>%2$s</a> and <a href='profile.php?user=%3$s'>

<font style="color:{$rep->cred_usercolor({$content.action_vars[1])};">

%4$s

</font>

</a> have added each other as contacts.

Link to comment
https://forums.phpfreaks.com/topic/163060-mysql-variable/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.