Jump to content

php strings


Nandini

Recommended Posts

Hi all

 

I want to validate one field named as "register string"

 

I want validate this string in the formate of "username:password@host" OR "username:password@host:port/username" OR "username:password@host:port"

here username, password and host values are fetching from database. But for port there is no text field and no database field. But we can allow port number. Can any one one tell me how can i validate this field.

 

here is my validate condition:

if( (( (($_POST['register'])<>($p_username.":".$p_secret."@".$p_host)) &&  (($_POST['register'])<>($p_username.":".$p_secret."@".$p_host.":".some port."/".$p_username)) ) ) {

$errmsg = "<ul class='square'><li>Invalid register string.</li></ul>";

}

 

Can any one help me

 

Link to comment
https://forums.phpfreaks.com/topic/121659-php-strings/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.