[PHP-DB] MySQL ENCRYPT help!

2005-01-09 Thread Kevin the Linux User
To the PHP Database Mailing-List:

I joined the mailing list for this one question I just can't figure 
out. I used the phpMyAdmin to create table. I placed one row in this table, I 
used the ENCRYPT function. How do I De-Crypt the data I just encrypted to use 
in my PHP code. I encrypted it, for security.

If it's not a bother, can you also give a sniplet of example code, on 
just the part of de-crypting it, I know everything about connecting, and 
displaying, it's just the de-crypting I am having trouble with.

-- 
Thanks,
Kevin the Linux User
Linux! Working together, we build it BETTER!
-- Quote from book, The Joy of Linux/2001

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



[PHP-DB] Re: OK, ahí voy...

2004-03-18 Thread user
Felipe eduardo ortiz lópez wrote:
Mi primera pregunta: ¿PHP tiene algún editor o IDE tipo las que tiene HTML?
Clarifico; por ejemplo puedo trabajar con FrontPage, o el editor de textos,
para generar los archivos HTML, ¿existe algo así para PHP?
My first question: Has PHP some editor or IDE kinda HTML has? I'll be clear:
for instance i can work with FrontPage, or text edito to generate the HTML
files, it does exist something similar for PHP?
_
Felipe Eduardo Ortiz López,
Consultor.
Tiammat Software.
Yahoo! Messenger: tiammatsoftware
MSN Messenger: [EMAIL PROTECTED]
http://www.prodigyweb.net.mx/tiammat/default.html
Ammm.. pues mira, si lo que nececitas es un editor hay varios, depende 
en que plataforma vayas a trabajar.
Linux: Vim, Emacs, nano, etc... (vim y emacs te marcan el codigo)

Windows: PHP Edit, Dreamweaver, etc... (Dream y Edit te marcan el 
codigo, phpedit tienen algunas funciones ya pre-realizadas nadamas 
especificas datos.)

y esas son las opciones, si quieres ralizar la web por completo en php 
en forma facil, como frontpage realiza los html, creo que te va a costar 
encontrar algo asi ;) nos vemos.

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


[PHP-DB] Re: Help with SQLite and ADOdb

2004-02-23 Thread user
@domain.invalid
hmmm???
HMMM indeed
Many hosts there days offer mysql and PHP on default. 
I could point you in the write direction if your
willing to pay around $5 - $10 a month on hosting. 
Which is quite reasonable for the kind of service you
get and services (more importantly).
Yes, I know but (at this point) it's out of my hands :-(

The site is being hosted by http://valueweb.com basic their package is 
$17.95/month (USD).

What's that's you say a MySQL, that'll be additonal $15.95/month.

My other thought is embedding MySQL(or SQLite) sever, which from what 
I've read so far is makeing a call to libmysqld?

Any experiences with this type of thing?

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


Re: [PHP-DB] Embedded MySQL server (libmysqld)?

2004-02-23 Thread user
Ricardo Lopes wrote:
The libmysqld is meant to be used as a database server embeded into
application, not a replace or a lighter version of a database server, it
can´t be used with php to provide a web page to the internet in the way i
tink you want.
The way of using libmysql is for what i read the same way you would use a
mysql database.
It could be used with php to create a dinamic webpage into a cdrom with a
read-noly database.
If you dont want to pay the extra $$$ you could use plain text files, or use
a driver to treat text-files as databases, you can execute sql instructions
as if you were using a database but the results asre saved/fetched from a
textfile, is a slower but cheaper solution.
Ricardo --
Thanks or you reply.
Unfortunitly the question of hostinga package is out of my hands.
If the PHP provides SQL -text file pleae point me to the man page?
Is it sometihng like SQLcsv ?
TIA,
David
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Embedded MySQL server (libmysqld)?

2004-02-23 Thread user
Ricardo Lopes wrote:

You can use:

- txtSQL http://txtsql.sourceforge.net/

Is not provided in php, you have to install it to the folder were you have
your scripts or reachable by it.
The sintax is not exactly as sql but is similar, the documentation included
seems to be very good.
I dont know if it does everything you need but it appears to have an fairly
complete list of features avaliable the main drawback is compatibility (the
sql instructions are not sql standard) and speed (its slower, but probably
you wont even notice it).
Good Luck

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 23, 2004 3:29 PM
Subject: Re: [PHP-DB] Embedded MySQL server (libmysqld)?


Ricardo Lopes wrote:

The libmysqld is meant to be used as a database server embeded into
application, not a replace or a lighter version of a database server, it
can´t be used with php to provide a web page to the internet in the way
i

tink you want.

The way of using libmysql is for what i read the same way you would use
a

mysql database.
It could be used with php to create a dinamic webpage into a cdrom with
a

read-noly database.

If you dont want to pay the extra $$$ you could use plain text files, or
use

a driver to treat text-files as databases, you can execute sql
instructions

as if you were using a database but the results asre saved/fetched from
a

textfile, is a slower but cheaper solution.
Ricardo --
Thanks or you reply.
Unfortunitly the question of hostinga package is out of my hands.
If the PHP provides SQL -text file pleae point me to the man page?
Is it sometihng like SQLcsv ?
TIA,
David
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Thanks, I'll have a look.
Does ADOdb povide text functions?
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Embedded MySQL server (libmysqld)?

2004-02-23 Thread user
Howdy --
Would someone point or provide me with an example of PHP + libMysqld 
(Embedded MySQL server)?

 My problem is my churchs web site doesn't provide a MySQL database as 
a default package (add $15.95/mo)for a MySQL Db.

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


Re: [PHP-DB] Embedded MySQL server (libmysqld)?

2004-02-23 Thread user
Adam Voigt wrote:
Check these guys out:

http://spenix.com/WebHostingPlans.aspx

Very cheap, very reliable, great features, and support is second to none
I've ever experienced, and before you ask, no I'm not now nor have I
ever been an employee or shareholder. =) Just a satisfied customer.
Admin --
There is no shortage of good cheap hosting package.
The choice of hosting providers is out of my hands.
What I'm looking for is a way to implement a  relational database in 
docuument_root of the web site (ie. /home/username)?

David

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


[PHP-DB] MySQL-4.x.x and md5 password?

2004-02-23 Thread user
Howdy --
The following code bite, works with MySQL-2.x.x but not with MySQL4.x.x.
Any suggestions.

One other note, I'm using the DBal (database layer) from phpBB forum.

TIA,
David
- login.php -
if ( $_SERVER['QUERY_STRING'] == 'logout' )
{
	setcookie('lb_user', NULL, time(), 
str_replace(basename($_SERVER['REQUEST_URI']), '', 
$_SERVER['REQUEST_URI']), $_SERVER['HTTP_HOST']);
	setcookie('lb_pass', NULL, time(), 
str_replace(basename($_SERVER['REQUEST_URI']), '', 
$_SERVER['REQUEST_URI']), $_SERVER['HTTP_HOST']);
	header(Location: index.{$phpEx});
}

if ( !empty($_POST['uname'])  !empty($_POST['pword']) )
{
	$sql = SELECT user_pass FROM {$db-prefix}users WHERE 
user_name='$_POST[uname]';;
	$query = $db-sql_query($sql);
	$result = $db-sql_fetchrowset($query);
	
	if ( count($result) ==1 )
	{

		if ( md5($_POST['pword']) == $result[0]['user_pass'] )
		{
			setcookie('lb_user', $_POST['uname'], NULL, 
str_replace(basename($_SERVER['REQUEST_URI']), '', 
$_SERVER['REQUEST_URI']), $_SERVER['HTTP_HOST']);
			setcookie('lb_pass', md5($_POST['pword']), NULL, 
str_replace(basename($_SERVER['REQUEST_URI']), '', 
$_SERVER['REQUEST_URI']), $_SERVER['HTTP_HOST']);
			header(Location: index.{$phpEx});
		}
	}
}

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


[PHP-DB] Re: [PHP] Re: [PHP-DB] Embedded MySQL server (libmysqld)?

2004-02-23 Thread user
Adam Voigt wrote:
Alright, well with any txt based system, your probably going to run into
problems with multi-users (multiple browsers) updating the DB.
Reguardless, if you must use txtbased, I recommend SQL-Lite, it supports
SQL statements, and is very small and very fast.
http://www.sqlite.com
Quoting myself(
What I'm looking for is a way to implement a  relational database in 
docuument_root of the web site (ie. /home/username)?
)
David
Adam,
Thanks for your repsone(s) now back the root of the problem.
As stated above I need to be able to run the database from with the home 
direcory/document root?

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


[PHP-DB] Help with SQLite and ADOdb

2004-02-21 Thread user
I'm working on a website whose hosting package doesn't include any db 
(except maybe gdbm).

I've install sqlite in the home directory.
The question is what adjustment do I have to make to my PHP script and ADOdb
in order for it to exicute SQLite in from the account home direcory?
TIA,
Davd
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] ODBC Query max()

2003-03-12 Thread Squirrel User
I'm trying to extract one record that has largest sequence ID number for an 
employee, so I've tried below but doesn't work.  Help.

$mQuery = EmployeeID = '$user';
$mCur = odbc_exec( $mCnx, select ID=max(ID),Date,TimeIn,TimeOut,StationIP 
from Clocks where $mQuery );


-
This mail sent through ISOT.  To find out more 
about ISOT, visit http://isot.com

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



[PHP-DB] Receiving ARRAY from Forms

2003-02-20 Thread Squirrel User
I tried the following code but all I get back is Array.  I'm trying to pass 
a huge array.

?
if( isset( $submit ) )
{
echo array list:br;
print_r( $eList );
$submit = ;
}
else
{
$mList = array();
$mList[0] = 1. hello;
$mList[1] = 2. there;
$mList[2] = 3. How are you;

$fShow = EOD
pPress Submit Button to test/p
form method=POST action=$PHP_SELF name=Test Array
  pinput type=submit value=Submit name=submit
  input type=reset value=Reset name=B2/p
  input type=hidden name=eList[] value=$mList
  /form
EOD;

echo $fShow;
}
?


-
This mail sent through ISOT.  To find out more 
about ISOT, visit http://isot.com

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




Re: [PHP-DB] Help with ADDUSER from linux

2003-02-18 Thread Squirrel User
adduser script is written in perl.  You can easily disect it.

Quoting Bruno Pereira [EMAIL PROTECTED]:

 How can i create a new user, with linux, apache and php?
 Like this, in a form i ask for the username and password, than somehow use
 the 'adduser' username password confirm password.
 Can someone help me?
 
 
 Cumprimentos
 
 Bruno Pereira
 [EMAIL PROTECTED]
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 




-
This mail sent through ISOT.  To find out more 
about ISOT, visit http://isot.com

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




[PHP-DB] Passing ARRAY through URL

2003-02-07 Thread Squirrel User
Help.  I've tried to pass large array through URL but it keep telling me page 
can not be displayed:

? // page1.php
$mList = arrary();
...// fill array with values
$mList = urlencode( serialize( $mList ) );
header( location: page2.php?mL=$mList );
?

? // page2.php
$mList = stripslashes( unserialize( $mL ) );
print_r( $mList );
?



-
This mail sent through ISOT.  To find out more 
about ISOT, visit http://isot.com

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




Re: [PHP-DB] $_FILES missing path

2003-02-06 Thread Squirrel User
I searched for PHP script for selecting a file, but couldn't find small simple 
ones.  Well, I could write a script using opendir() and link a url to each.  
Geez, but I was hoping that someone has already done that...


Quoting Squirrel User [EMAIL PROTECTED]:

 form method=POST action=$PHP_SELF name=My Test Form 
 ENCTYPE=multipart/form-data
 
 print_r($_FILES) doesn't show full path of the filename I selected.  I'm not
 
 trying to upload but just need to be able to open the file for viewing.
 
 Help.
 


-
This mail sent through ISOT.  To find out more 
about ISOT, visit http://isot.com

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




RE: [PHP-DB] odbc query with single quote in string

2003-02-05 Thread Squirrel User
The 1st one didn't work, but the 2nd one did work.  Fantastic!  Thanks alot, 
you saved me from frustrations.

Quoting John W. Holmes [EMAIL PROTECTED]:

  I'm having problem querying a table with a field value containing an
  appostropy, please help.  Using ODBC to connect MSAcess database.
  
 $mQuery = CustomerID='$mCust';
 $mCur2 = odbc_do( $mCnx, select Login from Emails where $mQuery
 );
  
  When it hits O'Donald, James, I get error in odbc_exec().  I tried
  variations of $mQuery, including:
  
 $mQuery = addslashes( $mQuery );
 
 You don't want to use addslashes() on $mQuery, you want to use it on the
 data you're inserting between the quotes, i.e. $mCust. 
 
 $mQuery = CustomerID=' . addslashes($mCust) . ';
 
 If that still causes an error, your database may require quotes to be
 escaped with another quote, instead of a backslash. In that case, you
 can create a function like this
 
 function addslashes2($data)
 { return str_replace(','',$data); }
 
 Hope that helps.  
 
 ---John W. Holmes...
 
 PHP Architect - A monthly magazine for PHP Professionals. Get your copy
 today. http://www.phparch.com/
 
 
 




-
This mail sent through ISOT.  To find out more 
about ISOT, visit http://isot.com

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




[PHP-DB] odbc query with single quote in string

2003-02-04 Thread Squirrel User
I'm having problem querying a table with a field value containing an 
appostropy, please help.  Using ODBC to connect MSAcess database.

   $mQuery = CustomerID='$mCust';
   $mCur2 = odbc_do( $mCnx, select Login from Emails where $mQuery );

When it hits O'Donald, James, I get error in odbc_exec().  I tried 
variations of $mQuery, including:

   $mQuery = addslashes( $mQuery );

-
This mail sent through ISOT.  To find out more 
about ISOT, visit http://isot.com

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




Re: Fw: [PHP-DB] whats wrong with my sql insert statement?

2002-09-10 Thread user

my input.html has errors in it.
wrong
form method=post action=input.php enctype=multipart/form-data
correct
form method=POST action=input.php

strange thing is it used to work. anyhow thanks for the help.


Nikos wrote:
Try remove (;) at the end of the expresion, before quote (): VALUES
('$first_name','$location','$phone', '$blabla')...(;)...

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 10, 2002 4:38 AM
Subject: Re: [PHP-DB] whats wrong with my sql insert statement?



Thanks for your suggestions.
first my /etc/php.ini
register_globals = on
second i made the change as you suggested and i added a
[$blabla = truly random;]
when the input.php is excuated, 'blabla' value is inserted into the
table. '$first_name' is still left blank.
this leads me to believe that '$first_name' is blank to start with!
somehow the input.html gives input.php blank $first_name , $location .
care to look at my input.html ? thanks alot.

#
?php

$db_name =cheese_catalog;
$table_name = user;
$blabla =  bla bla;
$connection = @mysql_connect(localhost,test,new0pass) or
die(Couldn't Connect.);
$db = @mysql_select_db($db_name, $connection) or die(Couldn't select
database.);
if (none_required==none_required) {

$sql = INSERT INTO $table_name (first_name,location,phone,messages)
VALUES ('$first_name','$location','$phone', '$blabla');;
$result = @mysql_query($sql, $connection) or die(Error #.
mysql_errno() . :  . mysql_error());

include(input_added.html);

}

?
#


Michael Hazelden wrote:

Hi there,

Two things:

(a) in my experience - you should use single quotes in your query to
surround the values and so you don't need to escape them either (e.g.
'$first_name')

and (b) Make sure register_globals is on - otherwise you need to use
$_POST[first_name]

Cheers,

Michael.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 10 September 2002 01:15
To: [EMAIL PROTECTED]
Subject: [PHP-DB] whats wrong with my sql insert statement?


Hi
I am using redhat 7.3 with mysql-3.23.49-3 php-4.1.2-7.3.4
apache-1.3.23-11.
I want to insert few values into a mysql table. This input.php sort
works. it will add a new entray to the table but with blank values.

 What
 
did I do wrong?
#
#
# file name input.php
?php

$db_name =cheese_catalog;
$table_name = user;
$connection = @mysql_connect(localhost,test,test) or

 die(Couldn't
 
Connect.);
$db = @mysql_select_db($db_name, $connection) or die(Couldn't select
database.);
if (none_required==none_required) {

$sql = INSERT INTO $table_name (first_name,location,phone,messages)
VALUES (\$first_name\,\$location\,\$phone\, \$messages\);;
$result = @mysql_query($sql, $connection) or die(Error #.
mysql_errno() . :  . mysql_error());

include(input_added.html);

}

?
#

# file name input.html
#
html
head
titleNew Record/title
/head
body
pPlease fill out the following information:/p
form method=post action=input.php enctype=multipart/form-data
table width=100% border=0 cellspacing=3 cellpadding=3
  tr
   td width=25%first_name:/td
   td width=75%input name=first_name type=text

 size=40
 
maxlength=255 value=/td
  /tr
  tr
   td width=25%location:/td
   td width=75%input name=location type=text size=40
maxlength=255 value=/td
  /tr
  tr
   td width=25%phone:/td
   td width=75%input name=phone type=text size=40
maxlength=255 value=/td
  /tr
  tr
  td width=25%messages:/td
   td width=75%input name=messages type=text size=40
maxlength=255 value=/td
  /tr
  tr
   td width=25%nbsp;/td
   td width=75% align=leftinput type=submit
name=submit value=Enternbspinput type=reset

 name=reset/td
 
  /tr
/table
/form
/body
/html
#
#







--
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] whats wrong with my sql insert statement?

2002-09-09 Thread user

Hi
I am using redhat 7.3 with mysql-3.23.49-3 php-4.1.2-7.3.4 
apache-1.3.23-11.
I want to insert few values into a mysql table. This input.php sort 
works. it will add a new entray to the table but with blank values. What 
did I do wrong?
#
#
# file name input.php
?php

$db_name =cheese_catalog;
$table_name = user;
$connection = mysql_connect(localhost,test,test) or die(Couldn't 
Connect.);
$db = mysql_select_db($db_name, $connection) or die(Couldn't select 
database.);
if (none_required==none_required) {

$sql = INSERT INTO $table_name (first_name,location,phone,messages) 
VALUES (\$first_name\,\$location\,\$phone\, \$messages\);;
$result = mysql_query($sql, $connection) or die(Error #. 
mysql_errno() . :  . mysql_error());

include(input_added.html);

}

?
#

# file name input.html
#
html
head
titleNew Record/title
/head
body
pPlease fill out the following information:/p
form method=post action=input.php enctype=multipart/form-data
table width=100% border=0 cellspacing=3 cellpadding=3
  tr
   td width=25%first_name:/td
   td width=75%input name=first_name type=text size=40 
maxlength=255 value=/td
  /tr
  tr
   td width=25%location:/td
   td width=75%input name=location type=text size=40 
maxlength=255 value=/td
  /tr
  tr
   td width=25%phone:/td
   td width=75%input name=phone type=text size=40 
maxlength=255 value=/td
  /tr
  tr
  td width=25%messages:/td
   td width=75%input name=messages type=text size=40 
maxlength=255 value=/td
  /tr
  tr
   td width=25%nbsp;/td
   td width=75% align=leftinput type=submit 
name=submit value=Enternbspinput type=reset name=reset/td
  /tr
/table
/form
/body
/html
#
#




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




Re: [PHP-DB] whats wrong with my sql insert statement?

2002-09-09 Thread user

Thanks for your suggestions.
first my /etc/php.ini
register_globals = on
second i made the change as you suggested and i added a
[$blabla = truly random;]
when the input.php is excuated, 'blabla' value is inserted into the 
table. '$first_name' is still left blank.
this leads me to believe that '$first_name' is blank to start with! 
somehow the input.html gives input.php blank $first_name , $location .
care to look at my input.html ? thanks alot.

#
?php

$db_name =cheese_catalog;
$table_name = user;
$blabla =  bla bla;
$connection = @mysql_connect(localhost,test,new0pass) or 
die(Couldn't Connect.);
$db = @mysql_select_db($db_name, $connection) or die(Couldn't select 
database.);
if (none_required==none_required) {

$sql = INSERT INTO $table_name (first_name,location,phone,messages) 
VALUES ('$first_name','$location','$phone', '$blabla');;
$result = @mysql_query($sql, $connection) or die(Error #. 
mysql_errno() . :  . mysql_error());

include(input_added.html);

}

?
#


Michael Hazelden wrote:
 Hi there,
 
 Two things:
 
 (a) in my experience - you should use single quotes in your query to
 surround the values and so you don't need to escape them either (e.g.
 '$first_name')
 
 and (b) Make sure register_globals is on - otherwise you need to use
 $_POST[first_name]
 
 Cheers,
 
 Michael.
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: 10 September 2002 01:15
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] whats wrong with my sql insert statement?
 
 
 Hi
 I am using redhat 7.3 with mysql-3.23.49-3 php-4.1.2-7.3.4 
 apache-1.3.23-11.
 I want to insert few values into a mysql table. This input.php sort 
 works. it will add a new entray to the table but with blank values. What 
 did I do wrong?
 #
 #
 # file name input.php
 ?php
 
 $db_name =cheese_catalog;
 $table_name = user;
 $connection = @mysql_connect(localhost,test,test) or die(Couldn't 
 Connect.);
 $db = @mysql_select_db($db_name, $connection) or die(Couldn't select 
 database.);
 if (none_required==none_required) {
 
 $sql = INSERT INTO $table_name (first_name,location,phone,messages) 
 VALUES (\$first_name\,\$location\,\$phone\, \$messages\);;
 $result = @mysql_query($sql, $connection) or die(Error #. 
 mysql_errno() . :  . mysql_error());
 
 include(input_added.html);
 
 }
 
 ?
 #
 
 # file name input.html
 #
 html
 head
 titleNew Record/title
 /head
 body
 pPlease fill out the following information:/p
 form method=post action=input.php enctype=multipart/form-data
 table width=100% border=0 cellspacing=3 cellpadding=3
   tr
td width=25%first_name:/td
td width=75%input name=first_name type=text size=40 
 maxlength=255 value=/td
   /tr
   tr
td width=25%location:/td
td width=75%input name=location type=text size=40 
 maxlength=255 value=/td
   /tr
   tr
td width=25%phone:/td
td width=75%input name=phone type=text size=40 
 maxlength=255 value=/td
   /tr
   tr
   td width=25%messages:/td
td width=75%input name=messages type=text size=40 
 maxlength=255 value=/td
   /tr
   tr
td width=25%nbsp;/td
td width=75% align=leftinput type=submit 
 name=submit value=Enternbspinput type=reset name=reset/td
   /tr
 /table
 /form
 /body
 /html
 #
 #
 
 
 
 



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




[PHP-DB] Re: obdc_pconnect problems

2002-09-06 Thread user

Escuder Nicolas wrote:
 Hello,
 
 i use php as not a cgi it is include in my apache
 my odbc is a custom odbc driver
 
 
 so i try to use odbc_pconnect, the first time it connect to the db i saw the 
connection tcp by netstat
 and the next time (on the next page) i reuse pconnect with the same db user pass and 
sql cursor but it open 
 a new connection, i see two connection with netstat ... and more connection if i go 
another page ...
 
 i don't understand why ...
 
 see you
 
 nicolas.
 

I believe the reason is because the persistent connections are
per httpd process. As you navigate through you web site you
cannot control which httpd process the main server hands your
request off to. Eventually, all httpds will have a connection.

Martin


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




[PHP-DB] Re: PHP and msql Error

2002-06-27 Thread user

The error is in your MySql statement.  Sounds like you are calling the 
wrong data field / column.  Check you spelling and syntax to make sure 
all of that is in order.  If you can't find it, copy it and post it. 
We'll help you out

gl -- Seth

Comp Boy wrote:

  I am getting the following error:
  
  Warning: Supplied argument is not a valid mSQL result resource in
  /usr/local/apache/htdocs/inc/listings.inc on line 24
  
  listings.inc: 24
  $numRows = msql_numrows( $result );
  
  The manual on php.net says that it takes no variables msql_numrows(void)
  however it says it is another version of msql_num_rows(int msql);
  
  The code I am trying to run, runs perfectly fine on another one of our
 systems.  I was just setting up a development server and now I am getting
 this problem.  The specs are the same except for the version of Apache
 production is 1.3.9 and development is 1.3.26
  
  PHP vesrion 4.1.2
  
  ./msqladmin version
  Version Details :-
  msqladmin version   2.0.11
  mSQL server version 2.0.11
  mSQL protocol version   23
  mSQL connection Localhost via UNIX socket
  Target platform Linux-2.2.14-5.0-i686
 
 PHP was configured:
 ./configure --with-apxs=/usr/local/apache/bin/apxs --with-msql
 
 msql was a default install.
 
 Does anyone know what I did wrong?  Do I need to recompile with some
 different options?
 
 TIA
 Jason
 
 


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




[PHP-DB] Re: MySQL - Left Join Question

2002-06-26 Thread user

You might think about adding comparison operators to the statement to 
help narrow the search.

i.e.  A LEFT JOIN B
  ON a.id = b.id
  WHERE a.value = b.value
  AND a.value2 = b.value2
  OR a.value3 = b.value3

The MySQL website provides documentation dealing with comparison 
operators and the WHERE statement.



Monty wrote:

 A LEFT JOIN B
 ON a.id = b.id
 
 If I issue the above MySQL SELECT condition and there is more than one
 record in B that could potentially be joined to a record in A, is there a
 way to tell MySQL which of the two records from B to choose for the join
 with A?
 
 


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




[PHP-DB] Re: never seen this before..

2002-06-24 Thread user

TIA --


column in your table denotes your primary key? After that, how is it 
incremented? Is it auto or do you have some other form of it.  I think 
your code is correct so the error seems to be how the data ID is generated.

gl -- Seth

Jas wrote:

 I am getting an error when inserting data into a mysql database table.  It
 is telling me that there is a duplicate entry in the database everytime it
 gets 10 records inserted to the table, if I flush the table and try it again
 it works fine.  Is there some kind of limit on some tables?  Here is the
 error php outputs once the table gets 10 records: Duplicate entry '10' for
 key 1
 Here is the code...
 require '/home/web/b/bignickel.net/scripts/admin/db.php';
  $table = demo_sessions;
  $sql_insert = INSERT INTO $table (ipaddy,date) VALUES
 ('$ipaddy','$date') or die('Could not insert client info');
  $result = mysql_query($sql_insert,$dbh) or die(MYSQL_ERROR());
 
 Any help on this would be great
 TIA
 Jas
 
 
 


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




[PHP-DB] Re: check two tables at same time?

2002-06-24 Thread user

You are correct in your statements.  your SQL statement would look like 
this...

$query = mysql_query(SELECT *
  FROM Table1, Table2
  WHERE Table1.Value = Table2.Value
 );

your Values could be the primary key of each table any other values that 
you would like to use to match rows.

gl -- Seth

Noah Spitzer-Williams wrote:

 hey guys,
 
 im trying to figure out a query that i can return rows from more than
 one table at a time. for example, i have two identical tables in structure
 and i want to return rows from both using one query. maybe this will help:
 
 select * from table1 and table2 where condition='value'
 
 is there any way to do this?
 
 thanks!
 
 - Noah
 
 --
 TradeMyTraffic! Web Services
 http://www.trademytraffic.com
 
 
 
 


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




Re: [PHP-DB] what the heck? (elementary question)

2002-06-24 Thread user

Keep with Christophers original statement.

It is more efficient to not have large echo values.

gl -- Seth

[EMAIL PROTECTED] wrote:

 - Original Message - 
 From: Cosby, Christopher [EMAIL PROTECTED]
 
I don't want to start a tangent here, but the most accepted way for
generating HTML with PHP is to NOT generate HTML with PHP.  Thus, the
original code should be written like this:

 
 Huh?  .. most accepted way for generating ...is NOT generate..?
 Brain fart?  =)
 
 I will regularly use large echo style statements to generate HTML, especially
 SELECT tags and result tables.
 
 
As far as the POST/GET question, you technically can use POST and GET
methods simultaneously, but it's nasty.  For best results, stay away from
the register_globals functionality and use $HTTP_POST_VARS[] and
$HTTP_GET_VARS[] instead.

 
 Both of which are deprecated.  =(  _GET _POST are the new ones.
 
 POST will allow larger form submits as well, like file uploads.  GET are for 
 smaller and faster data sets.
 
 
Go to WeSellBooksByTheMillions and buy a good PHP book for reference.  They
have lots of basics like this in them.  I prefer most anything from Wrox
Press (http://www.wrox.com/)

 
 www.php.net
 www.phpbuilder.com
 
 RIP Computer Literacy bookstores after the Barnes and Noble acquisition.
 
 -Mike
 
 
 


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




[PHP-DB] Finding numbers in a string

2002-06-21 Thread user

Hello all -

I am trying to seperate numberic characters from a string.  The book I 
was looking at described something like this:


if(ereg([[:alnum]]+, $textandnumbers, $numbers)) {
print($numbersBR);
  }


When I run my script I receive this error:

Warning: REG_ECTYPE in ../mypage.php


Anyone have a solution / explanation to my problem

  - still reading


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




[PHP-DB] Re: MySQL Query Acting Up

2002-06-20 Thread user

in your   SET title=\$title\,   statement you forgot the second 
backslash before the double quote.  I would start there.

Martin Clifford wrote:

 Howdy all,
 
 If someone call tell me why this MySQL query is not working, I'd be VERY thankful.  
I don't see a damn thing wrong with it, but I could have been looking at it too long.
 
 Here is the query:
 
 $query = UPDATE articles2 SET title=\$title, brief=\$brief\, 
doclink=\$doclink\ WHERE article_id=\$id\;
 $result = mysql_query($query, $connect)
  or die(mysql_error());
 
 No errors are produced, yet the query doesn't do anything.  Nothing in the row 
changes.  Any help would be appreciated!
 
 Martin
 
 


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




[PHP-DB] Re: mysql_fetch_array() doesn't work

2001-09-30 Thread Web user

Hello,
First, Thank you all for your help!
I  finally found the reason for why does  the IE always show info as below:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
`T_NUM_STRING' in c:\program files\apache
group\apache\htdocs\web\site1\list.php on line --[the number of line]

It is because the echo (including print) doesn't work at the line
below,
echo trtda href=\profile.php?id=$arr['user_id']\  target='_top';
showing the error info as I mentioned. ( but it should work according to PHP
books)

It only works when  the $arr['user_id'] is out of the quotes.
echo trtda href=\profile.php?id=.$arr['user_id'].\
target='_top';
then IE showed no error any longer.

So I have to let all $arr['key']  out of the quotes, then the scripts are
Ok.

Regards
Mike










-- 
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] mysql_fetch_array() doesn't work

2001-09-26 Thread Web user

System: PHP4.06 + Mysql3.23.41 Win32 + Apache 1.3.20 Win32 + Win98

When PHP is running at the line: $arr=mysql_fetch_array($res);
The IE always show info as below:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
`T_NUM_STRING' in c:\program files\apache
group\apache\htdocs\web\site1\list.php on line --[the number of line]

What's the problem wiht mysql_fetch_array() or other?
What does the T_STRING' or `T_VARIABLE' or `T_NUM_STRING' mean?

THANKS
Mike


The full code below:

-

?
$link=mysql_connect(localhost,,);
if($link==false){
echo Failed linking to database.;
exit();
}
$handler=mysql_select_db(database1);
if($handler==false)
echo Failed linking to database.;
$query=selct count(*) from users where sign=1;
$res=mysql_query($query);
$row=mysql_fetch_row($res);
$all=$row[0];
$step=5;
$pages=ceil($all/$step);   /*the number of pages needed to listed */
if(empty($offset))
$offset=0;
$query=select user_id, user_name, time, status, comment from users
where sign=1
order by user_name
limit $offset, $step;
$res=mysql_query($query);
echo tabletd align=centerUser/td
td align=centerAdded time/tdtd align=centerStatus/td/tr;
$num=mysql_num_rows($res);
for($i=0; $i$num; $i++) {
$arr=mysql_fetch_array($res);   /* HERE is line where the error occurs!!!
*/
echo trtd align=centera href=\profile.php?id=$arr['user_id']\
target='_top'
$arr['user_name']/a/td;
echo td align=center$arr['time']/td;
echo td align=center$arr['status']/td/tr;
echo tr colspan=3td$arr['comment']/td/tr;
}

echo /tablebrbrbr;

echo tabletrtd align='center';  /* show others in multi-pages */
for($i=0; $i$pages; $i++){
echo a href='$PHP_SELF?offset=$i*$step' target='_top'
echo ($i+1)./a;
echo nbsp;nbsp;;
}
echo /td/tr/table;

?


-
create table users (
user_id int not null auto_increment primary key,
user_name varchar(30),
time datetime,
status tinyint(1),
comment text,
sign tinyint(1) default '1'
);






-- 
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] mysql_fetch_array() doesn't work

2001-09-25 Thread Web user

System: PHP4.06 + Mysql3.23.41 Win32 + Apache 1.3.20 Win32 + Win98

?
..
..
$res=mysql_query($query);
$num=mysql_num_rows($res);
for($i=0; $i$num; $i++){
$arr=mysql_fetch_array($res);
...
}
...


When PHP is running at the line: $arr=mysql_fetch_array($res);
The IE always show info as below:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
`T_NUM_STRING' in
c:\program files\apache group\apache\...\page.php on line ...

What's the problem wiht mysql_fetch_array() or other?

Thanks!
Mike





-- 
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] PHP and ms Access

2001-08-31 Thread user

Hello,

I am builing a microsoft access database.

Now wants the compagny I created it for me to use it to make dynamic
webpages. The problem is that I am new at this.

Can somebody please explain the basics of integrating a MS Access databse
with php into a webpage?

I thank you in advance,

TheB'Oss

//Could you please mail the answer to [EMAIL PROTECTED]

Thx



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

2001-02-07 Thread PHP user
HI!

I am Japanese in Tokyo.
How about you? I still have a question.

initial condition
1)  three are many *html in my SQL ex:xxx.html,and yyy.html 
2)I have domain ex: abc (ex: http://www.abc.com)
3)database  name : aaa
4)table name :bbb


I want to try next step.
when I type in URL from brouze ,ex http://www.abc.com/xxx.html .
I can get xxx.html from my SQL.
when I type in URL from brouze ,ex http://www.abc.com/yyy.html
I can get yyy.html from my SQL.
How can I do this?
Is it posible to create it?


Please answer for me.


Thank you
yui

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