[PHP] if then else?

2001-08-18 Thread Glyndower



-Original Message-
From: Glyndower [mailto:[EMAIL PROTECTED]]
Sent: Sunday, August 19, 2001 12:12 AM
Cc: [EMAIL PROTECTED]
Subject:


Ok, here we go

I'm new to PHP and also to MySql, but i'm making a pretty good go so far.
Until now, lol

I have a mysql database with several optional feilds (pe1.pe2.pe2,e1,e2,e3,
etc)

What I'm looking for is a way to check the value of each optional feild and
if said feild is "not null" or contains data. I want to create a header for
that feild and then a bulleted list of the options in the feilds under the
header.

i.e something along the lines of:

 

So the final output would end up like:

Professional Education
* College
* High School
* Middle School

TIA


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] if then else?

2001-08-18 Thread Glyndower

btw...this is the code i'm trying

Please keep the laughter to a minimum...ah heck with it...laugh all you
want...its good for ya



Professional Experience: 


This field is empty

output for users with a variable other than value1 or value2






This field is empty

output for users with a variable other than value1 or value2



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] if... then... else with HTML

2001-04-23 Thread Martin Thoma

Hello !

I want to do something like

if (condition)
output this html-block
else
output that html-block


Without printig or echoing the html-block out (because the block has a
lot of  ", which I all would have to slash out...)

How can I do that ?

Martin




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] if... then... else with HTML

2001-04-23 Thread Martin Thoma

Ah, I forgott the {} ;-)


You are using Internet Explorer

You are not using Internet Explorer


Martin Thoma schrieb:

> Hello !
>
> I want to do something like
>
> if (condition)
> output this html-block
> else
> output that html-block
>
> Without printig or echoing the html-block out (because the block has a
> lot of  ", which I all would have to slash out...)
>
> How can I do that ?
>
> Martin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] if... then... else with HTML

2001-04-23 Thread Taylor, Stewart


   HTML

   HTML


-Stewart

-Original Message-
From: Martin Thoma [mailto:[EMAIL PROTECTED]]
Sent: 23 April 2001 13:41
To: [EMAIL PROTECTED]
Subject: [PHP] if... then... else with HTML


Hello !

I want to do something like

if (condition)
output this html-block
else
output that html-block


Without printig or echoing the html-block out (because the block has a
lot of  ", which I all would have to slash out...)

How can I do that ?

Martin




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] if... then... else with HTML

2001-04-23 Thread Geir Eivind Mork

On Monday 23 April 2001 14:41, Martin Thoma wrote:
if ($word != "flat") {

echo <<
html

html


-- 
 php developer / CoreTrek AS| I judge a religion as being good or bad 
 Sandnes / Rogaland / Norway| based on whether its adherents become
 web: http://www.moijk.net/ | better people as a result of practicing 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] if... then... else with HTML

2001-04-23 Thread Tyler Longren



1st HTML here



2nd HTML here



> -Original Message-
> From: Martin Thoma [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 23, 2001 7:41 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] if... then... else with HTML
> 
> 
> Hello !
> 
> I want to do something like
> 
> if (condition)
> output this html-block
> else
> output that html-block
> 
> 
> Without printig or echoing the html-block out (because the block has a
> lot of  ", which I all would have to slash out...)
> 
> How can I do that ?
> 
> Martin
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] if... then... else with HTML

2001-04-23 Thread Avetis Avagyan

Something like this:

   output this html-block

output that html-block


Regards,
Avetis


Martin Thoma wrote:

> Hello !
>
> I want to do something like
>
> if (condition)
> output this html-block
> else
> output that html-block
>
> Without printig or echoing the html-block out (because the block has a
> lot of  ", which I all would have to slash out...)
>
> How can I do that ?
>
> Martin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
[EMAIL PROTECTED]
ICT Specialist
UNDP, Armenia



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




SV: [PHP] if... then... else with HTML

2001-04-23 Thread Fredrik Wahlberg

I hope I understood your question right. 
You can do like this

html text

other html




> -Ursprungligt meddelande-
> Fran: Martin Thoma [mailto:[EMAIL PROTECTED]]
> Skickat: den 23 april 2001 14:41
> Till: [EMAIL PROTECTED]
> Amne: [PHP] if... then... else with HTML
> 
> 
> Hello !
> 
> I want to do something like
> 
> if (condition)
> output this html-block
> else
> output that html-block
> 
> 
> Without printig or echoing the html-block out (because the block has a
> lot of  ", which I all would have to slash out...)
> 
> How can I do that ?
> 
> Martin
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] if... then... else with HTML

2001-04-23 Thread elias

yes, consider this:




your name is 

name is not set!




-elias
http://eassoft.cjb.net

"Martin Thoma" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello !
>
> I want to do something like
>
> if (condition)
> output this html-block
> else
> output that html-block
>
>
> Without printig or echoing the html-block out (because the block has a
> lot of  ", which I all would have to slash out...)
>
> How can I do that ?
>
> Martin
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] if... then... else with HTML

2001-04-23 Thread Richard Crawford


Alternatively, and this is what I would do because it would be easier to 
maintain should you want to change the content later on, you could use 
includes as per the following:


\n\nTry This\n\n\n");
if(condition)
include("html_block_1.html");
else
include("html_block_2.html");
print("\n");
?>

I suppose it would depend on how big your HTML blocks are.

Either way -- using includes or using the method below -- will work, and 
with neither method will you have to escape out your special characters.



>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 4/23/01, 3:59:41 PM, "elias" <[EMAIL PROTECTED]> wrote 
regarding Re: [PHP] if... then... else with HTML:


> yes, consider this:

> 
> 
> 
> your name is 
> 
> name is not set!
> 
> 
> 

> -elias
> http://eassoft.cjb.net

> "Martin Thoma" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hello !
> >
> > I want to do something like
> >
> > if (condition)
> > output this html-block
> > else
> > output that html-block
> >
> >
> > Without printig or echoing the html-block out (because the block has a
> > lot of  ", which I all would have to slash out...)
> >
> > How can I do that ?
> >
> > Martin
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >



> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]