Jump to content

Recommended Posts

Basically, I created an application using HTML & Javascript for front end, MYSQL for back end and PHP to link these both. I have one console acting as a server and client. But I need to maintain multiple clients. So, I need the required code and methodology to do the same.

I created an application for VOTING SYSTEM. Now, I need the voters to vote from multiple computer/consoles. How do I achieve this?

 

Right now.. Since I have NOT implemented multiple clients system.. The server and the client is on ONE system. But, I want a suitable JS code such that I can support multiple clients.

 

Um, is my query still ambiguous? I hope, not!

This is how my login module at the server side looks like--

 

<?php

//initilaize the mysql user name and password

//Database Config

$dbHost='localhost'; //Database server

$dbName='db';  // Name of the database

$dbUser='root'; // Database username

$dbPass=''; // Database password

 

 

$source = mysql_connect($dbHost, $dbUser, $dbPass);

 

if (!$source) {

die('Not connected : ' . mysql_error());

}

 

$db_selected = mysql_select_db('db', $source);

 

if (!$db_selected) {

die ('Can\'t use $DB : ' . mysql_error());

}

 

 

//get the information from login form

 

$username = addslashes($_POST['adminname']);

 

$pwd = addslashes($_POST['adminpwd']);

 

 

//execute the query

 

$sql ="SELECT * FROM administrator WHERE vid = '$username' AND pwd = '$pwd'";

 

$result = mysql_query($sql);

 

$flag=0;

if ($row = mysql_fetch_assoc($result)) {

$flag =1;

}

if($flag == 1){

header("Location:http://localhost/project/Loginmodule/adminmenu.html");

}else{

echo "You Are an Unauthorised User";

}

?>

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.