Changing link to an image.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

semlar
Forum Commoner
Posts: 61
Joined: Fri Feb 20, 2009 10:45 pm

Re: Changing link to an image.

Post by semlar »

Something outside that file must be affecting it, because I copied the entire script you posted into my listmembers.php file and it still works.

Did you change listmembers.html back to just {members_row.RANK}?

I can't really think of anything off the top of my head that even could be responsible for this type of behavior.

There doesn't appear to be anything relevant in their changelog between versions 1.3.0 and 1.3.2.
MIGhunter
Forum Newbie
Posts: 13
Joined: Thu Jul 31, 2008 10:49 pm

Re: Changing link to an image.

Post by MIGhunter »

man, Idk. Here is the link to my eqdkp, I did change the header file.
http://www.botdls.com/botdpoints/listmembers.php?s=

As you can see it lists the members rank just fine. If I change it the way you have it, it doesn't.
MIGhunter
Forum Newbie
Posts: 13
Joined: Thu Jul 31, 2008 10:49 pm

Re: Changing link to an image.

Post by MIGhunter »

Figured it out. I forgot I changed something in the other file trying to get it to work. I thought I changed it back but apparently, I didn't. Thanks for the help.
semlar
Forum Commoner
Posts: 61
Joined: Fri Feb 20, 2009 10:45 pm

Re: Changing link to an image.

Post by semlar »

You're welcome.

I'm glad you figured it out.
MIGhunter
Forum Newbie
Posts: 13
Joined: Thu Jul 31, 2008 10:49 pm

Re: Changing link to an image.

Post by MIGhunter »

Can I ask you another huge question.

I want to add a new column to my viewmembers table. Now, I know MySQL and Coldfusion so it is easy there but PHP not so much.

Here is what I want to do and this part I know how to do.
New table called:
eqdkp_member_relic
relic_id
relic_name

New column in the table:
eqdkp_members
member_relic_id

Now, member_relic_id would link to the stuff in eqdkp_member_relic. I know how to do this.

The thing I don't know how to do is, on the listmembers.php page that we've been working with, make the call to that information. Like I said, in coldfusion I would just run a new query and output it. That I can't do in php. All I need it to do is spit out the name I am going to input into the relic table. Then on my listmembers.html page that info will end up as an image like we did with the other stuff. Any chance you can help me out with this?

Here is the html page: http://migcfdesign.com/einherjartues/listmembers.php?s=
You can see I already added the column. Here is the code (I know that I'll have to replace it with the new method call):

Code: Select all

<!-- INCLUDE page_header.html -->
<!-- INCLUDE sidebar.html -->
<!-- IF S_COMPARE -->
<table class="mytable" width="100%" border="0" cellspacing="1" cellpadding="2">
  <tr>
    <th align="left" width="100%" nowrap="nowrap"><a href="{U_COMPARE_MEMBERS}o={O_NAME}">{L_NAME}</a></th>
    <th align="left" width="40" nowrap="nowrap"><a href="{U_COMPARE_MEMBERS}o={O_LEVEL}">Relic Status</a></th>
    <th align="left" width="40" nowrap="nowrap"><a href="{U_COMPARE_MEMBERS}o={O_LEVEL}">{L_LEVEL}</a></th>
    <th align="left" width="100" nowrap="nowrap"><a href="{U_COMPARE_MEMBERS}o={O_CLASS}">{L_CLASS}</a></th>
    <th align="left" width="65" nowrap="nowrap"><a href="{U_COMPARE_MEMBERS}o={O_EARNED}">{L_EARNED}</a></th>
    <th align="left" width="65" nowrap="nowrap"><a href="{U_COMPARE_MEMBERS}o={O_SPENT}">{L_SPENT}</a></th>
    <th align="left" width="90" nowrap="nowrap"><a href="{U_COMPARE_MEMBERS}o={O_ADJUSTMENT}">{L_ADJUSTMENT}</a></th>
    <th align="left" width="60" nowrap="nowrap"><a href="{U_COMPARE_MEMBERS}o={O_CURRENT}">{L_CURRENT}</a></th>
    <th align="left" width="70" nowrap="nowrap"><a href="{U_COMPARE_MEMBERS}o={O_LASTRAID}">{L_LASTRAID}</a></th>
    <th align="left" width="70" nowrap="nowrap">{L_LASTLOOT}</th>
    <th align="left" width="100" nowrap="nowrap">{L_RAIDS_30_DAYS}</th>
    <th align="left" width="100" nowrap="nowrap">{L_RAIDS_90_DAYS}</th>
  </tr>
  <!-- BEGIN members_row -->
  <tr class="{members_row.ROW_CLASS}">
    <td width="100%" nowrap="nowrap"><a href="{members_row.U_VIEW_MEMBER}">{members_row.NAME}</a></td>
    <td width="40" nowrap="nowrap">Relic Status</td>
    <td width="40" nowrap="nowrap">{members_row.LEVEL}</td>
    <td width="100" nowrap="nowrap">{members_row.CLASS}</td>
    <td width="65" nowrap="nowrap" class="positive">{members_row.EARNED}</td>
    <td width="65" nowrap="nowrap" class="negative">{members_row.SPENT}</td>
    <td width="90" nowrap="nowrap" class="{members_row.C_ADJUSTMENT}">{members_row.ADJUSTMENT}</td>
    <td width="60" nowrap="nowrap" class="{members_row.C_CURRENT}">{members_row.CURRENT}</td>
    <td width="70" nowrap="nowrap" class="{members_row.C_LASTRAID}">{members_row.LASTRAID}</td>
    <td width="70" nowrap="nowrap">{members_row.LASTLOOT}</td>
    <td width="100" nowrap="nowrap" class="{members_row.C_RAIDS_30_DAYS}">{members_row.RAIDS_30_DAYS}</td>
    <td width="100" nowrap="nowrap" class="{members_row.C_RAIDS_90_DAYS}">{members_row.RAIDS_90_DAYS}</td>
  </tr>
  <!-- END members_row -->
  <tr>
    <th colspan="11" class="footer">{LISTMEMBERS_FOOTCOUNT}</th>
  </tr>
</table>
<!-- ELSE -->
<!-- IF S_NOTMM -->
<form method="get" action="{F_MEMBERS}">
<input type="hidden" name="{URI_SESSION}" value="{V_SID}" />
<table width="100%" border="0" cellspacing="1" cellpadding="2" style="border-bottom: none">
  <tr>
    <th align="right" width="56" nowrap="nowrap">{L_FILTER}:</th>
    <th align="left">&nbsp;
      <select name="filter" class="input" onchange="javascript&#058;form.submit();">
        <!-- BEGIN filter_row -->
        <option value="{filter_row.VALUE}"{filter_row.SELECTED}>{filter_row.OPTION}</option>
        <!-- END filter_row -->
      </select>
    </th>
  </tr>
</table>
</form>
<!-- ENDIF -->
<form method="post" action="{F_MEMBERS}" name="post">
<table class="mytable" width="100%" border="0" cellspacing="1" cellpadding="2">
  <tr>
    <th align="center" width="20" nowrap="nowrap">&nbsp;</th>
    <th align="left" width="35" nowrap="nowrap">&nbsp;</th>
    <th align="left" width="100%"><a href="{U_LIST_MEMBERS}o={O_NAME}{URI_ADDON}">{L_NAME}</a></th>
    <th align="left" width="100"><a href="{U_LIST_MEMBERS}o={O_RANK}{URI_ADDON}">Relic</a></th>
    <th align="left" width="100"><a href="{U_LIST_MEMBERS}o={O_RANK}{URI_ADDON}">{L_RANK}</a></th>
    <th align="left" width="40" nowrap="nowrap"><a href="{U_LIST_MEMBERS}o={O_LEVEL}{URI_ADDON}">{L_LEVEL}</a></th>
    <th align="left" width="100" nowrap="nowrap"><a href="{U_LIST_MEMBERS}o={O_CLASS}{URI_ADDON}">{L_CLASS}</a></th>
    <th align="left" width="80" nowrap="nowrap"><a href="{U_LIST_MEMBERS}o={O_EARNED}{URI_ADDON}">{L_EARNED}</a></th>
    <th align="left" width="80" nowrap="nowrap"><a href="{U_LIST_MEMBERS}o={O_SPENT}{URI_ADDON}">{L_SPENT}</a></th>
    <th align="left" width="90" nowrap="nowrap"><a href="{U_LIST_MEMBERS}o={O_ADJUSTMENT}{URI_ADDON}">{L_ADJUSTMENT}</a></th>
    <th align="left" width="80" nowrap="nowrap"><a href="{U_LIST_MEMBERS}o={O_CURRENT}{URI_ADDON}">{L_CURRENT}</a></th>
    <th align="left" width="70" nowrap="nowrap"><a href="{U_LIST_MEMBERS}o={O_LASTRAID}{URI_ADDON}">{L_LASTRAID}</a></th>
  </tr>
  <!-- BEGIN members_row -->
  <tr class="{members_row.ROW_CLASS}">
    <td width="13" nowrap="nowrap" align="center"><input type="checkbox" name="compare_ids[]" value="{members_row.ID}" /></td>
    <td width="35" nowrap="nowrap" align="right">{members_row.COUNT}</td>
    <td width="100%" nowrap="nowrap"><a href="{members_row.U_VIEW_MEMBER}">{members_row.NAME}</a></td>
    <td width="100" nowrap="nowrap" align="center">RelicTest</td>
    <td width="100" nowrap="nowrap" align="center">{members_row.RANK}</td>
    <td width="40" nowrap="nowrap">{members_row.LEVEL}</td>
    <td width="100" nowrap="nowrap">{members_row.CLASS}</td>
    <td width="65" nowrap="nowrap" class="positive">{members_row.EARNED}</td>
    <td width="65" nowrap="nowrap" class="negative">{members_row.SPENT}</td>
    <td width="90" nowrap="nowrap" class="{members_row.C_ADJUSTMENT}">{members_row.ADJUSTMENT}</td>
    <td width="60" nowrap="nowrap" class="{members_row.C_CURRENT}">{members_row.CURRENT}</td>
    <td width="70" nowrap="nowrap" class="{members_row.C_LASTRAID}">{members_row.LASTRAID}</td>
  </tr>
  <!-- END members_row -->
  <tr>
    <th colspan="11" class="footer">{LISTMEMBERS_FOOTCOUNT}</th>
  </tr>
</table>
<br />
<center><input type="submit" name="{BUTTON_NAME}" value="{BUTTON_VALUE}" class="liteoption" /></center>
</form>
<!-- ENDIF -->
<!-- INCLUDE page_tail.html -->
 
MIGhunter
Forum Newbie
Posts: 13
Joined: Thu Jul 31, 2008 10:49 pm

Re: Changing link to an image.

Post by MIGhunter »

?
mattpointblank
Forum Contributor
Posts: 304
Joined: Tue Dec 23, 2008 6:29 am

Re: Changing link to an image.

Post by mattpointblank »

You just need to add to the query that selects your user data - in this case, using a join. You join the two tables together on their related fields, then you have access to all the columns associated with that entity.

Try this page for some tips: http://www.tizag.com/mysqlTutorial/mysqljoins.php
Post Reply