Needed some help with php and mysql... - Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Webmaster Tech > Programming > PHP Development

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 12-27-2010, 02:27 PM   #1 (permalink)
Junior Member
 
Join Date: Dec 2010
Posts: 6
Default Needed some help with php and mysql...

Hey guys,

First all let me start by saying this is a great community here, read some threads trying to learn something. But now I am stuck and had a question, hopefully you will be able to help me.

So I am trying to create a system which does the following,

A php page that will ask a user to enter a table name and add bunch of categories for that table(all entries will be text or numbers in the table) and add it to a db. Once a user does that a php script to read back the created table and the categories.

Now once he has that table setup, what he can do is see the list of the tables that he has in that db, view content of each table, add a entry to those tables via form... and possibly in future sort the content of the viewing table.

How do I go about starting with this? Anyhelp will be much appreciated

I am a novice when it comes to php and mysql. So please bear with me and my stupid questions and if you could just point me in the right direction it would be great.
mdp88 is offline   Reply With Quote
Sponsored Links
Old 01-12-2011, 05:17 AM   #2 (permalink)
Junior Member
 
Join Date: Jan 2011
Posts: 18
Default Re: Needed some help with php and mysql...

You should start by making MySQL tables:

tables
with columns:
id,
table_name

and table
categories
columns:
id,
table_id (from table tables (id)),
category_name

and table "content"
with columns
id,
category_id (from category table),
content
after_me is offline   Reply With Quote
Old 02-24-2011, 01:44 PM   #3 (permalink)
Junior Member
 
Join Date: Feb 2011
Posts: 16
Default Re: Needed some help with php and mysql...

go to your mySQL and create tables first..and column names
aokiji1 is offline   Reply With Quote
Old 02-24-2011, 09:45 PM   #4 (permalink)
Regular User
 
hilhilginger's Avatar
 
Join Date: Dec 2010
Posts: 272
Default Re: Needed some help with php and mysql...

Use form to get the details from users and add this script to creat new tables.Hope you know the code to connect to your DB.
PHP Code:
<?php

//  Connect to your database
//  ----------------------------------
// $conn = dbconnect();

$sql 'DROP TABLE IF EXISTS `zones`';
mysql_query$sql$conn );

$sql 'CREATE TABLE `zones` (
        `zid` TINYINT( 3 ) UNSIGNED NOT NULL AUTO_INCREMENT,
        `zdesc` VARCHAR( 150 ) NOT NULL,
        `zwidth` SMALLINT( 3 ) DEFAULT 0 NOT NULL,
        `zheight` SMALLINT( 3 ) DEFAULT 0 NOT NULL,
        `zmax` MEDIUMINT(7) unsigned NOT NULL default 12288,
        PRIMARY KEY ( `zid` )
       )'
;
echo 
'Creating table: \'zones\'....';
mysql_query$sql$conn );

$sql 'DROP TABLE IF EXISTS `bcategory`';
mysql_query$sql$conn );

$sql 'CREATE TABLE `bcategory` (
         `bid` int(10) NOT NULL default 0,
         `cid` int(10) NOT NULL default 0,
         PRIMARY KEY ( `bid`, `cid` )
       )'
;
echo 
'Creating table: \'bcategory\'....';
mysql_query$sql$conn );

?>
__________________
Unique Articles for SEO www.softnwords.com
hilhilginger is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 08:05 PM.


Powered by vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
Webmaster Forums
Web Hosting | Chicago Web Hosting | Web Hosting