Click here to Skip to main content
15,901,505 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
QuestionTwo types of user login in joomla Pin
govind_22200725-Aug-10 23:00
govind_22200725-Aug-10 23:00 
AnswerRe: Two types of user login in joomla Pin
Gerben Jongerius26-Aug-10 0:14
Gerben Jongerius26-Aug-10 0:14 
GeneralRe: Two types of user login in joomla Pin
govind_22200726-Aug-10 0:44
govind_22200726-Aug-10 0:44 
GeneralRe: Two types of user login in joomla Pin
bobby.villines10-Sep-10 9:04
bobby.villines10-Sep-10 9:04 
QuestionUsing webservice in php Pin
sarang_k23-Aug-10 18:22
sarang_k23-Aug-10 18:22 
AnswerRe: Using webservice in php Pin
Gerben Jongerius25-Aug-10 22:35
Gerben Jongerius25-Aug-10 22:35 
AnswerRe: Using webservice in php Pin
Smithers-Jones26-Aug-10 1:44
Smithers-Jones26-Aug-10 1:44 
QuestionHow would I get it to... replaceWith()? [modified] Pin
thebiostyle21-Aug-10 14:57
thebiostyle21-Aug-10 14:57 
Okay, well, I'm trying to code something to help out another website, and I can't seem to figure it out... I am printing out a list with PHP and MySQL, and I want it to print part of the list in colors... this is what I am using...

------------------------------------------------
<pre><script type="text/javascript>
$("body:contains('Fire Squad')").replaceWith(("<b>Fire</b>")
</script></pre>
------------------------------------------------

and this...

------------------------------------------------
<pre><table><tr><td><b><i>Name</b></i></td><td><b><i>Squad</b></i></td><td><b><i>Friend Code</b></i></td ></tr>
<?
$list_members = mysql_query("SELECT * FROM `brawl` ORDER BY squad");
$list = mysql_fetch_array( $list_members );
while($list = mysql_fetch_array( $list_members ))
{
Print '<tr><td>';
Print "".$list['username']."</td><td>".$list['squad']."</td><td>".$list['FC']."</td></tr>";
}
?>
</div>
</table> </pre>
------------------------------------------------


EDIT: I tried something else, and now it just prints out a blank line where the squad should be....

------------------------------------------------
<pre><select id="squads" name="squads">
<option id="air">Air Squad</option>
<option id="earth">Earth Squad</option>
<option id="fire">Fire Squad</option>
<option id="water">Water Squad</option>
<option id="neutral" selected="selected">Neutral</option>
<option id="admin">Admin</option>
</select>
<script type="text/javascript">
if document.getElementById("fire").selected=true
{
document.write("<input type="hidden" id="squad" value="<span style='color:red'><b>Fire Squad</b></span>"/>");
}
else if document.getElementById("air").selected=true
{
document.write("<input type="hidden" id="squad" value="<span style='color:goldenrod'><b>Air Squad</b></span>"/>");
}
else if document.getElementById("earth").selected=true
{
document.write("<input type="hidden" id="squad" value="<span style='color:#090'><b>Earth Squad</b></span>"/>");
}
else if document.getElementById("water").selected=true
{
document.write("<input type="hidden" id="squad" value="<span style='color:blue'><b>Water Squad</b></span>"/>");
}
else if document.getElementById("neutral").selected=true
{
document.write("<input type="hidden" id="squad" value="<span style='color:black'><b>Neutral</b></span>"/>");
}
else
{
document.write("<input type="hidden" id="squad" value="<span style='color:black'><b>Admin</b></span>"/>");
}
</script></pre>
-----------------------------------------------

Please help, I'd like to have this part done by tomorrow night.... Thanks!



-- Modified Saturday, August 21, 2010 11:19 PM
AnswerRe: How would I get it to... replaceWith()? Pin
cjoki23-Aug-10 4:43
cjoki23-Aug-10 4:43 
QuestionLogin to htaccess Pin
stefanism19-Aug-10 15:33
sussstefanism19-Aug-10 15:33 
AnswerRe: Login to htaccess Pin
Graham Breach19-Aug-10 23:37
Graham Breach19-Aug-10 23:37 
QuestionPassword Display Pin
gdpgupta17-Aug-10 22:44
gdpgupta17-Aug-10 22:44 
AnswerRe: Password Display Pin
Richard MacCutchan18-Aug-10 1:29
mveRichard MacCutchan18-Aug-10 1:29 
GeneralRe: Password Display Pin
gdpgupta18-Aug-10 2:01
gdpgupta18-Aug-10 2:01 
GeneralRe: Password Display Pin
Richard MacCutchan18-Aug-10 2:36
mveRichard MacCutchan18-Aug-10 2:36 
AnswerRe: Password Display Pin
Nuri Ismail18-Aug-10 3:53
Nuri Ismail18-Aug-10 3:53 
AnswerRe: [HELP] Family Tree Pin
Peter_in_278015-Aug-10 11:55
professionalPeter_in_278015-Aug-10 11:55 
GeneralRe: [HELP] Family Tree Pin
Peter_in_278015-Aug-10 13:14
professionalPeter_in_278015-Aug-10 13:14 
AnswerRe: [HELP] Family Tree Pin
User 171649215-Aug-10 22:07
professionalUser 171649215-Aug-10 22:07 
GeneralRe: [HELP] Family Tree Pin
Peter_in_278015-Aug-10 22:23
professionalPeter_in_278015-Aug-10 22:23 
Questioncode php for tic tac toe Pin
nsultan715-Aug-10 3:30
nsultan715-Aug-10 3:30 
QuestionHow can I mix confirm(); from javascript with php? Pin
fantasyMe13-Aug-10 6:15
fantasyMe13-Aug-10 6:15 
AnswerRe: How can I mix confirm(); from javascript with php? Pin
cjoki13-Aug-10 7:51
cjoki13-Aug-10 7:51 
QuestionVideo not playing in a .php file Pin
offroaderdan13-Aug-10 0:16
offroaderdan13-Aug-10 0:16 
Questionno module named _tkinter Pin
Sakhalean10-Aug-10 19:57
Sakhalean10-Aug-10 19:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.