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:
>
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
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
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
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
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-
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
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
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
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
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
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
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
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'] ."
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
...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
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
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
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";
>
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
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
-
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."
> ?>
>
>
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
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
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
25 matches
Mail list logo