[PHP-DB] Im new to this but...

2008-09-02 Thread Chris Hale
I have: Apache 2.0.59 MySQL 5.0.41 PHP 4.4.7 5.2.5 and this is my program: ?php session_start(); include(includes/functions_main.php); include(Vars.php); ? ?php get_header(); ? ?php get_sidebar(); ? ?php $page = '$_GET[page]'; $cxn = mysqli_connect($host, $user,$passwd, $database) or

[PHP-DB] Blank Page?

2008-09-03 Thread Chris Hale
I have a functions page: function connect() { include(includes/Vars.php); mysql_connect($host, $user, $passwd) or die(Couldn't connect to database); mysql_select_db($db) or die(Couldn't select database); } function pagecontent() switch($_GET[page]) { connect();

[PHP-DB] If( Query)

2008-09-06 Thread Chris Hale
I have the following function: function add_item($item_name,$item_desc,$item_price,$item_man_id,$item_cat_id,$item_pix) { connect(); if($item_pix == ) { $sql = INSERT INTO items (item_name,item_desc,item_price,item_man_id,item_cat_id) VALUES

[PHP-DB] mysql auto_increment

2008-09-07 Thread Chris Hale
I am writing a catologe application and i have a problem when it comes to the edit product part. I have a table with the catogories and a table with manufacturers. Each table has a id column and a name column. The id column is set up in the MySQL to auto_increment, which works fine normally,

Re: [PHP-DB] If( Query)

2008-09-07 Thread Chris Hale
Niel Archer wrote: Hi I have the following function: function add_item($item_name,$item_desc,$item_price,$item_man_id,$item_cat_id,$item_pix) { connect(); if($item_pix == ) { $sql = INSERT INTO items (item_name,item_desc,item_price,item_man_id,item_cat_id) VALUES

Re: [PHP-DB] If( Query)

2008-09-08 Thread Chris Hale
Niel Archer wrote: Hi I have the following function: function add_item($item_name,$item_desc,$item_price,$item_man_id,$item_cat_id,$item_pix) { connect(); if($item_pix == ) { $sql = INSERT INTO items (item_name,item_desc,item_price,item_man_id,item_cat_id) VALUES