[PHP-DB] Installing mcrypt?

2001-08-22 Thread Brad Lipovsky

I am trying to install the mcrypt libraries on a Windows 98 computer running
Apache1.3.20 and PHP 4.0.6.  I cant really find anywhere on the net that
goes over the installation process, and the readme doesnt describe
installation.  Does anyone know how to do this, or where I can find a site
that describes this process?

Thanks
Brad



-- 
PHP Database 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-DB] isset() for objects?

2001-08-01 Thread Brad Lipovsky

Does isset() work for objects?  If not, is there a similar function for
objects?

Thanks



-- 
PHP Database 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-DB] cookie problems

2001-07-11 Thread Brad Lipovsky

can anyone help me with this code?  i cant believe it wont work, it seems
pretty simple!

?php
setcookie (logged_in, logged in, time() - 3600);
setcookie (logged_user_name, logged user name, time() - 3600);

print $logged_in br;
print $logged_user_name;
?

brad



-- 
PHP Database 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-DB] pulling my hair out

2001-07-11 Thread Brad Lipovsky

I have one script that looks like this:

?php
setcookie (logged_in, yes, time() - 3600);
setcookie (logged_user_name, brad, time() - 3600);
?

html
head
/head
body
SENT
/body
/html

and another that looks like this:

?php
print start br;
echo $HTTP_COOKIE_VARS[logged_in];
print br;
echo $logged_user_name;
print br;
print end;
?

which I have also tried like this:

?php
print br;
echo $logged_in;
print br;
echo $logged_user_name;
?

It seems like this should be extremely simple, but when I run the first one,
and then the second one, the second one only writes the br's to the
document.  It also doesnt trigger my browser (tried in netscape and ie5) to
alert me that a cookie is being sent, I turned that option on just to test
this script.
Please Help!


Brad



-- 
PHP Database 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-DB] a simple question

2001-07-09 Thread Brad Lipovsky

can somebody help me with the following code:


function multi_word($title) {

 $array = explode ( , $input);
 $number = count ($array);

  if ($number  1) {
   return true;
  } else{
   return false;
  }

}

 if ($category) {
 $Query = SELECT * from $TableName WHERE ((category)=$category);
 } else {
  if ($title) {
   if (multi_word($title)) {
   print one word at a time for now;
   die();
  } else {
  $Query = SELECT * from $TableName WHERE title LIKE '%$title%';
  }
 }
}

when i try to pass in a multi-word string it doesnt print anything.  I have
tested the function and I know it works allright... if anyone could help
that would be great.

Brad



-- 
PHP Database 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-DB] A very simple MySQL + PHP error

2001-07-08 Thread Brad Lipovsky

I get the following error:

//error
Warning: Supplied argument is not a valid MySQL result resource in
/web/sites/184/syzme/www.syzme.f2s.com/Commerce_System/search.php on line 22
//error

when I try to use this code:

?php
$Link = mysql_connect ($Host, $User, $Password);

//code
if ($category) {
 $Query = SELECT * from $TableName WHERE ((category)=$category);
} else { if ($title) {
 $Query = SELECT * from $TableName WHERE title LIKE %$title%);
 }
}

$Result = mysql_db_query ($DBName, $Query, $Link);

print Your search query of b $category /b returned the following
results:brbr;

while ($Row = mysql_fetch_array ($Result)) {
  print a href=item.php?p=$Row[id];
 echo ( $Row[title] );
 print /abr;
}


mysql_close ($Link);
?
//code

on my site.  If i pass in a value for $category, it works fine... the error
arises when I try to pass in a value for $title.  I want it to search a
MySQL DB for anything with the string $title in it, and then print it out in
the while structure.  Thanks

Brad



-- 
PHP Database 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-DB] Control Structure Error

2001-07-08 Thread Brad Lipovsky

Here is the code that I am trying to use:

//code start
function search_terms($title) {
 $array = explode ( , $title);
  for($i=0,$n=count($array); $i$n; $i++) {
   $returned_string = $returned_string . $array[$i] .  OR ;
}
 return $returned_string
}
//code end

I want it to turn the string of words stored in $title into an array
($array), then use the for structure to insert the string  OR  in between
each word, and then finally return the string ($returned_string) for DB
purposes.



-- 
PHP Database 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]