Mr_J Posted November 13, 2008 Share Posted November 13, 2008 Hi All I`m a newby so please bare with me. I have a "basic login" that requires username & password. It creates a table (config.txt) if there is none. When I use fopen, I get access denied! So, I signed up @ DynDns for a dynamic address. Shared a folder for FTP() access(Vista Home Premium). How can I create the username (Sign up/table) on my local PC which stores the usr & password. Then I need to give 2 groups (Providers / Public) security permissions, viewing i.e. different links, adds, etc? My first attempt use: Install.php (if table does not exist) Access denied... Login.html -> form name="form1" method="post" action="SignIn.php signin.php -> include connection.php connection.php -> fopen("config.txt","r"); ->mysql_connect ("localhost", "root", "") or die ("My SQL -- - Error"); index1.php -> <? $Username=$_POST['Username']; $Password=$_POST['Password']; $Email=$_POST['Email']; $Aim=$_POST['Aim']; $Address=$_POST['Address']; include("connection.php"); mysql_query("INSERT INTO users (uname,pass,email,address,aim) VALUES ('$Username','$Password','$Email','$Address','$Aim')"); echo "Username is created!"; mysql_close($connection); ?> Any advice? Regards Jaco Link to comment https://forums.phpfreaks.com/topic/132537-solved-local-database-connect/ Share on other sites More sharing options...
nitation Posted November 13, 2008 Share Posted November 13, 2008 I have no idea on what you trying to achieve . Sorry ~ Link to comment https://forums.phpfreaks.com/topic/132537-solved-local-database-connect/#findComment-689188 Share on other sites More sharing options...
Mr_J Posted November 13, 2008 Author Share Posted November 13, 2008 I have no idea on what you trying to achieve . Sorry ~ I want to create a basic Register, Login username and password on my local computer using the dyndns address for access. I have 2 target groups, 1: Profesional Medical Doctors and 2: Patients. Each must have access to their own, shall I say, website depending on the usr & pw provided. Link to comment https://forums.phpfreaks.com/topic/132537-solved-local-database-connect/#findComment-689193 Share on other sites More sharing options...
revraz Posted November 13, 2008 Share Posted November 13, 2008 Why are you using a text file and a database? Just use a database. Link to comment https://forums.phpfreaks.com/topic/132537-solved-local-database-connect/#findComment-689289 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.