to search in a database for a field containing a string you can use % signs:

select * fro table where field='%$string%'

Luc

""Mark Collins"" <[EMAIL PROTECTED]> wrote in message
99nu1n$9nj$[EMAIL PROTECTED]">news:99nu1n$9nj$[EMAIL PROTECTED]...
> Hi again, a couple of questions if you have the time.
>
> I am having trouble writing the code to perform a search on a database. I
> have written some code which will search but only get case sensitive exact
> match results. Are there any functions or prewritten bits that would help
> here? Or can anyone point me in the right direction so I can code it
myself?
>
> Another small problem is that I was working through a tutorial to
> authenticate users using HTTP headers, but I am getting the following
error,
>
> Warning: Cannot add header information - headers already sent by (output
> started at C:\INetPub\WWWRoot\counter.php:5) in
> C:\INetPub\WWWRoot\counter.php on line 15
>
> Warning: Cannot add header information - headers already sent by (output
> started at C:\INetPub\WWWRoot\counter.php:5) in
> C:\INetPub\WWWRoot\counter.php on line 16
>
> With the code looking like this,
>
>  if (!isset($PHP_AUTH_USER)) {
>   header('WWW-Authenticate: Basic realm="My Private Stuff"');
>   header('HTTP/1.0 401 Unauthorized');
>   echo 'Authorization Required.';
>   exit;
>  }
>
> I am running php4 on IIS on Windows NT Server. Can you help? Sorry this is
> such a long post, I didn't know who else to ask!
>
> Thanks again
>
>
>
> --
> PHP Windows 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 Windows 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]

Reply via email to