Re: [PHP] Happy 1234567890 day!

2009-02-13 Thread Gary Maddock-Greene

Note quite there yet here but yes Happy 1234567890 day to you too

--
- Gary Maddock-Greene
"Luke Slater"  wrote in message 
news:200902131812.43295.l...@blog-thing.com... 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] First record not diplaying

2008-12-22 Thread Gary Maddock-Greene
so the correct way to do this is remove the $row_rsSearch = 
mysql_fetch_assoc($rsSearch); from my recordset query code. Thank you SanTa


--
- Gary Maddock-Greene
""Sándor Tamás (HostWare Kft . )""  wrote in 
message news:dbb55d182b624f26be7f5125e592d...@stgepe...

Yes, the error is here.

You get the record count with a mysql_fetch_assoc(), which reads the first 
record, and then step onto the next one. So the first record's datas will 
disappear at the next mysql_fetch_assoc() line (which can be found in your 
while loop).


You should NOT fetch the first record, unless you fetch it in a variable 
to process datas at a later time.


SanTa


- Original Message ----- 
From: "Gary Maddock-Greene" 

To: 
Sent: Monday, December 22, 2008 3:49 PM
Subject: Re: [PHP] First record not diplaying



Thanks Dan,

So my error is here?
$colname_rsSearch = "-1";
if (isset($_GET['product_name'])) {
 $colname_rsSearch = $_GET['product_name'];
}
mysql_select_db($database_sondia_lighting, $sondia_lighting);
$query_rsSearch = sprintf("SELECT * FROM products WHERE product_name LIKE 
%s", GetSQLValueString("%" . $colname_rsSearch . "%", "text"));
$rsSearch = mysql_query($query_rsSearch, $sondia_lighting) or 
die(mysql_error());

$row_rsSearch = mysql_fetch_assoc($rsSearch);
$totalRows_rsSearch = mysql_num_rows($rsSearch);

--
- Gary Maddock-Greene
""Dan Shirah""  wrote in message 
news:a16da1ff0812220635j6a77c35ga2e74588671dc...@mail.gmail.com...

>
  Hi, I seem to have a bug in my code but can't see why. My first 
record

does
not display when I run a search. Can anyone spot what I have done 
wrong?

Thanks

if (0 == $totalRows_rsSearch) {
echo "Sorry no products were found";
} else {
echo "Please click on a product for further information.";
while ($row_rsSearch = mysql_fetch_assoc($rsSearch)){
echo "

- Gary Maddock-Greene



Is this another one of your classes?  I see your email address links 
to a

web page created for a class.

Without the rest of the code (the code above what you have placed) and 
the
end of the echo line you have provided, all any of us can do is a 
guess.


However one thing to note, this list was not created to help you with 
your
homework and with the previous postings you have written, it is 
pointedly

answering different places you have stumbled in your work and haven't
checked your book, the online resources, or a TA.

Wolf




Like Wolf said...we need more code :)

My "guess" would be that you probably have the default value of your row
count set to start at 1...but the results of an array start at 
0...therefore

your first row is being cutoff?




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] First record not diplaying

2008-12-22 Thread Gary Maddock-Greene

very helpful thank you :)

--
- Gary Maddock-Greene
""Sándor Tamás (HostWare Kft . )""  wrote in 
message news:dbb55d182b624f26be7f5125e592d...@stgepe...

Yes, the error is here.

You get the record count with a mysql_fetch_assoc(), which reads the first 
record, and then step onto the next one. So the first record's datas will 
disappear at the next mysql_fetch_assoc() line (which can be found in your 
while loop).


You should NOT fetch the first record, unless you fetch it in a variable 
to process datas at a later time.


SanTa


- Original Message ----- 
From: "Gary Maddock-Greene" 

To: 
Sent: Monday, December 22, 2008 3:49 PM
Subject: Re: [PHP] First record not diplaying



Thanks Dan,

So my error is here?
$colname_rsSearch = "-1";
if (isset($_GET['product_name'])) {
 $colname_rsSearch = $_GET['product_name'];
}
mysql_select_db($database_sondia_lighting, $sondia_lighting);
$query_rsSearch = sprintf("SELECT * FROM products WHERE product_name LIKE 
%s", GetSQLValueString("%" . $colname_rsSearch . "%", "text"));
$rsSearch = mysql_query($query_rsSearch, $sondia_lighting) or 
die(mysql_error());

$row_rsSearch = mysql_fetch_assoc($rsSearch);
$totalRows_rsSearch = mysql_num_rows($rsSearch);

--
- Gary Maddock-Greene
""Dan Shirah""  wrote in message 
news:a16da1ff0812220635j6a77c35ga2e74588671dc...@mail.gmail.com...

>
  Hi, I seem to have a bug in my code but can't see why. My first 
record

does
not display when I run a search. Can anyone spot what I have done 
wrong?

Thanks

if (0 == $totalRows_rsSearch) {
echo "Sorry no products were found";
} else {
echo "Please click on a product for further information.";
while ($row_rsSearch = mysql_fetch_assoc($rsSearch)){
echo "

- Gary Maddock-Greene



Is this another one of your classes?  I see your email address links 
to a

web page created for a class.

Without the rest of the code (the code above what you have placed) and 
the
end of the echo line you have provided, all any of us can do is a 
guess.


However one thing to note, this list was not created to help you with 
your
homework and with the previous postings you have written, it is 
pointedly

answering different places you have stumbled in your work and haven't
checked your book, the online resources, or a TA.

Wolf




Like Wolf said...we need more code :)

My "guess" would be that you probably have the default value of your row
count set to start at 1...but the results of an array start at 
0...therefore

your first row is being cutoff?




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] First record not diplaying

2008-12-22 Thread Gary Maddock-Greene

Thanks Dan,

So my error is here?
$colname_rsSearch = "-1";
if (isset($_GET['product_name'])) {
 $colname_rsSearch = $_GET['product_name'];
}
mysql_select_db($database_sondia_lighting, $sondia_lighting);
$query_rsSearch = sprintf("SELECT * FROM products WHERE product_name LIKE 
%s", GetSQLValueString("%" . $colname_rsSearch . "%", "text"));
$rsSearch = mysql_query($query_rsSearch, $sondia_lighting) or 
die(mysql_error());

$row_rsSearch = mysql_fetch_assoc($rsSearch);
$totalRows_rsSearch = mysql_num_rows($rsSearch);

--
- Gary Maddock-Greene
""Dan Shirah""  wrote in message 
news:a16da1ff0812220635j6a77c35ga2e74588671dc...@mail.gmail.com...

>

  Hi, I seem to have a bug in my code but can't see why. My first record

does
not display when I run a search. Can anyone spot what I have done 
wrong?

Thanks

if (0 == $totalRows_rsSearch) {
echo "Sorry no products were found";
} else {
echo "Please click on a product for further information.";
while ($row_rsSearch = mysql_fetch_assoc($rsSearch)){
echo "

- Gary Maddock-Greene



Is this another one of your classes?  I see your email address links to 
a

web page created for a class.

Without the rest of the code (the code above what you have placed) and 
the

end of the echo line you have provided, all any of us can do is a guess.

However one thing to note, this list was not created to help you with 
your
homework and with the previous postings you have written, it is 
pointedly

answering different places you have stumbled in your work and haven't
checked your book, the online resources, or a TA.

Wolf




Like Wolf said...we need more code :)

My "guess" would be that you probably have the default value of your row
count set to start at 1...but the results of an array start at 
0...therefore

your first row is being cutoff?




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] First record not diplaying

2008-12-22 Thread Gary Maddock-Greene

Very helpful thanks Wolf. fyi the web site you see was done by my son.

This is a live project that I was just asking for help on ... a pointer 
perhaps. Too much to ask I guess


--
- Gary Maddock-Greene
"Wolf"  wrote in message 
news:20081222141852.ovv8i.364383.r...@cdptpa-web15-z01...

 Gary Maddock-Greene  wrote:
Hi, I seem to have a bug in my code but can't see why. My first record 
does

not display when I run a search. Can anyone spot what I have done wrong?
Thanks

if (0 == $totalRows_rsSearch) {
echo "Sorry no products were found";
} else {
echo "Please click on a product for further information.";
while ($row_rsSearch = mysql_fetch_assoc($rsSearch)){
echo "

- Gary Maddock-Greene


Is this another one of your classes?  I see your email address links to a 
web page created for a class.


Without the rest of the code (the code above what you have placed) and the 
end of the echo line you have provided, all any of us can do is a guess.


However one thing to note, this list was not created to help you with your 
homework and with the previous postings you have written, it is pointedly 
answering different places you have stumbled in your work and haven't 
checked your book, the online resources, or a TA.


Wolf 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] First record not diplaying

2008-12-22 Thread Gary Maddock-Greene
I know you are so right Richard .. beleive me ... I wish I was year down the 
line so I knew how to get the html out of the php


--
- Gary Maddock-Greene
""Richard Heyes""  wrote in message 
news:af8726440812220617l6c965cd0x6ae55f57fa96b...@mail.gmail.com...

Also (and I know the speed junkies will want to shoot me now!) you could
shorten the echo inside the while loop to:


You could shorten it even further by omitting it... :-)

--
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.rgraph.org (Updated December 20th) 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] First record not diplaying

2008-12-22 Thread Gary Maddock-Greene
Ash ... this is the full code block ... I am really new to php so I 
appreciate your tip


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'] ."

  View
Product
    
     
 

  ";
}

}
?>

--
- Gary Maddock-Greene
"Ashley Sheridan"  wrote in message 
news:1229955502.3530.3.ca...@localhost.localdomain...

On Mon, 2008-12-22 at 14:02 +, Gary Maddock-Greene wrote:
Hi, I seem to have a bug in my code but can't see why. My first record 
does

not display when I run a search. Can anyone spot what I have done wrong?
Thanks

if (0 == $totalRows_rsSearch) {
echo "Sorry no products were found";
} else {
echo "Please click on a product for further information.";
while ($row_rsSearch = mysql_fetch_assoc($rsSearch)){
echo "

- Gary Maddock-Greene



You seem to be missing quite a lot of code from your example, namely the
ending quotation mark, ending semicolon, the ending brace to the while
loop, the closing  tag inside the loop...

Also (and I know the speed junkies will want to shoot me now!) you could
shorten the echo inside the while loop to:

echo "";




Ash
www.ashleysheridan.co.uk




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] First record not diplaying

2008-12-22 Thread Gary Maddock-Greene
Hi, I seem to have a bug in my code but can't see why. My first record does 
not display when I run a search. Can anyone spot what I have done wrong? 
Thanks


if (0 == $totalRows_rsSearch) {
echo "Sorry no products were found";
} else {
echo "Please click on a product for further information.";
while ($row_rsSearch = mysql_fetch_assoc($rsSearch)){
echo "

- Gary Maddock-Greene 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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
drawing board for me :)

--
- Gary Maddock-Greene
""Gary Maddock-Greene""  wrote in message
news:b4.82.23981.dee8e...@pb1.pair.com...

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 on a product for further information.";
while ($row_rsSearch = mysql_fetch_assoc($rsSearch)){
echo "
". $row_rsSearch['product_name']."
  ". $row_rsSearch['product_subtitle'] ."

  

 
 

  ";
}

}
?>

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


On Sun, Dec 21, 2008 at 1:07 PM, Gary Maddock-Greene <
g...@maddock-greene.co.uk> wrote:


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:2ce4207d0812210959k3491690ctbc4f0dbf971ac...@mail.gmail.com...

 ...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



On Sun, Dec 21, 2008 at 12:33 PM, Gary Maddock-Greene <
g...@maddock-greene.co.uk> wrote:

 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
after the echo "Please click on a product for further
information.". I can't get the syntax right ...

I appreciate everyones help

--
- Gary Maddock-Greene
"Ashley Sheridan"  wrote in message
news:1229878234.4229.12.ca...@localhost.localdomain...

 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 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 on a product for further information.
>
> 
>  
>
>  
>    
$row_rsSearch['product_subtitle'];
> ?>
>View Product
>  
>   
>   
>  
>
>  
>
> --
> - Gary Maddock-Greene
> "Ashley Sheridan"  wrote in message
> news:1229875150.4229.9.ca...@localhost.localdomain...
>
>  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."
>>> ?>
>>>  
>>>  
>>>  
>>>
>>>  
>>>>> $row_rsSearch['product_subtitle'];
>>> ?>
>>>View Product
>>>  
>>>   
>>>   
>>>  
>>>
>>>  >> ?>
>>>
>>> --
>>> - Gary Maddock-Greene
>>> "Ashley Sheridan"  wrote in message
>>> news:1229873521.4229.6.ca...@localhost.localdomain...
>>> > 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
>>> >>  >>>
>> 

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 
drawing board for me :)


--
- Gary Maddock-Greene
""Gary Maddock-Greene""  wrote in message 
news:b4.82.23981.dee8e...@pb1.pair.com...
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 on a product for further information.";
while ($row_rsSearch = mysql_fetch_assoc($rsSearch)){
echo "
". $row_rsSearch['product_name']."
  ". $row_rsSearch['product_subtitle'] ."

  

 
 

  ";
}

}
?>

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


On Sun, Dec 21, 2008 at 1:07 PM, Gary Maddock-Greene <
g...@maddock-greene.co.uk> wrote:


I've corrected those errors thanks but how do I insert this code as the
else statement?


 
   
     
       $row_rsSearch['product_subtitle'];

?>
   View Product
 
  
  
 
   
 

--
- Gary Maddock-Greene
""Anthony Gentile""  wrote in message
news:2ce4207d0812210959k3491690ctbc4f0dbf971ac...@mail.gmail.com...

 ...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



On Sun, Dec 21, 2008 at 12:33 PM, Gary Maddock-Greene <
g...@maddock-greene.co.uk> wrote:

 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

after the echo "Please click on a product for further
information.". I can't get the syntax right ...

I appreciate everyones help

--
- Gary Maddock-Greene
"Ashley Sheridan"  wrote in message
news:1229878234.4229.12.ca...@localhost.localdomain...

 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 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 on a product for further information.
>
> 
>  
>
>  
>    
$row_rsSearch['product_subtitle'];
> ?>
>
> ?>">View Product
>  
>   
>   
>  
>
>  
>
> --
> - Gary Maddock-Greene
> "Ashley Sheridan"  wrote in message
> news:1229875150.4229.9.ca...@localhost.localdomain...
>
>  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."

>>> ?>
>>>  
>>>  
>>>  
>>>
>>>  
>>>>> $row_rsSearch['product_subtitle'];
>>> ?>
>>>View Product
>>>  
>>>   
>>>   
>>>  
>>>
>>>  >>> ?>

>>>
>>> --
>>> - Gary Maddock-Greene
>>> "Ashley Sheridan"  wrote in message
>>> news:1229873521.4229.6.ca...@localhost.localdomain...
>>> > On Sun, 2008-12-21 at 15:22 +, Gary Maddock-Greene wrote:
>>> >> Hi, I'm very n

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 on a product for further information.";
while ($row_rsSearch = mysql_fetch_assoc($rsSearch)){
echo "
". $row_rsSearch['product_name']."
  ". $row_rsSearch['product_subtitle'] ."

  

 
 

  ";
}

}
?>

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


On Sun, Dec 21, 2008 at 1:07 PM, Gary Maddock-Greene <
g...@maddock-greene.co.uk> wrote:


I've corrected those errors thanks but how do I insert this code as the
else statement?


 
   
 
   $row_rsSearch['product_subtitle'];

?>
   View Product
 
  
  
 
   
 

--
- Gary Maddock-Greene
""Anthony Gentile""  wrote in message
news:2ce4207d0812210959k3491690ctbc4f0dbf971ac...@mail.gmail.com...

 ...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



On Sun, Dec 21, 2008 at 12:33 PM, Gary Maddock-Greene <
g...@maddock-greene.co.uk> wrote:

 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
after the echo "Please click on a product for further
information.". I can't get the syntax right ...

I appreciate everyones help

--
- Gary Maddock-Greene
"Ashley Sheridan"  wrote in message
news:1229878234.4229.12.ca...@localhost.localdomain...

 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 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 on a product for further information.
>
> 
>  
>
>  
>
$row_rsSearch['product_subtitle'];
> ?>
>
> ?>">View Product
>  
>   
>   
>  
>
>  
>
> --
> - Gary Maddock-Greene
> "Ashley Sheridan"  wrote in message
> news:1229875150.4229.9.ca...@localhost.localdomain...
>
>  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."

>>> ?>
>>>  
>>>  
>>>  
>>>
>>>  
>>>>> $row_rsSearch['product_subtitle'];
>>> ?>
>>>View Product
>>>  
>>>   
>>>   
>>>  
>>>
>>>  
>>>
>>> --
>>> - Gary Maddock-Greene
>>> "Ashley Sheridan"  wrote in message
>>> news:1229873521.4229.6.ca...@localhost.localdomain...
>>> > 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 ...
>>> >>
>>> >> $que

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 
news:2ce4207d0812211021g215d5346wb0afcedf039ef...@mail.gmail.com...

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'] ."

  

 
 

  ";
}

}
?>

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


On Sun, Dec 21, 2008 at 1:07 PM, Gary Maddock-Greene <
g...@maddock-greene.co.uk> wrote:


I've corrected those errors thanks but how do I insert this code as the
else statement?


 
   
 
   $row_rsSearch['product_subtitle'];

?>
   View Product
 
  
  
 
   
 

--
- Gary Maddock-Greene
""Anthony Gentile""  wrote in message
news:2ce4207d0812210959k3491690ctbc4f0dbf971ac...@mail.gmail.com...

 ...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



On Sun, Dec 21, 2008 at 12:33 PM, Gary Maddock-Greene <
g...@maddock-greene.co.uk> wrote:

 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
after the echo "Please click on a product for further
information.". I can't get the syntax right ...

I appreciate everyones help

--
- Gary Maddock-Greene
"Ashley Sheridan"  wrote in message
news:1229878234.4229.12.ca...@localhost.localdomain...

 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 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 on a product for further information.
>
> 
>  
>
>  
>    
$row_rsSearch['product_subtitle'];
> ?>
>
> ?>">View Product
>  
>   
>   
>  
>
>  
>
> --
> - Gary Maddock-Greene
> "Ashley Sheridan"  wrote in message
> news:1229875150.4229.9.ca...@localhost.localdomain...
>
>  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."

>>> ?>
>>>  
>>>  
>>>  
>>>
>>>  
>>>>> $row_rsSearch['product_subtitle'];
>>> ?>
>>>View Product
>>>  
>>>   
>>>   
>>>  
>>>
>>>  
>>>
>>> --
>>> - Gary Maddock-Greene
>>> "Ashley Sheridan"  wrote in message
>>> news:1229873521.4229.6.ca...@localhost.localdomain...
>>> > 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
>>> >> return

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:2ce4207d0812210959k3491690ctbc4f0dbf971ac...@mail.gmail.com...

...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



On Sun, Dec 21, 2008 at 12:33 PM, Gary Maddock-Greene <
g...@maddock-greene.co.uk> wrote:


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
after the echo "Please click on a product for further
information.". I can't get the syntax right ...

I appreciate everyones help

--
- Gary Maddock-Greene
"Ashley Sheridan"  wrote in message
news:1229878234.4229.12.ca...@localhost.localdomain...

 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 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 on a product for further information.
>
> 
>  
>    
>  
>
$row_rsSearch['product_subtitle'];
> ?>
>View Product
>  
>   
>       
>  
>
>  
>
> --
> - Gary Maddock-Greene
> "Ashley Sheridan"  wrote in message
> news:1229875150.4229.9.ca...@localhost.localdomain...
>
>  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."
>>> ?>
>>>  
>>>  
>>>  
>>>
>>>  
>>>>> $row_rsSearch['product_subtitle'];
>>> ?>
>>>
>>> ?>">View Product
>>>  
>>>   
>>>   
>>>  
>>>
>>>  
>>>
>>> --
>>> - Gary Maddock-Greene
>>> "Ashley Sheridan"  wrote in message
>>> news:1229873521.4229.6.ca...@localhost.localdomain...
>>> > 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 ...
>>> >>
>>> >> $query_rsSearch = sprintf("SELECT * FROM products WHERE >>> >>
product_name
>>> >> LIKE
>>> >> %s", GetSQLValueString("%" . $colname_rsSearch . "%", "text"));
>>> >> $rsSearch = mysql_query($query_rsSearch, $sondia_lighting) or
>>> >> die(mysql_error());
>>> >> $row_rsSearch = mysql_fetch_assoc($rsSearch);
>>> >> $totalRows_rsSearch = mysql_num_rows($rsSearch);
>>> >> ?>
>>> >>
>>> >> Thanks
>>> >>
>>> >> - Gary Maddock-Greene
>>> >>
>>> >>
>>> > Can you not just use the $totalRows_rsSearch value inside of an 
>>> > if

>>> > statement?
>>> >
>>> >
>>> > Ash
>>> > www.ashleysheridan.co.uk
>>> >
>>>
>>>
>>>  It might be because you're comparing the total to a string rather
>>> than a
>> number  if ($totalRows_rsSearch="0")
>>
>> If you remove the quote marks, it should work.
>>
>>
>> Ash
>> www.ashleysheridan.co.uk
>>
>>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


D'oh, not sure how I missed that one too, the double ==. No wonder it
wasn't working.


Ash
www.ashleysheridan.co.uk




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php







--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 after the 
echo "Please click on a product for further information.". I can't 
get the syntax right ...


I appreciate everyones help

--
- Gary Maddock-Greene
"Ashley Sheridan"  wrote in message 
news:1229878234.4229.12.ca...@localhost.localdomain...

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 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 on a product for further information.
>
> 
>  
>
>  
>> $row_rsSearch['product_subtitle'];

> ?>
>View Product
>  
>   
>   
>  
>
>  
>
> --
> - Gary Maddock-Greene
> "Ashley Sheridan"  wrote in message
> news:1229875150.4229.9.ca...@localhost.localdomain...
>
>  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."
>>> ?>
>>>  
>>>  
>>>  
>>>
>>>      
>>>>> $row_rsSearch['product_subtitle'];
>>> ?>
>>>View Product
>>>  
>>>   
>>>   
>>>  
>>>
>>>  
>>>
>>> --
>>> - Gary Maddock-Greene
>>> "Ashley Sheridan"  wrote in message
>>> news:1229873521.4229.6.ca...@localhost.localdomain...
>>> > 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 ...
>>> >>
>>> >> $query_rsSearch = sprintf("SELECT * FROM products WHERE 
>>> >> product_name

>>> >> LIKE
>>> >> %s", GetSQLValueString("%" . $colname_rsSearch . "%", "text"));
>>> >> $rsSearch = mysql_query($query_rsSearch, $sondia_lighting) or
>>> >> die(mysql_error());
>>> >> $row_rsSearch = mysql_fetch_assoc($rsSearch);
>>> >> $totalRows_rsSearch = mysql_num_rows($rsSearch);
>>> >> ?>
>>> >>
>>> >> Thanks
>>> >>
>>> >> - Gary Maddock-Greene
>>> >>
>>> >>
>>> > Can you not just use the $totalRows_rsSearch value inside of an if
>>> > statement?
>>> >
>>> >
>>> > Ash
>>> > www.ashleysheridan.co.uk
>>> >
>>>
>>>
>>>  It might be because you're comparing the total to a string rather 
>>> than a

>> number  if ($totalRows_rsSearch="0")
>>
>> If you remove the quote marks, it should work.
>>
>>
>> Ash
>> www.ashleysheridan.co.uk
>>
>>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

D'oh, not sure how I missed that one too, the double ==. No wonder it
wasn't working.


Ash
www.ashleysheridan.co.uk




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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
  
   
   
  

  

--
- Gary Maddock-Greene
"Ashley Sheridan"  wrote in message 
news:1229875150.4229.9.ca...@localhost.localdomain...

On Sun, 2008-12-21 at 15:40 +0000, Gary Maddock-Greene wrote:

Thanks Ashley ... I have been trying that but I think my syntax id shot!!

Please click on a product for further information."
?>
  
  
  

  
$row_rsSearch['product_subtitle'];

?>
View Product
  
   
   
      
    
  

--
- Gary Maddock-Greene
"Ashley Sheridan"  wrote in message
news:1229873521.4229.6.ca...@localhost.localdomain...
> 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 ...
>>
>> $query_rsSearch = sprintf("SELECT * FROM products WHERE product_name 
>> LIKE

>> %s", GetSQLValueString("%" . $colname_rsSearch . "%", "text"));
>> $rsSearch = mysql_query($query_rsSearch, $sondia_lighting) or
>> die(mysql_error());
>> $row_rsSearch = mysql_fetch_assoc($rsSearch);
>> $totalRows_rsSearch = mysql_num_rows($rsSearch);
>> ?>
>>
>> Thanks
>>
>> - Gary Maddock-Greene
>>
>>
> Can you not just use the $totalRows_rsSearch value inside of an if
> statement?
>
>
> Ash
> www.ashleysheridan.co.uk
>



It might be because you're comparing the total to a string rather than a
number  if ($totalRows_rsSearch="0")

If you remove the quote marks, it should work.


Ash
www.ashleysheridan.co.uk




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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"  wrote in message 
news:1229873521.4229.6.ca...@localhost.localdomain...

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 ...

$query_rsSearch = sprintf("SELECT * FROM products WHERE product_name LIKE
%s", GetSQLValueString("%" . $colname_rsSearch . "%", "text"));
$rsSearch = mysql_query($query_rsSearch, $sondia_lighting) or
die(mysql_error());
$row_rsSearch = mysql_fetch_assoc($rsSearch);
$totalRows_rsSearch = mysql_num_rows($rsSearch);
?>

Thanks

- Gary Maddock-Greene



Can you not just use the $totalRows_rsSearch value inside of an if
statement?


Ash
www.ashleysheridan.co.uk




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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_name LIKE
%s", GetSQLValueString("%" . $colname_rsSearch . "%", "text"));
$rsSearch = mysql_query($query_rsSearch, $sondia_lighting) or
die(mysql_error());
$row_rsSearch = mysql_fetch_assoc($rsSearch);
$totalRows_rsSearch = mysql_num_rows($rsSearch);
?>

Thanks

- Gary Maddock-Greene 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Image Resizing

2008-12-21 Thread Gary Maddock-Greene

nice post Tedd and useful web site :)

-Gary

"tedd"  wrote in message 
news:p06240802c573f5a71...@[192.168.1.101]...

At 12:38 PM -0800 12/20/08, Stephen Alistoun wrote:

Hi all,

What is the best way in PHP to Resize an Image to a specific width.

For Example I have images in the following sizes:

(1) 200px width and 350px height
(2) 125px width and 220px height
(3) 166px width and 455px height

I want all the images to resize to 100px width but the height adjusts
automatically.

Regards,

Stephen


Stephen:

Here's the code.

http://webbytedd.com/b/thumb/

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Repeat Region Error

2008-12-21 Thread Gary Maddock-Greene

Sorry guys .. resolved it doh!

I was freeing the recordset in



-Gary

""Gary Maddock-Greene""  wrote in message 
news:5a.42.33998.4b83e...@pb1.pair.com...

Hi  All,

I am getting the following error - Warning: mysql_fetch_assoc(): 3 is not 
a valid MySQL result resource in 


I think it has something to do with my Dreamweaver created code for a 
repeat region. The head code is:


function GetSQLValueString($theValue, $theType, $theDefinedValue = "", 
$theNotDefinedValue = "")

{
 $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

 $theValue = function_exists("mysql_real_escape_string") ? 
mysql_real_escape_string($theValue) : mysql_escape_string($theValue);


 switch ($theType) {
   case "text":
 $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
 break;
   case "long":
   case "int":
 $theValue = ($theValue != "") ? intval($theValue) : "NULL";
 break;
   case "double":
 $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : 
"NULL";

 break;
   case "date":
 $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
 break;
   case "defined":
 $theValue = ($theValue != "") ? $theDefinedValue : 
$theNotDefinedValue;

 break;
 }
 return $theValue;
}
}

$colname_rsSearch = "-1";
if (isset($_GET['product_name'])) {
 $colname_rsSearch = $_GET['product_name'];
}
mysql_select_db($database_sondia_lighting, $sondia_lighting);
$query_rsSearch = sprintf("SELECT * FROM products WHERE product_name LIKE 
%s", GetSQLValueString("%" . $colname_rsSearch . "%", "text"));
$rsSearch = mysql_query($query_rsSearch, $sondia_lighting) or 
die(mysql_error());

$row_rsSearch = mysql_fetch_assoc($rsSearch);
$totalRows_rsSearch = mysql_num_rows($rsSearch);
?>



... and the code in the page to generate my region is:


 

   
 
   ?>
   View Product

 
  
  
 
   
 

If anyone can assist I would really appreciate it

- Gary 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Repeat Region Error

2008-12-21 Thread Gary Maddock-Greene

Hi  All,

I am getting the following error - Warning: mysql_fetch_assoc(): 3 is not a 
valid MySQL result resource in 


I think it has something to do with my Dreamweaver created code for a repeat 
region. The head code is:


function GetSQLValueString($theValue, $theType, $theDefinedValue = "", 
$theNotDefinedValue = "")

{
 $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

 $theValue = function_exists("mysql_real_escape_string") ? 
mysql_real_escape_string($theValue) : mysql_escape_string($theValue);


 switch ($theType) {
   case "text":
 $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
 break;
   case "long":
   case "int":
 $theValue = ($theValue != "") ? intval($theValue) : "NULL";
 break;
   case "double":
 $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : 
"NULL";

 break;
   case "date":
 $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
 break;
   case "defined":
 $theValue = ($theValue != "") ? $theDefinedValue : 
$theNotDefinedValue;

 break;
 }
 return $theValue;
}
}

$colname_rsSearch = "-1";
if (isset($_GET['product_name'])) {
 $colname_rsSearch = $_GET['product_name'];
}
mysql_select_db($database_sondia_lighting, $sondia_lighting);
$query_rsSearch = sprintf("SELECT * FROM products WHERE product_name LIKE 
%s", GetSQLValueString("%" . $colname_rsSearch . "%", "text"));
$rsSearch = mysql_query($query_rsSearch, $sondia_lighting) or 
die(mysql_error());

$row_rsSearch = mysql_fetch_assoc($rsSearch);
$totalRows_rsSearch = mysql_num_rows($rsSearch);
?>



... and the code in the page to generate my region is:


 

   
 
   ?>
   View Product

 
  
  
 
   
 

If anyone can assist I would really appreciate it

- Gary 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: de-bug no input file specified

2008-12-20 Thread Gary Maddock-Greene
hi .. info.php works fine ... php is installed and working ok. Its just this 
connection to a database that throws the error.


Server API is ISAPI

I'm not sure that I'm running php as a cgi app. I was reading something that 
was pointing me to that but tbh my knowledge level is very basic so I am not 
sure what I am looking for. That's always a problem with trying to find or 
understand a bug .. if you don't know what you should be looking at.


How can I check the cgi .. and why could this be causing the problem?

Many thanks guys

- Gary

"Nathan Rixham"  wrote in message 
news:494c524d.40...@gmail.com...

Gary Maddock-Greene wrote:
Hi, is it possible to de-bug a 'no input file specified' error. I get the 
error when trying to run my search script but do not know whats causing 
it. Is it a common error?


PHP5 with MySQL adn IIS7

Thanks

- Gary


.. just did some more reading.. are you running php as a CGI app? 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] de-bug no input file specified

2008-12-19 Thread Gary Maddock-Greene
Hi Mike ... I think Adobe code does look like VB script actually ... I agree 
:)


I wish I knew php better (so I didn't have to rely on crappy Dreamweaver 
code), I only started using it today and just want to script a simple search 
form on a 5 colomn products table ... not too hard eh?


I have php installed, IIS7 running beautifully .. but can't get this simple 
form working.


"mike"  wrote in message 
news:bd9320b30812191522w365dfd7cx5ca8829ab53f2...@mail.gmail.com...

yeah but it stinks of microsoft/vb/asp :)

i can't really tell you in IIS, but that's the common reason nginx has
a "no input file specified" - people ask about it all the time.

On Fri, Dec 19, 2008 at 3:15 PM, Gary Maddock-Greene
 wrote:

the code was generated by Dreamweaver CS3  .. its php!

How do I check the SCRIPT_FILENAME please?

"mike"  wrote in message
news:bd9320b30812191502t2448ef31xa8ad8758f8638...@mail.gmail.com...


first off - you must be coming from ASP for that code :P

second - that error is usually due to the SCRIPT_FILENAME being
incorrect. not the code in the script.

On Fri, Dec 19, 2008 at 2:54 PM, Gary Maddock-Greene
 wrote:


Hi Philip,

Here is my code ...

$query_rsSearch = sprintf("SELECT * FROM products WHERE product_name 
LIKE

%s", GetSQLValueString("%" . $colname_rsSearch . "%", "text"));
$rsSearch = mysql_query($query_rsSearch, $MyDatabase) or
die(mysql_error());
$row_rsSearch = mysql_fetch_assoc($rsSearch);
$totalRows_rsSearch = mysql_num_rows($rsSearch);
?>

- Gary


"Philip Graham"  wrote in message
news:200812191734.10664.phi...@lightbox.org...



On December 19, 2008 17:20:32 Gary Maddock-Greene wrote:


Hi, is it possible to de-bug a 'no input file specified' error. I get
the
error when trying to run my search script but do not know whats 
causing

it.
Is it a common error?


What code/command/request is causing the error?



PHP5 with MySQL adn IIS7

Thanks

- Gary


--
Philip Graham
Lightbox Technologies
Suite 312 240 Catherine St.
Ottawa, ON, K2P 2G8
613-686-1661 ext. 102



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] de-bug no input file specified

2008-12-19 Thread Gary Maddock-Greene
Thanks Philip  i am running a search from a form (page 1) querying the 
db and returning the result on page 2 (well thats the theory) !


"Philip Graham"  wrote in message 
news:200812191822.58155.phi...@lightbox.org...

> Hi Philip,
>
> Here is my code ...
>
>  if (!function_exists("GetSQLValueString")) {
> function GetSQLValueString($theValue, $theType, $theDefinedValue = "",
> $theNotDefinedValue = "")
> {
>  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) :
> $theValue;
>
>  $theValue = function_exists("mysql_real_escape_string") ?
> mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
>
>  switch ($theType) {
>   case "text":
> $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
> break;
>   case "long":
>   case "int":
> $theValue = ($theValue != "") ? intval($theValue) : "NULL";
> break;
>   case "double":
> $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" :
> "NULL";
> break;
>   case "date":
> $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
> break;
>   case "defined":
> $theValue = ($theValue != "") ? $theDefinedValue :
> $theNotDefinedValue; break;
>  }
>  return $theValue;
> }
> }
>
> $colname_rsSearch = "-1";
> if (isset($_GET['product_name'])) {
>  $colname_rsSearch = $_GET['product_name'];
> }
> mysql_select_db($database_MyDatabase, $MyDatabase);
> $query_rsSearch = sprintf("SELECT * FROM products WHERE product_name 
> LIKE

> %s", GetSQLValueString("%" . $colname_rsSearch . "%", "text"));
> $rsSearch = mysql_query($query_rsSearch, $MyDatabase) or
> die(mysql_error()); $row_rsSearch = mysql_fetch_assoc($rsSearch);
> $totalRows_rsSearch = mysql_num_rows($rsSearch);
> ?>
>
> - Gary


It doesn't look like your code is the problem, how is the file being 
executed.

Through the command line or IIS?  In either case it sounds like either you
have don't have permissions on the file, you're pointing at the wrong file 
or
you've got a bad config setting somewhere.  You can always try searching 
'php

no input file specified' and see if others before you have had the same
problem for a quick fix.  Other than that I'm sorry I can't be of more 
help

but unfortunately I'm not at all familiar with PHP on windows/IIS.

--
Philip Graham




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] de-bug no input file specified

2008-12-19 Thread Gary Maddock-Greene

the code was generated by Dreamweaver CS3  .. its php!

How do I check the SCRIPT_FILENAME please?

"mike"  wrote in message 
news:bd9320b30812191502t2448ef31xa8ad8758f8638...@mail.gmail.com...

first off - you must be coming from ASP for that code :P

second - that error is usually due to the SCRIPT_FILENAME being
incorrect. not the code in the script.

On Fri, Dec 19, 2008 at 2:54 PM, Gary Maddock-Greene
 wrote:

Hi Philip,

Here is my code ...

 $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : 
$theValue;


 $theValue = function_exists("mysql_real_escape_string") ?
mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

 switch ($theType) {
  case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
  case "long":
  case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
  case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" :
"NULL";
break;
  case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
  case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : 
$theNotDefinedValue;

break;
 }
 return $theValue;
}
}

$colname_rsSearch = "-1";
if (isset($_GET['product_name'])) {
 $colname_rsSearch = $_GET['product_name'];
}
mysql_select_db($database_MyDatabase, $MyDatabase);
$query_rsSearch = sprintf("SELECT * FROM products WHERE product_name LIKE
%s", GetSQLValueString("%" . $colname_rsSearch . "%", "text"));
$rsSearch = mysql_query($query_rsSearch, $MyDatabase) or 
die(mysql_error());

$row_rsSearch = mysql_fetch_assoc($rsSearch);
$totalRows_rsSearch = mysql_num_rows($rsSearch);
?>

- Gary


"Philip Graham"  wrote in message
news:200812191734.10664.phi...@lightbox.org...



On December 19, 2008 17:20:32 Gary Maddock-Greene wrote:


Hi, is it possible to de-bug a 'no input file specified' error. I get 
the

error when trying to run my search script but do not know whats causing
it.
Is it a common error?


What code/command/request is causing the error?



PHP5 with MySQL adn IIS7

Thanks

- Gary


--
Philip Graham
Lightbox Technologies
Suite 312 240 Catherine St.
Ottawa, ON, K2P 2G8
613-686-1661 ext. 102



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] de-bug no input file specified

2008-12-19 Thread Gary Maddock-Greene

Hi Philip,

Here is my code ...

function GetSQLValueString($theValue, $theType, $theDefinedValue = "", 
$theNotDefinedValue = "")

{
 $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

 $theValue = function_exists("mysql_real_escape_string") ? 
mysql_real_escape_string($theValue) : mysql_escape_string($theValue);


 switch ($theType) {
   case "text":
 $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
 break;
   case "long":
   case "int":
 $theValue = ($theValue != "") ? intval($theValue) : "NULL";
 break;
   case "double":
 $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : 
"NULL";

 break;
   case "date":
 $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
 break;
   case "defined":
 $theValue = ($theValue != "") ? $theDefinedValue : 
$theNotDefinedValue;

 break;
 }
 return $theValue;
}
}

$colname_rsSearch = "-1";
if (isset($_GET['product_name'])) {
 $colname_rsSearch = $_GET['product_name'];
}
mysql_select_db($database_MyDatabase, $MyDatabase);
$query_rsSearch = sprintf("SELECT * FROM products WHERE product_name LIKE 
%s", GetSQLValueString("%" . $colname_rsSearch . "%", "text"));

$rsSearch = mysql_query($query_rsSearch, $MyDatabase) or die(mysql_error());
$row_rsSearch = mysql_fetch_assoc($rsSearch);
$totalRows_rsSearch = mysql_num_rows($rsSearch);
?>

- Gary


"Philip Graham"  wrote in message 
news:200812191734.10664.phi...@lightbox.org...



On December 19, 2008 17:20:32 Gary Maddock-Greene wrote:

Hi, is it possible to de-bug a 'no input file specified' error. I get the
error when trying to run my search script but do not know whats causing 
it.

Is it a common error?


What code/command/request is causing the error?



PHP5 with MySQL adn IIS7

Thanks

- Gary

--
Philip Graham
Lightbox Technologies
Suite 312 240 Catherine St.
Ottawa, ON, K2P 2G8
613-686-1661 ext. 102 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] de-bug no input file specified

2008-12-19 Thread Gary Maddock-Greene
Hi, is it possible to de-bug a 'no input file specified' error. I get the 
error when trying to run my search script but do not know whats causing it. 
Is it a common error?


PHP5 with MySQL adn IIS7

Thanks

- Gary 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: HTTP Error 500 - IsapiModule

2008-12-19 Thread Gary Maddock-Greene
Stuart you have been very helpful thank you. I have learnt a number of 
valuable lessons this afternoon.


- Gary

""Gary Maddock-Greene""  wrote in message 
news:a4.34.09584.e39ab...@pb1.pair.com...
Yes .. thanks Stuart. If I comment out that line I now get a different 
problem!!


Unable to connect to database.

One step closer!!!


"Stuart"  wrote in message 
news:a5f019de0812190556g611cd672k25a30b77d02ad...@mail.gmail.com...

2008/12/19 Gary Maddock-Greene :

$sql_query = mysql_query("SELECT * FROM products WHERE
MATCH(product_name,product_image) AGAINST('$search_term')");

// This is line 20 where I am getting the parse error

many mathces (too many matches cause returning of 0 results)


That line is not valid code. I'm guessing it's part of a comment that
has mistakenly been broken across 2 lines.

-Stuart

--
http://stut.net/


"Stuart"  wrote in message
news:a5f019de0812190516r3cdcdacana356320f39a8d...@mail.gmail.com...


2008/12/19 Gary Maddock-Greene :


Thanks Stuart,

Logs are no enabled and I generate this line:

#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port
cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status
time-taken

Sorry this is only my 2nd day with php/MySQL and I really need to get
this
working so I appreciate the help.


That's the IIS log not the PHP log. See here for details:
http://uk.php.net/errorfunc.configuration

Look for log_errors and error_log. They work together to give you a
PHP error log file.

Did you try using php -l on the file?

-Stuart

--
http://stut.net/


"Stut"  wrote in message
news:a5f019de0812190459w486205a4n5fe8fea317890...@mail.gmail.com...


Please include the list when replying.

2008/12/19 G. Maddock-Greene :


You may be right Stuart ... I am thinking this too. I can access my
database
with an auto generated call using say Dreamweaver, but my hand code 
is

throwing the error ... though I cannot see why!! It's really
frustrating


Look in your php.ini and make sure log_errors is on and the filename
it's directed at is writable by IIS. Restart IIS and PHP errors 
should

then appear in that file.

Alternatively use the PHP command line executable with the -l (lint)
argument to check the syntax of a file.

-Stuart

--
http://stut.net/


- Original Message - From: "Stut" 
Newsgroups: php.general
To: 
Cc: 
Sent: Friday, December 19, 2008 11:58 AM
Subject: Re: [PHP] Re: HTTP Error 500 - IsapiModule



2008/12/19 David Robley :


Gary Maddock-Greene wrote:


Hi, Don't know if this is the right group but I am having real
problems
trying to connect to my MySQL db with php. I am trying to create 
a

search
form. I can connect and display in my browser a simple call to a 
db

record
but when I try to execute my search script I get a 500 Internal
Server
error: IsapiModule / ExecuterequestHandler. I'm stumped! Any help
please
or pointers. Thanks Gary


The first thing when you get a 500 error, which is a server error 
not

php,
is to check the server error log.


I might be wrong but I think syntax errors can cause a 500 status 
when

using ISAPI.

-Stuart

--
http://stut.net/






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php







--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: HTTP Error 500 - IsapiModule

2008-12-19 Thread Gary Maddock-Greene
Yes .. thanks Stuart. If I comment out that line I now get a different 
problem!!


Unable to connect to database.

One step closer!!!


"Stuart"  wrote in message 
news:a5f019de0812190556g611cd672k25a30b77d02ad...@mail.gmail.com...

2008/12/19 Gary Maddock-Greene :

$sql_query = mysql_query("SELECT * FROM products WHERE
MATCH(product_name,product_image) AGAINST('$search_term')");

// This is line 20 where I am getting the parse error

many mathces (too many matches cause returning of 0 results)


That line is not valid code. I'm guessing it's part of a comment that
has mistakenly been broken across 2 lines.

-Stuart

--
http://stut.net/


"Stuart"  wrote in message
news:a5f019de0812190516r3cdcdacana356320f39a8d...@mail.gmail.com...


2008/12/19 Gary Maddock-Greene :


Thanks Stuart,

Logs are no enabled and I generate this line:

#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port
cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status
time-taken

Sorry this is only my 2nd day with php/MySQL and I really need to get
this
working so I appreciate the help.


That's the IIS log not the PHP log. See here for details:
http://uk.php.net/errorfunc.configuration

Look for log_errors and error_log. They work together to give you a
PHP error log file.

Did you try using php -l on the file?

-Stuart

--
http://stut.net/


"Stut"  wrote in message
news:a5f019de0812190459w486205a4n5fe8fea317890...@mail.gmail.com...


Please include the list when replying.

2008/12/19 G. Maddock-Greene :


You may be right Stuart ... I am thinking this too. I can access my
database
with an auto generated call using say Dreamweaver, but my hand code 
is

throwing the error ... though I cannot see why!! It's really
frustrating


Look in your php.ini and make sure log_errors is on and the filename
it's directed at is writable by IIS. Restart IIS and PHP errors should
then appear in that file.

Alternatively use the PHP command line executable with the -l (lint)
argument to check the syntax of a file.

-Stuart

--
http://stut.net/


- Original Message - From: "Stut" 
Newsgroups: php.general
To: 
Cc: 
Sent: Friday, December 19, 2008 11:58 AM
Subject: Re: [PHP] Re: HTTP Error 500 - IsapiModule



2008/12/19 David Robley :


Gary Maddock-Greene wrote:


Hi, Don't know if this is the right group but I am having real
problems
trying to connect to my MySQL db with php. I am trying to create a
search
form. I can connect and display in my browser a simple call to a 
db

record
but when I try to execute my search script I get a 500 Internal
Server
error: IsapiModule / ExecuterequestHandler. I'm stumped! Any help
please
or pointers. Thanks Gary


The first thing when you get a 500 error, which is a server error 
not

php,
is to check the server error log.


I might be wrong but I think syntax errors can cause a 500 status 
when

using ISAPI.

-Stuart

--
http://stut.net/






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: HTTP Error 500 - IsapiModule

2008-12-19 Thread Gary Maddock-Greene
$sql_query = mysql_query("SELECT * FROM products WHERE 
MATCH(product_name,product_image) AGAINST('$search_term')");


// This is line 20 where I am getting the parse error

many mathces (too many matches cause returning of 0 results)
   if($results = mysql_num_rows($sql_query) != 0)


"Stuart"  wrote in message 
news:a5f019de0812190516r3cdcdacana356320f39a8d...@mail.gmail.com...

2008/12/19 Gary Maddock-Greene :

Thanks Stuart,

Logs are no enabled and I generate this line:

#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port
cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status
time-taken

Sorry this is only my 2nd day with php/MySQL and I really need to get 
this

working so I appreciate the help.


That's the IIS log not the PHP log. See here for details:
http://uk.php.net/errorfunc.configuration

Look for log_errors and error_log. They work together to give you a
PHP error log file.

Did you try using php -l on the file?

-Stuart

--
http://stut.net/


"Stut"  wrote in message
news:a5f019de0812190459w486205a4n5fe8fea317890...@mail.gmail.com...


Please include the list when replying.

2008/12/19 G. Maddock-Greene :


You may be right Stuart ... I am thinking this too. I can access my
database
with an auto generated call using say Dreamweaver, but my hand code is
throwing the error ... though I cannot see why!! It's really 
frustrating


Look in your php.ini and make sure log_errors is on and the filename
it's directed at is writable by IIS. Restart IIS and PHP errors should
then appear in that file.

Alternatively use the PHP command line executable with the -l (lint)
argument to check the syntax of a file.

-Stuart

--
http://stut.net/


- Original Message - From: "Stut" 
Newsgroups: php.general
To: 
Cc: 
Sent: Friday, December 19, 2008 11:58 AM
Subject: Re: [PHP] Re: HTTP Error 500 - IsapiModule



2008/12/19 David Robley :


Gary Maddock-Greene wrote:


Hi, Don't know if this is the right group but I am having real
problems
trying to connect to my MySQL db with php. I am trying to create a
search
form. I can connect and display in my browser a simple call to a db
record
but when I try to execute my search script I get a 500 Internal 
Server

error: IsapiModule / ExecuterequestHandler. I'm stumped! Any help
please
or pointers. Thanks Gary


The first thing when you get a 500 error, which is a server error not
php,
is to check the server error log.


I might be wrong but I think syntax errors can cause a 500 status when
using ISAPI.

-Stuart

--
http://stut.net/






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: HTTP Error 500 - IsapiModule

2008-12-19 Thread Gary Maddock-Greene

Ok error log reads:

[19-Dec-2008 13:31:08] PHP Parse error:  parse error in 
C:\inetpub\wwwroot\search\search.php on line 20


Sorry didn't try your suggestion php -1 ... not sure how to!!


"Stuart"  wrote in message 
news:a5f019de0812190516r3cdcdacana356320f39a8d...@mail.gmail.com...

2008/12/19 Gary Maddock-Greene :

Thanks Stuart,

Logs are no enabled and I generate this line:

#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port
cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status
time-taken

Sorry this is only my 2nd day with php/MySQL and I really need to get 
this

working so I appreciate the help.


That's the IIS log not the PHP log. See here for details:
http://uk.php.net/errorfunc.configuration

Look for log_errors and error_log. They work together to give you a
PHP error log file.

Did you try using php -l on the file?

-Stuart

--
http://stut.net/


"Stut"  wrote in message
news:a5f019de0812190459w486205a4n5fe8fea317890...@mail.gmail.com...


Please include the list when replying.

2008/12/19 G. Maddock-Greene :


You may be right Stuart ... I am thinking this too. I can access my
database
with an auto generated call using say Dreamweaver, but my hand code is
throwing the error ... though I cannot see why!! It's really 
frustrating


Look in your php.ini and make sure log_errors is on and the filename
it's directed at is writable by IIS. Restart IIS and PHP errors should
then appear in that file.

Alternatively use the PHP command line executable with the -l (lint)
argument to check the syntax of a file.

-Stuart

--
http://stut.net/


- Original Message - From: "Stut" 
Newsgroups: php.general
To: 
Cc: 
Sent: Friday, December 19, 2008 11:58 AM
Subject: Re: [PHP] Re: HTTP Error 500 - IsapiModule



2008/12/19 David Robley :


Gary Maddock-Greene wrote:


Hi, Don't know if this is the right group but I am having real
problems
trying to connect to my MySQL db with php. I am trying to create a
search
form. I can connect and display in my browser a simple call to a db
record
but when I try to execute my search script I get a 500 Internal 
Server

error: IsapiModule / ExecuterequestHandler. I'm stumped! Any help
please
or pointers. Thanks Gary


The first thing when you get a 500 error, which is a server error not
php,
is to check the server error log.


I might be wrong but I think syntax errors can cause a 500 status when
using ISAPI.

-Stuart

--
http://stut.net/






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: HTTP Error 500 - IsapiModule

2008-12-19 Thread Gary Maddock-Greene

Thanks Stuart,

Logs are no enabled and I generate this line:

#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port 
cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status 
time-taken


Sorry this is only my 2nd day with php/MySQL and I really need to get this 
working so I appreciate the help.


-Gary

"Stut"  wrote in message 
news:a5f019de0812190459w486205a4n5fe8fea317890...@mail.gmail.com...

Please include the list when replying.

2008/12/19 G. Maddock-Greene :
You may be right Stuart ... I am thinking this too. I can access my 
database

with an auto generated call using say Dreamweaver, but my hand code is
throwing the error ... though I cannot see why!! It's really frustrating


Look in your php.ini and make sure log_errors is on and the filename
it's directed at is writable by IIS. Restart IIS and PHP errors should
then appear in that file.

Alternatively use the PHP command line executable with the -l (lint)
argument to check the syntax of a file.

-Stuart

--
http://stut.net/


- Original Message - From: "Stut" 
Newsgroups: php.general
To: 
Cc: 
Sent: Friday, December 19, 2008 11:58 AM
Subject: Re: [PHP] Re: HTTP Error 500 - IsapiModule



2008/12/19 David Robley :


Gary Maddock-Greene wrote:

Hi, Don't know if this is the right group but I am having real 
problems

trying to connect to my MySQL db with php. I am trying to create a
search
form. I can connect and display in my browser a simple call to a db
record
but when I try to execute my search script I get a 500 Internal Server
error: IsapiModule / ExecuterequestHandler. I'm stumped! Any help 
please

or pointers. Thanks Gary


The first thing when you get a 500 error, which is a server error not
php,
is to check the server error log.


I might be wrong but I think syntax errors can cause a 500 status when
using ISAPI.

-Stuart

--
http://stut.net/






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: HTTP Error 500 - IsapiModule

2008-12-19 Thread Gary Maddock-Greene
Thanks David, but my log doesn't tell me anything (I don't think) !! I am 
assuming we are referring to the inetpub logs?


-Gary

"David Robley"  wrote in message 
news:71.4b.09584.6698b...@pb1.pair.com...

Gary Maddock-Greene wrote:


Hi, Don't know if this is the right group but I am having real problems
trying to connect to my MySQL db with php. I am trying to create a search
form. I can connect and display in my browser a simple call to a db 
record

but when I try to execute my search script I get a 500 Internal Server
error: IsapiModule / ExecuterequestHandler. I'm stumped! Any help please
or pointers. Thanks Gary


The first thing when you get a 500 error, which is a server error not php,
is to check the server error log.


Cheers
--
David Robley

The best defense against logic is stupidity.
Today is Pungenday, the 61st day of The Aftermath in the YOLD 3174.




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] HTTP Error 500 - IsapiModule

2008-12-19 Thread Gary Maddock-Greene
Hi, Don't know if this is the right group but I am having real problems 
trying to connect to my MySQL db with php. I am trying to create a search 
form. I can connect and display in my browser a simple call to a db record 
but when I try to execute my search script I get a 500 Internal Server 
error: IsapiModule / ExecuterequestHandler. I'm stumped! Any help please or 
pointers. Thanks Gary 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php