This topic is locked
[SOLVED]

 Log in from home page

1/24/2011 12:50:28 PM
PHPRunner General questions
T
text author

Hi Guys
It's pretty common these days to have a small log in box on the home page of a site to log in. Is there an easy way to pass the log in details from this type of box to a phprunner created project?
Thanks
Richard

Sergey Kornilov admin 1/24/2011

Richard,
sure, you can copy and paste HTML code from the login page to any other page. Open the login page in web browser, right click somewhere on the page, choose 'View source' and copy some code. Remove what you don't need i.e. 'remember password' check box or link to registration page.
Here is the sample:

<script type="text/javascript" src="include/jquery.js"></script><script type="text/javascript" src="include/jsfunctions.js"></script><script type="text/javascript" src="include/runnerJS/RunnerBase.js"></script><form method=post action="login.php" id=form1 name=form1>

<input type=hidden name=btnSubmit value="Login">
<table align=center id="center_block" border=0><tr><td id="contents_block">
<b class="xtop"><b class="xb1b"></b><b class="xb2b"></b><b class="xb3b"></b><b class="xb4b"></b></b>
<div id="header_block" class="upeditmenu">

<font size=+1>Login</font>

</div>
<div class="main_table_border2 loginshade" id="main_block">
<TABLE CELLPADDING=0 CELLSPACING=0 align=center border=0 class="loginshade" id="fields_block">
<tr id="username_block">

<td align=right width="50%" class=loginshade>

<div align="left">Username:</div>
</td>

<td width="50%" class=loginshade>

<input name=username value="admin">

</td>

</tr>
<tr id="password_block">

<td align=right width="50%" class=loginshade>

<div align="left">Password:</div>

</td>

<td width="50%" class=loginshade>

<input type=password name=password onkeydown="e=event; if(!e) e = window.event; if (e.keyCode != 13) return; e.cancel = true; e.cancelBubble=true; document.forms[0].submit(); return false;" value="admin">
</td>

</tr>
<tr id="remember_block">

<td align=right width="50%" class=loginshade>

<div align="left">Remember Password:</div>

</td>

<td width="50%" class=loginshade>

<input type=checkbox name="remember_password" value="1" checked>

</td>

</tr>
</table>
<div id="buttons_block" class="downedit">

<div id="submit_block">

<span class=buttonborder><input type=submit value="Submit" class=button ></span>

</div>



<div id="delimiter"></div>

<div>

<a href="register.php" class="tablelinks" >Register</a>

</div>
</div>

</div>


<b class="xbottom"><b class="xb4b"></b><b class="xb3b"></b><b class="xb2b"></b><b class="xb1b"></b></b>
</td>

</tr>

</table>
</form>
T
text author 1/24/2011

thanks so much for the speedy reply Sergey.



Richard,
sure, you can copy and paste HTML code from the login page to any other page. Open the login page in web browser, right click somewhere on the page, choose 'View source' and copy some code. Remove what you don't need i.e. 'remember password' check box or link to registration page.
Here is the sample:

<script type="text/javascript" src="include/jquery.js"></script><script type="text/javascript" src="include/jsfunctions.js"></script><script type="text/javascript" src="include/runnerJS/RunnerBase.js"></script><form method=post action="login.php" id=form1 name=form1>

<input type=hidden name=btnSubmit value="Login">
<table align=center id="center_block" border=0><tr><td id="contents_block">
<b class="xtop"><b class="xb1b"></b><b class="xb2b"></b><b class="xb3b"></b><b class="xb4b"></b></b>
<div id="header_block" class="upeditmenu">

<font size=+1>Login</font>

</div>
<div class="main_table_border2 loginshade" id="main_block">
<TABLE CELLPADDING=0 CELLSPACING=0 align=center border=0 class="loginshade" id="fields_block">
<tr id="username_block">

<td align=right width="50%" class=loginshade>

<div align="left">Username:</div>
</td>

<td width="50%" class=loginshade>

<input name=username value="admin">

</td>

</tr>
<tr id="password_block">

<td align=right width="50%" class=loginshade>

<div align="left">Password:</div>

</td>

<td width="50%" class=loginshade>

<input type=password name=password onkeydown="e=event; if(!e) e = window.event; if (e.keyCode != 13) return; e.cancel = true; e.cancelBubble=true; document.forms[0].submit(); return false;" value="admin">
</td>

</tr>
<tr id="remember_block">

<td align=right width="50%" class=loginshade>

<div align="left">Remember Password:</div>

</td>

<td width="50%" class=loginshade>

<input type=checkbox name="remember_password" value="1" checked>

</td>

</tr>
</table>
<div id="buttons_block" class="downedit">

<div id="submit_block">

<span class=buttonborder><input type=submit value="Submit" class=button ></span>

</div>
<div id="delimiter"></div>

<div>

<a href="register.php" class="tablelinks" >Register</a>

</div>
</div>

</div>
<b class="xbottom"><b class="xb4b"></b><b class="xb3b"></b><b class="xb2b"></b><b class="xb1b"></b></b>
</td>

</tr>

</table>
</form>