FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


[HELP] PHP -> Scripting





rafazamboni
Hi friends, I am with a problem

I need a code in PHP where he possesss some fields:

A main (in this field I place the value that will be created a new table in the MySQL)

And excessively will be placed values that will be placed in the fields of the table previously created in the previous field with values established in the name of the text fields.

I do not know if it gave pra to understand well...

But I wait very that they can help me, necessary of this.
Stubru Freak
Something like this maybe:

Code:
mysql_query("CREATE TABLE `$_POST["Main"]` (field names here) TYPE = MYISAM");
foreach($_POST as $post){
     if($post!=$_POST["Main"]){
            mysql_query("INSERT INTO `" . $_POST["Main"] . "` (`fields here`) VALUES ('" . $post . "')";
     }
}


May contain errors, notify me if you can't find them
Related topics
PHP Toturail
How To : Improve Your PHP Programming
Complete Tutorial LINKS for every language
[PhP] News Posting Tutorial (code, actually ^^')
error in my PHP script
Needing a Bit Og Help {PHP}!
need some help - php switch code
Some php probs..need some help plzz!
PHP Help please
PHP help: Categories > Archives
[HELP] PHP (and some MyBB) Administration
Session directory permissions issue
Help with php email
<?php ?> Tags
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.