[PHP-DB] Customer id

2003-02-28 Thread Dan Kelly
How do I write a script that will automatically create an ID in the 
database. Here is a sample

-- orderform.shtml 

form action=order.php method=post
First Nameinput type=text name=fnamebr
Last Nameinput type=text name=lname

input type=submit name=submit value=enter
input type=reset name=Clear
--Order.php 
--
?PHP
include('dbconnect.php');

if ($submit == enter)
{
   $query = insert into orders
 (fname,lname) values
 ('$fname','$lname') ;
mysql_query($query) or
 die (mysql_error());
}
?
Any Ideas? Thanks, Dan


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


[PHP-DB] worked

2003-02-28 Thread Dan Kelly
Hey that worked guys.. Thanks..Dan

You need to create a column in the target table similar to:
custID SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT
When you run your INSERT query, you pass NULL to that column and the ID will
be created/auto incremented for you.
Is that what you mean?
Rich

-Original Message-
From: Dan Kelly [mailto:[EMAIL PROTECTED]
Sent: Friday, February 28, 2003 7:52 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Customer id
How do I write a script that will automatically create an ID in the 
database. Here is a sample

-- orderform.shtml 

form action=order.php method=post
First Nameinput type=text name=fnamebr
Last Nameinput type=text name=lname

input type=submit name=submit value=enter
input type=reset name=Clear
--Order.php 
--
?PHP
include('dbconnect.php');

if ($submit == enter)
{
$query = insert into orders
  (fname,lname) values
  ('$fname','$lname') ;
mysql_query($query) or
  die (mysql_error());
}
?
Any Ideas? Thanks, Dan


 



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


[PHP-DB] gd Library config problem.......

2002-08-21 Thread Dan Kelly

Anyone know how to configure gd library (php4)? I uploaded PHP_INFO and 
this is what I got

~~~
'./configure' '--with-apxs=apxs' 
'--prefix=/home/builder/psa-patch/psa/apache/../release/usr/local/psa/apache' 
'--with-system-regex' 
'--with-config-file-path=/usr/local/psa/apache/conf' '--disable-debug' 
'--disable-pear' '--enable-sockets' '--enable-track-vars' '--without-gd' 
'--with-mysql=/home/builder/psa-patch/psa/apache/../release/dist/usr/local/psa/mysql' 
'--with-iodbc=/home/builder/psa-patch/psa/apache/../release/lib/libiodbc' 
'--with-imap=/home/builder/psa-patch/psa/apache/../release/lib/imap-cclient'

Notice that it says Without GD I want it to say With gd .. where di 
I go to fix this problem?
Thanks, Dan


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