Jump to content
xisto Community
Sign in to follow this  
MarkBla

Need Help With Designing A Website With Database We need some help :)

Recommended Posts

Me and my friend are building a website for friends, were they can login with their own username and password.On the site our friends can react on polls, and that kind of stuff. We want to get this in a database, wich only we 2 can see. Can someone tell us how we have to do this?Greetings, Mark&Guido

Edited by miCRoSCoPiC^eaRthLinG (see edit history)

Share this post


Link to post
Share on other sites

Use a CMS (Content Management System) like Mambo or PHPNuke. They'll do everything for you with databases, polls and user ids. There are plenty of CMS's available on the net, but these are the ones I know about.

Share this post


Link to post
Share on other sites

You would definately want to use a CMS like abhiram said, and with a hosting account you could choose either Mambo or PHP-Nuke which I am more partial to since I run four PHP-Nuke sites , two running with Invision board forums and two with phpBB2 forums.

 

You can make them anyway you want (within possibilities of the system) and they are very easy for someone who has never run a site before. Basically all you have to do is create a database populate it then upload the edited config.php file that tells your database about where to find its info and set it up.

 

Or I think if you use one of the ready to go CMSs from Xisto all you do is click the link in the cPanel then set up your Admin information then go to your new site and proceed to set it up the way you like.

Share this post


Link to post
Share on other sites

If you want to code it yourself create a table that will consist of 2 columns: user name and password hash. This you will need for your user's data storing. If there is a guest book on your site create a table with may be 4 columns that are: record id, name of a user who posted it, his e-mail address and a text of a message. Something like this :D

Share this post


Link to post
Share on other sites

make check session for stuff and make table for stuff

 

make new table by use phpMyAdmin

 

make check session for stuff

but you must have start session function in process login page same this

session_start();           $_SESSION[sess_userid]=session_id();           $_SESSION[sess_username]=$username;           header("Location:where");
here is code

<?session_start();$sess_userid=$_SESSION[sess_userid];$sess_username=$_SESSION[sess_username];if ($sess_userid<>session_id() or $sess_username==""){	header("Location:index.php(or where that you need)");	exit();}$host="localhost";$user="username";$pass="password";$dbname="database name";$connect=mysql_connect($host,$user,$pass);if(!$connect){	echo"Can't connect to sql";	exit();}$sql="SELECT * FROM tbname WHERE username(field that is username)='$sess_username' "; $result=mysql_db_query($dbname,$sql);$num=mysql_num_rows($result);mysql_close();if ($num<=0){	header("Location:index.php(or where you need when he or she don't have permission)");	exit();}else{}?>
:D

to use

insert the following code into page that for staff

<?phpinclude "name of check session page that you saved";?>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.