Re: [PHP] Not a valid MySQL resource?

2002-03-30 Thread Brian Waskiewicz
I set it up so that I check the query for errors, and there are none. It is pretty random - sometimes the page works, and sometimes it doesn't, for no apparent reason. I haven't changed anything on the database side. Thanks. "Jason Wong" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECT

Re: [PHP] register_globals

2002-03-30 Thread Jason Wong
On Sunday 31 March 2002 17:05, Liam wrote: > 31/03/2002 9:05:53 AM > > Hi all, > I'm running a webhosting service and I'm looking at security issues. > > at the moment I have register_globals set to "on" > Is there any reason I should turn it off? > > What are the security risks of having them on?

Re: [PHP] Sql results

2002-03-30 Thread Jason Wong
On Sunday 31 March 2002 07:29, Alberto Wagner wrote: > $Sql_Query_Login Returns an empty mysql array like: > > $Sql_Query_Login = Mysql_Query("SELECT Nome FROM users WHERE User = > 'Anyone'") > > There isn't a user if name Anyone... > > Why > > If (!$Sql_Query_Login) { >Echo "Ninguem"; > } > >

php-general Digest 31 Mar 2002 04:55:00 -0000 Issue 1258

2002-03-30 Thread php-general-digest-help
php-general Digest 31 Mar 2002 04:55:00 - Issue 1258 Topics (messages 90792 through 90856): Re: Not a valid MySQL resource? 90792 by: Rasmus Lerdorf 90794 by: Brian Waskiewicz 90796 by: Jason Wong 90854 by: Brian Waskiewicz PHP 4.2.ORC1 - SID gets deleted

[PHP] MySQL Connection Error - mysql_select_db

2002-03-30 Thread Patrick Hartnett
Thanks for all the help so far, great to have others out there helping. Only way it will let me connect is to explicitly use the connection information in the connect statement and the select_db statements, can't pass in the variables. This seems a little on the insecure side, and a pain. Is

[PHP] Case Statements - lil help please

2002-03-30 Thread Patrick Hartnett
Are case statements not implemented in PHP4? If so, can someone help me debug this one, I seem to have some syntax incorrect, and am not sure what exactly is wrong with the statement. I get a parse error on the first line, but can't find any documentation on case statements in PHP4, so I am k

[PHP] php form mail - what am I doing wrong?

2002-03-30 Thread lmlweb
I'm suffering eye fatique, and after reading the code for the maybe millionth of time, I still can't figure out what I'm doing wrong in this one. Ideally, you get to this registration form by clicking on a link in a previous page, so the registration form automatically enters in the event name. T

Re: [PHP] Sql results

2002-03-30 Thread Alberto Wagner
But I Want a way to do something if there isn't any result 31/03/2002 01:52:10, Jason Wong <[EMAIL PROTECTED]> wrote: >On Sunday 31 March 2002 07:29, Alberto Wagner wrote: >> $Sql_Query_Login Returns an empty mysql array like: >> >> $Sql_Query_Login = Mysql_Query("SELECT Nome FROM users WHERE

Re: [PHP] Sql results

2002-03-30 Thread Patrick Hartnett
try this, it sees if there is a result, and you can then proceed to do what you need to do. if (mysql_num_rows($result) == 1) //match found { //do something here; } // no match found else { //do something here;

Re: [PHP] Sql results

2002-03-30 Thread Jason Wong
On Sunday 31 March 2002 08:44, Alberto Wagner wrote: > But I Want a way to do something if there isn't any result mysql_num_rows() ? -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk /* The road to Hades is easy to travel. -- Bion */ -- PHP General Mailing List (ht

Re: [PHP] Sql results

2002-03-30 Thread Patrick Hartnett
use it after your query to see if there is a result set. Like follows: $result = mysql_query($query) or die ("Error in query: " . mysql_error()); // if row exists -> user/pass combination is correct if (mysql_num_rows($result) == 1) { return 1; }

Re: [PHP] Case Statements - lil help please

2002-03-30 Thread Dennis Moore
Try the following... // check the error code and generate an appropriate error message switch($e) { case( -1): $message = "No such user."; break; case(0): $message = "Invalid username and/or password."; break; case(2): $message = "Unauthorized access

Re: [PHP] Php.ini

2002-03-30 Thread Dennis Moore
I do not know about a separate php.ini file but you can assign specific values in your settings or you can set them using your .htaccess file pending on how you have set up your server. Assuming you are running Apache on a UNIX type machine ie php_value upload_max_filesize 500 go to ch

[PHP] Postgres question

2002-03-30 Thread Robert Abbate
Greetings to all! I have a webhosting company, and I'm trying to be able to use PHP to calculate each of my hosting customer's Postgres database disk usage. It doesn't seem as easy as MySQL (since MySQL uses the user name to store all their database files). Does anyone know how I can calculate P

Re: [PHP] Re: Why?

2002-03-30 Thread andy thomas
On Sat, 30 Mar 2002, Michael Kimsal wrote: > Alberto Wagner wrote: > > Why everyone uses $foo or $foobar as examples? > > > > > > > > Why not? They are relatively benign words that are simply to > type and aren't terribly language centric. > > $moo and $moocow would work just as well, or $asdf

Re: [PHP] Sql results

2002-03-30 Thread Miguel Cruz
On Sat, 30 Mar 2002, Alberto Wagner wrote: > But I Want a way to do something if there isn't any result > > 31/03/2002 01:52:10, Jason Wong <[EMAIL PROTECTED]> wrote: > > >On Sunday 31 March 2002 07:29, Alberto Wagner wrote: > >> $Sql_Query_Login Returns an empty mysql array like: > >> > >> $Sql

<    1   2