I have this list of characters and I'm trying to figure out what I have to do to put the results of these functions into the table or what not. Keep in mine that these functions are included in a file that is with the bottom file.
Code: function getstatusname($statusid)
{
$query = "SELECT
s.name as status
FROM
efed_list_status as s
WHERE
s.id = '$statusid'";
$result = mysql_query ($query);
while ($row = mysql_fetch_assoc($result))
{
$status=cleanquerydata($row['status']);
return $status;
}
}
function getstylename($styleid)
{
$query = "SELECT
style.name as stylename
FROM
efed_list_styles as style
WHERE
style.id = '$styleid'";
$result = mysql_query ($query);
while ($row = mysql_fetch_assoc($result))
{
$style=cleanquerydata($row['stylename']);
return $style;
}
}
function getalignmentname($alignmentid)
{
$query = "SELECT
alignment.name as alignmentname
FROM
efed_list_alignment as alignment
WHERE
alignment.id = '$alignmentid'";
$result = mysql_query ($query);
while ($row = mysql_fetch_assoc($result))
{
$alignmentname=cleanquerydata($row['alignmentname']);
return $alignmentname;
}
}
Code: <?php {
print '<h1 class=backstage>Character Management</h1><br />';
print "<h2 class=backstage>Characters :: <a href="#" onclick="ajaxpage('addcharacter', 'content'); return false;">Add New</a></h2><br />";
{
$query = "SELECT * FROM efed_bio ORDER BY `charactername`";
$result = mysql_query ( $query ); // Run The Query
$rows = mysql_num_rows($result);
if ($rows > 0)
{
print '<table width="100%" class="table1">';
print '<tr class="rowheading">';
print '<td> </td>';
print '<td> </td>';
print '<td>Character Name</td>';
print '<td align=center width=100>Poser Name</td>';
print '<td align=center width=60>Style</td>';
print '<td align=center width=60>Alignment</td>';
print '<td align=center width=60>Status</td>';
print '</tr>';
// Fetch and print all records.
$i = 0;
$current_row = 0;
while ( $row = mysql_fetch_array ( $result, MYSQL_ASSOC ) ) {
$sClass = 'row2';
if ($i ++ & 1) {
$sClass = 'row1';
}
printf ( "<tr class="%s">", $sClass );
print "<td valign="top" align=center width=35><a href="#" onclick="ajaxpage('editcharacter', 'content'); return false;">Edit</a></td>";
print "<td valign="top" align=center width=25><a href="#" onclick="ajaxpage('bio', 'content'); return false;">Bio</a></td>";
printf ( "<td valign="top">%s</td>", $row [charactername] );
printf ( "<td align="center" valign="top">%s</td>", $row [posername] );
printf ( "<td align="center" valign="top">%s</td>", $row [style] );
printf ( "<td align="center" valign="top">%s</td>", $row [name] );
printf ( "<td align="center" valign="top">%s</td>", $row [name] );
print '</tr>';
}
print '</table>';
}
else
{
print '<span>There are characters.</span><br />';
}
print '<br />';
returnmain();
}
}
?>
PHP Captcha Error help - replace the "die" command
Hi All,I am after a bit of help with a Captcha spam protection box.The site gave me instructions, and all is well, apart from if the user give the wrong Captcha information...The highlighted code is
Not Inserting into DB
I can't get my Add new Division form to submit to the database. Anyone see my issue?Code: <?php $e = <<<here <script
Get to know your fellow coder
I think it's time we got personal around here. There's a lot of code swapping and a few members know a little more about the others, but the vast majority of us are nothing but coders passing in the
understanding functions and classes
Code: [Select]class person { var $name = "Jimmy Goe"; function get_name(){ echo $this->name; }} I am playing with this very small script that I made using a
Links not updating
I'm trying to fuel a simple navigation system for a news section. It works fine when it comes to retrieving and displaying data, but if I click on a valid link in the following code, the content and
IS this code correct
The reason i ask is everything underneath it appears to be alink as well, tis blimmin annoyingCode: <?php echo '<li class="newproducts"><a
UTL File problem
Hi
Giving the below syntax error
Dear Experts,
Not capturing all the information we require in the form.......
Hi Guys,I was wondering if you would share some more of your knowledge today, I'm hoping it will be quite a simple answer for you but one that is boggling us here! ;-)We have an html form that users
array help
Does anyone know how to require 10 text fields for individual grades and output class average? (10 pt grading scale)