PHP Classes

How to set Login values ?

Recommend this page to a friend!

      Browser  >  All threads  >  How to set Login values ?  >  (Un) Subscribe thread alerts  
Subject:How to set Login values ?
Summary:What is wrong ?
Messages:2
Author:John Dow
Date:2016-03-31 17:14:35
 

 


  1. How to set Login values ?   Reply   Report abuse  
Picture of John Dow John Dow - 2016-03-31 17:14:35
This is the html form:
========================

<form novalidate="" class="pure-form pure-form-stacked" action="/login/" id="login-form" name="login" method="post">
<input type="hidden" value="1" name="login">

<fieldset>
<label for="emailOrPhone">E-mail lub Telefon</label>
<input type="email" style="width:17em" class="text" value="" name="emailOrPhone" id="login-emailOrPhone">
<label for="password">Haslo</label>
<input type="password" style="width:17em" class="text" value="" name="password" id="login-password">
<button class="pure-button pure-button-primary" type="submit">Zaloguj si&#281;</button>

</fieldset>
</form>


My PHP:
====================

<?php

require 'browser.class.php';

$b = new Browser ( 'PHP Browser' );
$b -> navigate ( 'http://adresowo.pl/' ) -> click ( ".//a[@href='/login/']" );

$b -> submitForm (
$b -> getForm ( "//form[@id='login-form']" )
-> setAttributeByName ( 'emailOrPhone', '123456789' )
-> setAttributeByName ( 'password', 'MyPassword' )
);
echo $b -> getSource(); // Output the source

?>

My Q:
=================

When I output the source, why I see no value in Login fileds ?
How to submit this form here - button has no name ?

  2. Re: How to set Login values ?   Reply   Report abuse  
Picture of John Dow John Dow - 2016-03-31 20:17:21 - In reply to message 1 from John Dow
Sorry, I've noticed answer in other Post. But still, why there is 'fulltext' parameter for ?