Jump to content

[SOLVED] Local Database connect


Mr_J

Recommended Posts

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

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.

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.