The Mother Board
Ctechinfo's coding log

 
Post new topic   Reply to topic    The Mother Board Forum Index -> Programming
View previous topic :: View next topic  
Author Message
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master


Joined: 16 Dec 2001
Posts: 14081
Location: Maine

PostPosted: Thu Oct 20, 2011 6:36 am    Post subject: Ctechinfo's coding log Reply with quote

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..
_________________
Compaq-Fu Master
Other sites:
Hydrocephalus-Talk
DSL/Cable Webserver
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master


Joined: 16 Dec 2001
Posts: 14081
Location: Maine

PostPosted: Thu Oct 20, 2011 7:39 am    Post subject: Reply with quote

10 hours tweaking code to produce 3 lines on a webpage..
_________________
Compaq-Fu Master
Other sites:
Hydrocephalus-Talk
DSL/Cable Webserver
Back to top
View user's profile Send private message Send e-mail Visit poster's website
fussnfeathers
Mobo-fu Master
Mobo-fu Master


Joined: 04 Dec 2008
Posts: 3124
Location: Right behind you

PostPosted: Thu Oct 20, 2011 7:49 am    Post subject: Reply with quote

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

and for the million hours that we were....well I'll smile and remember them all, then I'll turn and go....
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master


Joined: 16 Dec 2001
Posts: 14081
Location: Maine

PostPosted: Thu Oct 20, 2011 10:14 am    Post subject: Reply with quote

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
_________________
Compaq-Fu Master
Other sites:
Hydrocephalus-Talk
DSL/Cable Webserver
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master


Joined: 16 Dec 2001
Posts: 14081
Location: Maine

PostPosted: Fri Oct 21, 2011 4:02 pm    Post subject: Reply with quote

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
_________________
Compaq-Fu Master
Other sites:
Hydrocephalus-Talk
DSL/Cable Webserver
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    The Mother Board Forum Index -> Programming All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group