Error?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
teckyan888
Forum Commoner
Posts: 40
Joined: Tue May 11, 2004 10:46 am

Error?

Post 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?
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post 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 ?
lostboy
Forum Contributor
Posts: 329
Joined: Mon Dec 30, 2002 8:12 pm
Location: toronto,canada

Post by lostboy »

post code
Post Reply