Re: [PHP-DB] Windoze crashes on this simple logon script.

2001-02-16 Thread Phil Driscoll

I suspect that what is going on is that your code is just going around in
circles - the redirect is just opening the same page over and over again
because your logic is flawed somewhere. Instead of outputting the location
header, output an a href= instead and echo out sundry values until you find
what's going wrong.

Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org


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

2001-02-16 Thread Russ Michell

$con = mysql_connect($DB_SERVER, $DB_USER, $DB_PASS)
or die ("Cant connect");
mysql_select_db($DB_NAME);

Try:

$con = mysql_connect($DB_SERVER, $DB_USER, $DB_PASS)
or die ("Cant connect");
mysql_select_db($DB_NAME, $con);

Also try and make your php functions like so: mysql_x() instead of: 
mysql_x () (loose the gap!)

Hope that helps somewhat! ;)

Russ

#---#

 "Believe nothing - consider everything"

  Russ Michell
  Anglia Polytechnic University Webteam
  http://gertrude.sipu.anglia.ac.uk/webteam
  [EMAIL PROTECTED]
  +44 (0)1223 363271 ext 2331
  
  www.theruss.com

#---#


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

2001-02-16 Thread Sridhar Ranganathan

Hi,

I have a search engine. It finds articles and displays the headings. When I 
click on the heading, I wanna load the article using a single page on the 
fly.

I did as follows. $h is the heading.

echo("font size='4' color='#003399'$hbr/fontfont size='1'a 
href='articleload.php?head=$h'Read This/a/fontbrbrHR noShade 
SIZE=1 width='80%'");

In articleload.php, I printed $head but, it prints only the first word of 
the heading. Can anyone help me?

Thanks in advance
Sridhar Ranganathan
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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

2001-02-16 Thread Marc Bragg


Is it possible to post to two forms with one click, one post command?
What would statement look like?


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

2001-02-16 Thread Marc Bragg

Does the first field in a form have special significance?
Have two fields in table:

last_name
member_id

member_id is key and autoincrement.

mysql won't accept two last names as same when last_name is first field.

when member_id is made first field, then can input same last name into
last_name field.

why is that?


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

2001-02-16 Thread phobo

No you cant.

What are you trying to do?

Siggy


- Original Message - 
From: "Marc Bragg" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, February 17, 2001 9:53 AM
Subject: [PHP-DB] double "posts"


 
 Is it possible to post to two forms with one click, one post command?
 What would statement look like?
 
 
 -- 
 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 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] double posts

2001-02-16 Thread JJeffman

Using a JavaScript function instead of the "action" form property I think is
possible .

HTH.

Jayme.

-Mensagem Original-
De: Marc Bragg [EMAIL PROTECTED]
Para: [EMAIL PROTECTED]
Enviada em: sexta-feira, 16 de fevereiro de 2001 17:53
Assunto: [PHP-DB] double "posts"



 Is it possible to post to two forms with one click, one post command?
 What would statement look like?


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

2001-02-16 Thread JJeffman

No it hasn't. The field order in the form doesn't matter, but the order you
use their values in the query yes !

I don't know what kind of operation you're making on the database
 updating, inserting, etc. ).

If you are inserting you must not give any member_id, as long as it is
generated by the database server. As you won't attribute any value to
member_id you must tell which fields you are inserting : "insert into table
(last_name) values('$lastName')" this way you'll get no errors, at least if
last_name is not a unique key .

If you is updating data you can't modify the member_id which is the table
primary key.

HTH.

Jayme.

-Mensagem Original-
De: Marc Bragg [EMAIL PROTECTED]
Para: [EMAIL PROTECTED]
Enviada em: sexta-feira, 16 de fevereiro de 2001 17:55
Assunto: [PHP-DB] primary field


 Does the first field in a form have special significance?
 Have two fields in table:

 last_name
 member_id

 member_id is key and autoincrement.

 mysql won't accept two last names as same when last_name is first field.

 when member_id is made first field, then can input same last name into
 last_name field.

 why is that?


 --
 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 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] Can't connect to local MySQL server error

2001-02-16 Thread Chris Weiss

Help!
I'm experimenting with several of the PHP based WebDatabase front ends and
am getting the following errors from all of them:

"Warning: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (111) in /home/httpd/html/pub/mainfile.php on
line 9
Unable to select database"

I've tried the following:
[root@casadelove pub]# telnet localhost 3306 |strings
Trying 127.0.0.1...
Connected to casadelove.com.
Escape character is '^]'.
3.23.27-beta
$Gu=m/.
Connection closed by foreign host.

The databases being requested do exist and are populated with the default
data and WebMin (Perl-based web administration program) accesses the test
databases just fine.

This is on a RH6.2 system with Apache 1.3.14 and PHP 4.0.4.

This strikes me as something really stupid that I'm missing, anyone have any
bright ideas where to look?


-- 
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] Can't connect to local MySQL server error

2001-02-16 Thread Brunner, Daniel

Hello...

Do a netstat -vatp
To see if mysql is up and listening on your TCP. And it will give your
PID/Program name as well...

I remember reading something about if the mysql.sock didn't work...you
needed to do something with mysql...I'll look into it this weekend.

If nobody can help you out sooner

Well good luck...

Dan



 --
 From: Chris Weiss
 Reply To: [EMAIL PROTECTED]
 Sent: Friday, February 16, 2001 4:37 PM
 To:   [EMAIL PROTECTED]
 Subject:  [PHP-DB] Can't connect to local MySQL server error
 
 Help!
 I'm experimenting with several of the PHP based WebDatabase front ends
 and
 am getting the following errors from all of them:
 
 "Warning: Can't connect to local MySQL server through socket
 '/var/lib/mysql/mysql.sock' (111) in /home/httpd/html/pub/mainfile.php
 on
 line 9
 Unable to select database"
 
 I've tried the following:
 [root@casadelove pub]# telnet localhost 3306 |strings
 Trying 127.0.0.1...
 Connected to casadelove.com.
 Escape character is '^]'.
 3.23.27-beta
 $Gu=m/.
 Connection closed by foreign host.
 
 The databases being requested do exist and are populated with the
 default
 data and WebMin (Perl-based web administration program) accesses the
 test
 databases just fine.
 
 This is on a RH6.2 system with Apache 1.3.14 and PHP 4.0.4.
 
 This strikes me as something really stupid that I'm missing, anyone
 have any
 bright ideas where to look?
 
 
 -- 
 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 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] double posts

2001-02-16 Thread phobo

You can have multiple SUBMIT buttons (one for 'save', one for 'cancel' etc).

if you have a button called 'SAVE', then a varable called save will be set
in the script.

eg, have the html:

INPUT TYPE=SUBMIT NAME=SaveRecord VALUE="Save Your Details"
INPUT TYPE=SUBMIT NAME=EditRecord VALUE="Edit Your Details Again"

on the initial page.

then you can do, on the script which is called:

if ($SaveRecord) {
echo "saving record ";
   
echo "done";

} elseif ($EditRecord) {
echo "Enter your details again...";
echo "PUsername: INPUT TYPE=TEXT NAME=Username VALUE=$Username";

} else {
  echo "you chose to do something else."
}



Siggy

- Original Message -
From: "Marc Bragg" [EMAIL PROTECTED]
To: "phobo" [EMAIL PROTECTED]
Sent: Saturday, February 17, 2001 10:42 AM
Subject: Re: [PHP-DB] double "posts"


 Well, I have a form that user inputs information to, then when post is
 pressed, it submits info to database. I wanted the information first to be
 submitted to a new screen to review the information (presuming most people
 make mistakes on their first try), and then click back to revise if not
 correct, or simply submit then if correct.

 phobo wrote:

  No you cant.
 
  What are you trying to do?
 
  Siggy
 
  - Original Message -
  From: "Marc Bragg" [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Saturday, February 17, 2001 9:53 AM
  Subject: [PHP-DB] double "posts"
 
  
   Is it possible to post to two forms with one click, one post command?
   What would statement look like?
  
  
   --
   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 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 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] double posts

2001-02-16 Thread Andrew Apold

At 12:53 PM 2/16/01 -0800, Marc Bragg wrote:

Is it possible to post to two forms with one click, one post command?
What would statement look like?

I've long wanted to do this but never found something to do it.  Usually
it is for something where I am submitting it to someone else but want to
keep what I submitted.  Thus far I make do by sending it to a page of 
mine, which saves it in my database, then sends it on again via hidden
fields to the end place.  It does require an extra click from the user,
though...

If there is a way to do this I'd be interested but I haven't found one...

=
"To dwell within Samsara, however, is to
 be subject to the works of those mighty
 among dreamers."

 - Mahasamatman, in Zelazny's "Lord of Light"

Andrew Apold


-- 
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] SQL Select statement

2001-02-16 Thread bill

I have a table with three simple columns: id(unique), memberID, and
choice


I want to find out which memberIDs have BOTH choice 2 AND choice 3.

-- SELECT memberID from table where choice=2 AND choice = 3

That won't work (0 results, of course, because no row has two choices,
they're mutually exclusive)

--- SELECT memberID from table where choice=2 OR choice = 3

That doesn't work (shows all memberIDs that chose either 2 or 3).

Can I maybe join the table upon itself on the memberID?

Other suggestions?

thanks,

bill hollett


-- 
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] Using include() to specify mysql_connection??

2001-02-16 Thread Boclair

Is it possible to place the mysql_connect and mysql_select_db functions in an include 
file and to open the connection and use the database in a PHP file using include(); ?

All that happens when I attempt it is that the text of the include file is dumped, the 
connection to the mysql server is not opened and the variables are not created.

Is there some other way of achieving this?  I have the databases transferred to 
another host but transferring the php files requires the mysql_connect and 
mysql_select_db amended for each.

Tim Morris



AW: [PHP-DB] SQL Select statement

2001-02-16 Thread Matthias Kopolt

try something like:

select a.memberID from table a, table b where a.choice=2 and b.choice=3 and
a.memberID = b.memberID;

or

select memberID, count(*) from table where choice=2 or choice=3 group by
memberID having count(*) = 2;

(i don't know what is more effizient, might depend on your indexes and the
amount. the second sql asumes you only have one row per memberID - choice
(noone should choose 3 2times ore more)

mk

-Ursprungliche Nachricht-
Von: bill [mailto:[EMAIL PROTECTED]]
Gesendet: Samstag, 17. Februar 2001 02:45
An: [EMAIL PROTECTED]
Betreff: [PHP-DB] SQL Select statement


I have a table with three simple columns: id(unique), memberID, and
choice


I want to find out which memberIDs have BOTH choice 2 AND choice 3.

-- SELECT memberID from table where choice=2 AND choice = 3

That won't work (0 results, of course, because no row has two choices,
they're mutually exclusive)

--- SELECT memberID from table where choice=2 OR choice = 3

That doesn't work (shows all memberIDs that chose either 2 or 3).

Can I maybe join the table upon itself on the memberID?

Other suggestions?

thanks,

bill hollett


--
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 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] Using include() to specify mysql_connection??

2001-02-16 Thread CC Zona

In article 96klap$c8p$[EMAIL PROTECTED], [EMAIL PROTECTED] 
("Boclair") wrote:

 Is it possible to place the mysql connect and mysql select db functions in 
 an include file and to open the connection and use the database in a PHP 
 file using include(); ?
 
 All that happens when I attempt it is that the text of the include file is 
 dumped, the connection to the mysql server is not opened and the variables 
 are not created.

To be parsed as PHP code, the contents of the included file also need to be 
in PHP mode ?php ... ?.

-- 
CC

-- 
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] Security on Windows2000/Nt

2001-02-16 Thread Fusion

Hello..

I am using windows2000 and when I run php it enables anyone on my network to allow php 
coding to make directorys in my computer.. How can I disable this feature so they can 
only make directorys/files in their own directory?

Thanks
Michael(Fusion)



Re: [PHP-DB] Using include() to specify mysql_connection??

2001-02-16 Thread boclair


- Original Message -
From: CC Zona [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, February 17, 2001 12:30 PM
Subject: Re: [PHP-DB] Using include() to specify mysql_connection??



 To be parsed as PHP code, the contents of the included file also
need to be
 in PHP mode ?php ... ?.

Thanks to you and Ron as well.  That was the problem.

Tim Morris


-- 
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] shopping cart classes

2001-02-16 Thread Randall Perry

I've checked out the shopping cart packages available for PHP and am not
thrilled by any of them. Was wondering if there are a set of classes
available that could be used to support a shopping cart. I'm interested in
the 'back end' -- working with the actual data, rather than the front end --
the user interface. Want to build it with php + mySQL or PostgreSQL.

I want complete freedom to build the interface but don't want to reinvent
the wheel for credit card validation, online credit card processing,
shipping calculation, etc.


I've built a simple shopping cart for a site currently under construction.
This uses a combination of javascript and php, and doesn't use database
(less than 1 dozen items).

You can see an example (excuse the mess) by going to:

http://www.bhagavati.com/trial/mainframe.htm

and clicking the 'order' link in the navbar frame at the top. HINT: close
movie window as soon as it opens.



Randy Perry
sysTame

Mac Consulting/Sales


-- 
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] Text field types and efficiency

2001-02-16 Thread Alan Hale

Question from a beginner: I want to associate a fairly small amount of
text (about 2500 chars) with records in a MySQL table, and display that
as html. But is it more efficient to include the text in the database
(in the appropriate text field type) and generate the html on the fly,
or to just put a link in the data base field to a pre-composed html
page?

Hope the question is clear. Many thanks

Alan Hale


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