utthu Posted July 25, 2011 Share Posted July 25, 2011 I need the javascript for client side. My server side is in PHP and I am using a MYSQL database. Please help! Quote Link to comment https://forums.phpfreaks.com/topic/242754-java-script-for-client-side/ Share on other sites More sharing options...
AyKay47 Posted July 25, 2011 Share Posted July 25, 2011 huh? what exactly is your issue? Quote Link to comment https://forums.phpfreaks.com/topic/242754-java-script-for-client-side/#findComment-1246830 Share on other sites More sharing options...
utthu Posted July 25, 2011 Author Share Posted July 25, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/242754-java-script-for-client-side/#findComment-1246836 Share on other sites More sharing options...
ZulfadlyAshBurn Posted July 25, 2011 Share Posted July 25, 2011 what are you trying to achieve? sorry i dont get you. Quote Link to comment https://forums.phpfreaks.com/topic/242754-java-script-for-client-side/#findComment-1246841 Share on other sites More sharing options...
utthu Posted July 25, 2011 Author Share Posted July 25, 2011 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! Quote Link to comment https://forums.phpfreaks.com/topic/242754-java-script-for-client-side/#findComment-1246843 Share on other sites More sharing options...
utthu Posted July 25, 2011 Author Share Posted July 25, 2011 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"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/242754-java-script-for-client-side/#findComment-1246846 Share on other sites More sharing options...
ZulfadlyAshBurn Posted July 25, 2011 Share Posted July 25, 2011 please use code tags like [ code ] without the spaces in the brackets. what you mean by multiple computer/consoles? is your server locally hosted? apache on windows or linux? do you know the server ip? Quote Link to comment https://forums.phpfreaks.com/topic/242754-java-script-for-client-side/#findComment-1246860 Share on other sites More sharing options...
utthu Posted July 25, 2011 Author Share Posted July 25, 2011 I am using a WAMP server on windows. Quote Link to comment https://forums.phpfreaks.com/topic/242754-java-script-for-client-side/#findComment-1246862 Share on other sites More sharing options...
utthu Posted July 25, 2011 Author Share Posted July 25, 2011 Basically, I want there to my multiple clients but just one server. But I don't know how to create multiple clients. Quote Link to comment https://forums.phpfreaks.com/topic/242754-java-script-for-client-side/#findComment-1246863 Share on other sites More sharing options...
ZulfadlyAshBurn Posted July 25, 2011 Share Posted July 25, 2011 open command prompt, type ipconfig. you would get your ip address, try on other com and it will work. Quote Link to comment https://forums.phpfreaks.com/topic/242754-java-script-for-client-side/#findComment-1246864 Share on other sites More sharing options...
utthu Posted July 25, 2011 Author Share Posted July 25, 2011 But how do I connect the client and the server? I'm sorry but I have absolutely no clue as to how to go about the whole 'client-server' thing. Quote Link to comment https://forums.phpfreaks.com/topic/242754-java-script-for-client-side/#findComment-1246865 Share on other sites More sharing options...
ZulfadlyAshBurn Posted July 25, 2011 Share Posted July 25, 2011 can you post, what is your ip address? so that i can get a clearer understanding Quote Link to comment https://forums.phpfreaks.com/topic/242754-java-script-for-client-side/#findComment-1246867 Share on other sites More sharing options...
AyKay47 Posted July 25, 2011 Share Posted July 25, 2011 don't post your ip, he doesn't need that to tell you how to do this Quote Link to comment https://forums.phpfreaks.com/topic/242754-java-script-for-client-side/#findComment-1246873 Share on other sites More sharing options...
ZulfadlyAshBurn Posted July 25, 2011 Share Posted July 25, 2011 @AyKay47 i do need that to tell him, which is which but nonetheless, i will upload the image i just created . Quote Link to comment https://forums.phpfreaks.com/topic/242754-java-script-for-client-side/#findComment-1246875 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.