Re: [PHP] eof bof in php

2008-12-23 Thread German Geek
Totally agree. Whenever i can i put html outside of php tags mainly because the code gets more readable because in eclipse u get syntax highlighting etc. Tim-Hinnerk Heuer http://www.ihostnz.com On Wed, Dec 24, 2008 at 4:13 AM, tedd wrote: > At 2:21 PM -0500 12/22/08, Anthony Gentile wrote: >

Re: [PHP] eof bof in php

2008-12-23 Thread tedd
At 2:21 PM -0500 12/22/08, Anthony Gentile wrote: I would argue it is better practice as: than Hello World"; ?> Anthony Gentile Certainly, but all you have done here is to move your to different places. There is a threshold one reaches in deciding where is the "best" place to put the

Re: [PHP] eof bof in php

2008-12-22 Thread Kyle Terry
On Dec 22, 2008, at 12:15 PM, Ashley Sheridan wrote: On Mon, 2008-12-22 at 15:04 -0500, Anthony Gentile wrote: Well you said it...for my example it makes sense. For when it gets really messy by all means concatenate with php. However, my argument is not so much keeping html seperate from

Re: [PHP] eof bof in php

2008-12-22 Thread Ashley Sheridan
On Mon, 2008-12-22 at 15:04 -0500, Anthony Gentile wrote: > Well you said it...for my example it makes sense. For when it gets really > messy by all means concatenate with php. However, my argument is not so much > keeping html seperate from php as it is keeping the business logic separate > from t

Re: [PHP] eof bof in php

2008-12-22 Thread Anthony Gentile
Well you said it...for my example it makes sense. For when it gets really messy by all means concatenate with php. However, my argument is not so much keeping html seperate from php as it is keeping the business logic separate from the presentationso if you have php writing html and its all dea

Re: [PHP] eof bof in php

2008-12-22 Thread Ashley Sheridan
On Mon, 2008-12-22 at 14:21 -0500, Anthony Gentile wrote: > I would argue it is better practice as: > > > > than > > echo "Hello World"; > ?> > Anthony Gentile > > > On Mon, Dec 22, 2008 at 9:18 AM, tedd wrote: > > > At 1:21 PM -0500 12/21/08, Anthony Gentile wrote: > > > >> -snip exampe-

Re: [PHP] eof bof in php

2008-12-22 Thread Anthony Gentile
I would argue it is better practice as: than Hello World"; ?> Anthony Gentile On Mon, Dec 22, 2008 at 9:18 AM, tedd wrote: > At 1:21 PM -0500 12/21/08, Anthony Gentile wrote: > >> -snip exampe- >> >> >> is probably going to give you the result you want. However you should know >> it is bad

Re: [PHP] eof bof in php

2008-12-22 Thread tedd
At 1:21 PM -0500 12/21/08, Anthony Gentile wrote: -snip exampe- is probably going to give you the result you want. However you should know it is bad practice to mix PHP and HTML as horridly as I just showed you. AKA you don't want your PHP writing your HTML. Anthony Gentile Anthony: Granted

Re: [PHP] eof bof in php

2008-12-21 Thread Gary Maddock-Greene
I guess you are right about mixing php with html. Actually the suggestion you gave breaks my search function. If I now search for a product called 'type 22' the space and first digit 2 breaks the serach. Also the \" in the htnl / php is causing a break in the image path urls ... so back to the dr

Re: [PHP] eof bof in php

2008-12-21 Thread Gary Maddock-Greene
I guess you are right about mixing php with html. Actually the suggestion you gave breaks my search function. If I now search for a product called 'type 22' the space and first digit 2 breaks the serach. Also the \" in the htnl / php is causing a break in the image path urls ... so back to the

Re: [PHP] eof bof in php

2008-12-21 Thread Gary Maddock-Greene
thanks for the advice re html and php mashup!! I will research to find the way to do it outside the php. - Gary Maddock-Greene ""Anthony Gentile"" wrote in message news:2ce4207d0812211021g215d5346wb0afcedf039ef...@mail.gmail.com... Sorry no products were found"; } else { echo "Please click o

Re: [PHP] eof bof in php

2008-12-21 Thread Gary Maddock-Greene
That's got it thanks Anthony. I love when you learn something. It was the back slash \ preceeding the "'s in my html that I wasn't aware of. Now I know they are needed if using "" in your code. Thank you so much for your help. -- - Gary Maddock-Greene ""Anthony Gentile"" wrote in message n

Re: [PHP] eof bof in php

2008-12-21 Thread Anthony Gentile
err forgot the closing > in ". Anthony Gentile Cell: 704.657.8550 Diese E-Mail ist vertraulich. Wenn Sie nicht der rechtmaessige Empfaenger sind, duerfen Sie den Inhalt weder kopieren noch verbreiten oder benutzen. Sollten Sie diese E-Mail versehentlich erhalten haben, senden Sie diese bitte an un

Re: [PHP] eof bof in php

2008-12-21 Thread Anthony Gentile
Sorry no products were found"; } else { echo "Please click on a product for further information."; while ($row_rsSearch = mysql_fetch_assoc($rsSearch)){ echo " ". $row_rsSearch['product_name']." ". $row_rsSearch['product_subtitle'] ."

Re: [PHP] eof bof in php

2008-12-21 Thread Gary Maddock-Greene
I've corrected those errors thanks but how do I insert this code as the else statement? View Product -- - Gary Maddock-Greene ""Anthony Gentile"" wrote in message news:2ce4207d0812210959

Re: [PHP] eof bof in php

2008-12-21 Thread Anthony Gentile
...missing semicolon and some brackets. Sorry no products were found"; } else { echo "Please click on a product for further information."; } ?> If there is more code you can show by perhaps pasting here: http://pastebin.redlinktech.com We can help with further syntax problems. Anthony Gentile

Re: [PHP] eof bof in php

2008-12-21 Thread Gary Maddock-Greene
Thanks guys .. I can get this part working great .. Sorry no products were found"; } else echo "Please click on a product for further information." ?> But I want to add the following so that only the products table appears when product are present. I cannot seem to add this code into the above

Re: [PHP] eof bof in php

2008-12-21 Thread Ashley Sheridan
On Sun, 2008-12-21 at 11:39 -0500, Anthony Gentile wrote: > if (0 == $totalRows_rsSearch) { > echo "Sorry no products were found"; > } else > > Anthony Gentile > > > > On Sun, Dec 21, 2008 at 11:22 AM, Gary Maddock-Greene < > g...@maddock-greene.co.uk> wrote: > > > I have tried that but to no

Re: [PHP] eof bof in php

2008-12-21 Thread Anthony Gentile
if (0 == $totalRows_rsSearch) { echo "Sorry no products were found"; } else Anthony Gentile On Sun, Dec 21, 2008 at 11:22 AM, Gary Maddock-Greene < g...@maddock-greene.co.uk> wrote: > I have tried that but to no avail :) > > if ($totalRows_rsSearch=0) > echo "Sorry no products were found"; >

Re: [PHP] eof bof in php

2008-12-21 Thread Ashley Sheridan
On Sun, 2008-12-21 at 16:22 +, Gary Maddock-Greene wrote: > I have tried that but to no avail :) > > if ($totalRows_rsSearch=0) > echo "Sorry no products were found"; > else > > > // All seems OK to here, then the syntax error unexpected T_VARIABLE > appears > > > echo Please click o

Re: [PHP] eof bof in php

2008-12-21 Thread Gary Maddock-Greene
I have tried that but to no avail :) // All seems OK to here, then the syntax error unexpected T_VARIABLE appears echo Please click on a product for further information. View Product -

Re: [PHP] eof bof in php

2008-12-21 Thread Ashley Sheridan
On Sun, 2008-12-21 at 15:40 +, Gary Maddock-Greene wrote: > Thanks Ashley ... I have been trying that but I think my syntax id shot!! > > if ($totalRows_rsSearch="0") > echo "Sorry no products were found"; > else > echo "Please click on a product for further information." > ?> > >

Re: [PHP] eof bof in php

2008-12-21 Thread Gary Maddock-Greene
Thanks Ashley ... I have been trying that but I think my syntax id shot!! Please click on a product for further information." ?> ?> View Product -- - Gary Maddock-Greene "Ashley Sheridan" wro

Re: [PHP] eof bof in php

2008-12-21 Thread Ashley Sheridan
On Sun, 2008-12-21 at 15:22 +, Gary Maddock-Greene wrote: > Hi, I'm very new to php. Please can someone point me in the right direction? > I want to display a message: 'No Products Found' if my search record set > returns no value. > > I think I need to be looking at this section of my code

[PHP] eof bof in php

2008-12-21 Thread Gary Maddock-Greene
Hi, I'm very new to php. Please can someone point me in the right direction? I want to display a message: 'No Products Found' if my search record set returns no value. I think I need to be looking at this section of my code ... $query_rsSearch = sprintf("SELECT * FROM products WHERE product_na