[PHP-DB] Re: any ideas?

2003-06-30 Thread Cristian MARIN
Have you print out the query resulted and manually tried in phpMyAdmin?
Maybe there is the problem. Anyway, it's better for you to use left join,
right join to do what you want to do

-- 
-
Cristian MARIN - Developer
InterAKT Online (www.interakt.ro)
Tel: +4021 312.53.12
Tel/Fax:  +4021 312.51.91
[EMAIL PROTECTED]
"Addison Ellis" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> hello and thank you for your time...
> any ideas why this isn't working?
> thank you again. best regards, addison
>
>  $query = "select * from stores,subcategory,category where
> stores.category = $crow->id and subcategory.category = $crow->id and
> (stores.city = '$city' and stores.state = '$state') and que='checked'
> order by 'name'";
> $result = mysql_query($query) or die(mysql_error());
> while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
>  {
> $count++;
> ?>
>
> // url of site with problem: http://www.momandpopcentral.com - select
> a category(arts & crafts) and state(TN) -next page enter
> city(nashville) there is a test store in the db  that will not appear.
> -- 
> Addison Ellis
> small independent publishing co.
> 114 B 29th Avenue North
> Nashville, TN 37203
> (615) 321-1791
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> subsidiaries of small independent publishing co.
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> addisonellis.com
>
> THIS E-MAIL AND ANY FILES TRANSMITTED WITH IT ARE CONFIDENTIAL  AND
> ARE INTENDED SOLELY FOR THE INDIVIDUAL OR ENTITY TO WHOM THEY ARE
> ADDRESSED.  IF YOU ARE NOT THE INTENDED RECIPIENT, PLEASE DO NOT
> READ, COPY OR RE-TRANSMIT THIS COMMUNICATION BUT DESTROY IT
> IMMEDIATELY.  ANY UNAUTHORIZED DISSEMINATION, DISTRIBUTION OR COPYING
> OF THIS COMMUNICATION IS STRICTLY PROHIBITED.
> A



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



Re: [PHP-DB] No MySQL Support in PHP5 - Uh oh!

2003-06-30 Thread Lester Caine
(Sorry Greg - Must remember to check return address ;) )

And what about recommending PHP/MySQL as a preferred dev environment? I am
currently in the process of several recommendations and wondering if I
shouldn't hold off for a while. Maybe its time to bite the bullet and move
to PHP/Postgres. Will anything remain "free"
Greg Reeves
Personally I have to live with MySQL built into the Windows
Binaries, but I have never used MySQL, and do not recommend
it because of the commercial implications.
Firebird will remain free for whoever wants it, so I will be
happy to see a MySQL-less build of PHP, and just install that :)
--
Lester Caine
-
L.S.Caine Electronic Services


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


[PHP-DB] Re: ./configure stupidity

2003-06-30 Thread Cristian MARIN
I think it's very good as it is. ./configure actually is almost a standard
for every compilation and is not ment to be used by a programmer but by a
system admins. Linux is not Windows. If you really want to learn to compile
a php create in a day or two a complete line with everything you ever think
you need about php or compile them as modules, save the config line in a
file and keep it on a CD. From version to version are very few changes to
the ./configure options.

-- 
-
Cristian MARIN - Developer
InterAKT Online (www.interakt.ro)
Tel: +4021 312.53.12
Tel/Fax:  +4021 312.51.91
[EMAIL PROTECTED]
"Nico Sabbi" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Hi,
>
> I wonder why at compile time ./configure  doesn't automatically detect
what
> features are compilable and what not, so as to
> build in php as much as possible.
>
> There isn't even such an option available, with the result that everytime
I
> recompile PHP I end-up missing some group of functions
> that I didn't expect to need.
>
>
>
> Thanks,
> Nico
>
>



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



Re: [PHP-DB] non-GPL MySQL licenses & PHP5

2003-06-30 Thread Rasmus Lerdorf
On Tue, 1 Jul 2003, Nabil wrote:
> You need to purchase commercial non-GPL MySQL licenses:
>
>   a.. If you distribute MySQL Software with your non open source software,
>   b.. If you want warranty from MySQL AB for the MySQL software,
>   c.. If you want to support MySQL development.
> So Why it is not supported with PHP5? and from where i can get the lib??

I guess we need a FAQ.  I am getting tired of answering this.

The GPL is not compatible with Apache/BSD-style licenses.  If you link a
GPL'ed library into a non-GPL'ed application and then redistribute it, or
if you incorporate the code into something and redistribute it, like we
do, then you must put that something under the GPL.  And we don't want to
put PHP under the GPL because that would mean you couldn't link it into
Apache (which sort of defeats the purpose for most people) unless of
course we also got the Apache guys to switch to the GPL.  This is why some
people call the GPL a viral license.

As for where you can get the MySQL library?  It's all over the place.  You
can obviously download it from mysql.com and it comes with every distro
out there.

-Rasmus

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



[PHP-DB] non-GPL MySQL licenses & PHP5

2003-06-30 Thread Nabil
As i read in www.MySQL.com:

The software from MySQL AB that you can download from the pages listed
below, is licensed under the GNU General Public License (GPL) and is
provided "as is" and is without any warranty.

You need to purchase commercial non-GPL MySQL licenses:

  a.. If you distribute MySQL Software with your non open source software,
  b.. If you want warranty from MySQL AB for the MySQL software,
  c.. If you want to support MySQL development.
So Why it is not supported with PHP5? and from where i can get the lib??




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



[PHP-DB] Re: PHP DB Interaction with Javascript?

2003-06-30 Thread jsWalter
"Aaron Wolski" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi All,
>
> Trying to get my head around something and want to know if it's possible
> first.
>
> Can PHP and Javascript interact to the point of PHP querying a DB to
> find out what records are in use as a variable for another record and
> then using JS to A) prevent the user from clicking a delete button; or
> B) pop-up a notice telling the user they can delete that particular
> record.
>
> Hope that makes sense.. any ideas?

Sure it does!

You looking to use PHP to query a database, create a table (or something)
and give the user the ability to dealte [or not] a particular record from
the displayed info.

Snce you havn't told us how your displaying your data, nor how a user can
kill a record, I will make some assumptions and you can go from there.

I would display this info ina table stlye, rows and columns to dispaly the
data from the database.


Each row would have a checkbox on it so I can select several items at once
and then have a DELETE button at the bottom and all the selected records
will go away.

Or you can place a DELETE button on EACH row to remove that particular
record right then.

Either way works.

So now the question, how can server-side PHP tell client-side JS that this
record can be modified and that record can not?

Right?

Simple, add a DISABLED attribute to the checkbox or individual record DELETE
button (as descirbed above). If something in your record from the database
says that this particular record can NOT be edited, then add the DISABLED
aatribute to the Form Element (checkbox or button).

And on the client-side, the HTML will take care of letting the user kill a
record or not.

Does this help?

walter




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



[PHP-DB] Re: MySQL error message...

2003-06-30 Thread Shivanischal A
hi,

mysql_query("$command",$mysqlHandle);

should actually be

mysql_query($command,$mysqlHandle);

it works for me. i did not understand rest ur code. but i think should do
it.
try this and get back if still facing problems.

regards,
-shiva


"Keith Spiller" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello,
>
> Does anyone know what would cause this message?
>
> Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result
> resource in c:\program files\easyphp\www\bod-rse\bod\menu.php3 on line
49...
>
> Here is the code:
>
>   $command = "SELECT * FROM central_fakepaths WHERE menu != '0' ORDER BY
menu
> ASC";
>  $result  = mysql_query("$command",$mysqlHandle);
>  $path_directory=explode("/", $HTTP_SERVER_VARS["REQUEST_URI"]);
>
>  while ($myrow = mysql_fetch_row($result))
>  {
>$count++;
>
>If   ($path_directory[1]=="$devsite")  { $path = $myrow[9];  $target =
> $myrow[10]; }
>else   { $path = $myrow[7];  $target =
> $myrow[3];  }
>
>If ($myrow[5] != $count)
>{ echo " height=\"7\">\n";
>  $count++;
>}
>
>   // IF MENU VALUE == COMMITTEES
>if ($myrow[2] == "Committees")
>{
>
>echo " width=139 height=7>
>    Committees
>  ";
>
>   $currdate = date("Y-m",time());
>   $cdate= explode("-" , $currdate);
>   $cyear= $cdate[0];
>   $cmonth   = $cdate[1];
>
>   if ($cmonth >=7 AND $cmonth <=12) $fyear  = $cyear + 1;
>   else  $fyear  = $cyear;
> $fyear2 = $fyear - 1;
> $syear  = "$fyear2 - $fyear";
>
> $commandw = "SELECT menuname, type, active, name FROM bod_board_boards
> WHERE type='committee' AND active='1' ORDER BY name ASC";
> $resultw  = mysql_query("$commandw",$mysqlHandle);
> while ($myroww = mysql_fetch_row($resultw))
>  {
>if ($myroww[0] !="")
> {
>echo "   target='_top'>$myroww[0]";
> }
>  }
>
>//echo "  What They
Do";
>}
>
>else
>{
>  echo "  $myrow[2]\n";
>}
>  }
>
> ?>
>
>
> Any help would be unendingly appreciated...
>
>
> Keith
>



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



[PHP-DB] Re: any ideas?

2003-06-30 Thread Shivanischal A
hi,

i can think of the following reasons:
1. if its ur query thats failing, then probably the 3 DB tables have columns
with the same name.
- "and que='checked' order by 'name';" is this without conflict?
2. after ur while loop there is an opening curly brace and no matching
closing one. are usure thats not the reason for ur failure?

regards,
-shiva


"Addison Ellis" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> hello and thank you for your time...
> any ideas why this isn't working?
> thank you again. best regards, addison
>
>  $query = "select * from stores,subcategory,category where
> stores.category = $crow->id and subcategory.category = $crow->id and
> (stores.city = '$city' and stores.state = '$state') and que='checked'
> order by 'name'";
> $result = mysql_query($query) or die(mysql_error());
> while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
>  {
> $count++;
> ?>
>
> // url of site with problem: http://www.momandpopcentral.com - select
> a category(arts & crafts) and state(TN) -next page enter
> city(nashville) there is a test store in the db  that will not appear.
> --
> Addison Ellis
> small independent publishing co.
> 114 B 29th Avenue North
> Nashville, TN 37203
> (615) 321-1791
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> subsidiaries of small independent publishing co.
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> addisonellis.com
>
> THIS E-MAIL AND ANY FILES TRANSMITTED WITH IT ARE CONFIDENTIAL  AND
> ARE INTENDED SOLELY FOR THE INDIVIDUAL OR ENTITY TO WHOM THEY ARE
> ADDRESSED.  IF YOU ARE NOT THE INTENDED RECIPIENT, PLEASE DO NOT
> READ, COPY OR RE-TRANSMIT THIS COMMUNICATION BUT DESTROY IT
> IMMEDIATELY.  ANY UNAUTHORIZED DISSEMINATION, DISTRIBUTION OR COPYING
> OF THIS COMMUNICATION IS STRICTLY PROHIBITED.
> A



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



[PHP-DB] Oracle query returning values in sqlplus, but not php.

2003-06-30 Thread Lang Sharpe
Hi all

Here is a test version of my script. It queries the data dictionary view 
ALL_SOURCE. In sqlplus it returns all souce code in the database. In php it 
returns no rows.

The only odd thing about it is that ALL_SOURCE.TYPE is VARCHAR2(12), and 
'PACKAGE BODY' is twelve characters long. When I change 'PACKAGE BODY' to 
'PACKAGE', it does return rows.



Im using PHP 4.3.2 Linked to Oracle 9.2.0.1.0 libraries connecting to oracle 
9.2.0.1.0 database on another machine. Can someone confirm it is only me?

Lang


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



[PHP-DB] Re: connecting to mySQL - testing server specified does not map to the http://localhost/_MMServerScript/MMHTTPDB.php

2003-06-30 Thread phpWalter
I think de-installing mySQL and PHP might be a bit pre-mature, at least at
this point.

(This advise is from years of experience trouble shooting this stuff on my
different systems. take it as it is given, freely and with a helpful hand.
If anyone has issues with this procedure, please advise me with constructive
criticism. I am always looking for a better way)



First, check some things out as individuals...

1) can you connect to mySQL via the mySQL manager?

- If so, then you are good there.

- If not, then un-install and reinstall.

- Make sure this works before you go on

NOTE: I find unstalling and reinstalling a LOT faster than trying to track
down issues on windows machines. Now, this is only a good idea IF you don't
have any real databases running. IF you do, then you need to think hard
about this and dedcide which would be easier; reinstalling and setting up
your databses with the new installation or trying to find the problem.



2) does your Apache serve pages?

- If so, then you are good there.

- If not, then un-install and reinstall.

- Make sure this works before you go on

At this point, may I suggest my configuration.

[NOTE: actually, delay this point until you verify PHP works]

I added a 'conf.d' directory as a sibling to conf directory in my Apache
directory. In there I have all my virtual domains defined (this may not
apply to you.) BUT, I also have my PHP configuration definitions. I don't
place this info in the main apache conf file. To much trouble editing that
thing. I've placed my PHP.conf file at the end of this message. (And yes!
I'm on a Win32 box! I'll leave it to you to see why I don't need a Volume
letter! HINT: Apache, mySQL and PHP are NOT in C:\program Files\...)

3) does your PHP work from the command line?

- If so, then you are good there.

- If not, then un-install and reinstall.

- Make sure this works before you go on



NOTE: To install, my I suggest a new procedure. I know this works on NT and
2k, but I'm not sure about XP (I hope you'll let me know!)

I have a virtual volume (I use G) labeled UNIX (the label is immaterial to
the app, it's for me). On that volume I have etc. home, usr and tmp, just
like my UNIX box. You don't need a virtual volume for this to work, just
make these directories on any working volume you wish to use. I do this
becasue I'm lazy about backups. With my method, I just backup the entire
volume and all my apps and files are ready to be but back if (or I shoudl
say when) I have to re-install windows.

I have PHP installed at etc/php. I did this by hand. I did not use the
installer.

I dropped ALL the DLLs that the install manual said to place in the SYSTEM
directory into that etc/php directory. Then I copied extensions and sapi in
there as well. Then I rename and copied the PHP.exe that was in the CLI
directory to php-cli.exe and placed it in the etc/php directory. This is the
command line executable.

In the php.ini I only had to change 3 lines...

;

; Paths and Directories ;

;

include_path = ".;G:\etc\php\extensions"

extension_dir = "G:\etc\php\extensions"

and then uncomment this line...

extension=php_gettext.dll

Once this is all done, you will need to modify your PATH environmental
variable. I have no idea where that is in XP, but you can find it.

At the end of the existing string add...

;X:\path\to\your\php

Now, X is your volume letter and the complete path to the php directory.

Now, from a command prompt (DOS box) you should be able to key in php and
key in any legal PHP command and get the proper response. And this is from
ANY directory on your system.

Now you can read the Apache conf directions above.

Once that is done, create a test.php file and place it in your apache
default directory and key this in to your browser.

If all is right, you should get back your test page!

If you have any questions, drop me a line.

Hope this helps and not confuse.

phpWalter





# php.conf

# Adding PHP integration

#

# PHP is an HTML-embedded scripting language which attempts to make it

# easy for developers to write dynamically generated webpages.

#

# Un*x version

# LoadModule php4_module modules/libphp4.so

# Windows Win32 version

LoadFile "/etc/php/gnu_gettext.dll"

LoadModule php4_module "/etc/php/sapi/php4apache2.dll"

Action application/x-httpd-php "/etc/php/php.exe"

ScriptAlias /php/ "/etc/php/"

AddType application/x-httpd-php .php .phtml

AddType application/x-httpd-php-source .phps

#

# Cause the PHP interpreter handle files with a .php extension.

#



SetOutputFilter PHP

SetInputFilter PHP

LimitRequestBody 524288



#

# Add index.php to the list of files that will be served as directory

# indexes.

#

DirectoryIndex index.php




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



Re: [PHP-DB] MySQL error message...

2003-06-30 Thread jeffrey_n_Dyke

mysql knows.  this means your query failed, $command resulted in an invalid
result set.  try adding: or die(mysql_error());  to any call to mysql_query
()so in your code use this:

$result  = mysql_query("$command",$mysqlHandle) or die(mysql_error());
- and -
$resultw  = mysql_query("$commandw",$mysqlHandle) or die(mysql_error());

that will give you all the info you need.

hth
jeff



   
 
  Keith Spiller
 
  <[EMAIL PROTECTED]To:   [EMAIL PROTECTED]
   
  ve.com>  cc:   Keith Spiller <[EMAIL 
PROTECTED]> 
   Subject:  [PHP-DB] MySQL error 
message...
  06/30/2003 12:47 
 
  PM   
 
   
 
   
 




Hello,

Does anyone know what would cause this message?

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result
resource in c:\program files\easyphp\www\bod-rse\bod\menu.php3 on line
49...

Here is the code:

\n";
 $count++;
   }

  // IF MENU VALUE == COMMITTEES
   if ($myrow[2] == "Committees")
   {

   echo "
   Committees
 ";

  $currdate = date("Y-m",time());
  $cdate= explode("-" , $currdate);
  $cyear= $cdate[0];
  $cmonth   = $cdate[1];

  if ($cmonth >=7 AND $cmonth <=12) $fyear  = $cyear + 1;
  else  $fyear  = $cyear;
$fyear2 = $fyear - 1;
$syear  = "$fyear2 - $fyear";

$commandw = "SELECT menuname, type, active, name FROM bod_board_boards
WHERE type='committee' AND active='1' ORDER BY name ASC";
$resultw  = mysql_query("$commandw",$mysqlHandle);
while ($myroww = mysql_fetch_row($resultw))
 {
   if ($myroww[0] !="")
{
   echo "  $myroww[0]";
}
 }

   //echo "  What They
   Do";
   }

   else
   {
 echo "  $myrow[2]\n";
   }
 }

?>


Any help would be unendingly appreciated...


Keith


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






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



[PHP-DB] MySQL error message...

2003-06-30 Thread Keith Spiller
Hello,

Does anyone know what would cause this message?

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result
resource in c:\program files\easyphp\www\bod-rse\bod\menu.php3 on line 49...

Here is the code:

\n";
 $count++;
   }

  // IF MENU VALUE == COMMITTEES
   if ($myrow[2] == "Committees")
   {

   echo "
   Committees
 ";

  $currdate = date("Y-m",time());
  $cdate= explode("-" , $currdate);
  $cyear= $cdate[0];
  $cmonth   = $cdate[1];

  if ($cmonth >=7 AND $cmonth <=12) $fyear  = $cyear + 1;
  else  $fyear  = $cyear;
$fyear2 = $fyear - 1;
$syear  = "$fyear2 - $fyear";

$commandw = "SELECT menuname, type, active, name FROM bod_board_boards
WHERE type='committee' AND active='1' ORDER BY name ASC";
$resultw  = mysql_query("$commandw",$mysqlHandle);
while ($myroww = mysql_fetch_row($resultw))
 {
   if ($myroww[0] !="")
{
   echo "  $myroww[0]";
}
 }

   //echo "  What They Do";
   }

   else
   {
 echo "  $myrow[2]\n";
   }
 }

?>


Any help would be unendingly appreciated...


Keith


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



[PHP-DB] Obtaining mysql for php 4.1.2 on Linux

2003-06-30 Thread PHP
Hello,

I'm trying to find the mysql.so module for php 4.1.2 on Linux.  I don't know
which version to use or if mysql is already embedded in the php build.
Another option - how do I build php with mysql enabled?

Thanks,

Brian



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



Re: [PHP-DB] setting session variables via a form

2003-06-30 Thread Terry Romine
Not to beat a dead horse, but I have a problem associated with 
differences between 4.3 and 4.0.6. My local server (Mac OSX) is running 
4.3 and has globals off. I designed the code to run with $_SESSION for 
my log in pages, and they work fine. Then I had to move the files to a 
client's server and discovered that he was running 4.0.6 and globals 
on. Now I have to revise my login scripts to accomodate.

Is there a function like $_SESSION['user_name'] vs. 
$session_register('user_name') that would work on both? I tried 
$HTTP_SESSION_VARS["user_name"] but that didn't keep the user_name 
going into the next page, which causes the login to fail and send back 
to the login page.

Snippets as they are now (for 4.0.6):
// this is the log in page

session_register("user_name");
}
if (session_is_registered("user_name")) {
header("Location: content.php");
exit();
}
.. rest of file
?>
// content.php

	session_start();
	if (!session_is_registered("user_name"))	{
		header("Location: index.php");
		exit();
	}
	
	die("check:".$user_name);	<-- may actually accept the registry of 
user_name but still does not display it

.. rest of file
?>
On Monday, June 16, 2003, at 11:11  AM, Ford, Mike [LSS] wrote:

-Original Message-
From: Hutchins, Richard [mailto:[EMAIL PROTECTED]
Sent: 16 June 2003 17:08
session_start();
session_register("isRegistering");
	$_SESSION["isRegistering"] = "true";
B't!  If you're using the $_SESSION array, then you MUST NOT use 
session_register() and friends.

(Well, ok, maybe that's overstating it a bit, but you still shouldn't 
do it!)

Cheers!

Mike


[PHP-DB] any ideas?

2003-06-30 Thread Addison Ellis
hello and thank you for your time...
any ideas why this isn't working?
thank you again. best regards, addison

$query = "select * from stores,subcategory,category where 
stores.category = $crow->id and subcategory.category = $crow->id and
(stores.city = '$city' and stores.state = '$state') and que='checked' 
order by 'name'";
$result = mysql_query($query) or die(mysql_error());
while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
	$count++;
?>

// url of site with problem: http://www.momandpopcentral.com - select 
a category(arts & crafts) and state(TN) -next page enter 
city(nashville) there is a test store in the db  that will not appear.
--
Addison Ellis
small independent publishing co.
114 B 29th Avenue North
Nashville, TN 37203
(615) 321-1791
[EMAIL PROTECTED]
[EMAIL PROTECTED]
subsidiaries of small independent publishing co.
[EMAIL PROTECTED]
[EMAIL PROTECTED]
addisonellis.com

THIS E-MAIL AND ANY FILES TRANSMITTED WITH IT ARE CONFIDENTIAL  AND 
ARE INTENDED SOLELY FOR THE INDIVIDUAL OR ENTITY TO WHOM THEY ARE 
ADDRESSED.  IF YOU ARE NOT THE INTENDED RECIPIENT, PLEASE DO NOT 
READ, COPY OR RE-TRANSMIT THIS COMMUNICATION BUT DESTROY IT 
IMMEDIATELY.  ANY UNAUTHORIZED DISSEMINATION, DISTRIBUTION OR COPYING 
OF THIS COMMUNICATION IS STRICTLY PROHIBITED.
A 

[PHP-DB] ./configure stupidity

2003-06-30 Thread Nico Sabbi

Hi,

I wonder why at compile time ./configure  doesn't automatically detect what
features are compilable and what not, so as to
build in php as much as possible.

There isn't even such an option available, with the result that everytime I
recompile PHP I end-up missing some group of functions
that I didn't expect to need.



Thanks,
Nico



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



[PHP-DB] Re: HELP PLEEASSSEE

2003-06-30 Thread Nadim Attari
> 
> .
> while($row = mysql_fetch_array($result))
> {
> ?>
> >
>  .
---

USE QUOTES

> .
while($row = mysql_fetch_array($result))
{
?>

 .



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



RE: [PHP-DB] Re: PHP help

2003-06-30 Thread Snijders, Mark
think you miss something


try this : 

print_r($_POST);


cause from a specific php version (above 4) al lthe form vars are in a
special array called ($_POST)   (when submitted by a form)


so you should do:

query="INSERT INTO login VALUES ('$_POST[login]')";

I also removed a "  you got one to many


hope this works!


-mark-




-Original Message-
From: Shivanischal A [mailto:[EMAIL PROTECTED]
Sent: maandag 30 juni 2003 13:13
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: PHP help


> My System:
> Windows 98
> Apache 1.3.27
> PHP 4
> mysql
>
> Hello all, I am a PHP beginner and was wondering if I could get some help
from some of the more experienced on this list.  I have been trying to use
an html form (with textboxes, radio buttons, and textareas) to input data
into a mysql database.  I am able to connect fully with the database and am
able to create tables in it, but when I try to input information into the
tables nothing happens. ever...  I don't really know what to do from here,
but I assume that a configuration is not set properly between mysql, apache,
windows, or php.  I really don't know what it could be.  My code is here and
I have tried to simplify the form in order to get it working, so here is my
barebones code that hopefully has some errors:
> HTML:
> 
> 
> Simplify
> 
> 
> 
> Login: 
> 
> 
> 
> 
>
> PHP file called "addform.php":
>
> 
> $user="chris";
> $database="test";
> mysql_connect(localhost,$user);


localhost should probably be  $localhost  OR'localhost'(?)


> @mysql_select_db($database) or die("unable to select database");
> $query="INSERT INTO login VALUES ("'$login')";


you can safely say -  $query="INSERT INTO login VALUES ('$login')" ;


> mysql_query($query);
> mysql_close();
> ?>
>
> Login is the name of the table on the database named test.
>
> I stopped using a password because it wouldn't let anything work even
table creation when I tried to use a password.  Any help that anyone could
give would be greatly appreciated; there is probably some grievious error in
this script.  Thanks, Chris


mentioning a password should do no harm. try  $query="INSERT INTO login
VALUES ('$login', password($password))";
password() is a mysql function. its irreversible; somehting on the like that
we have on LiNUX systems

regards,
-shiva



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



Re: [PHP-DB] Re: PHP help

2003-06-30 Thread Terry Riley
Surely this will fail because $login has not been defined, by use of 
something like

$login = $_REQUEST['login'];

I tried the naked code as given, and (as expected) got an error - 
undefined variable - $login 

I was under the impression that had to be done for all 'incoming', if it 
was to be used for anything.

Terry Riley

--Original Message-  

> 
>   $query="INSERT INTO login VALUES ('$login')";
> 
> have fun
> 
> 
> Bill Pilgrim wrote:
> > My System:  
> > Windows 98
> > Apache 1.3.27
> > PHP 4
> > mysql
> > 
> > Hello all, I am a PHP beginner and was wondering if I could get some 
> > help from some of the more experienced on this list.  I have been 
> trying to use an html form (with textboxes, radio buttons, and 
> textareas) to input data into a mysql database.  I am able to connect 
> fully with the database and am able to create tables in it, but when I 
> try to input information into the tables nothing happens. ever...  I 
> don't really know what to do from here, but I assume that a 
> configuration is not set properly between mysql, apache, windows, or 
> php.  I really don't know what it could be.  My code is here and I have 
> tried to simplify the form in order to get it working, so here is my 
> barebones code that hopefully has some errors:
> > HTML:
> > 
> > 
> > Simplify
> > 
> > 
> > 
> > Login: 
> > 
> > 
> > 
> > 
> > 
> > PHP file called "addform.php":
> > 
> >  > 
> > $user="chris";
> > $database="test";
> > mysql_connect(localhost,$user);
> > @mysql_select_db($database) or die("unable to select database");
> > $query="INSERT INTO login VALUES ("'$login')";
> > mysql_query($query);
> > mysql_close();
> > ?>
> > 
> > Login is the name of the table on the database named test.
> > 
> > I stopped using a password because it wouldn't let anything work even 
> > table creation when I tried to use a password.  Any help that anyone 
> could give would be greatly appreciated; there is probably some 
> grievious error in this script.  Thanks, Chris

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



[PHP-DB] HELP PLEEASSSEE

2003-06-30 Thread Nabil
I have a form like:


.
.
while($row = mysql_fetch_array($result))
{
?>
>
http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: PHP help

2003-06-30 Thread Shivanischal A
> My System:
> Windows 98
> Apache 1.3.27
> PHP 4
> mysql
>
> Hello all, I am a PHP beginner and was wondering if I could get some help
from some of the more experienced on this list.  I have been trying to use
an html form (with textboxes, radio buttons, and textareas) to input data
into a mysql database.  I am able to connect fully with the database and am
able to create tables in it, but when I try to input information into the
tables nothing happens. ever...  I don't really know what to do from here,
but I assume that a configuration is not set properly between mysql, apache,
windows, or php.  I really don't know what it could be.  My code is here and
I have tried to simplify the form in order to get it working, so here is my
barebones code that hopefully has some errors:
> HTML:
> 
> 
> Simplify
> 
> 
> 
> Login: 
> 
> 
> 
> 
>
> PHP file called "addform.php":
>
> 
> $user="chris";
> $database="test";
> mysql_connect(localhost,$user);


localhost should probably be  $localhost  OR'localhost'(?)


> @mysql_select_db($database) or die("unable to select database");
> $query="INSERT INTO login VALUES ("'$login')";


you can safely say -  $query="INSERT INTO login VALUES ('$login')" ;


> mysql_query($query);
> mysql_close();
> ?>
>
> Login is the name of the table on the database named test.
>
> I stopped using a password because it wouldn't let anything work even
table creation when I tried to use a password.  Any help that anyone could
give would be greatly appreciated; there is probably some grievious error in
this script.  Thanks, Chris


mentioning a password should do no harm. try  $query="INSERT INTO login
VALUES ('$login', password($password))";
password() is a mysql function. its irreversible; somehting on the like that
we have on LiNUX systems

regards,
-shiva



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



[PHP-DB] Re: PHP help

2003-06-30 Thread JeRRy


PHP file called "addform.php":




Okay the line $query is wrong.  So I quote...



$query="INSERT INTO login VALUES ("'$login')";



You have ("'$login')"; ... Why the " before the
'$login?

It should be:

$query="INSERT INTO login VALUES ('$login')";

Goodluck!


http://mobile.yahoo.com.au - Yahoo! Mobile
- Check & compose your email via SMS on your Telstra or Vodafone mobile.

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



[PHP-DB] Re: PHP help

2003-06-30 Thread Pete Morganic
 $query="INSERT INTO login VALUES ('$login')";

have fun

Bill Pilgrim wrote:
My System:  
Windows 98
Apache 1.3.27
PHP 4
mysql

Hello all, I am a PHP beginner and was wondering if I could get some help from some of 
the more experienced on this list.  I have been trying to use an html form (with 
textboxes, radio buttons, and textareas) to input data into a mysql database.  I am 
able to connect fully with the database and am able to create tables in it, but when I 
try to input information into the tables nothing happens. ever...  I don't really know 
what to do from here, but I assume that a configuration is not set properly between 
mysql, apache, windows, or php.  I really don't know what it could be.  My code is 
here and I have tried to simplify the form in order to get it working, so here is my 
barebones code that hopefully has some errors:
HTML:


Simplify



Login: 




PHP file called "addform.php":



$user="chris";
$database="test";
mysql_connect(localhost,$user);
@mysql_select_db($database) or die("unable to select database");
$query="INSERT INTO login VALUES ("'$login')";
mysql_query($query);
mysql_close();
?>
Login is the name of the table on the database named test.

I stopped using a password because it wouldn't let anything work even table creation when I tried to use a password.  Any help that anyone could give would be greatly appreciated; there is probably some grievious error in this script.  Thanks, Chris



-
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!


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