RE: [PHP-DB] How can you hide database login passwd in your script?

2001-09-05 Thread speedboy

> $0 option:
> Put your user ID and password in a config file, then give only the
> webserver user access to it.  Read the config file to make it work.  This
> also allows easy switching between test and production environments.

You can't change the group owner of a file unless you have root.

That does not stop another php user fopen'ing your config file.


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




Re: [PHP-DB] PHP+ postgresql help?

2001-08-20 Thread speedboy

> print_r?  Am I about to learn something new?  Be still, my beating heart!

print_r will print the array $row which is one of the rows returned by
running your query. You can then see all the values in the array.

Just run it, you will see what it does.

Or alternatively echo just one field from the returned row (array):

echo "$row[0]";
echo "$row[id]";


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




Re: [PHP-DB] PHP+ postgresql help?

2001-08-20 Thread speedboy

> $conn = pg_connect ("host=localhost user=username password=password 
> bname=dbname");
> 
> $sql = "SELECT * FROM database where lower('$name%') order by last;";
> 
$result = pg_exec($conn, $sql);

for ($i = 0; $i < pg_numrows($result); $i++) {
$row = pg_fetch_array($result, $i);
echo "";
print_r($row);
echo "";
}


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




Re: [PHP-DB] Re: delete user but keep the article

2001-08-15 Thread speedboy

> > i want to delete user_x, but keep article abc.
> > how php/mysql display that there is article named 'abc', input by
> 'user_x',
> > but there are no further information about that user (except maybe only

Have a user status, 1 = active, 2 = deleted.

So when they are deleted their account is made inactive but their username
still exists so it will show that when you do the query on their
particular article(s). Then just modify the queries for other areas on
your webpage to not show them as an active user.

It does not require much space to keep the rest of their information...


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




Re: [PHP-DB] blinking background

2001-08-09 Thread speedboy

> Fergawdsake -- WHY?!!
> 
> Irritating, annoying, amateurish -- go read Jakob Nielsen on usability.
> 
> Here's an alternate suggestion: A contrasting colour for the row you wish 
> to highlight, keeping in mind that some people are colour blind.

1. You can create an animated gif with the an asterisk * that flashes on
and off light a light bulb (slowly).

2. Or just use the asterisk to denote a certain requirement on a form or
to alert the user to some area of the page.

3. Even changing the color of the text to red will alert the user.

Goodluck and please post to the correct list next time, this has nothing
to do with a database or php for that matter. :)



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