| View previous topic :: View next topic |
| Author |
Message |
Toby B. Lead Mobo-fu Master


Joined: 16 Dec 2001 Posts: 14002 Location: Maine
|
Posted: Thu Oct 20, 2011 6:36 am Post subject: Ctechinfo's coding log |
|
|
In the ever annoying attempt to clean up old code (on my site) and make things more efficient I am starting this thread so I can ask for assistance and get input on the project as a whole, and have it confined to one spot.. _________________ We Help You. You Can Help Us!
Read the rules prior to posting
Tell your newsgroup or mailing list
Link to us from your pages |
|
| Back to top |
|
 |
Toby B. Lead Mobo-fu Master


Joined: 16 Dec 2001 Posts: 14002 Location: Maine
|
Posted: Thu Oct 20, 2011 7:39 am Post subject: |
|
|
10 hours tweaking code to produce 3 lines on a webpage.. _________________ We Help You. You Can Help Us!
Read the rules prior to posting
Tell your newsgroup or mailing list
Link to us from your pages |
|
| Back to top |
|
 |
fussnfeathers Mobo-fu Master


Joined: 04 Dec 2008 Posts: 3108 Location: Right behind you
|
Posted: Thu Oct 20, 2011 7:49 am Post subject: |
|
|
Don't you hate that? Gimme a few months, I'm finishing up a website development class in college, maybe I can help a bit. _________________ Faster than the speed of snot |
|
| Back to top |
|
 |
Toby B. Lead Mobo-fu Master


Joined: 16 Dec 2001 Posts: 14002 Location: Maine
|
Posted: Thu Oct 20, 2011 10:14 am Post subject: |
|
|
| fussnfeathers wrote: | | Don't you hate that? Gimme a few months, I'm finishing up a website development class in college, maybe I can help a bit. |
yes its a pissah!! lol _________________ We Help You. You Can Help Us!
Read the rules prior to posting
Tell your newsgroup or mailing list
Link to us from your pages |
|
| Back to top |
|
 |
Toby B. Lead Mobo-fu Master


Joined: 16 Dec 2001 Posts: 14002 Location: Maine
|
Posted: Fri Oct 21, 2011 4:02 pm Post subject: |
|
|
The code that I work on for hours seemed to work but is buggy now.
| Code: |
<p align="left">
<b>Found in the following systems:</b><br><?php
if (isset($modelscompaq, $modelsboth)) {
echo '<font color="#ff000"><b>Compaq</b> - <i>'.($modelscompaq).'</i></font><br><b>Compaq/HP</b> - <i>'.$modelsboth.'</i>';}
if (isset($modelsboth, $modelshp)) {
echo '<b>Compaq/HP</b> - <i>'.($modelsboth).'</i><br><font color="#0000ff"><b>HP</b> - <i>'.($modelshp).'</i></font>';}
elseif (isset($modelscompaq, $modelshp)) {
echo '<font color="#ff000"><b>Compaq</b> - <i>'.($modelscompaq).'</i></font><br><font color="#0000ff"><b>HP</b> - <i>'.($modelshp).'</i></font>';}
elseif (isset($modelsboth)) {
echo '<b>Compaq/HP</b> - <i>'.($modelsboth).'</i>';}
elseif (isset($modelscompaq)) {
echo '<font color="#ff0000"><b>Compaq</b> - <i>'.($modelscompaq).'</i></font>';}
elseif (isset($modelshp)) {
echo '<font color="#0000ff"><b>HP</b> - <i>'.($modelshp).'</i></font>';}
else {
echo "Information not availible";}?></p>
|
Essentailly I want the code to work in such a fashion that if two variables exist it will produce the the code for both like so:
Compaq - Models found in
HP - Models found in
OR
Compaq - Models found in
Compaq/HP - Models found in
OR
Compaq/HP - Models found in
HP - Models found in
And if only one variable exists the code would produce the corresponding line. but what is happening with the current code is it is doubling up the line that is in the two line block and single line block like
Compaq - Models found in
Compaq/HP - Models found inCompaq - Models found in _________________ We Help You. You Can Help Us!
Read the rules prior to posting
Tell your newsgroup or mailing list
Link to us from your pages |
|
| Back to top |
|
 |
|