DJDOG Posted October 18, 2008 Share Posted October 18, 2008 Hello, I've tried some many attepmts to try to get this script too work and beyond me it doesn't work, so I figure I'll ask for help. Multi-Login: What I would like; <form name="loginSelect" method="POST" action="some odd form code"> some odd form code needs to connect to the form some how. <input type="text" name="username" value="phplogin"> The input field name is username, but some other form logins have different varibles like: user<br> <input type="password" name="user_password" value="phplogin"> The input field name is user_password, but some other form logins have different varibles like: password or pass<br> <select name="panel" onchange="selectPanel()"> <option selected>-- Select Login -- <option value="panel1.url.com">panel1.url.com</option> <option value="panel2.url.com">panel2.url.com</option> <option value="panel3.url.com">panel3.url.com</option> <option value="billing.com/login.php">New: Client Area</option> <option value="billing2.com/login.php">Old: Client Area</option> <option value="domain:2082">cPanel</option> <option value="domain:2086">WHM</option> <option value="domain:2095">Webmail</option> </select> <br> Login: <?php if ($_GET['panel']=='') {echo ' --Select Login--';}?> <?php if ($_GET['panel']=='panel1'){echo ' panel1.url.com';}?> <?php if ($_GET['panel']=='panel2'){echo ' panel2.url.com';}?> <?php if ($_GET['panel']=='panel3'){echo ' panel3.url.com';}?> <br> <input type="submit" name="login_submit" value="login"> </form> Working...but not all the fields I want and focous on 1 particular login system. <?php if (!isset($_GET['panel'])) { $_GET['panel'] = 'panel1'; } ?> <script> function selectPanel() { var panel_index = document.forms['loginSelect'].panel; location.href='./login4.php?panel='+ panel_index.options[panel_index.selectedIndex].value } </script> <form name="loginSelect" method="POST" action="http://<?=$_GET['panel']?>.URL.COM/index.php?page=login"> <input type="text" name="username" value="phplogin"><br> <input type="password" name="user_password" value="phplogin"><br> <select name="panel" onchange="selectPanel()"> <option selected>-- Select Login -- <option value="panel1"<?php if ($_GET['panel']=='panel1'){echo ' selected';}?>>panel1.url.com</option> <option value="panel2"<?php if ($_GET['panel']=='panel2'){echo ' selected';}?>>panel2.url.com</option> <option value="panel3"<?php if ($_GET['panel']=='panel3'){echo ' selected';}?>>panel3.url.com</option> </select> <br> Login: <?php if ($_GET['panel']=='') {echo ' --Select Login--';}?> <?php if ($_GET['panel']=='panel1'){echo ' panel1.url.com';}?> <?php if ($_GET['panel']=='panel2'){echo ' panel2.url.com';}?> <?php if ($_GET['panel']=='panel3'){echo ' panel3.url.com';}?> <br> <input type="submit" name="login_submit" value="login"> </form> Need all these fields; <select name="panel" onchange="selectPanel()"> <option selected>-- Select Login -- <option value="panel1.url.com">panel1.url.com</option> <option value="panel2.url.com">panel2.url.com</option> <option value="panel3.url.com">panel3.url.com</option> <option value="billing.com/login.php">New: Client Area</option> <option value="billing2.com/login.php">Old: Client Area</option> <option value="domain:2082">cPanel</option> <option value="domain:2086">WHM</option> <option value="domain:2095">Webmail</option> </select> Think anyone can help me? - I thought maybe an Ajax solution but maybe someone can point me in the right direction. Link to comment https://forums.phpfreaks.com/topic/128993-mult-login-help/ Share on other sites More sharing options...
DJDOG Posted October 24, 2008 Author Share Posted October 24, 2008 Any help? Link to comment https://forums.phpfreaks.com/topic/128993-mult-login-help/#findComment-673541 Share on other sites More sharing options...
GKWelding Posted October 24, 2008 Share Posted October 24, 2008 You need to explain a little better exactly what you're trying to do here? Are you creating a page where you can go, select which website you want to login to, put in a username and password you already know, click login and be logged in to the selected site? Link to comment https://forums.phpfreaks.com/topic/128993-mult-login-help/#findComment-673545 Share on other sites More sharing options...
GKWelding Posted October 24, 2008 Share Posted October 24, 2008 this would probably be the best solution if you're trying to do what I described above... <?php if(isset(submit)){ $website=$_POST["panel"]; $username=$_POST["username"]; $password=$_POST["password"]; if($website == "panel1"){ cURL CODE FOR PANEL1 (lookup cURL on Google); echo"cURL for panel1"; }elseif($website == "panel2"){ cURL CODE FOR PANEL2 (lookup cURL on Google); echo"cURL for panel2"; }elseif($website == "panel3"){ cURL CODE FOR PANEL3 (lookup cURL on Google); echo"cURL for panel3"; }else{ echo "<form method=\"POST\" action=$PHP_Self>"; echo "<select name=\"panel\">"; echo "<option selected>-- Select Login --</option>"; echo "<option value=\"panel1\">panel1.url.com</option>"; echo "<option value=\"panel2\">panel2.url.com</option>"; echo "<option value=\"panel3\">panel3.url.com</option>"; echo "</select>"; echo "<input type=\"text\" name=\"username\"></input>"; echo "<input type=\"text\" name=\"password\"></input>"; echo "<input type=\"submit\" name=\"submit\" value=\"Submit\"></input>"; echo "</form>"; } ?> Link to comment https://forums.phpfreaks.com/topic/128993-mult-login-help/#findComment-673550 Share on other sites More sharing options...
DJDOG Posted October 24, 2008 Author Share Posted October 24, 2008 I thought about using cURL but wasn't sure what would be my best solution...mainly trying too use JS/Ajax or just PHP... Concept for: Hosting/Shoutcast Company Panels are for Shoutcast Servers (3 Different ones) cPanel/WHM/WebMail Logins Billing Login Once-> Selected: You would input your Username and Password, These could be on different servers or the same. Issue->Each form login has it's own varible defined in name="" User Inputs; Shoutcast->username Shoutcast->user_password cPanel->user cPanel->pass Billing->username Billing->password These also have different action links...panels have GET and rest have post. Link to comment https://forums.phpfreaks.com/topic/128993-mult-login-help/#findComment-673589 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.