Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7093437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:26:22+00:00 2026-05-28T08:26:22+00:00

How can I include this code as it is and then upload it to

  • 0

How can I include this code as it is and then upload it to my database and in the database there should be variables and not strings?

CODE:

$username1 = $_SESSION['myusername'];
$sql = mysql_query("SELECT * FROM `members` WHERE `username`='$username1'");
while($row=mysql_fetch_array($sql)) {
  $replytext = '<table cellpadding="0" cellspacing="0" border="0"><tr><td rowspan="10" class="teamimage" style="background-image: url(images/usericons/'.$row['img'].');"><div style="background-image:url(images/teamicons_shadow.png); width: 75px; height: 75px;"></div></td></tr><tr valign="top"><td rowspan="10" style="width:10px;"></td><td style="width:300px;"><table cellpadding="0" cellspacing="0" border="0" style="margin:0px; padding:0px;"><tr><td class="teamname"><b><a href="teams.php?user='.$row['id'].'">'.$row['username'].'</a></b></td></tr><tr><td>Summoner Name: '.$row['summonername'].'</td></tr><tr><td style="border-bottom: 1px solid #888; padding-bottom: 5px;">Clan: '.$row['clan'].'</td></tr><tr><td style="color: #888; padding-top: 3px;">Country: '.$row['country'].'</td></tr><tr><td style="color: #888; padding-top: 3px;">Joined In: '.$row['created'].'</td></tr></table></td><td style="width:10px;"></td><td rowspan="10" style="border: 1px solid #aaa; padding: 3px; width:600px;">'.$replytext.'</td></tr></table>';
}

CODE IN DATABASE

 <table cellpadding="0" cellspacing="0" border="0">
   <tr>
     <td rowspan="10" class="teamimage" 
       style="background-image: url(images/teamicons/default_user.png);">
       <div
         style="background-image:url(images/teamicons_shadow.png); 
           width: 75px; height: 75px;">
       </div>
     </td>
   </tr>
   <tr valign="top">
     <td rowspan="10" style="width:10px;">
     </td>
     <td style="width:300px;">

Please note that the code I explained before is the one inside of $replytext!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T08:26:22+00:00Added an answer on May 28, 2026 at 8:26 am

    If I understand you right , you want that the code in the database will be:

    <table cellpadding="0" cellspacing="0" border="0"><tr><td rowspan="10" class="teamimage" style="background-image: url(images/teamicons/$row['img'].png)
    

    Another solution is to have a unique char that won’t make php think it’s a variable.
    For instance change the:

    $row['img']
    

    to

     ###row['img']
    

    and when you pull this code from the database use a simple str_replace to replace the ###
    symbol with $.

    Of course you need to have a unique char , if you are using a simple char like “a” , it will change all the “a” chars in your code to $ … not a very good idea.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there anyway I can modify this code example #include <stdlib.h> #include <iostream> class
Can anybody help me with this simple code?? #include <iostream> using namespace std; void
I have several textboxes where users can enter information into them. This can include
How can I include foo() function of foo.c in this small program (sorry for
I can't figure out the problem in this: #include<stdio.h> int main() { int a,b,count
This may be a basic question but how can I include a module with
I know this isn't best practice, but can I include all of the dependencies
How can I this PHP function include in jquery .html? PHP function: function trim_text($string,
Can anyone explain to me why this isn't working? #include <stdio.h> #include <stdlib.h> char
Using scons I can easily set my include paths: env.Append( CPPPATH=['foo'] ) This passes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.