PHP Classes

New html

Recommend this page to a friend!

      Html 2 Array  >  All threads  >  New html  >  (Un) Subscribe thread alerts  
Subject:New html
Summary:problems with /> ending items
Messages:1
Author:Vampie
Date:2009-02-20 12:33:37
 

 


  1. New html   Reply   Report abuse  
Picture of Vampie Vampie - 2009-02-20 12:33:37
Hi there,

I think the regex has problems with fields that end with a />
like <input type="text" name="test" />

Here's the example:

<form method="post" action="/login.php">

<table class="tablebg" width="100%" cellspacing="1">
<tr>
<td class="row1" align="center"><span class="genmed">Username:</span> <input class="post" type="text" name="username" size="10" />&nbsp; <span class="genmed">Password:</span> <input class="post" type="password" name="password" size="10" />&nbsp; <span class="gensmall">Log me on automatically each visit</span> <input type="checkbox" class="radio" name="autologin" />&nbsp; <input type="submit" class="btnmain" name="login" value="Login" /></td>
</tr>
</table>
</form>

Gives me the following result:

Array
(
[0] => Array
(
[form_data] => Array
(
[name] =>
[action] => /login.php
[method] => post
[enctype] =>
)

[form_elemets] => Array
(
[username] => Array
(
[type] => checkbox
[value] =>
)

)

[buttons] => Array
(
[0] => Array
(
[type] => submit
[name] => username
[value] => Login
)

)

)

)

username is not a checkbox, password is gone.
and the name of the submit is not username.

 
For more information send a message to info at phpclasses dot org.