Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Need Help With Designing A Website With Database, We need some help!! :)
MarkBla
post Dec 15 2005, 04:46 PM
Post #1


Member [ Level 1 ]
Group Icon

Group: Members
Posts: 45
Joined: 12-December 05
From: IJsselstein Netherlands
Member No.: 10,088



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

This post has been edited by miCRoSCoPiC^eaRthLinG: Dec 30 2005, 07:10 PM
Go to the top of the page
 
+Quote Post
abhiram
post Dec 15 2005, 04:58 PM
Post #2


Hedonist at large
Group Icon

Group: Members
Posts: 610
Joined: 30-July 05
From: another realm
Member No.: 7,524



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.
Go to the top of the page
 
+Quote Post
Houdini
post Dec 15 2005, 11:15 PM
Post #3


Super Member
Group Icon

Group: Members
Posts: 572
Joined: 25-April 05
From: Nashville Tennessee
Member No.: 4,340



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 astahost 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.
Go to the top of the page
 
+Quote Post
Bio
post Dec 30 2005, 07:01 PM
Post #4


Newbie [ Level 2 ]
Group Icon

Group: Members
Posts: 28
Joined: 30-December 05
Member No.: 10,368



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 smile.gif
Go to the top of the page
 
+Quote Post
kook
post Dec 31 2005, 04:07 AM
Post #5


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 5
Joined: 30-December 05
From: Bangkok, Thailand
Member No.: 10,365



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
CODE
session_start();
          $_SESSION[sess_userid]=session_id();
          $_SESSION[sess_username]=$username;
          header("Location:where");

here is code
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{
}
?>

wink.gif
to use
insert the following code into page that for staff
CODE

<?php
include "name of check session page that you saved";
?>
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. phpBB Database Transfer(10)
  2. Embedded Database(7)
  3. Need Advice On Creating Online Music Database(6)
  4. Mirror My MySQL Database To Another Mysql Server(4)
  5. The Best Database(48)
  6. MySQL Output Database Question(18)
  7. Is It A Good Practice To Store Image Or Other Binary Files Directly In A Mysql Database(4)
  8. Permission Problem With Mysql Database Creation(8)
  9. Need Info On Database Programming Courses(2)
  10. Database Programming In Vba 6.0(1)
  11. How Many Concurrent Users For Oracle Database?(1)
  12. Database Size?(10)
  13. My Sql Database Help?(3)
  14. Learning Php/sql Basics(17)
  15. Need Help In Database Auto_increment(9)
  1. Connecting To A Remote Database(9)
  2. Database(1)
  3. Integrate Access Database Onto Intranet Site(5)
  4. Accessing Ms Access Database From A Centralized Location?(5)
  5. Mysql Database Management(1)
  6. Mysql Database Entry By Excel Sheets(2)
  7. Space Needed For Database(10)
  8. Database Access On Remote Server W/jsp(0)
  9. Any Website Provide Free Host Mysql Host?(4)
  10. Some Useful Database Links.(7)
  11. Best Database(13)
  12. How To Understand A Database Schema(4)
  13. Free Or Opensource Database/schema Browser?(6)


 



- Lo-Fi Version Time is now: 5th December 2008 - 01:29 AM