Page 1 of 1

Error?

Posted: Tue May 11, 2004 11:09 am
by teckyan888

Code: Select all

<?php

create table Cart 
( 
CartId int(20) not null AUTO_INCREMENT, 
CookieId varchar(50), 
StyleID int(20) not null,
UsersID int(50) not null,
qty int, 
primary key(CartID), 
unique id(CartID) 
); 

create table Users(
UserID int(50) not null AUTO_INCREMENT,
UserName Varchar(100) not null,
Password Varchar(100) not null,
Location Varchar(100) not null,
Email Varchar(200) not null,
PhoneNumber Int(10) not null,
CreditCardNumber Int(20) not null,
CreditCardVerify Int(10) not null,
PRIMARY KEY (UserID),
UNIQUE(UserName)
)type=innodb;

?>
This is my 2 tables...When i create the php and set $REQUEST['UserID'], But how come when i check my cart table, my UserID is become 0...What problem is it?

Posted: Tue May 11, 2004 11:11 am
by markl999
The problem will be in the PHP code that does the insert, we'll need to see it. And i'm presuming $REQUEST was a typo, it should be $_REQUEST ?

Posted: Tue May 11, 2004 11:11 am
by lostboy
post code