Jump to content

[HELP] Tournament system script


DoubleT

Recommended Posts

Ok ill start...

im some kind a noob in PHP & SQL and i need some good programmers help...

 

My idea is to make a tournament system in my website.

 

so for first i need a page where users can add their team:

i edited the editprofile page:

 

place from editprofile where you can add team

<?
$clansql="SELECT * FROM `clan`";
  	$clanres=mysql_query($clansql);
  	$clan=mysql_fetch_object($clanres);
?>
   <p>Name:<br /><input type="text" name="clan[name]" value="<?=$clan->name;?>" /></p>
   <p>Tag:<br /><input type="text" name="clan[tag]" value="<?=$clan->tag;?>" /></p>
   <p>Country:<br /><select name="clan[valsts]"><option value="1"<?=$clan->valsts==1?' selected="selected"':'';?>>Latvia</option><option value="2"<?=$clan->valsts==2?' selected="selected"':'';?>>Estonia</option><option value="3"<?=$clan->valsts==3?' selected="selected"':'';?>>Lithuania</option></select></p>
   <input type="hidden" name="clan[kapteinis]" value="<?=$clan->kapteinis;?>">
   <input type="hidden" name="clan[kapteinis_id]" value="<?=$clan->id;?>">
   <input type="hidden" name="clan[datums]" value="<?=$clan->datums;?>">

 

and SQL part:

CREATE TABLE IF NOT EXISTS `clan` (
  `id` tinyint(1) NOT NULL auto_increment,
  `name` varchar(50) default NULL,
  `tag` varchar(4) default NULL,
  `valsts` varchar(30) default NULL,
  `kapteinis` varchar(50) default NULL,
  `kapteinis_id` int(11) NOT NULL,
  `datums` datetime default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

 

now i need further help from you guys ;]]

 

I need to make a page tournaments.php & admin.php

 

Tournaments.php should look like this - http://cgc.lv/?q=node/2

& admin.php just simple white page where is possible to add/edit/delete tournaments

 

I thinked 3 nights but im not so good at PHP :/

 

If someone could push me in right way :)

 

Thanks, DoubleT

Link to comment
Share on other sites

I would strongly recommend you going through a few tutorials before asking for help as you are a beginner. Connecting to a database, selecting, inserting and updating records is basic stuff and is covered here:

 

http://devzone.zend.com/node/view/id/627

 

Once you have aquired the skills then you should have no problem in adapting to your own website.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.